Version Description
Download this release
Release Info
Developer | danieliser |
Plugin | Popup Maker – Popup Forms, Optins & More |
Version | 1.10.0 |
Comparing to | |
See all releases |
Code changes from version 1.9.2 to 1.10.0
- CHANGELOG.md +16 -0
- assets/css/pum-admin-popup-editor-rtl.css +96 -0
- assets/css/pum-admin-popup-editor-rtl.css.map +1 -1
- assets/css/pum-admin-popup-editor-rtl.min.css +1 -1
- assets/css/pum-admin-popup-editor.css +96 -0
- assets/css/pum-admin-popup-editor.css.map +1 -1
- assets/css/pum-admin-popup-editor.min.css +1 -1
- assets/images/admin/display-switcher/center-popup.png +0 -0
- assets/images/admin/display-switcher/left-bottom-notice.png +0 -0
- assets/images/admin/display-switcher/right-bottom-slidein.png +0 -0
- assets/images/admin/display-switcher/top-bar.png +0 -0
- assets/images/plugins/caldera-forms.png +0 -0
- assets/images/plugins/content-control.png +0 -0
- assets/images/plugins/mc4wp.png +0 -0
- assets/images/plugins/quiz-survey-master.png +0 -0
- assets/images/plugins/user-menus.png +0 -0
- assets/images/plugins/wp-forms.png +0 -0
- assets/js/admin-general.js +1 -2
- assets/js/admin-popup-editor.js +128 -1
- assets/js/admin-popup-editor.min.js +1 -1
- assets/js/pum-integration-calderaforms.js +49 -7
- assets/js/pum-integration-calderaforms.min.js +12 -4
- assets/js/pum-integration-ninjaforms.js +48 -6
- assets/js/pum-integration-ninjaforms.min.js +14 -6
- assets/js/site.js +212 -84
- assets/js/site.min.js +1 -1
- assets/sass/admin-batch.scss +0 -261
- assets/sass/admin-deprecated.scss +0 -0
- assets/sass/admin-editor-styles.scss +0 -7
- assets/sass/admin-extensions-page.scss +0 -136
- assets/sass/admin-general.scss +0 -87
- assets/sass/admin-popup-editor.scss +0 -159
- assets/sass/admin-settings-page.scss +0 -96
- assets/sass/admin-shortcode-ui.scss +0 -8
- assets/sass/admin-support-page.scss +0 -33
- assets/sass/admin-theme-editor.scss +0 -148
- assets/sass/modules/_alerts.scss +0 -152
- assets/sass/modules/_fields.scss +0 -644
- assets/sass/modules/_general.scss +0 -51
- assets/sass/modules/_modal.scss +0 -165
- assets/sass/modules/_select2.scss +0 -188
- assets/sass/modules/_tabs.scss +0 -206
- assets/sass/partials/_compatibility.scss +0 -22
- assets/sass/partials/_pum_styles.scss +0 -267
- assets/sass/partials/admin/_deprecated.scss +0 -31
- assets/sass/partials/admin/_fields.scss +0 -38
- assets/sass/partials/admin/_marketing.scss +0 -20
- assets/sass/partials/admin/_mixins.scss +0 -76
- assets/sass/partials/site/_animations.scss +0 -21
- assets/sass/partials/site/form/_alignments.scss +0 -31
- assets/sass/partials/site/form/_general.scss +0 -88
- assets/sass/partials/site/form/_privacy.scss +0 -64
- assets/sass/partials/site/form/_sub_form.scss +0 -34
- assets/sass/partials/site/form/layout/_block.scss +0 -11
- assets/sass/partials/site/form/layout/_inline.scss +0 -9
- assets/sass/partials/site/form/layout/_standard.scss +0 -12
- assets/sass/partials/site/form/style/_default.scss +0 -28
- assets/sass/site.scss +0 -15
- assets/sass/vendor/select2/_dropdown.scss +0 -73
- assets/sass/vendor/select2/_multiple.scss +0 -35
- assets/sass/vendor/select2/_single.scss +0 -34
- assets/sass/vendor/select2/mixins/_gradients.scss +0 -13
- assets/sass/vendor/select2/theme/classic/_defaults.scss +0 -34
- assets/sass/vendor/select2/theme/classic/_multiple.scss +0 -93
- assets/sass/vendor/select2/theme/classic/_single.scss +0 -124
- assets/sass/vendor/select2/theme/classic/layout.scss +0 -64
- assets/sass/vendor/select2/theme/default/_multiple.scss +0 -98
- assets/sass/vendor/select2/theme/default/_single.scss +0 -83
- assets/sass/vendor/select2/theme/default/layout.scss +0 -97
- assets/sounds/beep-two.mp3 +0 -0
- assets/sounds/beep-up.mp3 +0 -0
- assets/sounds/beep.mp3 +0 -0
- assets/sounds/chimes.mp3 +0 -0
- assets/sounds/correct.mp3 +0 -0
- assets/sounds/index.php +2 -0
- classes/Admin.php +1 -0
- classes/Admin/Assets.php +1 -0
- classes/Admin/BlockEditor.php +78 -0
- classes/Admin/Extend.php +71 -10
- classes/Admin/Pages.php +3 -3
- classes/Admin/Popups.php +48 -2
- classes/Admin/Settings.php +19 -5
- classes/Admin/Shortcode/UI.php +11 -5
- classes/Admin/Themes.php +2 -1
- classes/AssetCache.php +90 -13
- classes/Cookies.php +2 -1
- classes/Freemius.php +0 -316
- classes/Helpers.php +87 -0
- classes/Repository/Popups.php +0 -2
- classes/Repository/Themes.php +0 -2
- classes/Shortcode/PopupCookie.php +100 -0
- classes/Site.php +94 -12
- classes/Site/Assets.php +6 -23
- classes/Utils/Fields.php +2 -4
- dist/block-editor/block-editor-styles.asset.php +1 -0
- dist/block-editor/block-editor-styles.css +243 -0
- dist/block-editor/block-editor-styles.css.map +1 -0
- dist/block-editor/block-editor.asset.php +1 -0
- dist/block-editor/block-editor.js +1877 -0
- dist/block-editor/block-editor.js.map +1 -0
- includes/admin/upgrades/class-pum-admin-upgrade-routine.php +0 -2
- includes/extension-list.json +12 -1
- includes/functions/popups/template.php +8 -1
- includes/pum-sdk/freemius/LICENSE.txt +0 -674
- includes/pum-sdk/freemius/README.md +0 -253
- includes/pum-sdk/freemius/assets/css/admin/account.css +0 -1
- includes/pum-sdk/freemius/assets/css/admin/add-ons.css +0 -2
- includes/pum-sdk/freemius/assets/css/admin/affiliation.css +0 -1
- includes/pum-sdk/freemius/assets/css/admin/checkout.css +0 -1
- includes/pum-sdk/freemius/assets/css/admin/common.css +0 -2
- includes/pum-sdk/freemius/assets/css/admin/connect.css +0 -1
- includes/pum-sdk/freemius/assets/css/admin/debug.css +0 -1
- includes/pum-sdk/freemius/assets/css/admin/dialog-boxes.css +0 -2
- includes/pum-sdk/freemius/assets/css/admin/gdpr-optin-notice.css +0 -1
- includes/pum-sdk/freemius/assets/css/admin/index.php +0 -3
- includes/pum-sdk/freemius/assets/css/customizer.css +0 -1
- includes/pum-sdk/freemius/assets/css/index.php +0 -3
- includes/pum-sdk/freemius/assets/img/index.php +0 -3
- includes/pum-sdk/freemius/assets/img/plugin-icon.png +0 -0
- includes/pum-sdk/freemius/assets/img/theme-icon.png +0 -0
- includes/pum-sdk/freemius/assets/index.php +0 -3
- includes/pum-sdk/freemius/assets/js/index.php +0 -3
- includes/pum-sdk/freemius/assets/js/nojquery.ba-postmessage.js +0 -140
- includes/pum-sdk/freemius/assets/js/nojquery.ba-postmessage.min.js +0 -12
- includes/pum-sdk/freemius/assets/js/postmessage.js +0 -135
- includes/pum-sdk/freemius/assets/scss/_colors.scss +0 -79
- includes/pum-sdk/freemius/assets/scss/_functions.scss +0 -0
- includes/pum-sdk/freemius/assets/scss/_load.scss +0 -4
- includes/pum-sdk/freemius/assets/scss/_mixins.scss +0 -270
- includes/pum-sdk/freemius/assets/scss/_start.scss +0 -4
- includes/pum-sdk/freemius/assets/scss/_vars.scss +0 -6
- includes/pum-sdk/freemius/assets/scss/admin/_ajax-loader.scss +0 -49
- includes/pum-sdk/freemius/assets/scss/admin/_auto-install.scss +0 -33
- includes/pum-sdk/freemius/assets/scss/admin/_buttons.scss +0 -28
- includes/pum-sdk/freemius/assets/scss/admin/_deactivation-feedback.scss +0 -55
- includes/pum-sdk/freemius/assets/scss/admin/_gdpr-consent.scss +0 -81
- includes/pum-sdk/freemius/assets/scss/admin/_license-activation.scss +0 -47
- includes/pum-sdk/freemius/assets/scss/admin/_license-key-resend.scss +0 -68
- includes/pum-sdk/freemius/assets/scss/admin/_modal-common.scss +0 -194
- includes/pum-sdk/freemius/assets/scss/admin/_multisite-options.scss +0 -40
- includes/pum-sdk/freemius/assets/scss/admin/_plugin-upgrade-notice.scss +0 -8
- includes/pum-sdk/freemius/assets/scss/admin/_subscription-cancellation.scss +0 -30
- includes/pum-sdk/freemius/assets/scss/admin/_themes.scss +0 -21
- includes/pum-sdk/freemius/assets/scss/admin/_tooltip.scss +0 -66
- includes/pum-sdk/freemius/assets/scss/admin/account.scss +0 -302
- includes/pum-sdk/freemius/assets/scss/admin/add-ons.scss +0 -449
- includes/pum-sdk/freemius/assets/scss/admin/affiliation.scss +0 -97
- includes/pum-sdk/freemius/assets/scss/admin/checkout.scss +0 -5
- includes/pum-sdk/freemius/assets/scss/admin/common.scss +0 -220
- includes/pum-sdk/freemius/assets/scss/admin/connect.scss +0 -548
- includes/pum-sdk/freemius/assets/scss/admin/debug.scss +0 -135
- includes/pum-sdk/freemius/assets/scss/admin/dialog-boxes.scss +0 -10
- includes/pum-sdk/freemius/assets/scss/admin/gdpr-optin-notice.scss +0 -17
- includes/pum-sdk/freemius/assets/scss/admin/index.php +0 -3
- includes/pum-sdk/freemius/assets/scss/customizer.scss +0 -125
- includes/pum-sdk/freemius/assets/scss/index.php +0 -3
- includes/pum-sdk/freemius/composer.json +0 -10
- includes/pum-sdk/freemius/config.php +0 -388
- includes/pum-sdk/freemius/includes/class-freemius-abstract.php +0 -597
- includes/pum-sdk/freemius/includes/class-freemius.php +0 -6621
CHANGELOG.md
CHANGED
@@ -1,5 +1,21 @@
|
|
1 |
### Unreleased Changes
|
2 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
### v1.9.2 - 03/26/2020
|
4 |
* Tweak: Add support for WP 5.4's new method of adding custom fields to the nav menu editor.
|
5 |
|
1 |
### Unreleased Changes
|
2 |
|
3 |
+
### v1.10.0 - TBD
|
4 |
+
* Feature: Display presets for top bar, bottom right slide-ins, full-screen popups & bottom left notifications to make it simple to get common setups done much quicker
|
5 |
+
* Feature: Popup Trigger inline text format for the block editor.
|
6 |
+
* Feature: Turn any block in Gutenberg block editor into a popup trigger.
|
7 |
+
* Feature: Font Awesome support added to close button text setting.
|
8 |
+
* Feature: Play a sound when a popup is opened. Choose from 5 included sounds or upload your own.
|
9 |
+
* Feature: Insert customizable [popup_cookie] shortcode on thank you pages when using non-integrated forms.
|
10 |
+
* Tweak: Add option to disable or adjust the padding-right added to body.
|
11 |
+
* Tweak: Remove Freemius integration from Popup Maker.
|
12 |
+
* Improvement: Detect file permission issues with Asset Caching functionality.
|
13 |
+
* Fix: Prevent popups from going off the screen when using center position for a tall popup.
|
14 |
+
* Fix: Bug in slide animation origin positioning for bottom or right origins.
|
15 |
+
* Fix: Bug where Middle Center caused tall popups to hang off the screen on small screens.
|
16 |
+
* Fix: Typo in admin editor CSS path.
|
17 |
+
* Fix: Bug on fresh installs where default theme's close position is wrong.
|
18 |
+
|
19 |
### v1.9.2 - 03/26/2020
|
20 |
* Tweak: Add support for WP 5.4's new method of adding custom fields to the nav menu editor.
|
21 |
|
assets/css/pum-admin-popup-editor-rtl.css
CHANGED
@@ -1,6 +1,81 @@
|
|
1 |
/*!******************************************************************************
|
2 |
* Copyright (c) 2019, Code Atlantic LLC
|
3 |
******************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
#wp-admin-bar-view {
|
5 |
display: none;
|
6 |
}
|
@@ -137,4 +212,25 @@
|
|
137 |
display: block;
|
138 |
}
|
139 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
140 |
/*# sourceMappingURL=pum-admin-popup-editor-rtl.css.map */
|
1 |
/*!******************************************************************************
|
2 |
* Copyright (c) 2019, Code Atlantic LLC
|
3 |
******************************************************************************/
|
4 |
+
/***********
|
5 |
+
Display Switcher
|
6 |
+
***********/
|
7 |
+
#pum-popup-settings-container .popup-types {
|
8 |
+
display: flex;
|
9 |
+
flex-direction: column;
|
10 |
+
justify-content: space-between;
|
11 |
+
width: 100%;
|
12 |
+
}
|
13 |
+
|
14 |
+
@media screen and (min-width: 600px) {
|
15 |
+
#pum-popup-settings-container .popup-types {
|
16 |
+
flex-direction: row;
|
17 |
+
flex-wrap: wrap;
|
18 |
+
}
|
19 |
+
}
|
20 |
+
|
21 |
+
#pum-popup-settings-container .popup-types .popup-type {
|
22 |
+
margin: 0 1.5% 20px;
|
23 |
+
transition: transform 0.1s ease 0s;
|
24 |
+
cursor: pointer;
|
25 |
+
}
|
26 |
+
|
27 |
+
@media screen and (min-width: 600px) and (max-width: 1279px) {
|
28 |
+
#pum-popup-settings-container .popup-types .popup-type {
|
29 |
+
width: 47%;
|
30 |
+
}
|
31 |
+
#pum-popup-settings-container .popup-types .popup-type:nth-child(2n+1) {
|
32 |
+
margin-right: 0;
|
33 |
+
}
|
34 |
+
#pum-popup-settings-container .popup-types .popup-type:nth-child(2n+2) {
|
35 |
+
margin-left: 0;
|
36 |
+
}
|
37 |
+
}
|
38 |
+
|
39 |
+
@media screen and (min-width: 1280px) and (max-width: 1365px) {
|
40 |
+
#pum-popup-settings-container .popup-types .popup-type {
|
41 |
+
width: 30%;
|
42 |
+
}
|
43 |
+
#pum-popup-settings-container .popup-types .popup-type:nth-child(3n+1) {
|
44 |
+
margin-right: 0;
|
45 |
+
}
|
46 |
+
#pum-popup-settings-container .popup-types .popup-type:nth-child(3n+3) {
|
47 |
+
margin-left: 0;
|
48 |
+
}
|
49 |
+
}
|
50 |
+
|
51 |
+
@media screen and (min-width: 1366px) {
|
52 |
+
#pum-popup-settings-container .popup-types .popup-type {
|
53 |
+
width: 22.75%;
|
54 |
+
}
|
55 |
+
#pum-popup-settings-container .popup-types .popup-type:nth-child(4n+1) {
|
56 |
+
margin-right: 0;
|
57 |
+
}
|
58 |
+
#pum-popup-settings-container .popup-types .popup-type:nth-child(4n+4) {
|
59 |
+
margin-left: 0;
|
60 |
+
}
|
61 |
+
}
|
62 |
+
|
63 |
+
#pum-popup-settings-container .popup-types .popup-type:hover {
|
64 |
+
transform: scale(1.1);
|
65 |
+
}
|
66 |
+
|
67 |
+
#pum-popup-settings-container .popup-types .popup-type img {
|
68 |
+
max-width: 100%;
|
69 |
+
height: auto;
|
70 |
+
}
|
71 |
+
|
72 |
+
#pum-popup-settings-container .popup-types .popup-type button {
|
73 |
+
width: 100%;
|
74 |
+
}
|
75 |
+
|
76 |
+
/***********
|
77 |
+
Misc
|
78 |
+
***********/
|
79 |
#wp-admin-bar-view {
|
80 |
display: none;
|
81 |
}
|
212 |
display: block;
|
213 |
}
|
214 |
|
215 |
+
/***********
|
216 |
+
Manual Cookie Shortcode
|
217 |
+
***********/
|
218 |
+
pre.manual-cookie-shortcode {
|
219 |
+
overflow: hidden;
|
220 |
+
max-width: 20vw;
|
221 |
+
max-height: 1.7em;
|
222 |
+
margin: 0;
|
223 |
+
}
|
224 |
+
|
225 |
+
pre.manual-cookie-shortcode code {
|
226 |
+
overflow-x: scroll;
|
227 |
+
display: block;
|
228 |
+
padding: 2px 16px 1px;
|
229 |
+
margin: 0px -17px;
|
230 |
+
}
|
231 |
+
|
232 |
+
pre.manual-cookie-shortcode code::before, pre.manual-cookie-shortcode code::after {
|
233 |
+
content: " ";
|
234 |
+
}
|
235 |
+
|
236 |
/*# sourceMappingURL=pum-admin-popup-editor-rtl.css.map */
|
assets/css/pum-admin-popup-editor-rtl.css.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"sources":["pum-admin-popup-editor.scss","pum-admin-popup-editor-rtl.css"],"names":[],"mappings":"AAAA;;+ECE+E;ADE/E;EACE,aAAa;ACAf;;ADGA;EAEE,kBAAkB;EAClB,gBAAgB;ACDlB;;ADFA;EAMI,SAAS;EACT,UAAU;ACAd;;ADPA;EAWI,WAAW;EACX,kBAAkB;EAClB,gBAAgB;EAChB,kBAAkB;ACAtB;;ADdA;EAkBI,YAAY;ACAhB;;ADlBA;EAsBI,gBAAgB;EAChB,gBAAgB;EAChB,kBAAkB;EAClB,aAAa;EACb,WAAW;EACX,aAAa;EACb,eAAe;EACf,sBAAsB;ACA1B;;ADKA;EAEI,kBAAkB;ACHtB;;ADOA;EACE,gBAAY;ACJd;;ADOA;EACE,YAAY;ACJd;;ADOA;EAMI,SAAS;EACT,UAAU;ACTd;;ADaA;;EAEE,cAAc;EACd,gBAAgB;EAChB,YAAY;EACZ,eAAe;EACf,eAAe;EACf,WAAW;ACVb;;ADaA;;EAGI,YAAY;EACZ,oBAAmB;ACXvB;;ADeA;EACE,kBAAkB;EAClB,SAAO;EACP,WAAW;ACZb;;ADSA;EAOI,iBAAiB;EACjB,kBAAkB;EAClB,oCAAmC;EACnC,WAAW;EACX,kBAAkB;EAClB,eAAe;EAEf,eAAe;EACf,WAAW;EACX,UAAU;ACbd;;ADHA;EAmBM,yBAAyB;ACZ/B;;ADPA;EAyBI,yBAAyB;ACd7B;;ADXA;EA6BI,aAAa;EACb,SAAS;EACT,UAAU;EACV,kBAAkB;EAClB,QAAQ;EACR,WAAU;EACV,sBAAsB;EACtB,WAAW;EACX,YAAY;EACZ,6BAA4B;EAC5B,qCAAoC;EACpC,gBAAgB;ACdpB;;AD1BA;EA4CM,cAAc;EACd,aAAa;EACb,6CAA4C;EAE5C,eAAe;EACf,SAAS;ACff;;ADlCA;EAoDQ,eAAe;EACf,cAAc;EACd,cAAc;ACdtB;;ADxCA;EA0DQ,gBAAgB;ACdxB;;AD5CA;EA8DQ,cAAc;ACdtB;;ADhDA;EAsEI,cAAc;AClBlB","file":"pum-admin-popup-editor-rtl.css","sourcesContent":["/*!******************************************************************************\n * Copyright (c) 2019, Code Atlantic LLC\n ******************************************************************************/\n\n#wp-admin-bar-view {\n display: none;\n}\n\n#popup-titlediv {\n\n position: relative;\n margin-top: 10px;\n\n #popup-titlewrap {\n border: 0;\n padding: 0;\n }\n\n #popup-title-prompt-text {\n color: #777;\n position: absolute;\n font-size: 1.7em;\n padding: 11px 10px;\n }\n\n label {\n cursor: text;\n }\n\n #popup-title {\n padding: 3px 8px;\n font-size: 1.7em;\n line-height: 1.125;\n height: 1.7em;\n width: 100%;\n outline: none;\n margin: 0 0 3px;\n background-color: #fff;\n }\n\n}\n\n.post-type-popup {\n #edit-slug-box {\n margin-bottom: 5px;\n }\n}\n\n#major-publishing-actions {\n text-align: right;\n}\n\n#trigger-popmake-preview {\n padding: 5px;\n}\n\n#pum_popup_settings {\n > h2.hndle,\n > .handlediv {\n // display: none;\n }\n > .inside {\n margin: 0;\n padding: 0;\n }\n}\n\n#popup_trigger_add_type,\n#popup_cookie_add_event {\n display: block;\n font-size: 1.4em;\n height: auto;\n margin: 1.5em 0;\n padding: 0.25em;\n width: 100%;\n}\n\n#pum_trigger_add_type_modal,\n#pum_cookie_add_event_modal {\n .pum-modal-wrap {\n width: 440px;\n margin-left: -220px;\n }\n}\n\n.pum-click-selector-presets {\n position: absolute;\n right: 2px;\n bottom: 2px;\n\n > span {\n\n border: 1px solid;\n border-radius: 2px;\n background-color: rgba(0, 0, 0, .5);\n color: #fff;\n text-align: center;\n cursor: pointer;\n\n font-size: 21px;\n height: 1em;\n width: 1em;\n\n &:hover {\n background-color: #0085ba;\n }\n\n }\n\n &.open > span {\n background-color: #0085ba;\n }\n\n ul {\n display: none;\n margin: 0;\n padding: 0;\n position: absolute;\n top: 1px;\n left: 20px;\n background-color: #fff;\n width: auto;\n z-index: 999;\n box-shadow: 1px 1px 5px -1px;\n border: 1px solid rgba(0, 0, 0, .25);\n min-width: 125px;\n\n li {\n\n display: block;\n padding: .5em;\n border-bottom: 1px dashed rgba(0, 0, 0, .25);\n\n text-wrap: none;\n margin: 0;\n\n span {\n cursor: pointer;\n display: block;\n line-height: 1;\n }\n\n &:last-child {\n border-bottom: 0;\n }\n\n &:hover {\n color: #0085ba;\n }\n\n }\n\n }\n\n &.open ul {\n display: block;\n }\n\n}","/*!******************************************************************************\n * Copyright (c) 2019, Code Atlantic LLC\n ******************************************************************************/\n#wp-admin-bar-view {\n display: none;\n}\n\n#popup-titlediv {\n position: relative;\n margin-top: 10px;\n}\n\n#popup-titlediv #popup-titlewrap {\n border: 0;\n padding: 0;\n}\n\n#popup-titlediv #popup-title-prompt-text {\n color: #777;\n position: absolute;\n font-size: 1.7em;\n padding: 11px 10px;\n}\n\n#popup-titlediv label {\n cursor: text;\n}\n\n#popup-titlediv #popup-title {\n padding: 3px 8px;\n font-size: 1.7em;\n line-height: 1.125;\n height: 1.7em;\n width: 100%;\n outline: none;\n margin: 0 0 3px;\n background-color: #fff;\n}\n\n.post-type-popup #edit-slug-box {\n margin-bottom: 5px;\n}\n\n#major-publishing-actions {\n text-align: left;\n}\n\n#trigger-popmake-preview {\n padding: 5px;\n}\n\n#pum_popup_settings > .inside {\n margin: 0;\n padding: 0;\n}\n\n#popup_trigger_add_type,\n#popup_cookie_add_event {\n display: block;\n font-size: 1.4em;\n height: auto;\n margin: 1.5em 0;\n padding: 0.25em;\n width: 100%;\n}\n\n#pum_trigger_add_type_modal .pum-modal-wrap,\n#pum_cookie_add_event_modal .pum-modal-wrap {\n width: 440px;\n margin-right: -220px;\n}\n\n.pum-click-selector-presets {\n position: absolute;\n left: 2px;\n bottom: 2px;\n}\n\n.pum-click-selector-presets > span {\n border: 1px solid;\n border-radius: 2px;\n background-color: rgba(0, 0, 0, 0.5);\n color: #fff;\n text-align: center;\n cursor: pointer;\n font-size: 21px;\n height: 1em;\n width: 1em;\n}\n\n.pum-click-selector-presets > span:hover {\n background-color: #0085ba;\n}\n\n.pum-click-selector-presets.open > span {\n background-color: #0085ba;\n}\n\n.pum-click-selector-presets ul {\n display: none;\n margin: 0;\n padding: 0;\n position: absolute;\n top: 1px;\n right: 20px;\n background-color: #fff;\n width: auto;\n z-index: 999;\n box-shadow: -1px 1px 5px -1px;\n border: 1px solid rgba(0, 0, 0, 0.25);\n min-width: 125px;\n}\n\n.pum-click-selector-presets ul li {\n display: block;\n padding: .5em;\n border-bottom: 1px dashed rgba(0, 0, 0, 0.25);\n text-wrap: none;\n margin: 0;\n}\n\n.pum-click-selector-presets ul li span {\n cursor: pointer;\n display: block;\n line-height: 1;\n}\n\n.pum-click-selector-presets ul li:last-child {\n border-bottom: 0;\n}\n\n.pum-click-selector-presets ul li:hover {\n color: #0085ba;\n}\n\n.pum-click-selector-presets.open ul {\n display: block;\n}\n"]}
|
1 |
+
{"version":3,"sources":["pum-admin-popup-editor.scss","pum-admin-popup-editor-rtl.css"],"names":[],"mappings":"AAAA;;+ECE+E;ADE/E;;WCCW;ADGX;EACC,aAAa;EACb,sBAAsB;EACtB,8BAA8B;EAC9B,WAAW;ACDZ;;ADGC;EAND;IAOE,mBAAmB;IACnB,eAAe;ECCf;AACF;;ADVA;EAYE,mBAAmB;EACnB,kCAAkC;EAClC,eAAc;ACEhB;;ADAE;EAhBF;IAiBG,UAAU;ECIX;EDrBF;IAoBI,eAAc;ECIhB;EDxBF;IAwBI,cAAc;ECGhB;AACF;;ADCE;EA7BF;IA8BG,UAAU;ECGX;EDjCF;IAiCI,eAAc;ECGhB;EDpCF;IAqCI,cAAc;ECEhB;AACF;;ADCE;EAzCF;IA0CG,aAAa;ECGd;ED7CF;IA6CI,eAAc;ECGhB;EDhDF;IAiDI,cAAc;ECEhB;AACF;;ADpDA;EAsDI,qBAAqB;ACEzB;;ADxDA;EA0DG,eAAe;EACf,YAAY;ACEf;;AD7DA;EA+DG,WAAW;ACEd;;ADKA;;WCDW;ADKX;EACE,aAAa;ACHf;;ADMA;EAEE,kBAAkB;EAClB,gBAAgB;ACJlB;;ADCA;EAMI,SAAS;EACT,UAAU;ACHd;;ADJA;EAWI,WAAW;EACX,kBAAkB;EAClB,gBAAgB;EAChB,kBAAkB;ACHtB;;ADXA;EAkBI,YAAY;ACHhB;;ADfA;EAsBI,gBAAgB;EAChB,gBAAgB;EAChB,kBAAkB;EAClB,aAAa;EACb,WAAW;EACX,aAAa;EACb,eAAe;EACf,sBAAsB;ACH1B;;ADQA;EAEI,kBAAkB;ACNtB;;ADUA;EACE,gBAAY;ACPd;;ADUA;EACE,YAAY;ACPd;;ADUA;EAMI,SAAS;EACT,UAAU;ACZd;;ADgBA;;EAEE,cAAc;EACd,gBAAgB;EAChB,YAAY;EACZ,eAAe;EACf,eAAe;EACf,WAAW;ACbb;;ADgBA;;EAGI,YAAY;EACZ,oBAAmB;ACdvB;;ADkBA;EACE,kBAAkB;EAClB,SAAO;EACP,WAAW;ACfb;;ADYA;EAOI,iBAAiB;EACjB,kBAAkB;EAClB,oCAAmC;EACnC,WAAW;EACX,kBAAkB;EAClB,eAAe;EAEf,eAAe;EACf,WAAW;EACX,UAAU;AChBd;;ADAA;EAmBM,yBAAyB;ACf/B;;ADJA;EAyBI,yBAAyB;ACjB7B;;ADRA;EA6BI,aAAa;EACb,SAAS;EACT,UAAU;EACV,kBAAkB;EAClB,QAAQ;EACR,WAAU;EACV,sBAAsB;EACtB,WAAW;EACX,YAAY;EACZ,6BAA4B;EAC5B,qCAAoC;EACpC,gBAAgB;ACjBpB;;ADvBA;EA4CM,cAAc;EACd,aAAa;EACb,6CAA4C;EAE5C,eAAe;EACf,SAAS;AClBf;;AD/BA;EAoDQ,eAAe;EACf,cAAc;EACd,cAAc;ACjBtB;;ADrCA;EA0DQ,gBAAgB;ACjBxB;;ADzCA;EA8DQ,cAAc;ACjBtB;;AD7CA;EAsEI,cAAc;ACrBlB;;AD2BA;;WCvBW;AD2BX;EACE,gBAAgB;EAChB,eAAe;EACf,iBAAiB;EACjB,SAAS;ACzBX;;ADqBA;EAOI,kBAAkB;EAClB,cAAc;EACd,qBAAqB;EACrB,iBAAiB;ACxBrB;;ADcA;EAaM,YAAY;ACvBlB","file":"pum-admin-popup-editor-rtl.css","sourcesContent":["/*!******************************************************************************\n * Copyright (c) 2019, Code Atlantic LLC\n ******************************************************************************/\n\n/***********\nDisplay Switcher\n***********/\n\n#pum-popup-settings-container .popup-types {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\twidth: 100%;\n\n\t@media screen and (min-width: 600px) {\n\t\tflex-direction: row;\n\t\tflex-wrap: wrap;\n\t}\n\n\t.popup-type {\n\t\tmargin: 0 1.5% 20px;\n\t\ttransition: transform 0.1s ease 0s;\n\t\tcursor:pointer;\n\n\t\t@media screen and (min-width: 600px) and (max-width: 1279px) {\n\t\t\twidth: 47%;\n\n\t\t\t&:nth-child(2n+1) {\n\t\t\t\tmargin-left: 0; // First column in each row\n\t\t\t}\n\n\t\t\t&:nth-child(2n+2) {\n\t\t\t\tmargin-right: 0; // Last Column in each row\n\t\t\t}\n\t\t}\n\n\n\t\t@media screen and (min-width: 1280px) and (max-width: 1365px) {\n\t\t\twidth: 30%;\n\n\t\t\t&:nth-child(3n+1) {\n\t\t\t\tmargin-left: 0; // First column in each row\n\t\t\t}\n\n\t\t\t&:nth-child(3n+3) {\n\t\t\t\tmargin-right: 0; // Last Column in each row\n\t\t\t}\n\t\t}\n\n\t\t@media screen and (min-width: 1366px) {\n\t\t\twidth: 22.75%;\n\n\t\t\t&:nth-child(4n+1) {\n\t\t\t\tmargin-left: 0; // First column in each row\n\t\t\t}\n\n\t\t\t&:nth-child(4n+4) {\n\t\t\t\tmargin-right: 0; // Last Column in each row\n\t\t\t}\n\t\t}\n\n\t\t&:hover {\n\t\t\t\ttransform: scale(1.1); // Intentional ?\n\t\t}\n\n\t\timg {\n\t\t\tmax-width: 100%;\n\t\t\theight: auto;\n\t\t}\n\n\t\tbutton {\n\t\t\twidth: 100%;\n\t\t}\n\t}\n}\n\n\n\n/***********\nMisc\n***********/\n\n#wp-admin-bar-view {\n display: none;\n}\n\n#popup-titlediv {\n\n position: relative;\n margin-top: 10px;\n\n #popup-titlewrap {\n border: 0;\n padding: 0;\n }\n\n #popup-title-prompt-text {\n color: #777;\n position: absolute;\n font-size: 1.7em;\n padding: 11px 10px;\n }\n\n label {\n cursor: text;\n }\n\n #popup-title {\n padding: 3px 8px;\n font-size: 1.7em;\n line-height: 1.125;\n height: 1.7em;\n width: 100%;\n outline: none;\n margin: 0 0 3px;\n background-color: #fff;\n }\n\n}\n\n.post-type-popup {\n #edit-slug-box {\n margin-bottom: 5px;\n }\n}\n\n#major-publishing-actions {\n text-align: right;\n}\n\n#trigger-popmake-preview {\n padding: 5px;\n}\n\n#pum_popup_settings {\n > h2.hndle,\n > .handlediv {\n // display: none;\n }\n > .inside {\n margin: 0;\n padding: 0;\n }\n}\n\n#popup_trigger_add_type,\n#popup_cookie_add_event {\n display: block;\n font-size: 1.4em;\n height: auto;\n margin: 1.5em 0;\n padding: 0.25em;\n width: 100%;\n}\n\n#pum_trigger_add_type_modal,\n#pum_cookie_add_event_modal {\n .pum-modal-wrap {\n width: 440px;\n margin-left: -220px;\n }\n}\n\n.pum-click-selector-presets {\n position: absolute;\n right: 2px;\n bottom: 2px;\n\n > span {\n\n border: 1px solid;\n border-radius: 2px;\n background-color: rgba(0, 0, 0, .5);\n color: #fff;\n text-align: center;\n cursor: pointer;\n\n font-size: 21px;\n height: 1em;\n width: 1em;\n\n &:hover {\n background-color: #0085ba;\n }\n\n }\n\n &.open > span {\n background-color: #0085ba;\n }\n\n ul {\n display: none;\n margin: 0;\n padding: 0;\n position: absolute;\n top: 1px;\n left: 20px;\n background-color: #fff;\n width: auto;\n z-index: 999;\n box-shadow: 1px 1px 5px -1px;\n border: 1px solid rgba(0, 0, 0, .25);\n min-width: 125px;\n\n li {\n\n display: block;\n padding: .5em;\n border-bottom: 1px dashed rgba(0, 0, 0, .25);\n\n text-wrap: none;\n margin: 0;\n\n span {\n cursor: pointer;\n display: block;\n line-height: 1;\n }\n\n &:last-child {\n border-bottom: 0;\n }\n\n &:hover {\n color: #0085ba;\n }\n\n }\n\n }\n\n &.open ul {\n display: block;\n }\n\n}\n\n\n/***********\nManual Cookie Shortcode\n***********/\n\npre.manual-cookie-shortcode {\n overflow: hidden;\n max-width: 20vw;\n max-height: 1.7em;\n margin: 0;\n\n code {\n overflow-x: scroll;\n display: block;\n padding: 2px 16px 1px;\n margin: 0px -17px;\n\n &::before, &::after {\n content: \" \";\n }\n }\n}\n","/*!******************************************************************************\n * Copyright (c) 2019, Code Atlantic LLC\n ******************************************************************************/\n/***********\nDisplay Switcher\n***********/\n#pum-popup-settings-container .popup-types {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n width: 100%;\n}\n\n@media screen and (min-width: 600px) {\n #pum-popup-settings-container .popup-types {\n flex-direction: row;\n flex-wrap: wrap;\n }\n}\n\n#pum-popup-settings-container .popup-types .popup-type {\n margin: 0 1.5% 20px;\n transition: transform 0.1s ease 0s;\n cursor: pointer;\n}\n\n@media screen and (min-width: 600px) and (max-width: 1279px) {\n #pum-popup-settings-container .popup-types .popup-type {\n width: 47%;\n }\n #pum-popup-settings-container .popup-types .popup-type:nth-child(2n+1) {\n margin-right: 0;\n }\n #pum-popup-settings-container .popup-types .popup-type:nth-child(2n+2) {\n margin-left: 0;\n }\n}\n\n@media screen and (min-width: 1280px) and (max-width: 1365px) {\n #pum-popup-settings-container .popup-types .popup-type {\n width: 30%;\n }\n #pum-popup-settings-container .popup-types .popup-type:nth-child(3n+1) {\n margin-right: 0;\n }\n #pum-popup-settings-container .popup-types .popup-type:nth-child(3n+3) {\n margin-left: 0;\n }\n}\n\n@media screen and (min-width: 1366px) {\n #pum-popup-settings-container .popup-types .popup-type {\n width: 22.75%;\n }\n #pum-popup-settings-container .popup-types .popup-type:nth-child(4n+1) {\n margin-right: 0;\n }\n #pum-popup-settings-container .popup-types .popup-type:nth-child(4n+4) {\n margin-left: 0;\n }\n}\n\n#pum-popup-settings-container .popup-types .popup-type:hover {\n transform: scale(1.1);\n}\n\n#pum-popup-settings-container .popup-types .popup-type img {\n max-width: 100%;\n height: auto;\n}\n\n#pum-popup-settings-container .popup-types .popup-type button {\n width: 100%;\n}\n\n/***********\nMisc\n***********/\n#wp-admin-bar-view {\n display: none;\n}\n\n#popup-titlediv {\n position: relative;\n margin-top: 10px;\n}\n\n#popup-titlediv #popup-titlewrap {\n border: 0;\n padding: 0;\n}\n\n#popup-titlediv #popup-title-prompt-text {\n color: #777;\n position: absolute;\n font-size: 1.7em;\n padding: 11px 10px;\n}\n\n#popup-titlediv label {\n cursor: text;\n}\n\n#popup-titlediv #popup-title {\n padding: 3px 8px;\n font-size: 1.7em;\n line-height: 1.125;\n height: 1.7em;\n width: 100%;\n outline: none;\n margin: 0 0 3px;\n background-color: #fff;\n}\n\n.post-type-popup #edit-slug-box {\n margin-bottom: 5px;\n}\n\n#major-publishing-actions {\n text-align: left;\n}\n\n#trigger-popmake-preview {\n padding: 5px;\n}\n\n#pum_popup_settings > .inside {\n margin: 0;\n padding: 0;\n}\n\n#popup_trigger_add_type,\n#popup_cookie_add_event {\n display: block;\n font-size: 1.4em;\n height: auto;\n margin: 1.5em 0;\n padding: 0.25em;\n width: 100%;\n}\n\n#pum_trigger_add_type_modal .pum-modal-wrap,\n#pum_cookie_add_event_modal .pum-modal-wrap {\n width: 440px;\n margin-right: -220px;\n}\n\n.pum-click-selector-presets {\n position: absolute;\n left: 2px;\n bottom: 2px;\n}\n\n.pum-click-selector-presets > span {\n border: 1px solid;\n border-radius: 2px;\n background-color: rgba(0, 0, 0, 0.5);\n color: #fff;\n text-align: center;\n cursor: pointer;\n font-size: 21px;\n height: 1em;\n width: 1em;\n}\n\n.pum-click-selector-presets > span:hover {\n background-color: #0085ba;\n}\n\n.pum-click-selector-presets.open > span {\n background-color: #0085ba;\n}\n\n.pum-click-selector-presets ul {\n display: none;\n margin: 0;\n padding: 0;\n position: absolute;\n top: 1px;\n right: 20px;\n background-color: #fff;\n width: auto;\n z-index: 999;\n box-shadow: -1px 1px 5px -1px;\n border: 1px solid rgba(0, 0, 0, 0.25);\n min-width: 125px;\n}\n\n.pum-click-selector-presets ul li {\n display: block;\n padding: .5em;\n border-bottom: 1px dashed rgba(0, 0, 0, 0.25);\n text-wrap: none;\n margin: 0;\n}\n\n.pum-click-selector-presets ul li span {\n cursor: pointer;\n display: block;\n line-height: 1;\n}\n\n.pum-click-selector-presets ul li:last-child {\n border-bottom: 0;\n}\n\n.pum-click-selector-presets ul li:hover {\n color: #0085ba;\n}\n\n.pum-click-selector-presets.open ul {\n display: block;\n}\n\n/***********\nManual Cookie Shortcode\n***********/\npre.manual-cookie-shortcode {\n overflow: hidden;\n max-width: 20vw;\n max-height: 1.7em;\n margin: 0;\n}\n\npre.manual-cookie-shortcode code {\n overflow-x: scroll;\n display: block;\n padding: 2px 16px 1px;\n margin: 0px -17px;\n}\n\npre.manual-cookie-shortcode code::before, pre.manual-cookie-shortcode code::after {\n content: \" \";\n}\n"]}
|
assets/css/pum-admin-popup-editor-rtl.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
#wp-admin-bar-view{display:none}#popup-titlediv{position:relative;margin-top:10px}#popup-titlediv #popup-titlewrap{border:0;padding:0}#popup-titlediv #popup-title-prompt-text{color:#777;position:absolute;font-size:1.7em;padding:11px 10px}#popup-titlediv label{cursor:text}#popup-titlediv #popup-title{padding:3px 8px;font-size:1.7em;line-height:1.125;height:1.7em;width:100%;outline:0;margin:0 0 3px;background-color:#fff}.post-type-popup #edit-slug-box{margin-bottom:5px}#major-publishing-actions{text-align:left}#trigger-popmake-preview{padding:5px}#pum_popup_settings>.inside{margin:0;padding:0}#popup_cookie_add_event,#popup_trigger_add_type{display:block;font-size:1.4em;height:auto;margin:1.5em 0;padding:.25em;width:100%}#pum_cookie_add_event_modal .pum-modal-wrap,#pum_trigger_add_type_modal .pum-modal-wrap{width:440px;margin-right:-220px}.pum-click-selector-presets{position:absolute;left:2px;bottom:2px}.pum-click-selector-presets>span{border:1px solid;border-radius:2px;background-color:rgba(0,0,0,.5);color:#fff;text-align:center;cursor:pointer;font-size:21px;height:1em;width:1em}.pum-click-selector-presets.open>span,.pum-click-selector-presets>span:hover{background-color:#0085ba}.pum-click-selector-presets ul{display:none;margin:0;padding:0;position:absolute;top:1px;right:20px;background-color:#fff;width:auto;z-index:999;box-shadow:-1px 1px 5px -1px;border:1px solid rgba(0,0,0,.25);min-width:125px}.pum-click-selector-presets ul li{display:block;padding:.5em;border-bottom:1px dashed rgba(0,0,0,.25);text-wrap:none;margin:0}.pum-click-selector-presets ul li span{cursor:pointer;display:block;line-height:1}.pum-click-selector-presets ul li:last-child{border-bottom:0}.pum-click-selector-presets ul li:hover{color:#0085ba}.pum-click-selector-presets.open ul{display:block}
|
1 |
+
#pum-popup-settings-container .popup-types{display:flex;flex-direction:column;justify-content:space-between;width:100%}@media screen and (min-width:600px){#pum-popup-settings-container .popup-types{flex-direction:row;flex-wrap:wrap}}#pum-popup-settings-container .popup-types .popup-type{margin:0 1.5% 20px;transition:transform .1s;cursor:pointer}@media screen and (min-width:600px) and (max-width:1279px){#pum-popup-settings-container .popup-types .popup-type{width:47%}#pum-popup-settings-container .popup-types .popup-type:nth-child(2n+1){margin-right:0}#pum-popup-settings-container .popup-types .popup-type:nth-child(2n+2){margin-left:0}}@media screen and (min-width:1280px) and (max-width:1365px){#pum-popup-settings-container .popup-types .popup-type{width:30%}#pum-popup-settings-container .popup-types .popup-type:nth-child(3n+1){margin-right:0}#pum-popup-settings-container .popup-types .popup-type:nth-child(3n+3){margin-left:0}}@media screen and (min-width:1366px){#pum-popup-settings-container .popup-types .popup-type{width:22.75%}#pum-popup-settings-container .popup-types .popup-type:nth-child(4n+1){margin-right:0}#pum-popup-settings-container .popup-types .popup-type:nth-child(4n+4){margin-left:0}}#pum-popup-settings-container .popup-types .popup-type:hover{transform:scale(1.1)}#pum-popup-settings-container .popup-types .popup-type img{max-width:100%;height:auto}#pum-popup-settings-container .popup-types .popup-type button{width:100%}#wp-admin-bar-view{display:none}#popup-titlediv{position:relative;margin-top:10px}#popup-titlediv #popup-titlewrap{border:0;padding:0}#popup-titlediv #popup-title-prompt-text{color:#777;position:absolute;font-size:1.7em;padding:11px 10px}#popup-titlediv label{cursor:text}#popup-titlediv #popup-title{padding:3px 8px;font-size:1.7em;line-height:1.125;height:1.7em;width:100%;outline:0;margin:0 0 3px;background-color:#fff}.post-type-popup #edit-slug-box{margin-bottom:5px}#major-publishing-actions{text-align:left}#trigger-popmake-preview{padding:5px}#pum_popup_settings>.inside{margin:0;padding:0}#popup_cookie_add_event,#popup_trigger_add_type{display:block;font-size:1.4em;height:auto;margin:1.5em 0;padding:.25em;width:100%}#pum_cookie_add_event_modal .pum-modal-wrap,#pum_trigger_add_type_modal .pum-modal-wrap{width:440px;margin-right:-220px}.pum-click-selector-presets{position:absolute;left:2px;bottom:2px}.pum-click-selector-presets>span{border:1px solid;border-radius:2px;background-color:rgba(0,0,0,.5);color:#fff;text-align:center;cursor:pointer;font-size:21px;height:1em;width:1em}.pum-click-selector-presets.open>span,.pum-click-selector-presets>span:hover{background-color:#0085ba}.pum-click-selector-presets ul{display:none;margin:0;padding:0;position:absolute;top:1px;right:20px;background-color:#fff;width:auto;z-index:999;box-shadow:-1px 1px 5px -1px;border:1px solid rgba(0,0,0,.25);min-width:125px}.pum-click-selector-presets ul li{display:block;padding:.5em;border-bottom:1px dashed rgba(0,0,0,.25);text-wrap:none;margin:0}.pum-click-selector-presets ul li span{cursor:pointer;display:block;line-height:1}.pum-click-selector-presets ul li:last-child{border-bottom:0}.pum-click-selector-presets ul li:hover{color:#0085ba}.pum-click-selector-presets.open ul{display:block}pre.manual-cookie-shortcode{overflow:hidden;max-width:20vw;max-height:1.7em;margin:0}pre.manual-cookie-shortcode code{overflow-x:scroll;display:block;padding:2px 16px 1px;margin:0 -17px}pre.manual-cookie-shortcode code::after,pre.manual-cookie-shortcode code::before{content:" "}
|
assets/css/pum-admin-popup-editor.css
CHANGED
@@ -1,6 +1,81 @@
|
|
1 |
/*!******************************************************************************
|
2 |
* Copyright (c) 2019, Code Atlantic LLC
|
3 |
******************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
#wp-admin-bar-view {
|
5 |
display: none;
|
6 |
}
|
@@ -137,4 +212,25 @@
|
|
137 |
display: block;
|
138 |
}
|
139 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
140 |
/*# sourceMappingURL=pum-admin-popup-editor.css.map */
|
1 |
/*!******************************************************************************
|
2 |
* Copyright (c) 2019, Code Atlantic LLC
|
3 |
******************************************************************************/
|
4 |
+
/***********
|
5 |
+
Display Switcher
|
6 |
+
***********/
|
7 |
+
#pum-popup-settings-container .popup-types {
|
8 |
+
display: flex;
|
9 |
+
flex-direction: column;
|
10 |
+
justify-content: space-between;
|
11 |
+
width: 100%;
|
12 |
+
}
|
13 |
+
|
14 |
+
@media screen and (min-width: 600px) {
|
15 |
+
#pum-popup-settings-container .popup-types {
|
16 |
+
flex-direction: row;
|
17 |
+
flex-wrap: wrap;
|
18 |
+
}
|
19 |
+
}
|
20 |
+
|
21 |
+
#pum-popup-settings-container .popup-types .popup-type {
|
22 |
+
margin: 0 1.5% 20px;
|
23 |
+
transition: transform 0.1s ease 0s;
|
24 |
+
cursor: pointer;
|
25 |
+
}
|
26 |
+
|
27 |
+
@media screen and (min-width: 600px) and (max-width: 1279px) {
|
28 |
+
#pum-popup-settings-container .popup-types .popup-type {
|
29 |
+
width: 47%;
|
30 |
+
}
|
31 |
+
#pum-popup-settings-container .popup-types .popup-type:nth-child(2n+1) {
|
32 |
+
margin-left: 0;
|
33 |
+
}
|
34 |
+
#pum-popup-settings-container .popup-types .popup-type:nth-child(2n+2) {
|
35 |
+
margin-right: 0;
|
36 |
+
}
|
37 |
+
}
|
38 |
+
|
39 |
+
@media screen and (min-width: 1280px) and (max-width: 1365px) {
|
40 |
+
#pum-popup-settings-container .popup-types .popup-type {
|
41 |
+
width: 30%;
|
42 |
+
}
|
43 |
+
#pum-popup-settings-container .popup-types .popup-type:nth-child(3n+1) {
|
44 |
+
margin-left: 0;
|
45 |
+
}
|
46 |
+
#pum-popup-settings-container .popup-types .popup-type:nth-child(3n+3) {
|
47 |
+
margin-right: 0;
|
48 |
+
}
|
49 |
+
}
|
50 |
+
|
51 |
+
@media screen and (min-width: 1366px) {
|
52 |
+
#pum-popup-settings-container .popup-types .popup-type {
|
53 |
+
width: 22.75%;
|
54 |
+
}
|
55 |
+
#pum-popup-settings-container .popup-types .popup-type:nth-child(4n+1) {
|
56 |
+
margin-left: 0;
|
57 |
+
}
|
58 |
+
#pum-popup-settings-container .popup-types .popup-type:nth-child(4n+4) {
|
59 |
+
margin-right: 0;
|
60 |
+
}
|
61 |
+
}
|
62 |
+
|
63 |
+
#pum-popup-settings-container .popup-types .popup-type:hover {
|
64 |
+
transform: scale(1.1);
|
65 |
+
}
|
66 |
+
|
67 |
+
#pum-popup-settings-container .popup-types .popup-type img {
|
68 |
+
max-width: 100%;
|
69 |
+
height: auto;
|
70 |
+
}
|
71 |
+
|
72 |
+
#pum-popup-settings-container .popup-types .popup-type button {
|
73 |
+
width: 100%;
|
74 |
+
}
|
75 |
+
|
76 |
+
/***********
|
77 |
+
Misc
|
78 |
+
***********/
|
79 |
#wp-admin-bar-view {
|
80 |
display: none;
|
81 |
}
|
212 |
display: block;
|
213 |
}
|
214 |
|
215 |
+
/***********
|
216 |
+
Manual Cookie Shortcode
|
217 |
+
***********/
|
218 |
+
pre.manual-cookie-shortcode {
|
219 |
+
overflow: hidden;
|
220 |
+
max-width: 20vw;
|
221 |
+
max-height: 1.7em;
|
222 |
+
margin: 0;
|
223 |
+
}
|
224 |
+
|
225 |
+
pre.manual-cookie-shortcode code {
|
226 |
+
overflow-x: scroll;
|
227 |
+
display: block;
|
228 |
+
padding: 2px 16px 1px;
|
229 |
+
margin: 0px -17px;
|
230 |
+
}
|
231 |
+
|
232 |
+
pre.manual-cookie-shortcode code::before, pre.manual-cookie-shortcode code::after {
|
233 |
+
content: " ";
|
234 |
+
}
|
235 |
+
|
236 |
/*# sourceMappingURL=pum-admin-popup-editor.css.map */
|
assets/css/pum-admin-popup-editor.css.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"sources":["pum-admin-popup-editor.scss","pum-admin-popup-editor.css"],"names":[],"mappings":"AAAA;;+ECE+E;ADE/E;EACE,aAAa;ACAf;;ADGA;EAEE,kBAAkB;EAClB,gBAAgB;ACDlB;;ADFA;EAMI,SAAS;EACT,UAAU;ACAd;;ADPA;EAWI,WAAW;EACX,kBAAkB;EAClB,gBAAgB;EAChB,kBAAkB;ACAtB;;ADdA;EAkBI,YAAY;ACAhB;;ADlBA;EAsBI,gBAAgB;EAChB,gBAAgB;EAChB,kBAAkB;EAClB,aAAa;EACb,WAAW;EACX,aAAa;EACb,eAAe;EACf,sBAAsB;ACA1B;;ADKA;EAEI,kBAAkB;ACHtB;;ADOA;EACE,iBAAiB;ACJnB;;ADOA;EACE,YAAY;ACJd;;ADOA;EAMI,SAAS;EACT,UAAU;ACTd;;ADaA;;EAEE,cAAc;EACd,gBAAgB;EAChB,YAAY;EACZ,eAAe;EACf,eAAe;EACf,WAAW;ACVb;;ADaA;;EAGI,YAAY;EACZ,mBAAmB;ACXvB;;ADeA;EACE,kBAAkB;EAClB,UAAU;EACV,WAAW;ACZb;;ADSA;EAOI,iBAAiB;EACjB,kBAAkB;EAClB,oCAAmC;EACnC,WAAW;EACX,kBAAkB;EAClB,eAAe;EAEf,eAAe;EACf,WAAW;EACX,UAAU;ACbd;;ADHA;EAmBM,yBAAyB;ACZ/B;;ADPA;EAyBI,yBAAyB;ACd7B;;ADXA;EA6BI,aAAa;EACb,SAAS;EACT,UAAU;EACV,kBAAkB;EAClB,QAAQ;EACR,UAAU;EACV,sBAAsB;EACtB,WAAW;EACX,YAAY;EACZ,4BAA4B;EAC5B,qCAAoC;EACpC,gBAAgB;ACdpB;;AD1BA;EA4CM,cAAc;EACd,aAAa;EACb,6CAA4C;EAE5C,eAAe;EACf,SAAS;ACff;;ADlCA;EAoDQ,eAAe;EACf,cAAc;EACd,cAAc;ACdtB;;ADxCA;EA0DQ,gBAAgB;ACdxB;;AD5CA;EA8DQ,cAAc;ACdtB;;ADhDA;EAsEI,cAAc;AClBlB","file":"pum-admin-popup-editor.css","sourcesContent":["/*!******************************************************************************\n * Copyright (c) 2019, Code Atlantic LLC\n ******************************************************************************/\n\n#wp-admin-bar-view {\n display: none;\n}\n\n#popup-titlediv {\n\n position: relative;\n margin-top: 10px;\n\n #popup-titlewrap {\n border: 0;\n padding: 0;\n }\n\n #popup-title-prompt-text {\n color: #777;\n position: absolute;\n font-size: 1.7em;\n padding: 11px 10px;\n }\n\n label {\n cursor: text;\n }\n\n #popup-title {\n padding: 3px 8px;\n font-size: 1.7em;\n line-height: 1.125;\n height: 1.7em;\n width: 100%;\n outline: none;\n margin: 0 0 3px;\n background-color: #fff;\n }\n\n}\n\n.post-type-popup {\n #edit-slug-box {\n margin-bottom: 5px;\n }\n}\n\n#major-publishing-actions {\n text-align: right;\n}\n\n#trigger-popmake-preview {\n padding: 5px;\n}\n\n#pum_popup_settings {\n > h2.hndle,\n > .handlediv {\n // display: none;\n }\n > .inside {\n margin: 0;\n padding: 0;\n }\n}\n\n#popup_trigger_add_type,\n#popup_cookie_add_event {\n display: block;\n font-size: 1.4em;\n height: auto;\n margin: 1.5em 0;\n padding: 0.25em;\n width: 100%;\n}\n\n#pum_trigger_add_type_modal,\n#pum_cookie_add_event_modal {\n .pum-modal-wrap {\n width: 440px;\n margin-left: -220px;\n }\n}\n\n.pum-click-selector-presets {\n position: absolute;\n right: 2px;\n bottom: 2px;\n\n > span {\n\n border: 1px solid;\n border-radius: 2px;\n background-color: rgba(0, 0, 0, .5);\n color: #fff;\n text-align: center;\n cursor: pointer;\n\n font-size: 21px;\n height: 1em;\n width: 1em;\n\n &:hover {\n background-color: #0085ba;\n }\n\n }\n\n &.open > span {\n background-color: #0085ba;\n }\n\n ul {\n display: none;\n margin: 0;\n padding: 0;\n position: absolute;\n top: 1px;\n left: 20px;\n background-color: #fff;\n width: auto;\n z-index: 999;\n box-shadow: 1px 1px 5px -1px;\n border: 1px solid rgba(0, 0, 0, .25);\n min-width: 125px;\n\n li {\n\n display: block;\n padding: .5em;\n border-bottom: 1px dashed rgba(0, 0, 0, .25);\n\n text-wrap: none;\n margin: 0;\n\n span {\n cursor: pointer;\n display: block;\n line-height: 1;\n }\n\n &:last-child {\n border-bottom: 0;\n }\n\n &:hover {\n color: #0085ba;\n }\n\n }\n\n }\n\n &.open ul {\n display: block;\n }\n\n}","/*!******************************************************************************\n * Copyright (c) 2019, Code Atlantic LLC\n ******************************************************************************/\n#wp-admin-bar-view {\n display: none;\n}\n\n#popup-titlediv {\n position: relative;\n margin-top: 10px;\n}\n\n#popup-titlediv #popup-titlewrap {\n border: 0;\n padding: 0;\n}\n\n#popup-titlediv #popup-title-prompt-text {\n color: #777;\n position: absolute;\n font-size: 1.7em;\n padding: 11px 10px;\n}\n\n#popup-titlediv label {\n cursor: text;\n}\n\n#popup-titlediv #popup-title {\n padding: 3px 8px;\n font-size: 1.7em;\n line-height: 1.125;\n height: 1.7em;\n width: 100%;\n outline: none;\n margin: 0 0 3px;\n background-color: #fff;\n}\n\n.post-type-popup #edit-slug-box {\n margin-bottom: 5px;\n}\n\n#major-publishing-actions {\n text-align: right;\n}\n\n#trigger-popmake-preview {\n padding: 5px;\n}\n\n#pum_popup_settings > .inside {\n margin: 0;\n padding: 0;\n}\n\n#popup_trigger_add_type,\n#popup_cookie_add_event {\n display: block;\n font-size: 1.4em;\n height: auto;\n margin: 1.5em 0;\n padding: 0.25em;\n width: 100%;\n}\n\n#pum_trigger_add_type_modal .pum-modal-wrap,\n#pum_cookie_add_event_modal .pum-modal-wrap {\n width: 440px;\n margin-left: -220px;\n}\n\n.pum-click-selector-presets {\n position: absolute;\n right: 2px;\n bottom: 2px;\n}\n\n.pum-click-selector-presets > span {\n border: 1px solid;\n border-radius: 2px;\n background-color: rgba(0, 0, 0, 0.5);\n color: #fff;\n text-align: center;\n cursor: pointer;\n font-size: 21px;\n height: 1em;\n width: 1em;\n}\n\n.pum-click-selector-presets > span:hover {\n background-color: #0085ba;\n}\n\n.pum-click-selector-presets.open > span {\n background-color: #0085ba;\n}\n\n.pum-click-selector-presets ul {\n display: none;\n margin: 0;\n padding: 0;\n position: absolute;\n top: 1px;\n left: 20px;\n background-color: #fff;\n width: auto;\n z-index: 999;\n box-shadow: 1px 1px 5px -1px;\n border: 1px solid rgba(0, 0, 0, 0.25);\n min-width: 125px;\n}\n\n.pum-click-selector-presets ul li {\n display: block;\n padding: .5em;\n border-bottom: 1px dashed rgba(0, 0, 0, 0.25);\n text-wrap: none;\n margin: 0;\n}\n\n.pum-click-selector-presets ul li span {\n cursor: pointer;\n display: block;\n line-height: 1;\n}\n\n.pum-click-selector-presets ul li:last-child {\n border-bottom: 0;\n}\n\n.pum-click-selector-presets ul li:hover {\n color: #0085ba;\n}\n\n.pum-click-selector-presets.open ul {\n display: block;\n}\n"]}
|
1 |
+
{"version":3,"sources":["pum-admin-popup-editor.scss","pum-admin-popup-editor.css"],"names":[],"mappings":"AAAA;;+ECE+E;ADE/E;;WCCW;ADGX;EACC,aAAa;EACb,sBAAsB;EACtB,8BAA8B;EAC9B,WAAW;ACDZ;;ADGC;EAND;IAOE,mBAAmB;IACnB,eAAe;ECCf;AACF;;ADVA;EAYE,mBAAmB;EACnB,kCAAkC;EAClC,eAAc;ACEhB;;ADAE;EAhBF;IAiBG,UAAU;ECIX;EDrBF;IAoBI,cAAc;ECIhB;EDxBF;IAwBI,eAAe;ECGjB;AACF;;ADCE;EA7BF;IA8BG,UAAU;ECGX;EDjCF;IAiCI,cAAc;ECGhB;EDpCF;IAqCI,eAAe;ECEjB;AACF;;ADCE;EAzCF;IA0CG,aAAa;ECGd;ED7CF;IA6CI,cAAc;ECGhB;EDhDF;IAiDI,eAAe;ECEjB;AACF;;ADpDA;EAsDI,qBAAqB;ACEzB;;ADxDA;EA0DG,eAAe;EACf,YAAY;ACEf;;AD7DA;EA+DG,WAAW;ACEd;;ADKA;;WCDW;ADKX;EACE,aAAa;ACHf;;ADMA;EAEE,kBAAkB;EAClB,gBAAgB;ACJlB;;ADCA;EAMI,SAAS;EACT,UAAU;ACHd;;ADJA;EAWI,WAAW;EACX,kBAAkB;EAClB,gBAAgB;EAChB,kBAAkB;ACHtB;;ADXA;EAkBI,YAAY;ACHhB;;ADfA;EAsBI,gBAAgB;EAChB,gBAAgB;EAChB,kBAAkB;EAClB,aAAa;EACb,WAAW;EACX,aAAa;EACb,eAAe;EACf,sBAAsB;ACH1B;;ADQA;EAEI,kBAAkB;ACNtB;;ADUA;EACE,iBAAiB;ACPnB;;ADUA;EACE,YAAY;ACPd;;ADUA;EAMI,SAAS;EACT,UAAU;ACZd;;ADgBA;;EAEE,cAAc;EACd,gBAAgB;EAChB,YAAY;EACZ,eAAe;EACf,eAAe;EACf,WAAW;ACbb;;ADgBA;;EAGI,YAAY;EACZ,mBAAmB;ACdvB;;ADkBA;EACE,kBAAkB;EAClB,UAAU;EACV,WAAW;ACfb;;ADYA;EAOI,iBAAiB;EACjB,kBAAkB;EAClB,oCAAmC;EACnC,WAAW;EACX,kBAAkB;EAClB,eAAe;EAEf,eAAe;EACf,WAAW;EACX,UAAU;AChBd;;ADAA;EAmBM,yBAAyB;ACf/B;;ADJA;EAyBI,yBAAyB;ACjB7B;;ADRA;EA6BI,aAAa;EACb,SAAS;EACT,UAAU;EACV,kBAAkB;EAClB,QAAQ;EACR,UAAU;EACV,sBAAsB;EACtB,WAAW;EACX,YAAY;EACZ,4BAA4B;EAC5B,qCAAoC;EACpC,gBAAgB;ACjBpB;;ADvBA;EA4CM,cAAc;EACd,aAAa;EACb,6CAA4C;EAE5C,eAAe;EACf,SAAS;AClBf;;AD/BA;EAoDQ,eAAe;EACf,cAAc;EACd,cAAc;ACjBtB;;ADrCA;EA0DQ,gBAAgB;ACjBxB;;ADzCA;EA8DQ,cAAc;ACjBtB;;AD7CA;EAsEI,cAAc;ACrBlB;;AD2BA;;WCvBW;AD2BX;EACE,gBAAgB;EAChB,eAAe;EACf,iBAAiB;EACjB,SAAS;ACzBX;;ADqBA;EAOI,kBAAkB;EAClB,cAAc;EACd,qBAAqB;EACrB,iBAAiB;ACxBrB;;ADcA;EAaM,YAAY;ACvBlB","file":"pum-admin-popup-editor.css","sourcesContent":["/*!******************************************************************************\n * Copyright (c) 2019, Code Atlantic LLC\n ******************************************************************************/\n\n/***********\nDisplay Switcher\n***********/\n\n#pum-popup-settings-container .popup-types {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\twidth: 100%;\n\n\t@media screen and (min-width: 600px) {\n\t\tflex-direction: row;\n\t\tflex-wrap: wrap;\n\t}\n\n\t.popup-type {\n\t\tmargin: 0 1.5% 20px;\n\t\ttransition: transform 0.1s ease 0s;\n\t\tcursor:pointer;\n\n\t\t@media screen and (min-width: 600px) and (max-width: 1279px) {\n\t\t\twidth: 47%;\n\n\t\t\t&:nth-child(2n+1) {\n\t\t\t\tmargin-left: 0; // First column in each row\n\t\t\t}\n\n\t\t\t&:nth-child(2n+2) {\n\t\t\t\tmargin-right: 0; // Last Column in each row\n\t\t\t}\n\t\t}\n\n\n\t\t@media screen and (min-width: 1280px) and (max-width: 1365px) {\n\t\t\twidth: 30%;\n\n\t\t\t&:nth-child(3n+1) {\n\t\t\t\tmargin-left: 0; // First column in each row\n\t\t\t}\n\n\t\t\t&:nth-child(3n+3) {\n\t\t\t\tmargin-right: 0; // Last Column in each row\n\t\t\t}\n\t\t}\n\n\t\t@media screen and (min-width: 1366px) {\n\t\t\twidth: 22.75%;\n\n\t\t\t&:nth-child(4n+1) {\n\t\t\t\tmargin-left: 0; // First column in each row\n\t\t\t}\n\n\t\t\t&:nth-child(4n+4) {\n\t\t\t\tmargin-right: 0; // Last Column in each row\n\t\t\t}\n\t\t}\n\n\t\t&:hover {\n\t\t\t\ttransform: scale(1.1); // Intentional ?\n\t\t}\n\n\t\timg {\n\t\t\tmax-width: 100%;\n\t\t\theight: auto;\n\t\t}\n\n\t\tbutton {\n\t\t\twidth: 100%;\n\t\t}\n\t}\n}\n\n\n\n/***********\nMisc\n***********/\n\n#wp-admin-bar-view {\n display: none;\n}\n\n#popup-titlediv {\n\n position: relative;\n margin-top: 10px;\n\n #popup-titlewrap {\n border: 0;\n padding: 0;\n }\n\n #popup-title-prompt-text {\n color: #777;\n position: absolute;\n font-size: 1.7em;\n padding: 11px 10px;\n }\n\n label {\n cursor: text;\n }\n\n #popup-title {\n padding: 3px 8px;\n font-size: 1.7em;\n line-height: 1.125;\n height: 1.7em;\n width: 100%;\n outline: none;\n margin: 0 0 3px;\n background-color: #fff;\n }\n\n}\n\n.post-type-popup {\n #edit-slug-box {\n margin-bottom: 5px;\n }\n}\n\n#major-publishing-actions {\n text-align: right;\n}\n\n#trigger-popmake-preview {\n padding: 5px;\n}\n\n#pum_popup_settings {\n > h2.hndle,\n > .handlediv {\n // display: none;\n }\n > .inside {\n margin: 0;\n padding: 0;\n }\n}\n\n#popup_trigger_add_type,\n#popup_cookie_add_event {\n display: block;\n font-size: 1.4em;\n height: auto;\n margin: 1.5em 0;\n padding: 0.25em;\n width: 100%;\n}\n\n#pum_trigger_add_type_modal,\n#pum_cookie_add_event_modal {\n .pum-modal-wrap {\n width: 440px;\n margin-left: -220px;\n }\n}\n\n.pum-click-selector-presets {\n position: absolute;\n right: 2px;\n bottom: 2px;\n\n > span {\n\n border: 1px solid;\n border-radius: 2px;\n background-color: rgba(0, 0, 0, .5);\n color: #fff;\n text-align: center;\n cursor: pointer;\n\n font-size: 21px;\n height: 1em;\n width: 1em;\n\n &:hover {\n background-color: #0085ba;\n }\n\n }\n\n &.open > span {\n background-color: #0085ba;\n }\n\n ul {\n display: none;\n margin: 0;\n padding: 0;\n position: absolute;\n top: 1px;\n left: 20px;\n background-color: #fff;\n width: auto;\n z-index: 999;\n box-shadow: 1px 1px 5px -1px;\n border: 1px solid rgba(0, 0, 0, .25);\n min-width: 125px;\n\n li {\n\n display: block;\n padding: .5em;\n border-bottom: 1px dashed rgba(0, 0, 0, .25);\n\n text-wrap: none;\n margin: 0;\n\n span {\n cursor: pointer;\n display: block;\n line-height: 1;\n }\n\n &:last-child {\n border-bottom: 0;\n }\n\n &:hover {\n color: #0085ba;\n }\n\n }\n\n }\n\n &.open ul {\n display: block;\n }\n\n}\n\n\n/***********\nManual Cookie Shortcode\n***********/\n\npre.manual-cookie-shortcode {\n overflow: hidden;\n max-width: 20vw;\n max-height: 1.7em;\n margin: 0;\n\n code {\n overflow-x: scroll;\n display: block;\n padding: 2px 16px 1px;\n margin: 0px -17px;\n\n &::before, &::after {\n content: \" \";\n }\n }\n}\n","/*!******************************************************************************\n * Copyright (c) 2019, Code Atlantic LLC\n ******************************************************************************/\n/***********\nDisplay Switcher\n***********/\n#pum-popup-settings-container .popup-types {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n width: 100%;\n}\n\n@media screen and (min-width: 600px) {\n #pum-popup-settings-container .popup-types {\n flex-direction: row;\n flex-wrap: wrap;\n }\n}\n\n#pum-popup-settings-container .popup-types .popup-type {\n margin: 0 1.5% 20px;\n transition: transform 0.1s ease 0s;\n cursor: pointer;\n}\n\n@media screen and (min-width: 600px) and (max-width: 1279px) {\n #pum-popup-settings-container .popup-types .popup-type {\n width: 47%;\n }\n #pum-popup-settings-container .popup-types .popup-type:nth-child(2n+1) {\n margin-left: 0;\n }\n #pum-popup-settings-container .popup-types .popup-type:nth-child(2n+2) {\n margin-right: 0;\n }\n}\n\n@media screen and (min-width: 1280px) and (max-width: 1365px) {\n #pum-popup-settings-container .popup-types .popup-type {\n width: 30%;\n }\n #pum-popup-settings-container .popup-types .popup-type:nth-child(3n+1) {\n margin-left: 0;\n }\n #pum-popup-settings-container .popup-types .popup-type:nth-child(3n+3) {\n margin-right: 0;\n }\n}\n\n@media screen and (min-width: 1366px) {\n #pum-popup-settings-container .popup-types .popup-type {\n width: 22.75%;\n }\n #pum-popup-settings-container .popup-types .popup-type:nth-child(4n+1) {\n margin-left: 0;\n }\n #pum-popup-settings-container .popup-types .popup-type:nth-child(4n+4) {\n margin-right: 0;\n }\n}\n\n#pum-popup-settings-container .popup-types .popup-type:hover {\n transform: scale(1.1);\n}\n\n#pum-popup-settings-container .popup-types .popup-type img {\n max-width: 100%;\n height: auto;\n}\n\n#pum-popup-settings-container .popup-types .popup-type button {\n width: 100%;\n}\n\n/***********\nMisc\n***********/\n#wp-admin-bar-view {\n display: none;\n}\n\n#popup-titlediv {\n position: relative;\n margin-top: 10px;\n}\n\n#popup-titlediv #popup-titlewrap {\n border: 0;\n padding: 0;\n}\n\n#popup-titlediv #popup-title-prompt-text {\n color: #777;\n position: absolute;\n font-size: 1.7em;\n padding: 11px 10px;\n}\n\n#popup-titlediv label {\n cursor: text;\n}\n\n#popup-titlediv #popup-title {\n padding: 3px 8px;\n font-size: 1.7em;\n line-height: 1.125;\n height: 1.7em;\n width: 100%;\n outline: none;\n margin: 0 0 3px;\n background-color: #fff;\n}\n\n.post-type-popup #edit-slug-box {\n margin-bottom: 5px;\n}\n\n#major-publishing-actions {\n text-align: right;\n}\n\n#trigger-popmake-preview {\n padding: 5px;\n}\n\n#pum_popup_settings > .inside {\n margin: 0;\n padding: 0;\n}\n\n#popup_trigger_add_type,\n#popup_cookie_add_event {\n display: block;\n font-size: 1.4em;\n height: auto;\n margin: 1.5em 0;\n padding: 0.25em;\n width: 100%;\n}\n\n#pum_trigger_add_type_modal .pum-modal-wrap,\n#pum_cookie_add_event_modal .pum-modal-wrap {\n width: 440px;\n margin-left: -220px;\n}\n\n.pum-click-selector-presets {\n position: absolute;\n right: 2px;\n bottom: 2px;\n}\n\n.pum-click-selector-presets > span {\n border: 1px solid;\n border-radius: 2px;\n background-color: rgba(0, 0, 0, 0.5);\n color: #fff;\n text-align: center;\n cursor: pointer;\n font-size: 21px;\n height: 1em;\n width: 1em;\n}\n\n.pum-click-selector-presets > span:hover {\n background-color: #0085ba;\n}\n\n.pum-click-selector-presets.open > span {\n background-color: #0085ba;\n}\n\n.pum-click-selector-presets ul {\n display: none;\n margin: 0;\n padding: 0;\n position: absolute;\n top: 1px;\n left: 20px;\n background-color: #fff;\n width: auto;\n z-index: 999;\n box-shadow: 1px 1px 5px -1px;\n border: 1px solid rgba(0, 0, 0, 0.25);\n min-width: 125px;\n}\n\n.pum-click-selector-presets ul li {\n display: block;\n padding: .5em;\n border-bottom: 1px dashed rgba(0, 0, 0, 0.25);\n text-wrap: none;\n margin: 0;\n}\n\n.pum-click-selector-presets ul li span {\n cursor: pointer;\n display: block;\n line-height: 1;\n}\n\n.pum-click-selector-presets ul li:last-child {\n border-bottom: 0;\n}\n\n.pum-click-selector-presets ul li:hover {\n color: #0085ba;\n}\n\n.pum-click-selector-presets.open ul {\n display: block;\n}\n\n/***********\nManual Cookie Shortcode\n***********/\npre.manual-cookie-shortcode {\n overflow: hidden;\n max-width: 20vw;\n max-height: 1.7em;\n margin: 0;\n}\n\npre.manual-cookie-shortcode code {\n overflow-x: scroll;\n display: block;\n padding: 2px 16px 1px;\n margin: 0px -17px;\n}\n\npre.manual-cookie-shortcode code::before, pre.manual-cookie-shortcode code::after {\n content: \" \";\n}\n"]}
|
assets/css/pum-admin-popup-editor.min.css
CHANGED
@@ -1 +1 @@
|
|
1 |
-
#wp-admin-bar-view{display:none}#popup-titlediv{position:relative;margin-top:10px}#popup-titlediv #popup-titlewrap{border:0;padding:0}#popup-titlediv #popup-title-prompt-text{color:#777;position:absolute;font-size:1.7em;padding:11px 10px}#popup-titlediv label{cursor:text}#popup-titlediv #popup-title{padding:3px 8px;font-size:1.7em;line-height:1.125;height:1.7em;width:100%;outline:0;margin:0 0 3px;background-color:#fff}.post-type-popup #edit-slug-box{margin-bottom:5px}#major-publishing-actions{text-align:right}#trigger-popmake-preview{padding:5px}#pum_popup_settings>.inside{margin:0;padding:0}#popup_cookie_add_event,#popup_trigger_add_type{display:block;font-size:1.4em;height:auto;margin:1.5em 0;padding:.25em;width:100%}#pum_cookie_add_event_modal .pum-modal-wrap,#pum_trigger_add_type_modal .pum-modal-wrap{width:440px;margin-left:-220px}.pum-click-selector-presets{position:absolute;right:2px;bottom:2px}.pum-click-selector-presets>span{border:1px solid;border-radius:2px;background-color:rgba(0,0,0,.5);color:#fff;text-align:center;cursor:pointer;font-size:21px;height:1em;width:1em}.pum-click-selector-presets.open>span,.pum-click-selector-presets>span:hover{background-color:#0085ba}.pum-click-selector-presets ul{display:none;margin:0;padding:0;position:absolute;top:1px;left:20px;background-color:#fff;width:auto;z-index:999;box-shadow:1px 1px 5px -1px;border:1px solid rgba(0,0,0,.25);min-width:125px}.pum-click-selector-presets ul li{display:block;padding:.5em;border-bottom:1px dashed rgba(0,0,0,.25);text-wrap:none;margin:0}.pum-click-selector-presets ul li span{cursor:pointer;display:block;line-height:1}.pum-click-selector-presets ul li:last-child{border-bottom:0}.pum-click-selector-presets ul li:hover{color:#0085ba}.pum-click-selector-presets.open ul{display:block}
|
1 |
+
#pum-popup-settings-container .popup-types{display:flex;flex-direction:column;justify-content:space-between;width:100%}@media screen and (min-width:600px){#pum-popup-settings-container .popup-types{flex-direction:row;flex-wrap:wrap}}#pum-popup-settings-container .popup-types .popup-type{margin:0 1.5% 20px;transition:transform .1s;cursor:pointer}@media screen and (min-width:600px) and (max-width:1279px){#pum-popup-settings-container .popup-types .popup-type{width:47%}#pum-popup-settings-container .popup-types .popup-type:nth-child(2n+1){margin-left:0}#pum-popup-settings-container .popup-types .popup-type:nth-child(2n+2){margin-right:0}}@media screen and (min-width:1280px) and (max-width:1365px){#pum-popup-settings-container .popup-types .popup-type{width:30%}#pum-popup-settings-container .popup-types .popup-type:nth-child(3n+1){margin-left:0}#pum-popup-settings-container .popup-types .popup-type:nth-child(3n+3){margin-right:0}}@media screen and (min-width:1366px){#pum-popup-settings-container .popup-types .popup-type{width:22.75%}#pum-popup-settings-container .popup-types .popup-type:nth-child(4n+1){margin-left:0}#pum-popup-settings-container .popup-types .popup-type:nth-child(4n+4){margin-right:0}}#pum-popup-settings-container .popup-types .popup-type:hover{transform:scale(1.1)}#pum-popup-settings-container .popup-types .popup-type img{max-width:100%;height:auto}#pum-popup-settings-container .popup-types .popup-type button{width:100%}#wp-admin-bar-view{display:none}#popup-titlediv{position:relative;margin-top:10px}#popup-titlediv #popup-titlewrap{border:0;padding:0}#popup-titlediv #popup-title-prompt-text{color:#777;position:absolute;font-size:1.7em;padding:11px 10px}#popup-titlediv label{cursor:text}#popup-titlediv #popup-title{padding:3px 8px;font-size:1.7em;line-height:1.125;height:1.7em;width:100%;outline:0;margin:0 0 3px;background-color:#fff}.post-type-popup #edit-slug-box{margin-bottom:5px}#major-publishing-actions{text-align:right}#trigger-popmake-preview{padding:5px}#pum_popup_settings>.inside{margin:0;padding:0}#popup_cookie_add_event,#popup_trigger_add_type{display:block;font-size:1.4em;height:auto;margin:1.5em 0;padding:.25em;width:100%}#pum_cookie_add_event_modal .pum-modal-wrap,#pum_trigger_add_type_modal .pum-modal-wrap{width:440px;margin-left:-220px}.pum-click-selector-presets{position:absolute;right:2px;bottom:2px}.pum-click-selector-presets>span{border:1px solid;border-radius:2px;background-color:rgba(0,0,0,.5);color:#fff;text-align:center;cursor:pointer;font-size:21px;height:1em;width:1em}.pum-click-selector-presets.open>span,.pum-click-selector-presets>span:hover{background-color:#0085ba}.pum-click-selector-presets ul{display:none;margin:0;padding:0;position:absolute;top:1px;left:20px;background-color:#fff;width:auto;z-index:999;box-shadow:1px 1px 5px -1px;border:1px solid rgba(0,0,0,.25);min-width:125px}.pum-click-selector-presets ul li{display:block;padding:.5em;border-bottom:1px dashed rgba(0,0,0,.25);text-wrap:none;margin:0}.pum-click-selector-presets ul li span{cursor:pointer;display:block;line-height:1}.pum-click-selector-presets ul li:last-child{border-bottom:0}.pum-click-selector-presets ul li:hover{color:#0085ba}.pum-click-selector-presets.open ul{display:block}pre.manual-cookie-shortcode{overflow:hidden;max-width:20vw;max-height:1.7em;margin:0}pre.manual-cookie-shortcode code{overflow-x:scroll;display:block;padding:2px 16px 1px;margin:0 -17px}pre.manual-cookie-shortcode code::after,pre.manual-cookie-shortcode code::before{content:" "}
|
assets/images/admin/display-switcher/center-popup.png
ADDED
Binary file
|
assets/images/admin/display-switcher/left-bottom-notice.png
ADDED
Binary file
|
assets/images/admin/display-switcher/right-bottom-slidein.png
ADDED
Binary file
|
assets/images/admin/display-switcher/top-bar.png
ADDED
Binary file
|
assets/images/plugins/caldera-forms.png
ADDED
Binary file
|
assets/images/plugins/content-control.png
ADDED
Binary file
|
assets/images/plugins/mc4wp.png
ADDED
Binary file
|
assets/images/plugins/quiz-survey-master.png
DELETED
Binary file
|
assets/images/plugins/user-menus.png
ADDED
Binary file
|
assets/images/plugins/wp-forms.png
ADDED
Binary file
|
assets/js/admin-general.js
CHANGED
@@ -8152,8 +8152,6 @@ function pumChecked(val1, val2, print) {
|
|
8152 |
if (Array.isArray(data.value) && data.value.length === 1 && data.value[0].toString() === '1') {
|
8153 |
data.value = true;
|
8154 |
data.meta.checked = true;
|
8155 |
-
} else {
|
8156 |
-
|
8157 |
}
|
8158 |
break;
|
8159 |
case 'boolean':
|
@@ -8288,6 +8286,7 @@ function pumChecked(val1, val2, print) {
|
|
8288 |
window.PUM_Admin = window.PUM_Admin || {};
|
8289 |
window.PUM_Admin.templates = templates;
|
8290 |
}(window.jQuery));
|
|
|
8291 |
/*******************************************************************************
|
8292 |
* Copyright (c) 2019, Code Atlantic LLC
|
8293 |
******************************************************************************/
|
8152 |
if (Array.isArray(data.value) && data.value.length === 1 && data.value[0].toString() === '1') {
|
8153 |
data.value = true;
|
8154 |
data.meta.checked = true;
|
|
|
|
|
8155 |
}
|
8156 |
break;
|
8157 |
case 'boolean':
|
8286 |
window.PUM_Admin = window.PUM_Admin || {};
|
8287 |
window.PUM_Admin.templates = templates;
|
8288 |
}(window.jQuery));
|
8289 |
+
|
8290 |
/*******************************************************************************
|
8291 |
* Copyright (c) 2019, Code Atlantic LLC
|
8292 |
******************************************************************************/
|
assets/js/admin-popup-editor.js
CHANGED
@@ -1218,6 +1218,133 @@ var cookies;
|
|
1218 |
$('#pum-first-condition, #pum-first-trigger, #pum-first-cookie')
|
1219 |
.val(null)
|
1220 |
.trigger('change');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1221 |
})
|
1222 |
.on('keydown', '#popup-title', function (event) {
|
1223 |
var keyCode = event.keyCode || event.which;
|
@@ -1244,4 +1371,4 @@ var cookies;
|
|
1244 |
$(target).focus();
|
1245 |
}
|
1246 |
});
|
1247 |
-
}(jQuery));
|
1218 |
$('#pum-first-condition, #pum-first-trigger, #pum-first-cookie')
|
1219 |
.val(null)
|
1220 |
.trigger('change');
|
1221 |
+
|
1222 |
+
// Add event handler to detect when opening sound is change and play the sound to allow admin to preview it.
|
1223 |
+
document.querySelector( '#pum-popup-settings-container' ).addEventListener( 'change', function(e) {
|
1224 |
+
if ( 'open_sound' === e.target.id ) {
|
1225 |
+
// Only play if the sound selected is not None or Custom.
|
1226 |
+
var notThese = ['none', 'custom'];
|
1227 |
+
if ( notThese.indexOf( e.target.value ) === -1 ) {
|
1228 |
+
var audio = new Audio( pum_admin_vars.pm_dir_url + '/assets/sounds/' + e.target.value );
|
1229 |
+
audio.addEventListener( 'canplaythrough', function() {
|
1230 |
+
this.play()
|
1231 |
+
.catch(function( reason ) {
|
1232 |
+
console.warn('Sound was not able to play when selected. Reason: ' + reason );
|
1233 |
+
});
|
1234 |
+
});
|
1235 |
+
audio.addEventListener( 'error', function() {
|
1236 |
+
console.warn( 'Error occurred when trying to load popup opening sound.' );
|
1237 |
+
});
|
1238 |
+
}
|
1239 |
+
}
|
1240 |
+
});
|
1241 |
+
|
1242 |
+
document.querySelector( '#pum-popup-settings-container' ).addEventListener( 'click', function(e) {
|
1243 |
+
if ( Array.from( e.target.classList ).includes( 'popup-type' ) || Array.from( e.target.parentElement.classList ).includes( 'popup-type' ) ) {
|
1244 |
+
var $container = jQuery( '#pum-popup-settings-container' );
|
1245 |
+
if ( 1 === $container.length ) {
|
1246 |
+
// Our initial presets. As we add more, consider creating JSON import system and moving to there.
|
1247 |
+
var popupTypes = {
|
1248 |
+
'center-popup': {
|
1249 |
+
'size': 'medium',
|
1250 |
+
'responsive_min_width': '0%',
|
1251 |
+
'responsive_max_width': '100%',
|
1252 |
+
'animation_type': 'fade',
|
1253 |
+
'animation_speed': 350,
|
1254 |
+
'location': 'center',
|
1255 |
+
'position_fixed': false,
|
1256 |
+
'position_from_trigger': false,
|
1257 |
+
'overlay_disabled': false,
|
1258 |
+
'stackable': false,
|
1259 |
+
'disable_reposition': false,
|
1260 |
+
},
|
1261 |
+
'left-bottom-notice': {
|
1262 |
+
'size': 'tiny',
|
1263 |
+
'responsive_min_width': '0%',
|
1264 |
+
'responsive_max_width': '100%',
|
1265 |
+
'animation_type': 'fade',
|
1266 |
+
'animation_speed': 350,
|
1267 |
+
'animation_origin': 'left bottom',
|
1268 |
+
'location': 'left bottom',
|
1269 |
+
'position_bottom': 10,
|
1270 |
+
'position_left': 10,
|
1271 |
+
'position_from_trigger': false,
|
1272 |
+
'position_fixed': true,
|
1273 |
+
'overlay_disabled': true,
|
1274 |
+
'stackable': true,
|
1275 |
+
'disable_reposition': false,
|
1276 |
+
},
|
1277 |
+
'top-bar': {
|
1278 |
+
'size': 'custom',
|
1279 |
+
'custom_width': '100%',
|
1280 |
+
'custom_height_auto': true,
|
1281 |
+
'animation_type': 'fadeAndSlide',
|
1282 |
+
'animation_speed': 300,
|
1283 |
+
'animation_origin': 'top',
|
1284 |
+
'location': 'center top',
|
1285 |
+
'position_top': 0,
|
1286 |
+
'position_from_trigger': false,
|
1287 |
+
'position_fixed': true,
|
1288 |
+
'overlay_disabled': true,
|
1289 |
+
'stackable': true,
|
1290 |
+
'disable_reposition': false,
|
1291 |
+
},
|
1292 |
+
'right-bottom-slidein': {
|
1293 |
+
'size': 'custom',
|
1294 |
+
'custom_width': '300px',
|
1295 |
+
'custom_height_auto': true,
|
1296 |
+
'animation_type': 'slide',
|
1297 |
+
'animation_speed': 350,
|
1298 |
+
'animation_origin': 'bottom',
|
1299 |
+
'location': 'right bottom',
|
1300 |
+
'position_bottom': 10,
|
1301 |
+
'position_right': 10,
|
1302 |
+
'position_from_trigger': false,
|
1303 |
+
'position_fixed': true,
|
1304 |
+
'overlay_disabled': true,
|
1305 |
+
'stackable': true,
|
1306 |
+
'disable_reposition': false,
|
1307 |
+
}
|
1308 |
+
};
|
1309 |
+
var popupType = e.target.dataset.popupType || e.target.parentElement.dataset.popupType || '';
|
1310 |
+
|
1311 |
+
// Gather our values needed for creating new settings object.
|
1312 |
+
var presetValues = popupTypes.hasOwnProperty( popupType ) ? popupTypes[ popupType ] : {};
|
1313 |
+
var args = pum_popup_settings_editor.form_args || {};
|
1314 |
+
var originalValues = pum_popup_settings_editor.current_values || {};
|
1315 |
+
var currentValues = $container.pumSerializeObject();
|
1316 |
+
|
1317 |
+
// pumSerializeObject returns the trigger/cookie settings as strings instead of objects.
|
1318 |
+
// Cycle through each trigger and cookie and convert to objects.
|
1319 |
+
if ( currentValues.popup_settings.triggers ) {
|
1320 |
+
for ( var i = 0; i < currentValues.popup_settings.triggers.length; i++ ) {
|
1321 |
+
currentValues.popup_settings.triggers[i].settings = JSON.parse( currentValues.popup_settings.triggers[i].settings );
|
1322 |
+
}
|
1323 |
+
}
|
1324 |
+
if ( currentValues.popup_settings.cookies ) {
|
1325 |
+
for ( var j = 0; j < currentValues.popup_settings.cookies.length; j++ ) {
|
1326 |
+
currentValues.popup_settings.cookies[j].settings = JSON.parse( currentValues.popup_settings.cookies[j].settings );
|
1327 |
+
}
|
1328 |
+
}
|
1329 |
+
|
1330 |
+
var newValues = Object.assign( {}, originalValues, currentValues.popup_settings, presetValues );
|
1331 |
+
|
1332 |
+
// Re-render form using updated settings.
|
1333 |
+
PUM_Admin.forms.render( args, newValues, $container );
|
1334 |
+
|
1335 |
+
// Click to 'Display' so they don't jump to 'Targeting' tab upon render.
|
1336 |
+
document.querySelector( 'a[href="#pum-popup-settings_display"]' ).click();
|
1337 |
+
|
1338 |
+
// Adds a notice into 'Display Presets' tab telling admin the settings have been applied.
|
1339 |
+
var notice = document.createElement( 'div' );
|
1340 |
+
notice.classList.add( 'notice','updated' );
|
1341 |
+
notice.insertBefore( document.createElement('p'), notice.firstChild );
|
1342 |
+
notice.firstChild.innerText = 'Display settings have been updated with the ' + popupType + ' preset';
|
1343 |
+
var parent = document.querySelector( '#pum-popup-settings-display-subtabs_preset' );
|
1344 |
+
parent.insertBefore( notice, parent.firstChild );
|
1345 |
+
}
|
1346 |
+
}
|
1347 |
+
});
|
1348 |
})
|
1349 |
.on('keydown', '#popup-title', function (event) {
|
1350 |
var keyCode = event.keyCode || event.which;
|
1371 |
$(target).focus();
|
1372 |
}
|
1373 |
});
|
1374 |
+
}(jQuery));
|
assets/js/admin-popup-editor.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var cookies;!function(t,e){"use strict";t(e).on("click","#popup_reset_open_count",function(){var e=t(this);e.is(":checked")&&!confirm(pum_admin_vars.I10n.confirm_count_reset)&&e.prop("checked",!1)})}(jQuery,document),function(s){"use strict";var d={get_conditions:function(){return window.pum_popup_settings_editor.conditions_selectlist},not_operand_checkbox:function(e){return(e=e||s(".pum-not-operand")).each(function(){var e=s(this),t=e.find("input");t.prop("checked",!t.is(":checked")),d.toggle_not_operand(e)})},toggle_not_operand:function(e){return(e=e||s(".pum-not-operand")).each(function(){var e=s(this),t=e.find("input"),n=e.parents(".facet-target");t.is(":checked")?n.addClass("not-operand-checked"):n.removeClass("not-operand-checked")})},template:{editor:function(e){var t=s.extend(!0,{},{groups:[]},e);return t.groups=PUM_Admin.utils.object_to_array(t.groups),PUM_Admin.templates.render("pum-condition-editor",t)},group:function(e){var t,n=s.extend(!0,{},{index:"",facets:[]},e);for(n.facets=PUM_Admin.utils.object_to_array(n.facets),t=0;n.facets.length>t;t++)n.facets[t].index=t,n.facets[t].group=n.index;return PUM_Admin.templates.render("pum-condition-group",n)},facet:function(e){var t=s.extend(!0,{},{group:"",index:"",target:"",not_operand:!1,settings:{}},e);return PUM_Admin.templates.render("pum-condition-facet",t)},settings:function(e,n){var i=[],o=s.extend(!0,{},{index:"",group:"",target:null,fields:[]},e);return o.fields.length||void 0===pum_popup_settings_editor.conditions[e.target]||(o.fields=pum_popup_settings_editor.conditions[e.target].fields),void 0===n&&(n={}),_.each(o.fields,function(e,t){"object"!=typeof(e=PUM_Admin.models.field(e)).meta&&(e.meta={}),void 0!==n[t]&&(e.value=n[t]),e.name="popup_settings[conditions]["+o.group+"]["+o.index+"][settings]["+t+"]",""===e.id&&(e.id="popup_settings_conditions_"+o.group+"_"+o.index+"_settings_"+t),i.push(PUM_Admin.templates.field(e))}),PUM_Admin.templates.section({fields:i})},selectbox:function(e){var t=s.extend(!0,{},{id:null,name:null,type:"select",group:"",index:"",value:null,select2:!0,classes:[],options:d.get_conditions()},e);return null===t.id&&(t.id="popup_settings_conditions_"+t.group+"_"+t.index+"_target"),null===t.name&&(t.name="popup_settings[conditions]["+t.group+"]["+t.index+"][target]"),PUM_Admin.templates.field(t)}},groups:{add:function(e,t,n){var i=s(e),o={index:i.find(".facet-group-wrap").length,facets:[{target:t||null,not_operand:n||!1,settings:{}}]};i.find(".facet-groups").append(d.template.group(o)),i.addClass("has-conditions")},remove:function(e){var t=e.parents(".facet-builder");e.prev(".facet-group-wrap").find(".and .add-facet").removeClass("disabled"),e.remove(),d.renumber(),0===t.find(".facet-group-wrap").length&&(t.removeClass("has-conditions"),s("#pum-first-condition").val(null).trigger("change"))}},facets:{add:function(e,t,n){var i={group:e.data("index"),index:e.find(".facet").length,target:t||null,not_operand:n||!1,settings:{}};e.find(".facet-list").append(d.template.facet(i))},remove:function(e){var t=e.parents(".facet-group-wrap");e.remove(),0===t.find(".facet").length?d.groups.remove(t):d.renumber()}},renumber:function(){s(".facet-builder .facet-group-wrap").each(function(){var e=s(this),n=e.parent().children().index(e);e.data("index",n).find(".facet").each(function(){var e=s(this),t=e.parent().children().index(e);e.data("index",t).find("[name]").each(function(){this.name=this.name.replace(/popup_settings\[conditions\]\[\d*?\]\[\d*?\]/,"popup_settings[conditions]["+n+"]["+t+"]"),this.id=this.id.replace(/popup_settings_conditions_\d*?_\d*?_/,"popup_settings_conditions_"+n+"_"+t+"_")})})})}};window.PUM_Admin=window.PUM_Admin||{},window.PUM_Admin.conditions=d,s(document).on("pum_init",function(){d.renumber(),d.toggle_not_operand()}).on("select2:select pumselect2:select","#pum-first-condition",function(e){var t=s(this),n=t.parents(".facet-builder").eq(0),i=t.val(),o=n.find("#pum-first-facet-operand"),r=o.is(":checked");d.groups.add(n,i,r),t.val(null).trigger("change"),o.prop("checked",!1).parents(".facet-target").removeClass("not-operand-checked"),s(document).trigger("pum_init")}).on("click",".facet-builder .pum-not-operand",function(){d.not_operand_checkbox(s(this))}).on("change",".facet-builder .facet-target select",function(e){var t=s(this),n=t.parents(".facet"),i=t.val(),o={target:i};""!==i&&i!==n.data("target")&&(n.data("target",i).find(".facet-settings").html(d.template.settings(o)),s(document).trigger("pum_init"))}).on("click",".facet-builder .facet-group-wrap:last-child .and .add-facet",function(){d.groups.add(s(this).parents(".facet-builder").eq(0)),s(document).trigger("pum_init")}).on("click",".facet-builder .add-or .add-facet:not(.disabled)",function(){d.facets.add(s(this).parents(".facet-group-wrap").eq(0)),s(document).trigger("pum_init")}).on("click",".facet-builder .remove-facet",function(){d.facets.remove(s(this).parents(".facet").eq(0)),s(document).trigger("pum_init")})}(jQuery),function(a,e){"use strict";var i,s=pum_admin_vars.I10n,p={get_cookies:function(){return window.pum_popup_settings_editor.cookies},get_cookie:function(e){var t=this.get_cookies(),n="undefined"!==t[e]&&t[e];return!!n&&(n&&"object"==typeof n&&"object"==typeof n.fields&&Object.keys(n.fields).length&&(n=this.parseFields(n)),n)},parseFields:function(i){return _.each(i.fields,function(e,n){_.each(e,function(e,t){i.fields[n][t].name="cookie_settings["+t+"]",""===i.fields[n][t].id&&(i.fields[n][t].id="cookie_settings_"+t)})}),i},parseValues:function(e,t){return e},select_list:function(){var e,t=PUM_Admin.utils.object_to_array(p.get_cookies()),n={};for(e=0;e<t.length;e++)n[t[e].id]=t[e].name;return n},getLabel:function(e){var t=p.get_cookie(e);return!!t&&t.name},getSettingsDesc:function(e,t){var n=p.get_cookie(e);return!!n&&PUM_Admin.templates.renderInline(n.settings_column,t)},refreshDescriptions:function(){a(".pum-popup-cookie-editor table.list-table tbody tr").each(function(){var e=a(this),t=e.find(".popup_cookies_field_event").val(),n=JSON.parse(e.find(".popup_cookies_field_settings:first").val());e.find("td.settings-column").html(p.getSettingsDesc(t,n))})},insertCookie:function(e,t){t=a.extend(!0,{},{event:"on_popup_close",settings:{name:name||"pum-"+a("#post_ID").val()}},t),p.rows.add(e,t)},template:{form:function(e,t,n){var i=p.get_cookie(e),o="pum_cookie_settings",r=Object.keys(i.fields)[0];(t=t||{}).event=e,t.index=0<=t.index?t.index:null,i.fields[r]=a.extend(!0,i.fields[r],{index:{type:"hidden",name:"index"},event:{type:"hidden",name:"event"}}),"string"==typeof t.key&&""!==t.key||delete i.fields.advanced.key,PUM_Admin.modals.reload("#"+o,PUM_Admin.templates.modal({id:o,title:i.modal_title||i.name,classes:"tabbed-content",save_button:null!==t.index?s.update:s.add,content:PUM_Admin.forms.render({id:"pum_cookie_settings_form",tabs:i.tabs||{},fields:i.fields||{}},t||{})})),a("#"+o+" form").on("submit",n||function(e){e.preventDefault(),PUM_Admin.modals.closeAll()})},editor:function(e){var t=a.extend(!0,{},{cookies:[],name:""},e);return t.cookies=PUM_Admin.utils.object_to_array(t.cookies),PUM_Admin.templates.render("pum-cookie-editor",t)},row:function(e){var t=a.extend(!0,{},{index:"",event:"",name:"",settings:{name:"",key:"",session:!1,time:"30 days",path:!0}},e);return PUM_Admin.templates.render("pum-cookie-row",t)},selectbox:function(e){var t=a.extend(!0,{},{id:null,name:null,type:"select",group:"",index:"",value:null,select2:!0,classes:[],options:p.select_list()},e);return null===t.id&&(t.id="popup_settings_cookies_"+t.index+"_event"),null===t.name&&(t.name="popup_settings[cookies]["+t.index+"][event]"),PUM_Admin.templates.field(t)}},rows:{add:function(e,t){var n=a(e),i={index:null!==t.index&&0<=t.index?t.index:n.find("table.list-table tbody tr").length,event:t.event,name:n.data("field_name"),settings:t.settings||{}},o=n.find("tbody tr").eq(i.index),r=PUM_Admin.templates.render("pum-cookie-row",i);o.length?o.replaceWith(r):n.find("tbody").append(r),n.addClass("has-list-items"),p.rows.renumber(),p.refreshDescriptions()},remove:function(e){var t=e.parents(".pum-popup-cookie-editor");e.remove(),p.rows.renumber(),0===t.find("table.list-table tbody tr").length&&(t.removeClass("has-list-items"),a("#pum-first-cookie").val(null).trigger("change"))},renumber:function(){a(".pum-popup-cookie-editor table.list-table tbody tr").each(function(){var e=a(this),t=e.parent().children().index(e);e.attr("data-index",t).data("index",t),e.find(":input, [name]").each(function(){this.name&&""!==this.name&&(this.name=this.name.replace(/\[\d*?\]/,"["+t+"]"))})})}}};window.PUM_Admin=window.PUM_Admin||{},window.PUM_Admin.cookies=p,a(e).on("pum_init",function(){p.refreshDescriptions()}).on("select2:select pumselect2:select","#pum-first-cookie",function(){var e=a(this),r=e.parents(".pum-popup-cookie-editor"),t=e.val(),n={indes:r.find("table.list-table tbody tr").length,name:"pum-"+a("#post_ID").val()};e.val(null).trigger("change"),p.template.form(t,n,function(e){var t=a(this),n=t.find("input#event").val(),i=t.find("input#index").val(),o=t.pumSerializeObject();e.preventDefault(),(!i||i<0)&&(i=r.find("tbody tr").length),p.rows.add(r,{index:i,event:n,settings:o.cookie_settings}),PUM_Admin.modals.closeAll()})}).on("click",".pum-popup-cookie-editor .pum-add-new",function(){i=a(this).parents(".pum-popup-cookie-editor");var e=wp.template("pum-cookie-add-event");PUM_Admin.modals.reload("#pum_cookie_add_event_modal",e({I10n:s}))}).on("click",".pum-popup-cookie-editor .edit",function(e){var t=a(this),r=t.parents(".pum-popup-cookie-editor"),n=t.parents("tr:first"),i=n.find(".popup_cookies_field_event").val(),o=_.extend({},JSON.parse(n.find(".popup_cookies_field_settings:first").val()),{index:n.parent().children().index(n),event:i});e.preventDefault(),p.template.form(i,o,function(e){var t=a(this),n=t.find("input#event").val(),i=t.find("input#index").val(),o=t.pumSerializeObject();e.preventDefault(),(!1===i||i<0)&&(i=r.find("tbody tr").length),p.rows.add(r,{index:i,event:n,settings:o.cookie_settings}),PUM_Admin.modals.closeAll()})}).on("click",".pum-popup-cookie-editor .remove",function(e){var t=a(this).parents("tr:first");e.preventDefault(),window.confirm(s.confirm_delete_cookie)&&p.rows.remove(t)}).on("click",".pum-field-cookie_key button.reset",function(e){var t=a(this),n=(new Date).getTime().toString(16);t.siblings('input[type="text"]:first').val(n)}).on("submit","#pum_cookie_add_event_modal .pum-form",function(e){var d=i,t=a("#popup_cookie_add_event").val(),n={index:d.find("table.list-table tbody tr").length,name:"pum-"+a("#post_ID").val(),path:"1"};e.preventDefault(),p.template.form(t,n,function(e){var t=a(this),n=t.find("input#event").val(),i=t.find("input#index").val(),o=t.pumSerializeObject();if(e.preventDefault(),(!1===i||i<0)&&(i=d.find("tbody tr").length),p.rows.add(d,{index:i,event:n,settings:o.cookie_settings}),PUM_Admin.modals.closeAll(),void 0!==PUM_Admin.triggers&&!1!==PUM_Admin.triggers.new_cookie&&0<=PUM_Admin.triggers.new_cookie){var r=PUM_Admin.triggers.current_editor.find("tbody tr").eq(PUM_Admin.triggers.new_cookie).find(".popup_triggers_field_settings:first"),s=JSON.parse(r.val());"string"==typeof s.cookie_name?s.cookie_name=s.cookie_name.replace("add_new",o.cookie_settings.name):(s.cookie_name[s.cookie_name.indexOf("add_new")]=o.cookie_settings.name,s.cookie_name=s.cookie_name.filter(function(e,t,n){return!(e in this)&&(this[e]=!0)},{})),r.val(JSON.stringify(s)),PUM_Admin.triggers.new_cookie=!1,PUM_Admin.triggers.refreshDescriptions()}})})}(jQuery,document),function(d,e,a){"use strict";var p=pum_admin_vars.I10n,c={current_editor:null,new_cookie:!1,get_triggers:function(){return window.pum_popup_settings_editor.triggers},get_trigger:function(e){var t=this.get_triggers(),n="undefined"!==t[e]&&t[e];return!!n&&(n&&"object"==typeof n&&"object"==typeof n.fields&&Object.keys(n.fields).length&&(n=this.parseFields(n)),n)},parseFields:function(i){return _.each(i.fields,function(e,n){_.each(e,function(e,t){i.fields[n][t].name="trigger_settings["+t+"]",""===i.fields[n][t].id&&(i.fields[n][t].id="trigger_settings_"+t)})}),i},parseValues:function(e,t){for(var n in e)e.hasOwnProperty(n)&&e.hasOwnProperty(n+"_unit")&&(e[n]+=e[n+"_unit"],delete e[n+"_unit"]);return e},select_list:function(){var e,t=PUM_Admin.utils.object_to_array(c.get_triggers()),n={};for(e=0;e<t.length;e++)n[t[e].id]=t[e].name;return n},rows:{add:function(e,t){var n=d(e),i={index:null!==t.index&&0<=t.index?t.index:n.find("table.list-table tbody tr").length,type:t.type,name:n.data("field_name"),settings:t.settings||{}},o=n.find("tbody tr").eq(i.index),r=PUM_Admin.templates.render("pum-trigger-row",i);o.length?o.replaceWith(r):n.find("tbody").append(r),n.addClass("has-list-items"),c.renumber(),c.refreshDescriptions()},remove:function(e){var t=e.parents(".pum-popup-trigger-editor");e.remove(),c.renumber(),0===t.find("table.list-table tbody tr").length&&(t.removeClass("has-list-items"),d("#pum-first-trigger").val(null).trigger("change"))}},template:{form:function(e,t,n){var i=c.get_trigger(e),o="pum_trigger_settings",r=Object.keys(i.fields)[0],s=d(".pum-field-cookies .list-table tbody tr");(t=t||{}).type=e,t.index=0<=t.index?t.index:null,i.fields[r]=d.extend(!0,i.fields[r],{index:{type:"hidden",name:"index"},type:{type:"hidden",name:"type"}}),s.each(function(){var e=JSON.parse(d(this).find(".popup_cookies_field_settings:first").val());void 0===i.fields[r].cookie_name.options[e.name]&&(i.fields[r].cookie_name.options[e.name]=e.name)}),PUM_Admin.modals.reload("#"+o,PUM_Admin.templates.modal({id:o,title:i.modal_title||i.name,classes:"tabbed-content",save_button:null!==t.index?p.update:p.add,content:PUM_Admin.forms.render({id:"pum_trigger_settings_form",tabs:i.tabs||{},fields:i.fields||{}},t||{})})),d("#"+o+" form").on("submit",n||function(e){e.preventDefault(),PUM_Admin.modals.closeAll()})},editor:function(e){var t=d.extend(!0,{},{triggers:[],name:""},e);return t.triggers=PUM_Admin.utils.object_to_array(t.triggers),PUM_Admin.templates.render("pum-trigger-editor",t)},row:function(e){var t=d.extend(!0,{},{index:"",type:"",name:"",settings:{cookie_name:""}},e);return PUM_Admin.templates.render("pum-trigger-row",t)},selectbox:function(e){var t=d.extend(!0,{},{id:null,name:null,type:"select",group:"",index:"",value:null,select2:!0,classes:[],options:c.select_list()},e);return null===t.id&&(t.id="popup_settings_triggers_"+t.index+"_type"),null===t.name&&(t.name="popup_settings[triggers]["+t.index+"][type]"),PUM_Admin.templates.field(t)}},getLabel:function(e){var t=c.get_trigger(e);return!!t&&t.name},getSettingsDesc:function(e,t){var n=c.get_trigger(e);return!!n&&PUM_Admin.templates.renderInline(n.settings_column,t)},renumber:function(){d(".pum-popup-trigger-editor table.list-table tbody tr").each(function(){var e=d(this),t=e.parent().children().index(e);e.attr("data-index",t).data("index",t),e.find(":input, [name]").each(function(){this.name&&""!==this.name&&(this.name=this.name.replace(/\[\d*?\]/,"["+t+"]"))})})},refreshDescriptions:function(){d(".pum-popup-trigger-editor table.list-table tbody tr").each(function(){var e=d(this),t=e.find(".popup_triggers_field_type").val(),n=JSON.parse(e.find(".popup_triggers_field_settings:first").val()),i=PUM_Admin.triggers.cookie_column_value(n.cookie_name);e.find("td.settings-column").html(PUM_Admin.triggers.getSettingsDesc(t,n)),e.find("td.cookie-column code").text(i)})},cookie_column_value:function(e){var t=p.no_cookie;return e instanceof Array?t=e.join(", "):null!==e&&e!==a&&""!==e&&(t=e),t},append_click_selector_presets:function(){var e,t,n=d("#extra_selectors");n.length&&!n.hasClass("pum-click-selector-presets-initialized")&&(e=PUM_Admin.templates.render("pum-click-selector-presets"),(t=n.parents(".pum-field").find(".pum-click-selector-presets")).length||(n.before(e),n.addClass("pum-click-selector-presets-initialized"),t=n.parents(".pum-field").find(".pum-click-selector-presets")),t.position({my:"right center",at:"right center",of:n}))},toggle_click_selector_presets:function(){d(this).parent().toggleClass("open")},reset_click_selector_presets:function(e){e!==a&&d(e.target).parents(".pum-click-selector-presets").length||d(".pum-click-selector-presets").removeClass("open")},insert_click_selector_preset:function(){var e=d(this),t=d("#extra_selectors"),n=t.val();""!==n&&(n+=", "),t.val(n+e.data("preset")),PUM_Admin.triggers.reset_click_selector_presets()}};window.PUM_Admin=window.PUM_Admin||{},window.PUM_Admin.triggers=c,d(e).on("pum_init",function(){PUM_Admin.triggers.append_click_selector_presets(),PUM_Admin.triggers.refreshDescriptions()}).on("click",".pum-click-selector-presets > span",PUM_Admin.triggers.toggle_click_selector_presets).on("click",".pum-click-selector-presets li",PUM_Admin.triggers.insert_click_selector_preset).on("click",PUM_Admin.triggers.reset_click_selector_presets).on("select2:select pumselect2:select","#pum-first-trigger",function(){var e=d(this),s=e.parents(".pum-popup-trigger-editor"),t=e.val(),n={};PUM_Admin.triggers.current_editor=s,"click_open"!==t&&(n.cookie_name="pum-"+d("#post_ID").val()),c.template.form(t,n,function(e){var t=d(this),n=t.find("input#type").val(),i=t.pumSerializeObject(),o=c.parseValues(i.trigger_settings||{}),r=parseInt(i.index);e.preventDefault(),(!1===r||r<0)&&(r=s.find("tbody tr").length),c.rows.add(s,{index:r,type:n,settings:o}),PUM_Admin.modals.closeAll(),o.cookie_name!==a&&null!==o.cookie_name&&("add_new"===o.cookie_name||0<=o.cookie_name.indexOf("add_new"))&&(PUM_Admin.triggers.new_cookie=i.index,d("#pum-popup-settings-container .pum-popup-cookie-editor button.pum-add-new").trigger("click"))}),e.val(null).trigger("change")}).on("click",".pum-popup-trigger-editor .pum-add-new",function(){PUM_Admin.triggers.current_editor=d(this).parents(".pum-popup-trigger-editor");var e=wp.template("pum-trigger-add-type");PUM_Admin.modals.reload("#pum_trigger_add_type_modal",e({I10n:p}))}).on("click",".pum-popup-trigger-editor .edit",function(e){var t=d(this),s=t.parents(".pum-popup-trigger-editor"),n=t.parents("tr:first"),i=n.find(".popup_triggers_field_type").val(),o=_.extend({},JSON.parse(n.find(".popup_triggers_field_settings:first").val()),{index:n.parent().children().index(n),type:i});e.preventDefault(),c.template.form(i,o,function(e){var t=d(this),n=t.find("input#type").val(),i=t.find("input#index").val(),o=t.pumSerializeObject(),r=c.parseValues(o.trigger_settings||{});PUM_Admin.triggers.current_editor=s,e.preventDefault(),(!1===i||i<0)&&(i=s.find("tbody tr").length),c.rows.add(s,{index:i,type:n,settings:r}),PUM_Admin.modals.closeAll(),r.cookie_name!==a&&null!==r.cookie_name&&("add_new"===r.cookie_name||0<=r.cookie_name.indexOf("add_new"))&&(PUM_Admin.triggers.new_cookie=o.index,d("#pum-popup-settings-container .pum-popup-cookie-editor button.pum-add-new").trigger("click"))})}).on("click",".pum-popup-trigger-editor .remove",function(e){var t=d(this),n=t.parents(".pum-popup-trigger-editor"),i=t.parents("tr:first");PUM_Admin.triggers.current_editor=n,e.preventDefault(),window.confirm(p.confirm_delete_trigger)&&c.rows.remove(i)}).on("submit","#pum_trigger_add_type_modal .pum-form",function(e){var s=PUM_Admin.triggers.current_editor,t=s.parents("#pum-popup-settings-triggers-subtabs_main").find(".pum-field-cookies .pum-popup-cookie-editor"),n=d("#popup_trigger_add_type").val(),i=d("#popup_trigger_add_cookie").is(":checked"),o=d("#popup_trigger_add_cookie_event").val(),r={};e.preventDefault(),i&&(r.cookie_name="pum-"+d("#post_ID").val(),PUM_Admin.cookies.insertCookie(t,{event:o,settings:{time:"1 month",path:"1",name:r.cookie_name}})),c.template.form(n,r,function(e){var t=d(this),n=t.find("input#type").val(),i=t.pumSerializeObject(),o=c.parseValues(i.trigger_settings||{}),r=parseInt(i.index);PUM_Admin.triggers.current_editor=s,e.preventDefault(),(!r||r<0)&&(r=s.find("tbody tr").length),c.rows.add(s,{index:r,type:n,settings:o}),PUM_Admin.modals.closeAll(),o.cookie_name!==a&&null!==o.cookie_name&&("add_new"===o.cookie_name||0<=o.cookie_name.indexOf("add_new"))&&(PUM_Admin.triggers.new_cookie=i.index,d("#pum-popup-settings-container .pum-popup-cookie-editor button.pum-add-new").trigger("click"))})})}(jQuery,document),function(i){"use strict";window.PUM_Admin=window.PUM_Admin||{},window.pum_popup_settings_editor=window.pum_popup_settings_editor||{form_args:{},current_values:{}},i(document).ready(function(){i(this).trigger("pum_init"),i("#title").prop("required",!0);var e=i("#pum-popup-settings-container"),t=pum_popup_settings_editor.form_args||{},n=pum_popup_settings_editor.current_values||{};e.length&&(e.find(".pum-no-js").hide(),PUM_Admin.forms.render(t,n,e)),i("a.page-title-action").clone().attr("target","_blank").attr("href",pum_admin_vars.homeurl+"?popup_preview=true&popup="+i("#post_ID").val()).text(pum_admin_vars.I10n.preview_popup).insertAfter("a.page-title-action"),i("#pum-first-condition, #pum-first-trigger, #pum-first-cookie").val(null).trigger("change")}).on("keydown","#popup-title",function(e){9===(e.keyCode||e.which)&&(e.preventDefault(),i("#title").focus())}).on("keydown","#title, #popup-title",function(e){var t,n=e.keyCode||e.which;e.shiftKey||9!==n||(e.preventDefault(),t="title"===i(this).attr("id")?"#popup-title":"#insert-media-button",i(t).focus())}).on("keydown","#popup-title, #insert-media-button",function(e){var t,n=e.keyCode||e.which;e.shiftKey&&9===n&&(e.preventDefault(),t="popup-title"===i(this).attr("id")?"#title":"#popup-title",i(t).focus())})}(jQuery);
|
1 |
+
var cookies;!function(t,e){"use strict";t(e).on("click","#popup_reset_open_count",function(){var e=t(this);e.is(":checked")&&!confirm(pum_admin_vars.I10n.confirm_count_reset)&&e.prop("checked",!1)})}(jQuery,document),function(s){"use strict";var a={get_conditions:function(){return window.pum_popup_settings_editor.conditions_selectlist},not_operand_checkbox:function(e){return(e=e||s(".pum-not-operand")).each(function(){var e=s(this),t=e.find("input");t.prop("checked",!t.is(":checked")),a.toggle_not_operand(e)})},toggle_not_operand:function(e){return(e=e||s(".pum-not-operand")).each(function(){var e=s(this),t=e.find("input"),i=e.parents(".facet-target");t.is(":checked")?i.addClass("not-operand-checked"):i.removeClass("not-operand-checked")})},template:{editor:function(e){var t=s.extend(!0,{},{groups:[]},e);return t.groups=PUM_Admin.utils.object_to_array(t.groups),PUM_Admin.templates.render("pum-condition-editor",t)},group:function(e){var t,i=s.extend(!0,{},{index:"",facets:[]},e);for(i.facets=PUM_Admin.utils.object_to_array(i.facets),t=0;i.facets.length>t;t++)i.facets[t].index=t,i.facets[t].group=i.index;return PUM_Admin.templates.render("pum-condition-group",i)},facet:function(e){var t=s.extend(!0,{},{group:"",index:"",target:"",not_operand:!1,settings:{}},e);return PUM_Admin.templates.render("pum-condition-facet",t)},settings:function(e,i){var n=[],o=s.extend(!0,{},{index:"",group:"",target:null,fields:[]},e);return o.fields.length||void 0===pum_popup_settings_editor.conditions[e.target]||(o.fields=pum_popup_settings_editor.conditions[e.target].fields),void 0===i&&(i={}),_.each(o.fields,function(e,t){"object"!=typeof(e=PUM_Admin.models.field(e)).meta&&(e.meta={}),void 0!==i[t]&&(e.value=i[t]),e.name="popup_settings[conditions]["+o.group+"]["+o.index+"][settings]["+t+"]",""===e.id&&(e.id="popup_settings_conditions_"+o.group+"_"+o.index+"_settings_"+t),n.push(PUM_Admin.templates.field(e))}),PUM_Admin.templates.section({fields:n})},selectbox:function(e){var t=s.extend(!0,{},{id:null,name:null,type:"select",group:"",index:"",value:null,select2:!0,classes:[],options:a.get_conditions()},e);return null===t.id&&(t.id="popup_settings_conditions_"+t.group+"_"+t.index+"_target"),null===t.name&&(t.name="popup_settings[conditions]["+t.group+"]["+t.index+"][target]"),PUM_Admin.templates.field(t)}},groups:{add:function(e,t,i){var n=s(e),o={index:n.find(".facet-group-wrap").length,facets:[{target:t||null,not_operand:i||!1,settings:{}}]};n.find(".facet-groups").append(a.template.group(o)),n.addClass("has-conditions")},remove:function(e){var t=e.parents(".facet-builder");e.prev(".facet-group-wrap").find(".and .add-facet").removeClass("disabled"),e.remove(),a.renumber(),0===t.find(".facet-group-wrap").length&&(t.removeClass("has-conditions"),s("#pum-first-condition").val(null).trigger("change"))}},facets:{add:function(e,t,i){var n={group:e.data("index"),index:e.find(".facet").length,target:t||null,not_operand:i||!1,settings:{}};e.find(".facet-list").append(a.template.facet(n))},remove:function(e){var t=e.parents(".facet-group-wrap");e.remove(),0===t.find(".facet").length?a.groups.remove(t):a.renumber()}},renumber:function(){s(".facet-builder .facet-group-wrap").each(function(){var e=s(this),i=e.parent().children().index(e);e.data("index",i).find(".facet").each(function(){var e=s(this),t=e.parent().children().index(e);e.data("index",t).find("[name]").each(function(){this.name=this.name.replace(/popup_settings\[conditions\]\[\d*?\]\[\d*?\]/,"popup_settings[conditions]["+i+"]["+t+"]"),this.id=this.id.replace(/popup_settings_conditions_\d*?_\d*?_/,"popup_settings_conditions_"+i+"_"+t+"_")})})})}};window.PUM_Admin=window.PUM_Admin||{},window.PUM_Admin.conditions=a,s(document).on("pum_init",function(){a.renumber(),a.toggle_not_operand()}).on("select2:select pumselect2:select","#pum-first-condition",function(e){var t=s(this),i=t.parents(".facet-builder").eq(0),n=t.val(),o=i.find("#pum-first-facet-operand"),r=o.is(":checked");a.groups.add(i,n,r),t.val(null).trigger("change"),o.prop("checked",!1).parents(".facet-target").removeClass("not-operand-checked"),s(document).trigger("pum_init")}).on("click",".facet-builder .pum-not-operand",function(){a.not_operand_checkbox(s(this))}).on("change",".facet-builder .facet-target select",function(e){var t=s(this),i=t.parents(".facet"),n=t.val(),o={target:n};""!==n&&n!==i.data("target")&&(i.data("target",n).find(".facet-settings").html(a.template.settings(o)),s(document).trigger("pum_init"))}).on("click",".facet-builder .facet-group-wrap:last-child .and .add-facet",function(){a.groups.add(s(this).parents(".facet-builder").eq(0)),s(document).trigger("pum_init")}).on("click",".facet-builder .add-or .add-facet:not(.disabled)",function(){a.facets.add(s(this).parents(".facet-group-wrap").eq(0)),s(document).trigger("pum_init")}).on("click",".facet-builder .remove-facet",function(){a.facets.remove(s(this).parents(".facet").eq(0)),s(document).trigger("pum_init")})}(jQuery),function(d,e){"use strict";var n,s=pum_admin_vars.I10n,p={get_cookies:function(){return window.pum_popup_settings_editor.cookies},get_cookie:function(e){var t=this.get_cookies(),i="undefined"!==t[e]&&t[e];return!!i&&(i&&"object"==typeof i&&"object"==typeof i.fields&&Object.keys(i.fields).length&&(i=this.parseFields(i)),i)},parseFields:function(n){return _.each(n.fields,function(e,i){_.each(e,function(e,t){n.fields[i][t].name="cookie_settings["+t+"]",""===n.fields[i][t].id&&(n.fields[i][t].id="cookie_settings_"+t)})}),n},parseValues:function(e,t){return e},select_list:function(){var e,t=PUM_Admin.utils.object_to_array(p.get_cookies()),i={};for(e=0;e<t.length;e++)i[t[e].id]=t[e].name;return i},getLabel:function(e){var t=p.get_cookie(e);return!!t&&t.name},getSettingsDesc:function(e,t){var i=p.get_cookie(e);return!!i&&PUM_Admin.templates.renderInline(i.settings_column,t)},refreshDescriptions:function(){d(".pum-popup-cookie-editor table.list-table tbody tr").each(function(){var e=d(this),t=e.find(".popup_cookies_field_event").val(),i=JSON.parse(e.find(".popup_cookies_field_settings:first").val());e.find("td.settings-column").html(p.getSettingsDesc(t,i))})},insertCookie:function(e,t){t=d.extend(!0,{},{event:"on_popup_close",settings:{name:name||"pum-"+d("#post_ID").val()}},t),p.rows.add(e,t)},template:{form:function(e,t,i){var n=p.get_cookie(e),o="pum_cookie_settings",r=Object.keys(n.fields)[0];(t=t||{}).event=e,t.index=0<=t.index?t.index:null,n.fields[r]=d.extend(!0,n.fields[r],{index:{type:"hidden",name:"index"},event:{type:"hidden",name:"event"}}),"string"==typeof t.key&&""!==t.key||delete n.fields.advanced.key,PUM_Admin.modals.reload("#"+o,PUM_Admin.templates.modal({id:o,title:n.modal_title||n.name,classes:"tabbed-content",save_button:null!==t.index?s.update:s.add,content:PUM_Admin.forms.render({id:"pum_cookie_settings_form",tabs:n.tabs||{},fields:n.fields||{}},t||{})})),d("#"+o+" form").on("submit",i||function(e){e.preventDefault(),PUM_Admin.modals.closeAll()})},editor:function(e){var t=d.extend(!0,{},{cookies:[],name:""},e);return t.cookies=PUM_Admin.utils.object_to_array(t.cookies),PUM_Admin.templates.render("pum-cookie-editor",t)},row:function(e){var t=d.extend(!0,{},{index:"",event:"",name:"",settings:{name:"",key:"",session:!1,time:"30 days",path:!0}},e);return PUM_Admin.templates.render("pum-cookie-row",t)},selectbox:function(e){var t=d.extend(!0,{},{id:null,name:null,type:"select",group:"",index:"",value:null,select2:!0,classes:[],options:p.select_list()},e);return null===t.id&&(t.id="popup_settings_cookies_"+t.index+"_event"),null===t.name&&(t.name="popup_settings[cookies]["+t.index+"][event]"),PUM_Admin.templates.field(t)}},rows:{add:function(e,t){var i=d(e),n={index:null!==t.index&&0<=t.index?t.index:i.find("table.list-table tbody tr").length,event:t.event,name:i.data("field_name"),settings:t.settings||{}},o=i.find("tbody tr").eq(n.index),r=PUM_Admin.templates.render("pum-cookie-row",n);o.length?o.replaceWith(r):i.find("tbody").append(r),i.addClass("has-list-items"),p.rows.renumber(),p.refreshDescriptions()},remove:function(e){var t=e.parents(".pum-popup-cookie-editor");e.remove(),p.rows.renumber(),0===t.find("table.list-table tbody tr").length&&(t.removeClass("has-list-items"),d("#pum-first-cookie").val(null).trigger("change"))},renumber:function(){d(".pum-popup-cookie-editor table.list-table tbody tr").each(function(){var e=d(this),t=e.parent().children().index(e);e.attr("data-index",t).data("index",t),e.find(":input, [name]").each(function(){this.name&&""!==this.name&&(this.name=this.name.replace(/\[\d*?\]/,"["+t+"]"))})})}}};window.PUM_Admin=window.PUM_Admin||{},window.PUM_Admin.cookies=p,d(e).on("pum_init",function(){p.refreshDescriptions()}).on("select2:select pumselect2:select","#pum-first-cookie",function(){var e=d(this),r=e.parents(".pum-popup-cookie-editor"),t=e.val(),i={indes:r.find("table.list-table tbody tr").length,name:"pum-"+d("#post_ID").val()};e.val(null).trigger("change"),p.template.form(t,i,function(e){var t=d(this),i=t.find("input#event").val(),n=t.find("input#index").val(),o=t.pumSerializeObject();e.preventDefault(),(!n||n<0)&&(n=r.find("tbody tr").length),p.rows.add(r,{index:n,event:i,settings:o.cookie_settings}),PUM_Admin.modals.closeAll()})}).on("click",".pum-popup-cookie-editor .pum-add-new",function(){n=d(this).parents(".pum-popup-cookie-editor");var e=wp.template("pum-cookie-add-event");PUM_Admin.modals.reload("#pum_cookie_add_event_modal",e({I10n:s}))}).on("click",".pum-popup-cookie-editor .edit",function(e){var t=d(this),r=t.parents(".pum-popup-cookie-editor"),i=t.parents("tr:first"),n=i.find(".popup_cookies_field_event").val(),o=_.extend({},JSON.parse(i.find(".popup_cookies_field_settings:first").val()),{index:i.parent().children().index(i),event:n});e.preventDefault(),p.template.form(n,o,function(e){var t=d(this),i=t.find("input#event").val(),n=t.find("input#index").val(),o=t.pumSerializeObject();e.preventDefault(),(!1===n||n<0)&&(n=r.find("tbody tr").length),p.rows.add(r,{index:n,event:i,settings:o.cookie_settings}),PUM_Admin.modals.closeAll()})}).on("click",".pum-popup-cookie-editor .remove",function(e){var t=d(this).parents("tr:first");e.preventDefault(),window.confirm(s.confirm_delete_cookie)&&p.rows.remove(t)}).on("click",".pum-field-cookie_key button.reset",function(e){var t=d(this),i=(new Date).getTime().toString(16);t.siblings('input[type="text"]:first').val(i)}).on("submit","#pum_cookie_add_event_modal .pum-form",function(e){var a=n,t=d("#popup_cookie_add_event").val(),i={index:a.find("table.list-table tbody tr").length,name:"pum-"+d("#post_ID").val(),path:"1"};e.preventDefault(),p.template.form(t,i,function(e){var t=d(this),i=t.find("input#event").val(),n=t.find("input#index").val(),o=t.pumSerializeObject();if(e.preventDefault(),(!1===n||n<0)&&(n=a.find("tbody tr").length),p.rows.add(a,{index:n,event:i,settings:o.cookie_settings}),PUM_Admin.modals.closeAll(),void 0!==PUM_Admin.triggers&&!1!==PUM_Admin.triggers.new_cookie&&0<=PUM_Admin.triggers.new_cookie){var r=PUM_Admin.triggers.current_editor.find("tbody tr").eq(PUM_Admin.triggers.new_cookie).find(".popup_triggers_field_settings:first"),s=JSON.parse(r.val());"string"==typeof s.cookie_name?s.cookie_name=s.cookie_name.replace("add_new",o.cookie_settings.name):(s.cookie_name[s.cookie_name.indexOf("add_new")]=o.cookie_settings.name,s.cookie_name=s.cookie_name.filter(function(e,t,i){return!(e in this)&&(this[e]=!0)},{})),r.val(JSON.stringify(s)),PUM_Admin.triggers.new_cookie=!1,PUM_Admin.triggers.refreshDescriptions()}})})}(jQuery,document),function(a,e,d){"use strict";var p=pum_admin_vars.I10n,c={current_editor:null,new_cookie:!1,get_triggers:function(){return window.pum_popup_settings_editor.triggers},get_trigger:function(e){var t=this.get_triggers(),i="undefined"!==t[e]&&t[e];return!!i&&(i&&"object"==typeof i&&"object"==typeof i.fields&&Object.keys(i.fields).length&&(i=this.parseFields(i)),i)},parseFields:function(n){return _.each(n.fields,function(e,i){_.each(e,function(e,t){n.fields[i][t].name="trigger_settings["+t+"]",""===n.fields[i][t].id&&(n.fields[i][t].id="trigger_settings_"+t)})}),n},parseValues:function(e,t){for(var i in e)e.hasOwnProperty(i)&&e.hasOwnProperty(i+"_unit")&&(e[i]+=e[i+"_unit"],delete e[i+"_unit"]);return e},select_list:function(){var e,t=PUM_Admin.utils.object_to_array(c.get_triggers()),i={};for(e=0;e<t.length;e++)i[t[e].id]=t[e].name;return i},rows:{add:function(e,t){var i=a(e),n={index:null!==t.index&&0<=t.index?t.index:i.find("table.list-table tbody tr").length,type:t.type,name:i.data("field_name"),settings:t.settings||{}},o=i.find("tbody tr").eq(n.index),r=PUM_Admin.templates.render("pum-trigger-row",n);o.length?o.replaceWith(r):i.find("tbody").append(r),i.addClass("has-list-items"),c.renumber(),c.refreshDescriptions()},remove:function(e){var t=e.parents(".pum-popup-trigger-editor");e.remove(),c.renumber(),0===t.find("table.list-table tbody tr").length&&(t.removeClass("has-list-items"),a("#pum-first-trigger").val(null).trigger("change"))}},template:{form:function(e,t,i){var n=c.get_trigger(e),o="pum_trigger_settings",r=Object.keys(n.fields)[0],s=a(".pum-field-cookies .list-table tbody tr");(t=t||{}).type=e,t.index=0<=t.index?t.index:null,n.fields[r]=a.extend(!0,n.fields[r],{index:{type:"hidden",name:"index"},type:{type:"hidden",name:"type"}}),s.each(function(){var e=JSON.parse(a(this).find(".popup_cookies_field_settings:first").val());void 0===n.fields[r].cookie_name.options[e.name]&&(n.fields[r].cookie_name.options[e.name]=e.name)}),PUM_Admin.modals.reload("#"+o,PUM_Admin.templates.modal({id:o,title:n.modal_title||n.name,classes:"tabbed-content",save_button:null!==t.index?p.update:p.add,content:PUM_Admin.forms.render({id:"pum_trigger_settings_form",tabs:n.tabs||{},fields:n.fields||{}},t||{})})),a("#"+o+" form").on("submit",i||function(e){e.preventDefault(),PUM_Admin.modals.closeAll()})},editor:function(e){var t=a.extend(!0,{},{triggers:[],name:""},e);return t.triggers=PUM_Admin.utils.object_to_array(t.triggers),PUM_Admin.templates.render("pum-trigger-editor",t)},row:function(e){var t=a.extend(!0,{},{index:"",type:"",name:"",settings:{cookie_name:""}},e);return PUM_Admin.templates.render("pum-trigger-row",t)},selectbox:function(e){var t=a.extend(!0,{},{id:null,name:null,type:"select",group:"",index:"",value:null,select2:!0,classes:[],options:c.select_list()},e);return null===t.id&&(t.id="popup_settings_triggers_"+t.index+"_type"),null===t.name&&(t.name="popup_settings[triggers]["+t.index+"][type]"),PUM_Admin.templates.field(t)}},getLabel:function(e){var t=c.get_trigger(e);return!!t&&t.name},getSettingsDesc:function(e,t){var i=c.get_trigger(e);return!!i&&PUM_Admin.templates.renderInline(i.settings_column,t)},renumber:function(){a(".pum-popup-trigger-editor table.list-table tbody tr").each(function(){var e=a(this),t=e.parent().children().index(e);e.attr("data-index",t).data("index",t),e.find(":input, [name]").each(function(){this.name&&""!==this.name&&(this.name=this.name.replace(/\[\d*?\]/,"["+t+"]"))})})},refreshDescriptions:function(){a(".pum-popup-trigger-editor table.list-table tbody tr").each(function(){var e=a(this),t=e.find(".popup_triggers_field_type").val(),i=JSON.parse(e.find(".popup_triggers_field_settings:first").val()),n=PUM_Admin.triggers.cookie_column_value(i.cookie_name);e.find("td.settings-column").html(PUM_Admin.triggers.getSettingsDesc(t,i)),e.find("td.cookie-column code").text(n)})},cookie_column_value:function(e){var t=p.no_cookie;return e instanceof Array?t=e.join(", "):null!==e&&e!==d&&""!==e&&(t=e),t},append_click_selector_presets:function(){var e,t,i=a("#extra_selectors");i.length&&!i.hasClass("pum-click-selector-presets-initialized")&&(e=PUM_Admin.templates.render("pum-click-selector-presets"),(t=i.parents(".pum-field").find(".pum-click-selector-presets")).length||(i.before(e),i.addClass("pum-click-selector-presets-initialized"),t=i.parents(".pum-field").find(".pum-click-selector-presets")),t.position({my:"right center",at:"right center",of:i}))},toggle_click_selector_presets:function(){a(this).parent().toggleClass("open")},reset_click_selector_presets:function(e){e!==d&&a(e.target).parents(".pum-click-selector-presets").length||a(".pum-click-selector-presets").removeClass("open")},insert_click_selector_preset:function(){var e=a(this),t=a("#extra_selectors"),i=t.val();""!==i&&(i+=", "),t.val(i+e.data("preset")),PUM_Admin.triggers.reset_click_selector_presets()}};window.PUM_Admin=window.PUM_Admin||{},window.PUM_Admin.triggers=c,a(e).on("pum_init",function(){PUM_Admin.triggers.append_click_selector_presets(),PUM_Admin.triggers.refreshDescriptions()}).on("click",".pum-click-selector-presets > span",PUM_Admin.triggers.toggle_click_selector_presets).on("click",".pum-click-selector-presets li",PUM_Admin.triggers.insert_click_selector_preset).on("click",PUM_Admin.triggers.reset_click_selector_presets).on("select2:select pumselect2:select","#pum-first-trigger",function(){var e=a(this),s=e.parents(".pum-popup-trigger-editor"),t=e.val(),i={};PUM_Admin.triggers.current_editor=s,"click_open"!==t&&(i.cookie_name="pum-"+a("#post_ID").val()),c.template.form(t,i,function(e){var t=a(this),i=t.find("input#type").val(),n=t.pumSerializeObject(),o=c.parseValues(n.trigger_settings||{}),r=parseInt(n.index);e.preventDefault(),(!1===r||r<0)&&(r=s.find("tbody tr").length),c.rows.add(s,{index:r,type:i,settings:o}),PUM_Admin.modals.closeAll(),o.cookie_name!==d&&null!==o.cookie_name&&("add_new"===o.cookie_name||0<=o.cookie_name.indexOf("add_new"))&&(PUM_Admin.triggers.new_cookie=n.index,a("#pum-popup-settings-container .pum-popup-cookie-editor button.pum-add-new").trigger("click"))}),e.val(null).trigger("change")}).on("click",".pum-popup-trigger-editor .pum-add-new",function(){PUM_Admin.triggers.current_editor=a(this).parents(".pum-popup-trigger-editor");var e=wp.template("pum-trigger-add-type");PUM_Admin.modals.reload("#pum_trigger_add_type_modal",e({I10n:p}))}).on("click",".pum-popup-trigger-editor .edit",function(e){var t=a(this),s=t.parents(".pum-popup-trigger-editor"),i=t.parents("tr:first"),n=i.find(".popup_triggers_field_type").val(),o=_.extend({},JSON.parse(i.find(".popup_triggers_field_settings:first").val()),{index:i.parent().children().index(i),type:n});e.preventDefault(),c.template.form(n,o,function(e){var t=a(this),i=t.find("input#type").val(),n=t.find("input#index").val(),o=t.pumSerializeObject(),r=c.parseValues(o.trigger_settings||{});PUM_Admin.triggers.current_editor=s,e.preventDefault(),(!1===n||n<0)&&(n=s.find("tbody tr").length),c.rows.add(s,{index:n,type:i,settings:r}),PUM_Admin.modals.closeAll(),r.cookie_name!==d&&null!==r.cookie_name&&("add_new"===r.cookie_name||0<=r.cookie_name.indexOf("add_new"))&&(PUM_Admin.triggers.new_cookie=o.index,a("#pum-popup-settings-container .pum-popup-cookie-editor button.pum-add-new").trigger("click"))})}).on("click",".pum-popup-trigger-editor .remove",function(e){var t=a(this),i=t.parents(".pum-popup-trigger-editor"),n=t.parents("tr:first");PUM_Admin.triggers.current_editor=i,e.preventDefault(),window.confirm(p.confirm_delete_trigger)&&c.rows.remove(n)}).on("submit","#pum_trigger_add_type_modal .pum-form",function(e){var s=PUM_Admin.triggers.current_editor,t=s.parents("#pum-popup-settings-triggers-subtabs_main").find(".pum-field-cookies .pum-popup-cookie-editor"),i=a("#popup_trigger_add_type").val(),n=a("#popup_trigger_add_cookie").is(":checked"),o=a("#popup_trigger_add_cookie_event").val(),r={};e.preventDefault(),n&&(r.cookie_name="pum-"+a("#post_ID").val(),PUM_Admin.cookies.insertCookie(t,{event:o,settings:{time:"1 month",path:"1",name:r.cookie_name}})),c.template.form(i,r,function(e){var t=a(this),i=t.find("input#type").val(),n=t.pumSerializeObject(),o=c.parseValues(n.trigger_settings||{}),r=parseInt(n.index);PUM_Admin.triggers.current_editor=s,e.preventDefault(),(!r||r<0)&&(r=s.find("tbody tr").length),c.rows.add(s,{index:r,type:i,settings:o}),PUM_Admin.modals.closeAll(),o.cookie_name!==d&&null!==o.cookie_name&&("add_new"===o.cookie_name||0<=o.cookie_name.indexOf("add_new"))&&(PUM_Admin.triggers.new_cookie=n.index,a("#pum-popup-settings-container .pum-popup-cookie-editor button.pum-add-new").trigger("click"))})})}(jQuery,document),function(n){"use strict";window.PUM_Admin=window.PUM_Admin||{},window.pum_popup_settings_editor=window.pum_popup_settings_editor||{form_args:{},current_values:{}},n(document).ready(function(){n(this).trigger("pum_init"),n("#title").prop("required",!0);var e=n("#pum-popup-settings-container"),t=pum_popup_settings_editor.form_args||{},i=pum_popup_settings_editor.current_values||{};e.length&&(e.find(".pum-no-js").hide(),PUM_Admin.forms.render(t,i,e)),n("a.page-title-action").clone().attr("target","_blank").attr("href",pum_admin_vars.homeurl+"?popup_preview=true&popup="+n("#post_ID").val()).text(pum_admin_vars.I10n.preview_popup).insertAfter("a.page-title-action"),n("#pum-first-condition, #pum-first-trigger, #pum-first-cookie").val(null).trigger("change"),document.querySelector("#pum-popup-settings-container").addEventListener("change",function(e){if("open_sound"===e.target.id){if(-1===["none","custom"].indexOf(e.target.value)){var t=new Audio(pum_admin_vars.pm_dir_url+"/assets/sounds/"+e.target.value);t.addEventListener("canplaythrough",function(){this.play().catch(function(e){console.warn("Sound was not able to play when selected. Reason: "+e)})}),t.addEventListener("error",function(){console.warn("Error occurred when trying to load popup opening sound.")})}}}),document.querySelector("#pum-popup-settings-container").addEventListener("click",function(e){if(Array.from(e.target.classList).includes("popup-type")||Array.from(e.target.parentElement.classList).includes("popup-type")){var t=jQuery("#pum-popup-settings-container");if(1===t.length){var i={"center-popup":{size:"medium",responsive_min_width:"0%",responsive_max_width:"100%",animation_type:"fade",animation_speed:350,location:"center",position_fixed:!1,position_from_trigger:!1,overlay_disabled:!1,stackable:!1,disable_reposition:!1},"left-bottom-notice":{size:"tiny",responsive_min_width:"0%",responsive_max_width:"100%",animation_type:"fade",animation_speed:350,animation_origin:"left bottom",location:"left bottom",position_bottom:10,position_left:10,position_from_trigger:!1,position_fixed:!0,overlay_disabled:!0,stackable:!0,disable_reposition:!1},"top-bar":{size:"custom",custom_width:"100%",custom_height_auto:!0,animation_type:"fadeAndSlide",animation_speed:300,animation_origin:"top",location:"center top",position_top:0,position_from_trigger:!1,position_fixed:!0,overlay_disabled:!0,stackable:!0,disable_reposition:!1},"right-bottom-slidein":{size:"custom",custom_width:"300px",custom_height_auto:!0,animation_type:"slide",animation_speed:350,animation_origin:"bottom",location:"right bottom",position_bottom:10,position_right:10,position_from_trigger:!1,position_fixed:!0,overlay_disabled:!0,stackable:!0,disable_reposition:!1}},n=e.target.dataset.popupType||e.target.parentElement.dataset.popupType||"",o=i.hasOwnProperty(n)?i[n]:{},r=pum_popup_settings_editor.form_args||{},s=pum_popup_settings_editor.current_values||{},a=t.pumSerializeObject();if(a.popup_settings.triggers)for(var d=0;d<a.popup_settings.triggers.length;d++)a.popup_settings.triggers[d].settings=JSON.parse(a.popup_settings.triggers[d].settings);if(a.popup_settings.cookies)for(var p=0;p<a.popup_settings.cookies.length;p++)a.popup_settings.cookies[p].settings=JSON.parse(a.popup_settings.cookies[p].settings);var c=Object.assign({},s,a.popup_settings,o);PUM_Admin.forms.render(r,c,t),document.querySelector('a[href="#pum-popup-settings_display"]').click();var l=document.createElement("div");l.classList.add("notice","updated"),l.insertBefore(document.createElement("p"),l.firstChild),l.firstChild.innerText="Display settings have been updated with the "+n+" preset";var u=document.querySelector("#pum-popup-settings-display-subtabs_preset");u.insertBefore(l,u.firstChild)}}})}).on("keydown","#popup-title",function(e){9===(e.keyCode||e.which)&&(e.preventDefault(),n("#title").focus())}).on("keydown","#title, #popup-title",function(e){var t,i=e.keyCode||e.which;e.shiftKey||9!==i||(e.preventDefault(),t="title"===n(this).attr("id")?"#popup-title":"#insert-media-button",n(t).focus())}).on("keydown","#popup-title, #insert-media-button",function(e){var t,i=e.keyCode||e.which;e.shiftKey&&9===i&&(e.preventDefault(),t="popup-title"===n(this).attr("id")?"#title":"#popup-title",n(t).focus())})}(jQuery);
|
assets/js/pum-integration-calderaforms.js
CHANGED
@@ -120,7 +120,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
120 |
$(document).on('cf.ajax.request', beforeAjax) // After all requests
|
121 |
.on('cf.submission', function (event, obj) {
|
122 |
// Only if status of request is complete|success.
|
123 |
-
if (
|
124 |
//get the form that is submiting's ID attribute
|
125 |
var _$form$attr$split = $form.attr('id').split('_'),
|
126 |
_$form$attr$split2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_$form$attr$split, 2),
|
@@ -143,6 +143,27 @@ __webpack_require__.r(__webpack_exports__);
|
|
143 |
|
144 |
/***/ }),
|
145 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
146 |
/***/ "./node_modules/@babel/runtime/helpers/arrayWithHoles.js":
|
147 |
/*!***************************************************************!*\
|
148 |
!*** ./node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
|
@@ -166,10 +187,7 @@ module.exports = _arrayWithHoles;
|
|
166 |
/***/ (function(module, exports) {
|
167 |
|
168 |
function _iterableToArrayLimit(arr, i) {
|
169 |
-
if (!(Symbol.iterator in Object(arr)
|
170 |
-
return;
|
171 |
-
}
|
172 |
-
|
173 |
var _arr = [];
|
174 |
var _n = true;
|
175 |
var _d = false;
|
@@ -207,7 +225,7 @@ module.exports = _iterableToArrayLimit;
|
|
207 |
/***/ (function(module, exports) {
|
208 |
|
209 |
function _nonIterableRest() {
|
210 |
-
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
211 |
}
|
212 |
|
213 |
module.exports = _nonIterableRest;
|
@@ -225,14 +243,38 @@ var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles */ "./node_modules
|
|
225 |
|
226 |
var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit */ "./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js");
|
227 |
|
|
|
|
|
228 |
var nonIterableRest = __webpack_require__(/*! ./nonIterableRest */ "./node_modules/@babel/runtime/helpers/nonIterableRest.js");
|
229 |
|
230 |
function _slicedToArray(arr, i) {
|
231 |
-
return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || nonIterableRest();
|
232 |
}
|
233 |
|
234 |
module.exports = _slicedToArray;
|
235 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
236 |
/***/ })
|
237 |
|
238 |
/******/ });
|
120 |
$(document).on('cf.ajax.request', beforeAjax) // After all requests
|
121 |
.on('cf.submission', function (event, obj) {
|
122 |
// Only if status of request is complete|success.
|
123 |
+
if ('complete' === obj.data.status || 'success' === obj.data.status) {
|
124 |
//get the form that is submiting's ID attribute
|
125 |
var _$form$attr$split = $form.attr('id').split('_'),
|
126 |
_$form$attr$split2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_0___default()(_$form$attr$split, 2),
|
143 |
|
144 |
/***/ }),
|
145 |
|
146 |
+
/***/ "./node_modules/@babel/runtime/helpers/arrayLikeToArray.js":
|
147 |
+
/*!*****************************************************************!*\
|
148 |
+
!*** ./node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
|
149 |
+
\*****************************************************************/
|
150 |
+
/*! no static exports found */
|
151 |
+
/***/ (function(module, exports) {
|
152 |
+
|
153 |
+
function _arrayLikeToArray(arr, len) {
|
154 |
+
if (len == null || len > arr.length) len = arr.length;
|
155 |
+
|
156 |
+
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
157 |
+
arr2[i] = arr[i];
|
158 |
+
}
|
159 |
+
|
160 |
+
return arr2;
|
161 |
+
}
|
162 |
+
|
163 |
+
module.exports = _arrayLikeToArray;
|
164 |
+
|
165 |
+
/***/ }),
|
166 |
+
|
167 |
/***/ "./node_modules/@babel/runtime/helpers/arrayWithHoles.js":
|
168 |
/*!***************************************************************!*\
|
169 |
!*** ./node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
|
187 |
/***/ (function(module, exports) {
|
188 |
|
189 |
function _iterableToArrayLimit(arr, i) {
|
190 |
+
if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
|
|
|
|
|
|
|
191 |
var _arr = [];
|
192 |
var _n = true;
|
193 |
var _d = false;
|
225 |
/***/ (function(module, exports) {
|
226 |
|
227 |
function _nonIterableRest() {
|
228 |
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
229 |
}
|
230 |
|
231 |
module.exports = _nonIterableRest;
|
243 |
|
244 |
var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit */ "./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js");
|
245 |
|
246 |
+
var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray */ "./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js");
|
247 |
+
|
248 |
var nonIterableRest = __webpack_require__(/*! ./nonIterableRest */ "./node_modules/@babel/runtime/helpers/nonIterableRest.js");
|
249 |
|
250 |
function _slicedToArray(arr, i) {
|
251 |
+
return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
|
252 |
}
|
253 |
|
254 |
module.exports = _slicedToArray;
|
255 |
|
256 |
+
/***/ }),
|
257 |
+
|
258 |
+
/***/ "./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js":
|
259 |
+
/*!***************************************************************************!*\
|
260 |
+
!*** ./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
|
261 |
+
\***************************************************************************/
|
262 |
+
/*! no static exports found */
|
263 |
+
/***/ (function(module, exports, __webpack_require__) {
|
264 |
+
|
265 |
+
var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray */ "./node_modules/@babel/runtime/helpers/arrayLikeToArray.js");
|
266 |
+
|
267 |
+
function _unsupportedIterableToArray(o, minLen) {
|
268 |
+
if (!o) return;
|
269 |
+
if (typeof o === "string") return arrayLikeToArray(o, minLen);
|
270 |
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
271 |
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
272 |
+
if (n === "Map" || n === "Set") return Array.from(n);
|
273 |
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
|
274 |
+
}
|
275 |
+
|
276 |
+
module.exports = _unsupportedIterableToArray;
|
277 |
+
|
278 |
/***/ })
|
279 |
|
280 |
/******/ });
|
assets/js/pum-integration-calderaforms.min.js
CHANGED
@@ -2,7 +2,11 @@
|
|
2 |
/*!***************************************************!*\
|
3 |
!*** ./assets/js/src/integration/calderaforms.js ***!
|
4 |
\***************************************************/
|
5 |
-
/*! no exports provided */function(e,r,t){"use strict";t.r(r);var u,n=t(/*! @babel/runtime/helpers/slicedToArray */"./node_modules/@babel/runtime/helpers/slicedToArray.js"),
|
|
|
|
|
|
|
|
|
6 |
/*!***************************************************************!*\
|
7 |
!*** ./node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
|
8 |
\***************************************************************/
|
@@ -10,12 +14,16 @@
|
|
10 |
/*!*********************************************************************!*\
|
11 |
!*** ./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
|
12 |
\*********************************************************************/
|
13 |
-
/*! no static exports found */function(e,r){e.exports=function(e,r){if(Symbol.iterator in Object(e)
|
14 |
/*!****************************************************************!*\
|
15 |
!*** ./node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
|
16 |
\****************************************************************/
|
17 |
-
/*! no static exports found */function(e,r){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},"./node_modules/@babel/runtime/helpers/slicedToArray.js":
|
18 |
/*!**************************************************************!*\
|
19 |
!*** ./node_modules/@babel/runtime/helpers/slicedToArray.js ***!
|
20 |
\**************************************************************/
|
21 |
-
/*! no static exports found */function(e,r,t){var n=t(/*! ./arrayWithHoles */"./node_modules/@babel/runtime/helpers/arrayWithHoles.js"),o=t(/*! ./iterableToArrayLimit */"./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js"),
|
|
|
|
|
|
|
|
2 |
/*!***************************************************!*\
|
3 |
!*** ./assets/js/src/integration/calderaforms.js ***!
|
4 |
\***************************************************/
|
5 |
+
/*! no exports provided */function(e,r,t){"use strict";t.r(r);var u,n=t(/*! @babel/runtime/helpers/slicedToArray */"./node_modules/@babel/runtime/helpers/slicedToArray.js"),i=t.n(n);(0,window.jQuery)(document).on("cf.ajax.request",function(e,r){return u=r.$form}).on("cf.submission",function(e,r){if("complete"===r.data.status||"success"===r.data.status){var t=u.attr("id").split("_"),n=i()(t,2),o=n[0],a=n[1],s=void 0===a?null:a;window.PUM.integrations.formSubmission(u,{formProvider:"calderaforms",formId:o,formInstanceId:s,extras:{state:window.cfstate.hasOwnProperty(o)?window.cfstate[o]:null}})}})},"./node_modules/@babel/runtime/helpers/arrayLikeToArray.js":
|
6 |
+
/*!*****************************************************************!*\
|
7 |
+
!*** ./node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
|
8 |
+
\*****************************************************************/
|
9 |
+
/*! no static exports found */function(e,r){e.exports=function(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}},"./node_modules/@babel/runtime/helpers/arrayWithHoles.js":
|
10 |
/*!***************************************************************!*\
|
11 |
!*** ./node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
|
12 |
\***************************************************************/
|
14 |
/*!*********************************************************************!*\
|
15 |
!*** ./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
|
16 |
\*********************************************************************/
|
17 |
+
/*! no static exports found */function(e,r){e.exports=function(e,r){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var t=[],n=!0,o=!1,a=void 0;try{for(var s,u=e[Symbol.iterator]();!(n=(s=u.next()).done)&&(t.push(s.value),!r||t.length!==r);n=!0);}catch(e){o=!0,a=e}finally{try{n||null==u.return||u.return()}finally{if(o)throw a}}return t}}},"./node_modules/@babel/runtime/helpers/nonIterableRest.js":
|
18 |
/*!****************************************************************!*\
|
19 |
!*** ./node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
|
20 |
\****************************************************************/
|
21 |
+
/*! no static exports found */function(e,r){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},"./node_modules/@babel/runtime/helpers/slicedToArray.js":
|
22 |
/*!**************************************************************!*\
|
23 |
!*** ./node_modules/@babel/runtime/helpers/slicedToArray.js ***!
|
24 |
\**************************************************************/
|
25 |
+
/*! no static exports found */function(e,r,t){var n=t(/*! ./arrayWithHoles */"./node_modules/@babel/runtime/helpers/arrayWithHoles.js"),o=t(/*! ./iterableToArrayLimit */"./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js"),a=t(/*! ./unsupportedIterableToArray */"./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"),s=t(/*! ./nonIterableRest */"./node_modules/@babel/runtime/helpers/nonIterableRest.js");e.exports=function(e,r){return n(e)||o(e,r)||a(e,r)||s()}},"./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js":
|
26 |
+
/*!***************************************************************************!*\
|
27 |
+
!*** ./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
|
28 |
+
\***************************************************************************/
|
29 |
+
/*! no static exports found */function(e,r,t){var n=t(/*! ./arrayLikeToArray */"./node_modules/@babel/runtime/helpers/arrayLikeToArray.js");e.exports=function(e,r){if(e){if("string"==typeof e)return n(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?n(e,r):void 0}}}});
|
assets/js/pum-integration-ninjaforms.js
CHANGED
@@ -171,6 +171,27 @@ __webpack_require__.r(__webpack_exports__);
|
|
171 |
|
172 |
/***/ }),
|
173 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
174 |
/***/ "./node_modules/@babel/runtime/helpers/arrayWithHoles.js":
|
175 |
/*!***************************************************************!*\
|
176 |
!*** ./node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
|
@@ -194,10 +215,7 @@ module.exports = _arrayWithHoles;
|
|
194 |
/***/ (function(module, exports) {
|
195 |
|
196 |
function _iterableToArrayLimit(arr, i) {
|
197 |
-
if (!(Symbol.iterator in Object(arr)
|
198 |
-
return;
|
199 |
-
}
|
200 |
-
|
201 |
var _arr = [];
|
202 |
var _n = true;
|
203 |
var _d = false;
|
@@ -235,7 +253,7 @@ module.exports = _iterableToArrayLimit;
|
|
235 |
/***/ (function(module, exports) {
|
236 |
|
237 |
function _nonIterableRest() {
|
238 |
-
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
239 |
}
|
240 |
|
241 |
module.exports = _nonIterableRest;
|
@@ -253,14 +271,38 @@ var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles */ "./node_modules
|
|
253 |
|
254 |
var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit */ "./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js");
|
255 |
|
|
|
|
|
256 |
var nonIterableRest = __webpack_require__(/*! ./nonIterableRest */ "./node_modules/@babel/runtime/helpers/nonIterableRest.js");
|
257 |
|
258 |
function _slicedToArray(arr, i) {
|
259 |
-
return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || nonIterableRest();
|
260 |
}
|
261 |
|
262 |
module.exports = _slicedToArray;
|
263 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
264 |
/***/ })
|
265 |
|
266 |
/******/ });
|
171 |
|
172 |
/***/ }),
|
173 |
|
174 |
+
/***/ "./node_modules/@babel/runtime/helpers/arrayLikeToArray.js":
|
175 |
+
/*!*****************************************************************!*\
|
176 |
+
!*** ./node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
|
177 |
+
\*****************************************************************/
|
178 |
+
/*! no static exports found */
|
179 |
+
/***/ (function(module, exports) {
|
180 |
+
|
181 |
+
function _arrayLikeToArray(arr, len) {
|
182 |
+
if (len == null || len > arr.length) len = arr.length;
|
183 |
+
|
184 |
+
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
185 |
+
arr2[i] = arr[i];
|
186 |
+
}
|
187 |
+
|
188 |
+
return arr2;
|
189 |
+
}
|
190 |
+
|
191 |
+
module.exports = _arrayLikeToArray;
|
192 |
+
|
193 |
+
/***/ }),
|
194 |
+
|
195 |
/***/ "./node_modules/@babel/runtime/helpers/arrayWithHoles.js":
|
196 |
/*!***************************************************************!*\
|
197 |
!*** ./node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
|
215 |
/***/ (function(module, exports) {
|
216 |
|
217 |
function _iterableToArrayLimit(arr, i) {
|
218 |
+
if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
|
|
|
|
|
|
|
219 |
var _arr = [];
|
220 |
var _n = true;
|
221 |
var _d = false;
|
253 |
/***/ (function(module, exports) {
|
254 |
|
255 |
function _nonIterableRest() {
|
256 |
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
257 |
}
|
258 |
|
259 |
module.exports = _nonIterableRest;
|
271 |
|
272 |
var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit */ "./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js");
|
273 |
|
274 |
+
var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray */ "./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js");
|
275 |
+
|
276 |
var nonIterableRest = __webpack_require__(/*! ./nonIterableRest */ "./node_modules/@babel/runtime/helpers/nonIterableRest.js");
|
277 |
|
278 |
function _slicedToArray(arr, i) {
|
279 |
+
return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
|
280 |
}
|
281 |
|
282 |
module.exports = _slicedToArray;
|
283 |
|
284 |
+
/***/ }),
|
285 |
+
|
286 |
+
/***/ "./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js":
|
287 |
+
/*!***************************************************************************!*\
|
288 |
+
!*** ./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
|
289 |
+
\***************************************************************************/
|
290 |
+
/*! no static exports found */
|
291 |
+
/***/ (function(module, exports, __webpack_require__) {
|
292 |
+
|
293 |
+
var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray */ "./node_modules/@babel/runtime/helpers/arrayLikeToArray.js");
|
294 |
+
|
295 |
+
function _unsupportedIterableToArray(o, minLen) {
|
296 |
+
if (!o) return;
|
297 |
+
if (typeof o === "string") return arrayLikeToArray(o, minLen);
|
298 |
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
299 |
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
300 |
+
if (n === "Map" || n === "Set") return Array.from(n);
|
301 |
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
|
302 |
+
}
|
303 |
+
|
304 |
+
module.exports = _unsupportedIterableToArray;
|
305 |
+
|
306 |
/***/ })
|
307 |
|
308 |
/******/ });
|
assets/js/pum-integration-ninjaforms.min.js
CHANGED
@@ -1,21 +1,29 @@
|
|
1 |
-
!function(
|
2 |
/*!*************************************************!*\
|
3 |
!*** ./assets/js/src/integration/ninjaforms.js ***!
|
4 |
\*************************************************/
|
5 |
-
/*! no exports provided */function(e,n
|
|
|
|
|
|
|
|
|
6 |
/*!***************************************************************!*\
|
7 |
!*** ./node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
|
8 |
\***************************************************************/
|
9 |
-
/*! no static exports found */function(e,
|
10 |
/*!*********************************************************************!*\
|
11 |
!*** ./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
|
12 |
\*********************************************************************/
|
13 |
-
/*! no static exports found */function(e,
|
14 |
/*!****************************************************************!*\
|
15 |
!*** ./node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
|
16 |
\****************************************************************/
|
17 |
-
/*! no static exports found */function(e,
|
18 |
/*!**************************************************************!*\
|
19 |
!*** ./node_modules/@babel/runtime/helpers/slicedToArray.js ***!
|
20 |
\**************************************************************/
|
21 |
-
/*! no static exports found */function(e,n
|
|
|
|
|
|
|
|
1 |
+
!function(n){var t={};function o(e){if(t[e])return t[e].exports;var r=t[e]={i:e,l:!1,exports:{}};return n[e].call(r.exports,r,r.exports,o),r.l=!0,r.exports}o.m=n,o.c=t,o.d=function(e,r,n){o.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(r,e){if(1&e&&(r=o(r)),8&e)return r;if(4&e&&"object"==typeof r&&r&&r.__esModule)return r;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:r}),2&e&&"string"!=typeof r)for(var t in r)o.d(n,t,function(e){return r[e]}.bind(null,t));return n},o.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(r,"a",r),r},o.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},o.p="",o(o.s="./assets/js/src/integration/ninjaforms.js")}({"./assets/js/src/integration/ninjaforms.js":
|
2 |
/*!*************************************************!*\
|
3 |
!*** ./assets/js/src/integration/ninjaforms.js ***!
|
4 |
\*************************************************/
|
5 |
+
/*! no exports provided */function(e,r,n){"use strict";n.r(r);var t=n(/*! @babel/runtime/helpers/slicedToArray */"./node_modules/@babel/runtime/helpers/slicedToArray.js"),d=n.n(t),c=window.jQuery,o=!1;c(document).ready(function(){"undefined"!=typeof Marionette&&"undefined"!=typeof nfRadio&&!1===o&&new(o=Marionette.Object.extend({initialize:function(){this.listenTo(nfRadio.channel("forms"),"submit:response",this.popupMaker)},popupMaker:function(e,r,n,t){var o=c("#nf-form-"+t+"-cont"),a=t.split("_"),i=d()(a,2),s=i[0],u=i[1],l=void 0===u?null:u,p={};e.errors.length||(window.PUM.integrations.formSubmission(o,{formProvider:"ninjaforms",formId:s,formInstanceId:l,extras:{response:e}}),void 0!==e.data.actions&&(p.openpopup=void 0!==e.data.actions.openpopup,p.openpopup_id=p.openpopup?parseInt(e.data.actions.openpopup):0,p.closepopup=void 0!==e.data.actions.closepopup,p.closedelay=p.closepopup?parseInt(e.data.actions.closepopup):0,p.closepopup&&e.data.actions.closedelay&&(p.closedelay=parseInt(e.data.actions.closedelay))),window.PUM.forms.success(o,p))}}))})},"./node_modules/@babel/runtime/helpers/arrayLikeToArray.js":
|
6 |
+
/*!*****************************************************************!*\
|
7 |
+
!*** ./node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
|
8 |
+
\*****************************************************************/
|
9 |
+
/*! no static exports found */function(e,r){e.exports=function(e,r){(null==r||r>e.length)&&(r=e.length);for(var n=0,t=new Array(r);n<r;n++)t[n]=e[n];return t}},"./node_modules/@babel/runtime/helpers/arrayWithHoles.js":
|
10 |
/*!***************************************************************!*\
|
11 |
!*** ./node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
|
12 |
\***************************************************************/
|
13 |
+
/*! no static exports found */function(e,r){e.exports=function(e){if(Array.isArray(e))return e}},"./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js":
|
14 |
/*!*********************************************************************!*\
|
15 |
!*** ./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
|
16 |
\*********************************************************************/
|
17 |
+
/*! no static exports found */function(e,r){e.exports=function(e,r){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],t=!0,o=!1,a=void 0;try{for(var i,s=e[Symbol.iterator]();!(t=(i=s.next()).done)&&(n.push(i.value),!r||n.length!==r);t=!0);}catch(e){o=!0,a=e}finally{try{t||null==s.return||s.return()}finally{if(o)throw a}}return n}}},"./node_modules/@babel/runtime/helpers/nonIterableRest.js":
|
18 |
/*!****************************************************************!*\
|
19 |
!*** ./node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
|
20 |
\****************************************************************/
|
21 |
+
/*! no static exports found */function(e,r){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}},"./node_modules/@babel/runtime/helpers/slicedToArray.js":
|
22 |
/*!**************************************************************!*\
|
23 |
!*** ./node_modules/@babel/runtime/helpers/slicedToArray.js ***!
|
24 |
\**************************************************************/
|
25 |
+
/*! no static exports found */function(e,r,n){var t=n(/*! ./arrayWithHoles */"./node_modules/@babel/runtime/helpers/arrayWithHoles.js"),o=n(/*! ./iterableToArrayLimit */"./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js"),a=n(/*! ./unsupportedIterableToArray */"./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"),i=n(/*! ./nonIterableRest */"./node_modules/@babel/runtime/helpers/nonIterableRest.js");e.exports=function(e,r){return t(e)||o(e,r)||a(e,r)||i()}},"./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js":
|
26 |
+
/*!***************************************************************************!*\
|
27 |
+
!*** ./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
|
28 |
+
\***************************************************************************/
|
29 |
+
/*! no static exports found */function(e,r,n){var t=n(/*! ./arrayLikeToArray */"./node_modules/@babel/runtime/helpers/arrayLikeToArray.js");e.exports=function(e,r){if(e){if("string"==typeof e)return t(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?t(e,r):void 0}}}});
|
assets/js/site.js
CHANGED
@@ -40,6 +40,18 @@
|
|
40 |
};
|
41 |
}
|
42 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
if (Date.now === undefined) {
|
44 |
Date.now = function () {
|
45 |
return new Date().getTime();
|
@@ -60,6 +72,7 @@ var PUM;
|
|
60 |
default_theme: '0',
|
61 |
home_url: '/',
|
62 |
version: 1.7,
|
|
|
63 |
ajaxurl: '',
|
64 |
restapi: false,
|
65 |
rest_nonce: null,
|
@@ -294,6 +307,21 @@ var PUM;
|
|
294 |
.data('popmake', settings)
|
295 |
.trigger('pumInit');
|
296 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
297 |
return this;
|
298 |
});
|
299 |
},
|
@@ -414,6 +442,14 @@ var PUM;
|
|
414 |
}
|
415 |
});
|
416 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
417 |
return this;
|
418 |
},
|
419 |
setup_close: function () {
|
@@ -678,6 +714,11 @@ var PUM;
|
|
678 |
.position(reposition)
|
679 |
.trigger('popmakeAfterReposition');
|
680 |
|
|
|
|
|
|
|
|
|
|
|
681 |
if (opacity.overlay) {
|
682 |
$popup.css({opacity: opacity.overlay}).hide(0);
|
683 |
}
|
@@ -1002,100 +1043,157 @@ var PUM_Analytics;
|
|
1002 |
return this;
|
1003 |
};
|
1004 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1005 |
$.fn.popmake.animations = {
|
1006 |
none: function (callback) {
|
1007 |
var $popup = PUM.getPopup(this);
|
1008 |
|
1009 |
// Ensure the container is visible immediately.
|
1010 |
-
$popup.popmake('getContainer').css({opacity: 1, display: "block"})
|
1011 |
|
1012 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1013 |
// Fire user passed callback.
|
1014 |
-
if (callback !== undefined) {
|
1015 |
callback();
|
1016 |
// TODO Test this new method. Then remove the above.
|
1017 |
//callback.apply(this);
|
1018 |
}
|
1019 |
-
});
|
1020 |
-
|
1021 |
-
},
|
1022 |
-
slide: function (callback) {
|
1023 |
-
var $popup = PUM.getPopup(this),
|
1024 |
-
$container = $popup.popmake('getContainer'),
|
1025 |
-
settings = $popup.popmake('getSettings'),
|
1026 |
-
speed = settings.animation_speed / 2,
|
1027 |
-
start = $popup.popmake('animation_origin', settings.animation_origin);
|
1028 |
-
|
1029 |
-
// Make the overlay and container visible so they can be positioned & sized prior to display.
|
1030 |
-
$popup.css({display: "block"});
|
1031 |
-
// Position the opaque container offscreen then update its opacity.
|
1032 |
-
$container.css({display: "block"})
|
1033 |
-
.position(start)
|
1034 |
-
.css({opacity: 1});
|
1035 |
-
|
1036 |
-
$popup
|
1037 |
-
.popmake('animate_overlay', 'fade', speed, function () {
|
1038 |
-
$container.popmake('reposition', function (position) {
|
1039 |
-
$container.animate(position, speed, 'swing', function () {
|
1040 |
-
// Fire user passed callback.
|
1041 |
-
if (callback !== undefined) {
|
1042 |
-
callback();
|
1043 |
-
// TODO Test this new method. Then remove the above.
|
1044 |
-
//callback.apply(this);
|
1045 |
-
}
|
1046 |
-
});
|
1047 |
-
});
|
1048 |
-
});
|
1049 |
return this;
|
1050 |
},
|
1051 |
-
|
1052 |
-
var $popup = PUM.getPopup(this),
|
1053 |
-
$container = $popup.popmake('getContainer'
|
1054 |
-
settings = $popup.popmake('getSettings'),
|
1055 |
-
|
1056 |
-
|
1057 |
-
|
1058 |
-
|
1059 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1060 |
// Fire user passed callback.
|
1061 |
-
if (callback !== undefined) {
|
1062 |
callback();
|
1063 |
// TODO Test this new method. Then remove the above.
|
1064 |
//callback.apply(this);
|
1065 |
}
|
1066 |
-
});
|
1067 |
-
});
|
1068 |
-
return this;
|
1069 |
-
},
|
1070 |
-
fadeAndSlide: function (callback) {
|
1071 |
-
var $popup = PUM.getPopup(this),
|
1072 |
-
$container = $popup.popmake('getContainer'),
|
1073 |
-
settings = $popup.popmake('getSettings'),
|
1074 |
-
speed = settings.animation_speed / 2,
|
1075 |
-
start = $popup.popmake('animation_origin', settings.animation_origin);
|
1076 |
-
|
1077 |
-
// Make the overlay and container visible so they can be positioned & sized prior to display.
|
1078 |
-
$popup.css({display: "block"});
|
1079 |
-
// Position the opaque container offscreen then update its opacity.
|
1080 |
-
$container.css({display: "block"})
|
1081 |
-
.position(start);
|
1082 |
-
|
1083 |
-
$popup
|
1084 |
-
.popmake('animate_overlay', 'fade', speed, function () {
|
1085 |
-
$container.popmake('reposition', function (position) {
|
1086 |
-
$container.css({opacity: 0});
|
1087 |
-
position.opacity = 1;
|
1088 |
-
$container.animate(position, speed, 'swing', function () {
|
1089 |
-
// Fire user passed callback.
|
1090 |
-
if (callback !== undefined) {
|
1091 |
-
callback();
|
1092 |
-
// TODO Test this new method. Then remove the above.
|
1093 |
-
//callback.apply(this);
|
1094 |
-
}
|
1095 |
-
});
|
1096 |
|
1097 |
-
|
1098 |
-
|
1099 |
return this;
|
1100 |
},
|
1101 |
/**
|
@@ -1520,6 +1618,16 @@ var pm_cookie, pm_cookie_json, pm_remove_cookie;
|
|
1520 |
(function ($, document, undefined) {
|
1521 |
"use strict";
|
1522 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1523 |
$.extend($.fn.popmake.methods, {
|
1524 |
addCookie: function (type) {
|
1525 |
// Method calling logic
|
@@ -1534,15 +1642,7 @@ var pm_cookie, pm_cookie_json, pm_remove_cookie;
|
|
1534 |
}
|
1535 |
return this;
|
1536 |
},
|
1537 |
-
setCookie:
|
1538 |
-
$.pm_cookie(
|
1539 |
-
settings.name,
|
1540 |
-
true,
|
1541 |
-
settings.session ? null : settings.time,
|
1542 |
-
settings.path ? pum_vars.home_url || '/' : null
|
1543 |
-
);
|
1544 |
-
pum.hooks.doAction('popmake.setCookie', settings);
|
1545 |
-
},
|
1546 |
checkCookies: function (settings) {
|
1547 |
var i,
|
1548 |
ret = false;
|
@@ -1654,6 +1754,34 @@ var pm_cookie, pm_cookie_json, pm_remove_cookie;
|
|
1654 |
|
1655 |
// Register All Cookies for a Popup
|
1656 |
$(document)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1657 |
.on('pumInit', '.pum', function () {
|
1658 |
var $popup = PUM.getPopup(this),
|
1659 |
settings = $popup.popmake('getSettings'),
|
40 |
};
|
41 |
}
|
42 |
|
43 |
+
if ($.fn.isInViewport === undefined) {
|
44 |
+
$.fn.isInViewport = function () {
|
45 |
+
var elementTop = $( this ).offset().top;
|
46 |
+
var elementBottom = elementTop + $( this ).outerHeight();
|
47 |
+
|
48 |
+
var viewportTop = $( window ).scrollTop();
|
49 |
+
var viewportBottom = viewportTop + $( window ).height();
|
50 |
+
|
51 |
+
return elementBottom > viewportTop && elementTop < viewportBottom;
|
52 |
+
};
|
53 |
+
}
|
54 |
+
|
55 |
if (Date.now === undefined) {
|
56 |
Date.now = function () {
|
57 |
return new Date().getTime();
|
72 |
default_theme: '0',
|
73 |
home_url: '/',
|
74 |
version: 1.7,
|
75 |
+
pm_dir_url: '',
|
76 |
ajaxurl: '',
|
77 |
restapi: false,
|
78 |
rest_nonce: null,
|
307 |
.data('popmake', settings)
|
308 |
.trigger('pumInit');
|
309 |
|
310 |
+
// If our opening sound setting is not set to None...
|
311 |
+
if ( settings.open_sound && 'none' !== settings.open_sound ) {
|
312 |
+
// ... then set up our audio. Once loaded, add to popup data.
|
313 |
+
var audio = 'custom' !== settings.open_sound ? new Audio( pum_vars.pm_dir_url + '/assets/sounds/' + settings.open_sound ) : new Audio( settings.custom_sound );
|
314 |
+
audio.addEventListener('canplaythrough', function() {
|
315 |
+
$popup.data('popAudio', audio);
|
316 |
+
});
|
317 |
+
audio.addEventListener('error', function() {
|
318 |
+
console.warn( 'Error occurred when trying to load Popup opening sound.' );
|
319 |
+
});
|
320 |
+
|
321 |
+
// In case our audio loaded faster than us attaching the event listener.
|
322 |
+
audio.load();
|
323 |
+
}
|
324 |
+
|
325 |
return this;
|
326 |
});
|
327 |
},
|
442 |
}
|
443 |
});
|
444 |
|
445 |
+
// If the audio hasn't loaded yet, it wouldn't have been added to the popup.
|
446 |
+
if ( 'undefined' !== typeof $popup.data('popAudio') ) {
|
447 |
+
$popup.data('popAudio').play()
|
448 |
+
.catch(function(reason) {
|
449 |
+
console.warn('Sound was not able to play when popup opened. Reason: ' + reason);
|
450 |
+
});
|
451 |
+
}
|
452 |
+
|
453 |
return this;
|
454 |
},
|
455 |
setup_close: function () {
|
714 |
.position(reposition)
|
715 |
.trigger('popmakeAfterReposition');
|
716 |
|
717 |
+
if (location === 'center' && $container[0].offsetTop < 0) {
|
718 |
+
// Admin bar is 32px high, with a 10px margin that is 42
|
719 |
+
$container.css({top: $('body').hasClass('admin-bar') ? 42 : 10});
|
720 |
+
}
|
721 |
+
|
722 |
if (opacity.overlay) {
|
723 |
$popup.css({opacity: opacity.overlay}).hide(0);
|
724 |
}
|
1043 |
return this;
|
1044 |
};
|
1045 |
|
1046 |
+
/**
|
1047 |
+
* Resets animation & position properties prior to opening/reopening the popup.
|
1048 |
+
*
|
1049 |
+
* @param $popup
|
1050 |
+
*/
|
1051 |
+
function popupCssReset( $popup ) {
|
1052 |
+
var $container = $popup.popmake( 'getContainer' ),
|
1053 |
+
cssResets = { display: '', opacity: '' };
|
1054 |
+
|
1055 |
+
$popup.css(cssResets);
|
1056 |
+
$container.css(cssResets);
|
1057 |
+
}
|
1058 |
+
|
1059 |
+
function overlayAnimationSpeed(settings) {
|
1060 |
+
if (settings.overlay_disabled) {
|
1061 |
+
return 0;
|
1062 |
+
}
|
1063 |
+
|
1064 |
+
return settings.animation_speed / 2;
|
1065 |
+
}
|
1066 |
+
|
1067 |
+
function containerAnimationSpeed(settings) {
|
1068 |
+
if (settings.overlay_disabled) {
|
1069 |
+
return parseInt(settings.animation_speed );
|
1070 |
+
}
|
1071 |
+
|
1072 |
+
return settings.animation_speed / 2;
|
1073 |
+
}
|
1074 |
+
|
1075 |
+
/**
|
1076 |
+
* All animations should.
|
1077 |
+
*
|
1078 |
+
* 1. Reset Popup CSS styles. Defaults are as follows:
|
1079 |
+
* - opacity: 1
|
1080 |
+
* - display: "none"
|
1081 |
+
* - left, top, right, bottom: set to final position (where animation ends).
|
1082 |
+
*
|
1083 |
+
* 2. Prepare the popup for animation. Examples include:
|
1084 |
+
* - a. Static positioned animations like fade might set display: "block" & opacity: 0.
|
1085 |
+
* - b. Moving animations such as slide might set display: "block" & opacity: 0 so that
|
1086 |
+
* positioning can be accurately calculated, then set opacity: 1 before the animation begins.
|
1087 |
+
*
|
1088 |
+
* 3. Animate the overlay using `$popup.popmake( 'animate_overlay', type, speed, callback);`
|
1089 |
+
*
|
1090 |
+
* 4. Animate the container.
|
1091 |
+
* - a. Moving animations can use $container.popmake( 'reposition', callback ); The callback
|
1092 |
+
* accepts a position argument for where you should animate to.
|
1093 |
+
* - b. This usually takes place inside the callback for the overlay callback or after it.
|
1094 |
+
*/
|
1095 |
$.fn.popmake.animations = {
|
1096 |
none: function (callback) {
|
1097 |
var $popup = PUM.getPopup(this);
|
1098 |
|
1099 |
// Ensure the container is visible immediately.
|
1100 |
+
$popup.popmake('getContainer').css({opacity: 1, display: "block"});
|
1101 |
|
1102 |
+
$popup.popmake('animate_overlay', 'none', 0, function () {
|
1103 |
+
// Fire user passed callback.
|
1104 |
+
if (callback !== undefined) {
|
1105 |
+
callback();
|
1106 |
+
// TODO Test this new method. Then remove the above.
|
1107 |
+
//callback.apply(this);
|
1108 |
+
}
|
1109 |
+
});
|
1110 |
+
return this;
|
1111 |
+
},
|
1112 |
+
slide: function ( callback ) {
|
1113 |
+
var $popup = PUM.getPopup( this ),
|
1114 |
+
$container = $popup.popmake( 'getContainer' ),
|
1115 |
+
settings = $popup.popmake( 'getSettings' ),
|
1116 |
+
start = $popup.popmake( 'animation_origin', settings.animation_origin );
|
1117 |
+
|
1118 |
+
// Step 1. Reset popup styles.
|
1119 |
+
popupCssReset( $popup );
|
1120 |
+
|
1121 |
+
// Step 2. Position the container offscreen.
|
1122 |
+
$container.position( start );
|
1123 |
+
|
1124 |
+
// Step 3. Animate the popup.
|
1125 |
+
$popup.popmake( 'animate_overlay', 'fade', overlayAnimationSpeed( settings ), function () {
|
1126 |
+
$container.popmake( 'reposition', function ( position ) {
|
1127 |
+
$container.animate( position, containerAnimationSpeed( settings ), 'swing', function () {
|
1128 |
+
// Fire user passed callback.
|
1129 |
+
if ( callback !== undefined ) {
|
1130 |
+
callback();
|
1131 |
+
// TODO Test this new method. Then remove the above.
|
1132 |
+
//allback.apply(this);
|
1133 |
+
}
|
1134 |
+
} );
|
1135 |
+
} );
|
1136 |
+
} );
|
1137 |
+
return this;
|
1138 |
+
},
|
1139 |
+
fade: function ( callback ) {
|
1140 |
+
var $popup = PUM.getPopup( this ),
|
1141 |
+
$container = $popup.popmake( 'getContainer' ),
|
1142 |
+
settings = $popup.popmake( 'getSettings' );
|
1143 |
+
|
1144 |
+
// Step 1. Reset popup styles.
|
1145 |
+
popupCssReset( $popup );
|
1146 |
+
|
1147 |
+
// Step 2. Hide each element to be faded in.
|
1148 |
+
$popup.css( { opacity: 0, display: 'block' } );
|
1149 |
+
$container.css( { opacity: 0, display: 'block' } );
|
1150 |
+
|
1151 |
+
// Step 3. Animate the popup.
|
1152 |
+
$popup.popmake( 'animate_overlay', 'fade', overlayAnimationSpeed( settings ), function () {
|
1153 |
+
$container.animate( { opacity: 1 }, containerAnimationSpeed( settings ), 'swing', function () {
|
1154 |
// Fire user passed callback.
|
1155 |
+
if ( callback !== undefined ) {
|
1156 |
callback();
|
1157 |
// TODO Test this new method. Then remove the above.
|
1158 |
//callback.apply(this);
|
1159 |
}
|
1160 |
+
} );
|
1161 |
+
} );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1162 |
return this;
|
1163 |
},
|
1164 |
+
fadeAndSlide: function ( callback ) {
|
1165 |
+
var $popup = PUM.getPopup( this ),
|
1166 |
+
$container = $popup.popmake( 'getContainer' ),
|
1167 |
+
settings = $popup.popmake( 'getSettings' ),
|
1168 |
+
start = $popup.popmake( 'animation_origin', settings.animation_origin );
|
1169 |
+
|
1170 |
+
// Step 1. Reset popup styles.
|
1171 |
+
popupCssReset( $popup );
|
1172 |
+
|
1173 |
+
// Step 2. Hide each element to be faded in. display: "block" is neccessary for accurate positioning based on popup size.
|
1174 |
+
$popup.css( { display: 'block', opacity: 0 } );
|
1175 |
+
$container.css( { display: 'block', opacity: 0 } );
|
1176 |
+
|
1177 |
+
// Step 3. Position the container offscreen.
|
1178 |
+
$container.position( start );
|
1179 |
+
|
1180 |
+
// Step 4. Animate the popup.
|
1181 |
+
$popup.popmake( 'animate_overlay', 'fade', overlayAnimationSpeed( settings ), function () {
|
1182 |
+
$container.popmake( 'reposition', function ( position ) {
|
1183 |
+
// Add opacity to the animation properties.
|
1184 |
+
position.opacity = 1;
|
1185 |
+
// Animate the fade & slide.
|
1186 |
+
$container.animate( position, containerAnimationSpeed( settings ), 'swing', function () {
|
1187 |
// Fire user passed callback.
|
1188 |
+
if ( callback !== undefined ) {
|
1189 |
callback();
|
1190 |
// TODO Test this new method. Then remove the above.
|
1191 |
//callback.apply(this);
|
1192 |
}
|
1193 |
+
} );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1194 |
|
1195 |
+
} );
|
1196 |
+
} );
|
1197 |
return this;
|
1198 |
},
|
1199 |
/**
|
1618 |
(function ($, document, undefined) {
|
1619 |
"use strict";
|
1620 |
|
1621 |
+
var setCookie = function (settings) {
|
1622 |
+
$.pm_cookie(
|
1623 |
+
settings.name,
|
1624 |
+
true,
|
1625 |
+
settings.session ? null : settings.time,
|
1626 |
+
settings.path ? pum_vars.home_url || '/' : null
|
1627 |
+
);
|
1628 |
+
pum.hooks.doAction('popmake.setCookie', settings);
|
1629 |
+
};
|
1630 |
+
|
1631 |
$.extend($.fn.popmake.methods, {
|
1632 |
addCookie: function (type) {
|
1633 |
// Method calling logic
|
1642 |
}
|
1643 |
return this;
|
1644 |
},
|
1645 |
+
setCookie: setCookie,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1646 |
checkCookies: function (settings) {
|
1647 |
var i,
|
1648 |
ret = false;
|
1754 |
|
1755 |
// Register All Cookies for a Popup
|
1756 |
$(document)
|
1757 |
+
.ready(function () {
|
1758 |
+
var $cookies = $('.pum-cookie');
|
1759 |
+
|
1760 |
+
$cookies.each(function () {
|
1761 |
+
var $cookie = $(this),
|
1762 |
+
index = $cookies.index($cookie),
|
1763 |
+
args = $cookie.data('cookie-args');
|
1764 |
+
|
1765 |
+
// If only-onscreen not set or false, set the cookie immediately.
|
1766 |
+
if ( ! $cookie.data('only-onscreen') ) {
|
1767 |
+
setCookie(args);
|
1768 |
+
} else {
|
1769 |
+
// If the element is visible on page load, set the cookie.
|
1770 |
+
if ( $cookie.isInViewport() && $cookie.is(':visible') ) {
|
1771 |
+
setCookie(args);
|
1772 |
+
} else {
|
1773 |
+
// Add a throttled scroll listener, when its in view, set the cookie.
|
1774 |
+
$(window).on('scroll.pum-cookie-' + index, $.fn.popmake.utilities.throttle(function(event) {
|
1775 |
+
if ( $cookie.isInViewport() && $cookie.is(':visible') ) {
|
1776 |
+
setCookie(args);
|
1777 |
+
|
1778 |
+
$(window).off('scroll.pum-cookie-' + index );
|
1779 |
+
}
|
1780 |
+
}, 100));
|
1781 |
+
}
|
1782 |
+
}
|
1783 |
+
})
|
1784 |
+
})
|
1785 |
.on('pumInit', '.pum', function () {
|
1786 |
var $popup = PUM.getPopup(this),
|
1787 |
settings = $popup.popmake('getSettings'),
|
assets/js/site.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
var PUM,PUM_Accessibility,PUM_Analytics,pm_cookie,pm_cookie_json,pm_remove_cookie;!function(s){"use strict";void 0===s.fn.on&&(s.fn.on=function(e,o,t){return this.delegate(o,e,t)}),void 0===s.fn.off&&(s.fn.off=function(e,o,t){return this.undelegate(o,e,t)}),void 0===s.fn.bindFirst&&(s.fn.bindFirst=function(e,o){var t,n,i=s(this);i.unbind(e,o),i.bind(e,o),(n=(t=s._data(i[0]).events)[e]).unshift(n.pop()),t[e]=n}),void 0===s.fn.outerHtml&&(s.fn.outerHtml=function(){var e=s(this).clone();return s("<div/>").append(e).html()}),void 0===Date.now&&(Date.now=function(){return(new Date).getTime()})}(jQuery),function(p,s,r){"use strict";function i(e,o){function t(e,o,t){return o?e[o.slice(0,t?-1:o.length)]:e}return o.split(".").reduce(function(e,o){return o?o.split("[").reduce(t,e):e},e)}window.pum_vars=window.pum_vars||{default_theme:"0",home_url:"/",version:1.7,ajaxurl:"",restapi:!1,rest_nonce:null,debug_mode:!1,disable_tracking:!0,message_position:"top",core_sub_forms_enabled:!0,popups:{}},window.pum_popups=window.pum_popups||{},window.pum_vars.popups=window.pum_popups,PUM={get:new function(){function e(e,o,t){"boolean"==typeof o&&(t=o,o=!1);var n=o?o.selector+" "+e:e;return r!==i[n]&&!t||(i[n]=o?o.find(e):jQuery(e)),i[n]}var i={};return e.elementCache=i,e},getPopup:function(e){var o,t;return t=e,(o=isNaN(t)||parseInt(Number(t))!==parseInt(t)||isNaN(parseInt(t,10))?"current"===e?PUM.get(".pum-overlay.pum-active:eq(0)",!0):"open"===e?PUM.get(".pum-overlay.pum-active",!0):"closed"===e?PUM.get(".pum-overlay:not(.pum-active)",!0):e instanceof jQuery?e:p(e):PUM.get("#pum-"+e)).hasClass("pum-overlay")?o:o.hasClass("popmake")||o.parents(".pum-overlay").length?o.parents(".pum-overlay"):p()},open:function(e,o){PUM.getPopup(e).popmake("open",o)},close:function(e,o){PUM.getPopup(e).popmake("close",o)},preventOpen:function(e){PUM.getPopup(e).addClass("preventOpen")},getSettings:function(e){return PUM.getPopup(e).popmake("getSettings")},getSetting:function(e,o,t){var n=i(PUM.getSettings(e),o);return void 0!==n?n:t!==r?t:null},checkConditions:function(e){return PUM.getPopup(e).popmake("checkConditions")},getCookie:function(e){return p.pm_cookie(e)},getJSONCookie:function(e){return p.pm_cookie_json(e)},setCookie:function(e,o){PUM.getPopup(e).popmake("setCookie",jQuery.extend({name:"pum-"+PUM.getSetting(e,"id"),expires:"+30 days"},o))},clearCookie:function(e,o){p.pm_remove_cookie(e),"function"==typeof o&&o()},clearCookies:function(e,o){var t,n=PUM.getPopup(e).popmake("getSettings").cookies;if(n!==r&&n.length)for(t=0;n.length>t;t+=1)p.pm_remove_cookie(n[t].settings.name);"function"==typeof o&&o()},getClickTriggerSelector:function(e,o){var t=PUM.getPopup(e),n=PUM.getSettings(e),i=[".popmake-"+n.id,".popmake-"+decodeURIComponent(n.slug),'a[href$="#popmake-'+n.id+'"]'];return o.extra_selectors&&""!==o.extra_selectors&&i.push(o.extra_selectors),(i=pum.hooks.applyFilters("pum.trigger.click_open.selectors",i,o,t)).join(", ")},disableClickTriggers:function(e,o){if(e!==r)if(o!==r){var t=PUM.getClickTriggerSelector(e,o);p(t).removeClass("pum-trigger"),p(s).off("click.pumTrigger click.popmakeOpen",t)}else{var n=PUM.getSetting(e,"triggers",[]);if(n.length)for(var i=0;n.length>i;i++)if(-1!==pum.hooks.applyFilters("pum.disableClickTriggers.clickTriggerTypes",["click_open"]).indexOf(n[i].type)){t=PUM.getClickTriggerSelector(e,n[i].settings);p(t).removeClass("pum-trigger"),p(s).off("click.pumTrigger click.popmakeOpen",t)}}}},p.fn.popmake=function(e){return p.fn.popmake.methods[e]?(p(s).trigger("pumMethodCall",arguments),p.fn.popmake.methods[e].apply(this,Array.prototype.slice.call(arguments,1))):"object"!=typeof e&&e?void(window.console&&console.warn("Method "+e+" does not exist on $.fn.popmake")):p.fn.popmake.methods.init.apply(this,arguments)},p.fn.popmake.methods={init:function(){return this.each(function(){var e=PUM.getPopup(this),o=e.popmake("getSettings");return o.theme_id<=0&&(o.theme_id=pum_vars.default_theme),o.disable_reposition!==r&&o.disable_reposition||p(window).on("resize",function(){(e.hasClass("pum-active")||e.find(".popmake.active").length)&&p.fn.popmake.utilities.throttle(setTimeout(function(){e.popmake("reposition")},25),500,!1)}),e.find(".pum-container").data("popmake",o),e.data("popmake",o).trigger("pumInit"),this})},getOverlay:function(){return PUM.getPopup(this)},getContainer:function(){return PUM.getPopup(this).find(".pum-container")},getTitle:function(){return PUM.getPopup(this).find(".pum-title")||null},getContent:function(){return PUM.getPopup(this).find(".pum-content")||null},getClose:function(){return PUM.getPopup(this).find(".pum-content + .pum-close")||null},getSettings:function(){var e=PUM.getPopup(this);return p.extend(!0,{},p.fn.popmake.defaults,e.data("popmake")||{},"object"==typeof pum_popups&&void 0!==pum_popups[e.attr("id")]?pum_popups[e.attr("id")]:{})},state:function(e){var o=PUM.getPopup(this);if(r!==e)switch(e){case"isOpen":return o.hasClass("pum-open")||o.popmake("getContainer").hasClass("active");case"isClosed":return!o.hasClass("pum-open")&&!o.popmake("getContainer").hasClass("active")}},open:function(e){var o=PUM.getPopup(this),t=o.popmake("getContainer"),n=o.popmake("getClose"),i=o.popmake("getSettings"),s=p("html");return o.trigger("pumBeforeOpen"),o.hasClass("preventOpen")||t.hasClass("preventOpen")?(console.log("prevented"),o.removeClass("preventOpen").removeClass("pum-active").trigger("pumOpenPrevented")):(i.stackable||o.popmake("close_all"),o.addClass("pum-active"),0<i.close_button_delay&&n.fadeOut(0),s.addClass("pum-open"),i.overlay_disabled?s.addClass("pum-open-overlay-disabled"):s.addClass("pum-open-overlay"),i.position_fixed?s.addClass("pum-open-fixed"):s.addClass("pum-open-scrollable"),o.popmake("setup_close").popmake("reposition").popmake("animate",i.animation_type,function(){0<i.close_button_delay&&setTimeout(function(){n.fadeIn()},i.close_button_delay),o.trigger("pumAfterOpen"),p(window).trigger("resize"),p.fn.popmake.last_open_popup=o,e!==r&&e()})),this},setup_close:function(){var t=PUM.getPopup(this),e=t.popmake("getClose"),n=t.popmake("getSettings");return(e=e.add(p(".popmake-close, .pum-close",t).not(e))).off("click.pum").on("click.pum",function(e){var o=p(this);o.hasClass("pum-do-default")||o.data("do-default")!==r&&o.data("do-default")||e.preventDefault(),p.fn.popmake.last_close_trigger="Close Button",t.popmake("close")}),(n.close_on_esc_press||n.close_on_f4_press)&&p(window).off("keyup.popmake").on("keyup.popmake",function(e){27===e.keyCode&&n.close_on_esc_press&&(p.fn.popmake.last_close_trigger="ESC Key",t.popmake("close")),115===e.keyCode&&n.close_on_f4_press&&(p.fn.popmake.last_close_trigger="F4 Key",t.popmake("close"))}),n.close_on_overlay_click&&(t.on("pumAfterOpen",function(){p(s).on("click.pumCloseOverlay",function(e){p(e.target).closest(".pum-container").length||(p.fn.popmake.last_close_trigger="Overlay Click",t.popmake("close"))})}),t.on("pumAfterClose",function(){p(s).off("click.pumCloseOverlay")})),n.close_on_form_submission&&PUM.hooks.addAction("pum.integration.form.success",function(e,o){o.popup&&o.popup[0]===t[0]&&setTimeout(function(){p.fn.popmake.last_close_trigger="Form Submission",t.popmake("close")},n.close_on_form_submission_delay||0)}),t.trigger("pumSetupClose"),this},close:function(n){return this.each(function(){var e=PUM.getPopup(this),o=e.popmake("getContainer"),t=e.popmake("getClose");return t=t.add(p(".popmake-close, .pum-close",e).not(t)),e.trigger("pumBeforeClose"),e.hasClass("preventClose")||o.hasClass("preventClose")?e.removeClass("preventClose").trigger("pumClosePrevented"):o.fadeOut("fast",function(){e.is(":visible")&&e.fadeOut("fast"),p(window).off("keyup.popmake"),e.off("click.popmake"),t.off("click.popmake"),1===p(".pum-active").length&&p("html").removeClass("pum-open").removeClass("pum-open-scrollable").removeClass("pum-open-overlay").removeClass("pum-open-overlay-disabled").removeClass("pum-open-fixed"),e.removeClass("pum-active").trigger("pumAfterClose"),o.find("iframe").filter('[src*="youtube"],[src*="vimeo"]').each(function(){var e=p(this),o=e.attr("src"),t=o.replace("autoplay=1","1=1");t!==o&&(o=t),e.prop("src",o)}),o.find("video").each(function(){this.pause()}),n!==r&&n()}),this})},close_all:function(){return p(".pum-active").popmake("close"),this},reposition:function(e){var o=PUM.getPopup(this).trigger("pumBeforeReposition"),t=o.popmake("getContainer"),n=o.popmake("getSettings"),i=n.location,s={my:"",at:"",of:window,collision:"none",using:"function"==typeof e?e:p.fn.popmake.callbacks.reposition_using},r={overlay:null,container:null},a=null;try{a=p(p.fn.popmake.last_open_trigger)}catch(e){a=p()}return n.position_from_trigger&&a.length?(s.of=a,0<=i.indexOf("left")&&(s.my+=" right",s.at+=" left"+(0!==n.position_left?"-"+n.position_left:"")),0<=i.indexOf("right")&&(s.my+=" left",s.at+=" right"+(0!==n.position_right?"+"+n.position_right:"")),0<=i.indexOf("center")&&(s.my="center"===i?"center":s.my+" center",s.at="center"===i?"center":s.at+" center"),0<=i.indexOf("top")&&(s.my+=" bottom",s.at+=" top"+(0!==n.position_top?"-"+n.position_top:"")),0<=i.indexOf("bottom")&&(s.my+=" top",s.at+=" bottom"+(0!==n.position_bottom?"+"+n.position_bottom:""))):(0<=i.indexOf("left")&&(s.my+=" left"+(0!==n.position_left?"+"+n.position_left:""),s.at+=" left"),0<=i.indexOf("right")&&(s.my+=" right"+(0!==n.position_right?"-"+n.position_right:""),s.at+=" right"),0<=i.indexOf("center")&&(s.my="center"===i?"center":s.my+" center",s.at="center"===i?"center":s.at+" center"),0<=i.indexOf("top")&&(s.my+=" top"+(0!==n.position_top?"+"+(p("body").hasClass("admin-bar")?parseInt(n.position_top,10)+32:n.position_top):""),s.at+=" top"),0<=i.indexOf("bottom")&&(s.my+=" bottom"+(0!==n.position_bottom?"-"+n.position_bottom:""),s.at+=" bottom")),s.my=p.trim(s.my),s.at=p.trim(s.at),o.is(":hidden")&&(r.overlay=o.css("opacity"),o.css({opacity:0}).show(0)),t.is(":hidden")&&(r.container=t.css("opacity"),t.css({opacity:0}).show(0)),n.position_fixed&&t.addClass("fixed"),"custom"===n.size?t.css({width:n.custom_width,height:n.custom_height_auto?"auto":n.custom_height}):"auto"!==n.size&&t.addClass("responsive").css({minWidth:""!==n.responsive_min_width?n.responsive_min_width:"auto",maxWidth:""!==n.responsive_max_width?n.responsive_max_width:"auto"}),o.trigger("pumAfterReposition"),t.addClass("custom-position").position(s).trigger("popmakeAfterReposition"),r.overlay&&o.css({opacity:r.overlay}).hide(0),r.container&&t.css({opacity:r.container}).hide(0),this},animation_origin:function(e){var o=PUM.getPopup(this).popmake("getContainer"),t={my:"",at:""};switch(e){case"top":t={my:"left+"+o.offset().left+" bottom-100",at:"left top"};break;case"bottom":t={my:"left+"+o.offset().left+" top+100",at:"left bottom"};break;case"left":t={my:"right top+"+o.offset().top,at:"left top"};break;case"right":t={my:"left top+"+o.offset().top,at:"right top"};break;default:0<=e.indexOf("left")&&(t={my:t.my+" right",at:t.at+" left"}),0<=e.indexOf("right")&&(t={my:t.my+" left",at:t.at+" right"}),0<=e.indexOf("center")&&(t={my:t.my+" center",at:t.at+" center"}),0<=e.indexOf("top")&&(t={my:t.my+" bottom-100",at:t.at+" top"}),0<=e.indexOf("bottom")&&(t={my:t.my+" top+100",at:t.at+" bottom"}),t.my=p.trim(t.my),t.at=p.trim(t.at)}return t.of=window,t.collision="none",t}}}(jQuery,document),function(s,t){"use strict";var n,i,r,a="a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]",e=".pum:not(.pum-accessibility-disabled)";PUM_Accessibility={forceFocus:function(e){r&&r.length&&!r[0].contains(e.target)&&(e.stopPropagation(),PUM_Accessibility.setFocusToFirstItem())},trapTabKey:function(e){if(9===e.keyCode){var o=r.find(".pum-container *").filter(a).filter(":visible"),t=s(":focus"),n=o.length,i=o.index(t);e.shiftKey?0===i&&(o.get(n-1).focus(),e.preventDefault()):i===n-1&&(o.get(0).focus(),e.preventDefault())}},setFocusToFirstItem:function(){r.find(".pum-container *").filter(a).filter(":visible").filter(":not(.pum-close)").first().focus()}},s(t).on("pumInit",e,function(){PUM.getPopup(this).find("[tabindex]").each(function(){var e=s(this);e.data("tabindex",e.attr("tabindex")).prop("tabindex","0")})}).on("pumBeforeOpen",e,function(){var e=PUM.getPopup(this),o=s(":focus");e.has(o).length||(i=o),r=e.on("keydown.pum_accessibility",PUM_Accessibility.trapTabKey).attr("aria-hidden","false"),(n=s("body > *").filter(":visible").not(r)).attr("aria-hidden","true"),s(t).one("focusin.pum_accessibility",PUM_Accessibility.forceFocus),PUM_Accessibility.setFocusToFirstItem()}).on("pumAfterOpen",e,function(){}).on("pumBeforeClose",e,function(){}).on("pumAfterClose",e,function(){PUM.getPopup(this).off("keydown.pum_accessibility").attr("aria-hidden","true"),n&&(n.attr("aria-hidden","false"),n=null),void 0!==i&&i.length&&i.focus(),r=null,s(t).off("focusin.pum_accessibility")}).on("pumSetupClose",e,function(){}).on("pumOpenPrevented",e,function(){}).on("pumClosePrevented",e,function(){}).on("pumBeforeReposition",e,function(){})}(jQuery,document),function(s){"use strict";s.fn.popmake.last_open_trigger=null,s.fn.popmake.last_close_trigger=null,s.fn.popmake.conversion_trigger=null;var r=!(void 0===pum_vars.restapi||!pum_vars.restapi);PUM_Analytics={beacon:function(e,o){var t=new Image,n=r?pum_vars.restapi:pum_vars.ajaxurl,i={route:"/analytics/",data:s.extend({event:"open",pid:null,_cache:+new Date},e),callback:"function"==typeof o?o:function(){}};r?n+=i.route:i.data.action="pum_analytics",n&&(s(t).on("error success load done",i.callback),t.src=n+"?"+s.param(i.data))}},void 0!==pum_vars.disable_tracking&&pum_vars.disable_tracking||s(document).on("pumAfterOpen.core_analytics",".pum",function(){var e=PUM.getPopup(this),o={pid:parseInt(e.popmake("getSettings").id,10)||null};0<o.pid&&!s("body").hasClass("single-popup")&&PUM_Analytics.beacon(o)})}(jQuery),function(n,r){"use strict";n.fn.popmake.methods.animate_overlay=function(e,o,t){return PUM.getPopup(this).popmake("getSettings").overlay_disabled?n.fn.popmake.overlay_animations.none.apply(this,[o,t]):n.fn.popmake.overlay_animations[e]?n.fn.popmake.overlay_animations[e].apply(this,[o,t]):(window.console&&console.warn("Animation style "+e+" does not exist."),this)},n.fn.popmake.methods.animate=function(e){return n.fn.popmake.animations[e]?n.fn.popmake.animations[e].apply(this,Array.prototype.slice.call(arguments,1)):(window.console&&console.warn("Animation style "+e+" does not exist."),this)},n.fn.popmake.animations={none:function(e){var o=PUM.getPopup(this);return o.popmake("getContainer").css({opacity:1,display:"block"}),o.popmake("animate_overlay","none",0,function(){e!==r&&e()}),this},slide:function(o){var e=PUM.getPopup(this),t=e.popmake("getContainer"),n=e.popmake("getSettings"),i=n.animation_speed/2,s=e.popmake("animation_origin",n.animation_origin);return e.css({display:"block"}),t.css({display:"block"}).position(s).css({opacity:1}),e.popmake("animate_overlay","fade",i,function(){t.popmake("reposition",function(e){t.animate(e,i,"swing",function(){o!==r&&o()})})}),this},fade:function(e){var o=PUM.getPopup(this),t=o.popmake("getContainer").css({opacity:0,display:"block"}),n=o.popmake("getSettings").animation_speed/2;return o.popmake("animate_overlay","fade",n,function(){t.animate({opacity:1},n,"swing",function(){e!==r&&e()})}),this},fadeAndSlide:function(o){var e=PUM.getPopup(this),t=e.popmake("getContainer"),n=e.popmake("getSettings"),i=n.animation_speed/2,s=e.popmake("animation_origin",n.animation_origin);return e.css({display:"block"}),t.css({display:"block"}).position(s),e.popmake("animate_overlay","fade",i,function(){t.popmake("reposition",function(e){t.css({opacity:0}),e.opacity=1,t.animate(e,i,"swing",function(){o!==r&&o()})})}),this},grow:function(e){return n.fn.popmake.animations.fade.apply(this,arguments)},growAndSlide:function(e){return n.fn.popmake.animations.fadeAndSlide.apply(this,arguments)}},n.fn.popmake.overlay_animations={none:function(e,o){PUM.getPopup(this).css({opacity:1,display:"block"}),"function"==typeof o&&o()},fade:function(e,o){PUM.getPopup(this).css({opacity:0,display:"block"}).animate({opacity:1},e,"swing",o)},slide:function(e,o){PUM.getPopup(this).slideDown(e,o)}}}(jQuery,void document),function(e,o){"use strict";e(o).on("pumInit",".pum",function(){e(this).popmake("getContainer").trigger("popmakeInit")}).on("pumBeforeOpen",".pum",function(){e(this).popmake("getContainer").addClass("active").trigger("popmakeBeforeOpen")}).on("pumAfterOpen",".pum",function(){e(this).popmake("getContainer").trigger("popmakeAfterOpen")}).on("pumBeforeClose",".pum",function(){e(this).popmake("getContainer").trigger("popmakeBeforeClose")}).on("pumAfterClose",".pum",function(){e(this).popmake("getContainer").removeClass("active").trigger("popmakeAfterClose")}).on("pumSetupClose",".pum",function(){e(this).popmake("getContainer").trigger("popmakeSetupClose")}).on("pumOpenPrevented",".pum",function(){e(this).popmake("getContainer").removeClass("preventOpen").removeClass("active")}).on("pumClosePrevented",".pum",function(){e(this).popmake("getContainer").removeClass("preventClose")}).on("pumBeforeReposition",".pum",function(){e(this).popmake("getContainer").trigger("popmakeBeforeReposition")})}(jQuery,document),function(o){"use strict";o.fn.popmake.callbacks={reposition_using:function(e){o(this).css(e)}}}(jQuery,document),function(p){"use strict";function u(){return void 0===e&&(e="undefined"!=typeof MobileDetect?new MobileDetect(window.navigator.userAgent):{phone:function(){return!1},tablet:function(){return!1}}),e}var e;p.extend(p.fn.popmake.methods,{checkConditions:function(){var e,o,t,n,i,s=PUM.getPopup(this),r=s.popmake("getSettings"),a=!0;if(r.disable_on_mobile&&u().phone())return!1;if(r.disable_on_tablet&&u().tablet())return!1;if(r.conditions.length)for(o=0;r.conditions.length>o;o++){for(n=r.conditions[o],e=!1,t=0;n.length>t&&((!(i=p.extend({},{not_operand:!1},n[t])).not_operand&&s.popmake("checkCondition",i)||i.not_operand&&!s.popmake("checkCondition",i))&&(e=!0),p(this).trigger("pumCheckingCondition",[e,i]),!e);t++);e||(a=!1)}return a},checkCondition:function(e){var o=e.target||null;e.settings;return o?p.fn.popmake.conditions[o]?p.fn.popmake.conditions[o].apply(this,[e]):window.console?(console.warn("Condition "+o+" does not exist."),!0):void 0:(console.warn("Condition type not set."),!1)}}),p.fn.popmake.conditions={}}(jQuery,document),function(c){"use strict";function m(e,o,t){var n,i=new Date;if("undefined"!=typeof document){if(1<arguments.length){switch(typeof(t=c.extend({path:pum_vars.home_url},m.defaults,t)).expires){case"number":i.setMilliseconds(i.getMilliseconds()+864e5*t.expires),t.expires=i;break;case"string":i.setTime(1e3*c.fn.popmake.utilities.strtotime("+"+t.expires)),t.expires=i}try{n=JSON.stringify(o),/^[\{\[]/.test(n)&&(o=n)}catch(e){}return o=d.write?d.write(o,e):encodeURIComponent(String(o)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),e=(e=(e=encodeURIComponent(String(e))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape),document.cookie=[e,"=",o,t.expires?"; expires="+t.expires.toUTCString():"",t.path?"; path="+t.path:"",t.domain?"; domain="+t.domain:"",t.secure?"; secure":""].join("")}e||(n={});for(var s=document.cookie?document.cookie.split("; "):[],r=/(%[0-9A-Z]{2})+/g,a=0;a<s.length;a++){var p=s[a].split("="),u=p.slice(1).join("=");'"'===u.charAt(0)&&(u=u.slice(1,-1));try{var l=p[0].replace(r,decodeURIComponent);if(u=d.read?d.read(u,l):d(u,l)||u.replace(r,decodeURIComponent),this.json)try{u=JSON.parse(u)}catch(e){}if(e===l){n=u;break}e||(n[l]=u)}catch(e){}}return n}}var d;c.extend(c.fn.popmake,{cookie:(void 0===d&&(d=function(){}),(m.set=m).get=function(e){return m.call(m,e)},m.getJSON=function(){return m.apply({json:!0},[].slice.call(arguments))},m.defaults={},m.remove=function(e,o){m(e,"",c.extend({},o,{expires:-1,path:""})),m(e,"",c.extend({},o,{expires:-1}))},m.process=function(e,o,t,n){return m.apply(m,3<arguments.length&&"object"!=typeof t&&void 0!==o?[e,o,{expires:t,path:n}]:[].slice.call(arguments,[0,2]))},m.withConverter=c.fn.popmake.cookie,m)}),pm_cookie=c.pm_cookie=c.fn.popmake.cookie.process,pm_cookie_json=c.pm_cookie_json=c.fn.popmake.cookie.getJSON,pm_remove_cookie=c.pm_remove_cookie=c.fn.popmake.cookie.remove}(jQuery),function(i,e,n){"use strict";i.extend(i.fn.popmake.methods,{addCookie:function(e){return pum.hooks.doAction("popmake.addCookie",arguments),i.fn.popmake.cookies[e]?i.fn.popmake.cookies[e].apply(this,Array.prototype.slice.call(arguments,1)):(window.console&&console.warn("Cookie type "+e+" does not exist."),this)},setCookie:function(e){i.pm_cookie(e.name,!0,e.session?null:e.time,e.path?pum_vars.home_url||"/":null),pum.hooks.doAction("popmake.setCookie",e)},checkCookies:function(e){var o,t=!1;if(e.cookie_name===n||null===e.cookie_name||""===e.cookie_name)return!1;switch(typeof e.cookie_name){case"object":case"array":for(o=0;e.cookie_name.length>o;o+=1)i.pm_cookie(e.cookie_name[o])!==n&&(t=!0);break;case"string":i.pm_cookie(e.cookie_name)!==n&&(t=!0)}return pum.hooks.doAction("popmake.checkCookies",e,t),t}}),i.fn.popmake.cookies=i.fn.popmake.cookies||{},i.extend(i.fn.popmake.cookies,{on_popup_open:function(e){var o=PUM.getPopup(this);o.on("pumAfterOpen",function(){o.popmake("setCookie",e)})},on_popup_close:function(e){var o=PUM.getPopup(this);o.on("pumBeforeClose",function(){o.popmake("setCookie",e)})},form_submission:function(t){var n=PUM.getPopup(this);t=i.extend({form:"",formInstanceId:"",only_in_popup:!1},t),PUM.hooks.addAction("pum.integration.form.success",function(e,o){t.form.length&&PUM.integrations.checkFormKeyMatches(t.form,t.formInstanceId,o)&&(t.only_in_popup&&PUM.getPopup(e).length&&PUM.getPopup(e).is(n)||!t.only_in_popup)&&n.popmake("setCookie",t)})},manual:function(e){var o=PUM.getPopup(this);o.on("pumSetCookie",function(){o.popmake("setCookie",e)})},form_success:function(e){var o=PUM.getPopup(this);o.on("pumFormSuccess",function(){o.popmake("setCookie",e)})},pum_sub_form_success:function(e){var o=PUM.getPopup(this);o.find("form.pum-sub-form").on("success",function(){o.popmake("setCookie",e)})},pum_sub_form_already_subscribed:function(e){var o=PUM.getPopup(this);o.find("form.pum-sub-form").on("success",function(){o.popmake("setCookie",e)})},ninja_form_success:function(e){return i.fn.popmake.cookies.form_success.apply(this,arguments)},cf7_form_success:function(e){return i.fn.popmake.cookies.form_success.apply(this,arguments)},gforms_form_success:function(e){return i.fn.popmake.cookies.form_success.apply(this,arguments)}}),i(e).on("pumInit",".pum",function(){var e,o=PUM.getPopup(this),t=o.popmake("getSettings").cookies||[],n=null;if(t.length)for(e=0;e<t.length;e+=1)n=t[e],o.popmake("addCookie",n.event,n.settings)})}(jQuery,document);var pum_debug,pum_debug_mode=!1;!function(r,e){if(e=window.pum_vars||{debug_mode:!1},(pum_debug_mode=void 0!==e.debug_mode&&e.debug_mode)||-1===window.location.href.indexOf("pum_debug")||(pum_debug_mode=!0),pum_debug_mode){var a=!1,t=!1,p=window.pum_debug_vars||{debug_mode_enabled:"Popup Maker: Debug Mode Enabled",debug_started_at:"Debug started at:",debug_more_info:"For more information on how to use this information visit https://docs.wppopupmaker.com/?utm_medium=js-debug-info&utm_campaign=ContextualHelp&utm_source=browser-console&utm_content=more-info",global_info:"Global Information",localized_vars:"Localized variables",popups_initializing:"Popups Initializing",popups_initialized:"Popups Initialized",single_popup_label:"Popup: #",theme_id:"Theme ID: ",label_method_call:"Method Call:",label_method_args:"Method Arguments:",label_popup_settings:"Settings",label_triggers:"Triggers",label_cookies:"Cookies",label_delay:"Delay:",label_conditions:"Conditions",label_cookie:"Cookie:",label_settings:"Settings:",label_selector:"Selector:",label_mobile_disabled:"Mobile Disabled:",label_tablet_disabled:"Tablet Disabled:",label_event:"Event: %s",triggers:[],cookies:[]};pum_debug={odump:function(e){return r.extend({},e)},logo:function(){console.log(" -------------------------------------------------------------\n| ____ __ __ _ |\n| | _ \\ ___ _ __ _ _ _ __ | \\/ | __ _| | _____ _ __ |\n| | |_) / _ \\| '_ \\| | | | '_ \\ | |\\/| |/ _` | |/ / _ \\ '__| |\n| | __/ (_) | |_) | |_| | |_) | | | | | (_| | < __/ | |\n| |_| \\___/| .__/ \\__,_| .__/ |_| |_|\\__,_|_|\\_\\___|_| |\n| |_| |_| |\n -------------------------------------------------------------")},initialize:function(){a=!0,pum_debug.logo(),console.debug(p.debug_mode_enabled),console.log(p.debug_started_at,new Date),console.info(p.debug_more_info),pum_debug.divider(p.global_info),console.groupCollapsed(p.localized_vars),console.log("pum_vars:",pum_debug.odump(e)),r(document).trigger("pum_debug_initialize_localized_vars"),console.groupEnd(),r(document).trigger("pum_debug_initialize")},popup_event_header:function(e){var o=e.popmake("getSettings");t!==o.id&&(t=o.id,pum_debug.divider(p.single_popup_label+o.id+" - "+o.slug))},divider:function(e){var o=62,t=0,n=" "+new Array(63).join("-")+" ";"string"==typeof e?(o=62-e.length,(t={left:Math.floor(o/2),right:Math.floor(o/2)}).left+t.right===o-1&&t.right++,t.left=new Array(t.left+1).join(" "),t.right=new Array(t.right+1).join(" "),console.log(n+"\n|"+t.left+e+t.right+"|\n"+n)):console.log(n)},click_trigger:function(e,o){var t,n=e.popmake("getSettings"),i=[".popmake-"+n.id,".popmake-"+decodeURIComponent(n.slug),'a[href$="#popmake-'+n.id+'"]'];o.extra_selectors&&""!==o.extra_selectors&&i.push(o.extra_selectors),t=(i=pum.hooks.applyFilters("pum.trigger.click_open.selectors",i,o,e)).join(", "),console.log(p.label_selector,t)},trigger:function(e,o){if("string"==typeof p.triggers[o.type]){switch(console.groupCollapsed(p.triggers[o.type]),o.type){case"auto_open":console.log(p.label_delay,o.settings.delay),console.log(p.label_cookie,o.settings.cookie_name);break;case"click_open":pum_debug.click_trigger(e,o.settings),console.log(p.label_cookie,o.settings.cookie_name)}r(document).trigger("pum_debug_render_trigger",e,o),console.groupEnd()}},cookie:function(e,o){if("string"==typeof p.cookies[o.event]){switch(console.groupCollapsed(p.cookies[o.event]),o.event){case"on_popup_open":case"on_popup_close":case"manual":case"ninja_form_success":console.log(p.label_cookie,pum_debug.odump(o.settings))}r(document).trigger("pum_debug_render_trigger",e,o),console.groupEnd()}}},r(document).on("pumInit",".pum",function(){var e=PUM.getPopup(r(this)),o=e.popmake("getSettings"),t=o.triggers||[],n=o.cookies||[],i=o.conditions||[],s=0;if(a||(pum_debug.initialize(),pum_debug.divider(p.popups_initializing)),console.groupCollapsed(p.single_popup_label+o.id+" - "+o.slug),console.log(p.theme_id,o.theme_id),t.length){for(console.groupCollapsed(p.label_triggers),s=0;s<t.length;s++)pum_debug.trigger(e,t[s]);console.groupEnd()}if(n.length){for(console.groupCollapsed(p.label_cookies),s=0;s<n.length;s+=1)pum_debug.cookie(e,n[s]);console.groupEnd()}i.length&&(console.groupCollapsed(p.label_conditions),console.log(i),console.groupEnd()),console.groupCollapsed(p.label_popup_settings),console.log(p.label_mobile_disabled,!1!==o.disable_on_mobile),console.log(p.label_tablet_disabled,!1!==o.disable_on_tablet),console.log(p.label_display_settings,pum_debug.odump(o)),e.trigger("pum_debug_popup_settings"),console.groupEnd(),console.groupEnd()}).on("pumBeforeOpen",".pum",function(){var e=PUM.getPopup(r(this)),o=r.fn.popmake.last_open_trigger;pum_debug.popup_event_header(e),console.groupCollapsed(p.label_event.replace("%s","pumBeforeOpen"));try{o=(o=r(r.fn.popmake.last_open_trigger)).length?o:r.fn.popmake.last_open_trigger.toString()}catch(e){o=""}finally{console.log(p.label_triggers,[o])}console.groupEnd()}).on("pumOpenPrevented",".pum",function(){var e=PUM.getPopup(r(this));pum_debug.popup_event_header(e),console.groupCollapsed(p.label_event.replace("%s","pumOpenPrevented")),console.groupEnd()}).on("pumAfterOpen",".pum",function(){var e=PUM.getPopup(r(this));pum_debug.popup_event_header(e),console.groupCollapsed(p.label_event.replace("%s","pumAfterOpen")),console.groupEnd()}).on("pumSetupClose",".pum",function(){var e=PUM.getPopup(r(this));pum_debug.popup_event_header(e),console.groupCollapsed(p.label_event.replace("%s","pumSetupClose")),console.groupEnd()}).on("pumClosePrevented",".pum",function(){var e=PUM.getPopup(r(this));pum_debug.popup_event_header(e),console.groupCollapsed(p.label_event.replace("%s","pumClosePrevented")),console.groupEnd()}).on("pumBeforeClose",".pum",function(){var e=PUM.getPopup(r(this));pum_debug.popup_event_header(e),console.groupCollapsed(p.label_event.replace("%s","pumBeforeClose")),console.groupEnd()}).on("pumAfterClose",".pum",function(){var e=PUM.getPopup(r(this));pum_debug.popup_event_header(e),console.groupCollapsed(p.label_event.replace("%s","pumAfterClose")),console.groupEnd()}).on("pumBeforeReposition",".pum",function(){var e=PUM.getPopup(r(this));pum_debug.popup_event_header(e),console.groupCollapsed(p.label_event.replace("%s","pumBeforeReposition")),console.groupEnd()}).on("pumAfterReposition",".pum",function(){var e=PUM.getPopup(r(this));pum_debug.popup_event_header(e),console.groupCollapsed(p.label_event.replace("%s","pumAfterReposition")),console.groupEnd()}).on("pumCheckingCondition",".pum",function(e,o,t){var n=PUM.getPopup(r(this));pum_debug.popup_event_header(n),console.groupCollapsed(p.label_event.replace("%s","pumCheckingCondition")),console.log((t.not_operand?"(!) ":"")+t.target+": "+o,t),console.groupEnd()})}}(jQuery),function(e){"use strict";e.fn.popmake.defaults={id:null,slug:"",theme_id:null,cookies:[],triggers:[],conditions:[],mobile_disabled:null,tablet_disabled:null,custom_height_auto:!1,scrollable_content:!1,position_from_trigger:!1,position_fixed:!1,overlay_disabled:!1,stackable:!1,disable_reposition:!1,close_on_overlay_click:!1,close_on_form_submission:!1,close_on_form_submission_delay:0,close_on_esc_press:!1,close_on_f4_press:!1,disable_on_mobile:!1,disable_on_tablet:!1,size:"medium",responsive_min_width:"0%",responsive_max_width:"100%",custom_width:"640px",custom_height:"380px",animation_type:"fade",animation_speed:"350",animation_origin:"center top",location:"center top",position_top:"100",position_bottom:"0",position_left:"0",position_right:"0",zindex:"1999999999",close_button_delay:"0",meta:{display:{stackable:!1,overlay_disabled:!1,size:"medium",responsive_max_width:"100",responsive_max_width_unit:"%",responsive_min_width:"0",responsive_min_width_unit:"%",custom_width:"640",custom_width_unit:"px",custom_height:"380",custom_height_unit:"px",custom_height_auto:!1,location:"center top",position_top:100,position_left:0,position_bottom:0,position_right:0,position_fixed:!1,animation_type:"fade",animation_speed:350,animation_origin:"center top",scrollable_content:!1,disable_reposition:!1,position_from_trigger:!1,overlay_zindex:!1,zindex:"1999999999"},close:{overlay_click:!1,esc_press:!1,f4_press:!1,text:"",button_delay:0},click_open:[]},container:{active_class:"active",attr:{class:"popmake"}},title:{attr:{class:"popmake-title"}},content:{attr:{class:"popmake-content"}},close:{close_speed:0,attr:{class:"popmake-close"}},overlay:{attr:{id:"popmake-overlay",class:"popmake-overlay"}}}}(jQuery,document),function(s){"use strict";var r={openpopup:!1,openpopup_id:0,closepopup:!1,closedelay:0,redirect_enabled:!1,redirect:"",cookie:!1};window.PUM=window.PUM||{},window.PUM.forms=window.PUM.forms||{},s.extend(window.PUM.forms,{form:{validation:{errors:[]},responseHandler:function(e,o){var t=o.data;o.success?window.PUM.forms.form.success(e,t):window.PUM.forms.form.errors(e,t)},display_errors:function(e,o){window.PUM.forms.messages.add(e,o||this.validation.errors,"error")},beforeAjax:function(e){var o=e.find('[type="submit"]'),t=o.find(".pum-form__loader");window.PUM.forms.messages.clear_all(e),t.length||(t=s('<span class="pum-form__loader"></span>'),""!==o.attr("value")?t.insertAfter(o):o.append(t)),o.prop("disabled",!0),t.show(),e.addClass("pum-form--loading").removeClass("pum-form--errors")},afterAjax:function(e){var o=e.find('[type="submit"]'),t=o.find(".pum-form__loader");o.prop("disabled",!1),t.hide(),e.removeClass("pum-form--loading")},success:function(e,o){void 0!==o.message&&""!==o.message&&window.PUM.forms.messages.add(e,[{message:o.message}]),e.trigger("success",[o]),!e.data("noredirect")&&void 0!==e.data("redirect_enabled")&&o.redirect&&(""!==o.redirect?window.location=o.redirect:window.location.reload(!0))},errors:function(e,o){void 0!==o.errors&&o.errors.length&&(console.log(o.errors),window.PUM.forms.form.display_errors(e,o.errors),window.PUM.forms.messages.scroll_to_first(e),e.addClass("pum-form--errors").trigger("errors",[o]))},submit:function(e){var o=s(this),t=o.pumSerializeObject();e.preventDefault(),e.stopPropagation(),window.PUM.forms.form.beforeAjax(o),s.ajax({type:"POST",dataType:"json",url:pum_vars.ajaxurl,data:{action:"pum_form",values:t}}).always(function(){window.PUM.forms.form.afterAjax(o)}).done(function(e){window.PUM.forms.form.responseHandler(o,e)}).error(function(e,o,t){console.log("Error: type of "+o+" with message of "+t)})}},messages:{add:function(e,o,t){var n=e.find(".pum-form__messages"),i=0;if(t=t||"success",o=o||[],!n.length)switch(n=s('<div class="pum-form__messages">').hide(),pum_vars.message_position){case"bottom":e.append(n.addClass("pum-form__messages--bottom"));break;case"top":e.prepend(n.addClass("pum-form__messages--top"))}if(0<=["bottom","top"].indexOf(pum_vars.message_position))for(;o.length>i;i++)this.add_message(n,o[i].message,t);else for(;o.length>i;i++)void 0!==o[i].field?this.add_field_error(e,o[i]):this.add_message(n,o[i].message,t);n.is(":hidden")&&s(".pum-form__message",n).length&&n.slideDown()},add_message:function(e,o,t){var n=s('<p class="pum-form__message">').html(o);t=t||"success",n.addClass("pum-form__message--"+t),e.append(n),e.is(":visible")&&n.hide().slideDown()},add_field_error:function(e,o){var t=s('[name="'+o.field+'"]',e).parents(".pum-form__field").addClass("pum-form__field--error");this.add_message(t,o.message,"error")},clear_all:function(e,o){var t=e.find(".pum-form__messages"),n=t.find(".pum-form__message"),i=e.find(".pum-form__field.pum-form__field--error");o=o||!1,t.length&&n.slideUp("fast",function(){s(this).remove(),o&&t.hide()}),i.length&&i.removeClass("pum-form__field--error").find("p.pum-form__message").remove()},scroll_to_first:function(e){window.PUM.utilities.scrollTo(s(".pum-form__field.pum-form__field--error",e).eq(0))}},success:function(e,o){if(o=s.extend({},r,o)){var t=PUM.getPopup(e),n={},i=function(){o.openpopup&&PUM.getPopup(o.openpopup_id).length?PUM.open(o.openpopup_id):o.redirect_enabled&&(""!==o.redirect?window.location=o.redirect:window.location.reload(!0))};t.length&&(t.trigger("pumFormSuccess"),o.cookie&&(n=s.extend({name:"pum-"+PUM.getSetting(t,"id"),expires:"+1 year"},"object"==typeof o.cookie?o.cookie:{}),PUM.setCookie(t,n))),t.length&&o.closepopup?setTimeout(function(){t.popmake("close",i)},1e3*parseInt(o.closedelay)):i()}}})}(jQuery),function(e){"use strict";e.pum=e.pum||{},e.pum.hooks=e.pum.hooks||new function(){var t=Array.prototype.slice,i={removeFilter:function(e,o){"string"==typeof e&&n("filters",e,o);return i},applyFilters:function(){var e=t.call(arguments),o=e.shift();return"string"!=typeof o?i:r("filters",o,e)},addFilter:function(e,o,t,n){"string"==typeof e&&"function"==typeof o&&(t=parseInt(t||10,10),s("filters",e,o,t,n));return i},removeAction:function(e,o){"string"==typeof e&&n("actions",e,o);return i},doAction:function(){var e=t.call(arguments),o=e.shift();"string"==typeof o&&r("actions",o,e);return i},addAction:function(e,o,t,n){"string"==typeof e&&"function"==typeof o&&(t=parseInt(t||10,10),s("actions",e,o,t,n));return i}},a={actions:{},filters:{}};function n(e,o,t,n){var i,s,r;if(a[e][o])if(t)if(i=a[e][o],n)for(r=i.length;r--;)(s=i[r]).callback===t&&s.context===n&&i.splice(r,1);else for(r=i.length;r--;)i[r].callback===t&&i.splice(r,1);else a[e][o]=[]}function s(e,o,t,n,i){var s={callback:t,priority:n,context:i},r=a[e][o];r=r?(r.push(s),function(e){for(var o,t,n,i=1,s=e.length;i<s;i++){for(o=e[i],t=i;(n=e[t-1])&&n.priority>o.priority;)e[t]=e[t-1],--t;e[t]=o}return e}(r)):[s],a[e][o]=r}function r(e,o,t){var n,i,s=a[e][o];if(!s)return"filters"===e&&t[0];if(i=s.length,"filters"===e)for(n=0;n<i;n++)t[0]=s[n].callback.apply(s[n].context,t);else for(n=0;n<i;n++)s[n].callback.apply(s[n].context,t);return"filters"!==e||t[0]}return i},e.PUM=e.PUM||{},e.PUM.hooks=e.pum.hooks}(window),function(t){"use strict";function n(e){return e}window.PUM=window.PUM||{},window.PUM.integrations=window.PUM.integrations||{},t.extend(window.PUM.integrations,{init:function(){if(void 0!==pum_vars.form_submission){var e=pum_vars.form_submission;e.ajax=!1,e.popup=0<e.popupId?PUM.getPopup(e.popupId):null,PUM.integrations.formSubmission(null,e)}},formSubmission:function(e,o){(o=t.extend({popup:PUM.getPopup(e),formProvider:null,formId:null,formInstanceId:null,formKey:null,ajax:!0,tracked:!1},o)).formKey=o.formKey||[o.formProvider,o.formId,o.formInstanceId].filter(n).join("_"),o.popup&&o.popup.length&&(o.popupId=PUM.getSetting(o.popup,"id")),window.PUM.hooks.doAction("pum.integration.form.success",e,o)},checkFormKeyMatches:function(e,o,t){o=""===o&&o;var n=-1!==["any"===e,"pumsubform"===e&&"pumsubform"===t.formProvider,e===t.formProvider+"_any",!o&&new RegExp("^"+e+"(_[d]*)?").test(t.formKey),!!o&&e+"_"+o===t.formKey].indexOf(!0);return window.PUM.hooks.applyFilters("pum.integration.checkFormKeyMatches",n,{formIdentifier:e,formInstanceId:o,submittedFormArgs:t})}})}(window.jQuery),function(p){"use strict";pum_vars&&void 0!==pum_vars.core_sub_forms_enabled&&!pum_vars.core_sub_forms_enabled||(window.PUM=window.PUM||{},window.PUM.newsletter=window.PUM.newsletter||{},p.extend(window.PUM.newsletter,{form:p.extend({},window.PUM.forms.form,{submit:function(e){var o=p(this),t=o.pumSerializeObject();e.preventDefault(),e.stopPropagation(),window.PUM.newsletter.form.beforeAjax(o),p.ajax({type:"POST",dataType:"json",url:pum_vars.ajaxurl,data:{action:"pum_sub_form",values:t}}).always(function(){window.PUM.newsletter.form.afterAjax(o)}).done(function(e){window.PUM.newsletter.form.responseHandler(o,e)}).error(function(e,o,t){console.log("Error: type of "+o+" with message of "+t)})}})}),p(document).on("submit","form.pum-sub-form",window.PUM.newsletter.form.submit).on("success","form.pum-sub-form",function(e,o){var t=p(e.target),n=t.data("settings")||{},i=t.pumSerializeObject(),s=PUM.getPopup(t),r=PUM.getSetting(s,"id"),a=p("form.pum-sub-form",s).index(t)+1;window.PUM.integrations.formSubmission(t,{formProvider:"pumsubform",formId:r,formInstanceId:a,extras:{data:o,values:i,settings:n}}),t.trigger("pumNewsletterSuccess",[o]).addClass("pum-newsletter-success"),t[0].reset(),window.pum.hooks.doAction("pum-sub-form.success",o,t),"string"==typeof n.redirect&&""!==n.redirect&&(n.redirect=atob(n.redirect)),window.PUM.forms.success(t,n)}).on("error","form.pum-sub-form",function(e,o){var t=p(e.target);t.trigger("pumNewsletterError",[o]),window.pum.hooks.doAction("pum-sub-form.errors",o,t)}))}(jQuery),function(s,r){"use strict";s.extend(s.fn.popmake.methods,{addTrigger:function(e){return s.fn.popmake.triggers[e]?s.fn.popmake.triggers[e].apply(this,Array.prototype.slice.call(arguments,1)):(window.console&&console.warn("Trigger type "+e+" does not exist."),this)}}),s.fn.popmake.triggers={auto_open:function(e){var o=PUM.getPopup(this);setTimeout(function(){o.popmake("state","isOpen")||!o.popmake("checkCookies",e)&&o.popmake("checkConditions")&&(s.fn.popmake.last_open_trigger="Auto Open - Delay: "+e.delay,o.popmake("open"))},e.delay)},click_open:function(n){var e,i=PUM.getPopup(this),o=i.popmake("getSettings"),t=[".popmake-"+o.id,".popmake-"+decodeURIComponent(o.slug),'a[href$="#popmake-'+o.id+'"]'];n.extra_selectors&&""!==n.extra_selectors&&t.push(n.extra_selectors),e=(t=pum.hooks.applyFilters("pum.trigger.click_open.selectors",t,n,i)).join(", "),s(e).addClass("pum-trigger").css({cursor:"pointer"}),s(r).on("click.pumTrigger",e,function(e){var o=s(this),t=n.do_default||!1;0<i.has(o).length||i.popmake("state","isOpen")||!i.popmake("checkCookies",n)&&i.popmake("checkConditions")&&(o.data("do-default")?t=o.data("do-default"):(o.hasClass("do-default")||o.hasClass("popmake-do-default")||o.hasClass("pum-do-default"))&&(t=!0),e.ctrlKey||pum.hooks.applyFilters("pum.trigger.click_open.do_default",t,i,o)||(e.preventDefault(),e.stopPropagation()),s.fn.popmake.last_open_trigger=o,i.popmake("open"))})},form_submission:function(t){var n=PUM.getPopup(this);t=s.extend({form:"",formInstanceId:"",delay:0},t);PUM.hooks.addAction("pum.integration.form.success",function(e,o){t.form.length&&PUM.integrations.checkFormKeyMatches(t.form,t.formInstanceId,o)&&setTimeout(function(){n.popmake("state","isOpen")||!n.popmake("checkCookies",t)&&n.popmake("checkConditions")&&(s.fn.popmake.last_open_trigger="Form Submission",n.popmake("open"))},t.delay)})},admin_debug:function(){PUM.getPopup(this).popmake("open")}},s(r).on("pumInit",".pum",function(){var e,o=PUM.getPopup(this),t=o.popmake("getSettings").triggers||[],n=null;if(t.length)for(e=0;e<t.length;e+=1)n=t[e],o.popmake("addTrigger",n.type,n.settings)})}(jQuery,document),function(p){"use strict";var n="color,date,datetime,datetime-local,email,hidden,month,number,password,range,search,tel,text,time,url,week".split(","),i="select,textarea".split(","),s=/\[([^\]]*)\]/g;Array.prototype.indexOf||(Array.prototype.indexOf=function(e){if(null==this)throw new TypeError;var o=Object(this),t=o.length>>>0;if(0==t)return-1;var n=0;if(0<arguments.length&&((n=Number(arguments[1]))!=n?n=0:0!==n&&n!==1/0&&n!==-1/0&&(n=(0<n||-1)*Math.floor(Math.abs(n)))),t<=n)return-1;for(var i=0<=n?n:Math.max(t-Math.abs(n),0);i<t;i++)if(i in o&&o[i]===e)return i;return-1}),p.fn.popmake.utilities={scrollTo:function(e,o){var t=p(e)||p();t.length&&p("html, body").animate({scrollTop:t.offset().top-100},1e3,"swing",function(){var e=t.find(':input:not([type="button"]):not([type="hidden"]):not(button)').eq(0);e.hasClass("wp-editor-area")?tinyMCE.execCommand("mceFocus",!1,e.attr("id")):e.focus(),"function"==typeof o&&o()})},inArray:function(e,o){return!!~o.indexOf(e)},convert_hex:function(e,o){return e=e.replace("#",""),"rgba("+parseInt(e.substring(0,2),16)+","+parseInt(e.substring(2,4),16)+","+parseInt(e.substring(4,6),16)+","+o/100+")"},debounce:function(t,n){var i;return function(){var e=this,o=arguments;window.clearTimeout(i),i=window.setTimeout(function(){t.apply(e,o)},n)}},throttle:function(e,o){function t(){n=!1}var n=!1;return function(){n||(e.apply(this,arguments),window.setTimeout(t,o),n=!0)}},getXPath:function(e){var t,n,i,s,r,a=[];return p.each(p(e).parents(),function(e,o){if(t=p(o),n=t.attr("id")||"",i=t.attr("class")||"",s=t.get(0).tagName.toLowerCase(),r=t.parent().children(s).index(t),"body"===s)return!1;0<i.length&&(i=(i=i.split(" "))[0]),a.push(s+(0<n.length?"#"+n:0<i.length?"."+i.split(" ").join("."):":eq("+r+")"))}),a.reverse().join(" > ")},strtotime:function(e,o){var t,n,i,s,l,c,m,r,a,p;if(!e)return!1;if((n=(e=e.replace(/^\s+|\s+$/g,"").replace(/\s{2,}/g," ").replace(/[\t\r\n]/g,"").toLowerCase()).match(/^(\d{1,4})([\-\.\/\:])(\d{1,2})([\-\.\/\:])(\d{1,4})(?:\s(\d{1,2}):(\d{2})?:?(\d{2})?)?(?:\s([A-Z]+)?)?$/))&&n[2]===n[4])if(1901<n[1])switch(n[2]){case"-":return 12<n[3]||31<n[5]?!1:new Date(n[1],parseInt(n[3],10)-1,n[5],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3;case".":return!1;case"/":return 12<n[3]||31<n[5]?!1:new Date(n[1],parseInt(n[3],10)-1,n[5],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3}else if(1901<n[5])switch(n[2]){case"-":case".":return 12<n[3]||31<n[1]?!1:new Date(n[5],parseInt(n[3],10)-1,n[1],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3;case"/":return 12<n[1]||31<n[3]?!1:new Date(n[5],parseInt(n[1],10)-1,n[3],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3}else switch(n[2]){case"-":return 12<n[3]||31<n[5]||n[1]<70&&38<n[1]?!1:(s=0<=n[1]&&n[1]<=38?+n[1]+2e3:n[1],new Date(s,parseInt(n[3],10)-1,n[5],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3);case".":return 70<=n[5]?!(12<n[3]||31<n[1])&&new Date(n[5],parseInt(n[3],10)-1,n[1],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3:n[5]<60&&!n[6]&&(!(23<n[1]||59<n[3])&&(i=new Date,new Date(i.getFullYear(),i.getMonth(),i.getDate(),n[1]||0,n[3]||0,n[5]||0,n[9]||0)/1e3));case"/":return 12<n[1]||31<n[3]||n[5]<70&&38<n[5]?!1:(s=0<=n[5]&&n[5]<=38?+n[5]+2e3:n[5],new Date(s,parseInt(n[1],10)-1,n[3],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3);case":":return 23<n[1]||59<n[3]||59<n[5]?!1:(i=new Date,new Date(i.getFullYear(),i.getMonth(),i.getDate(),n[1]||0,n[3]||0,n[5]||0)/1e3)}if("now"===e)return null===o||isNaN(o)?(new Date).getTime()/1e3||0:o||0;if(t=Date.parse(e),!isNaN(t))return t/1e3||0;function u(e){var o,t,n,i,s=e.split(" "),r=s[0],a=s[1].substring(0,3),p=/\d+/.test(r),u=("last"===r?-1:1)*("ago"===s[2]?-1:1);if(p&&(u*=parseInt(r,10)),m.hasOwnProperty(a)&&!s[1].match(/^mon(day|\.)?$/i))return l["set"+m[a]](l["get"+m[a]]()+u);if("wee"===a)return l.setDate(l.getDate()+7*u);if("next"===r||"last"===r)o=r,t=u,void 0!==(i=c[a])&&(0===(n=i-l.getDay())?n=7*t:0<n&&"last"===o?n-=7:n<0&&"next"===o&&(n+=7),l.setDate(l.getDate()+n));else if(!p)return;return 1}if(l=o?new Date(1e3*o):new Date,c={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6},m={yea:"FullYear",mon:"Month",day:"Date",hou:"Hours",min:"Minutes",sec:"Seconds"},a="(years?|months?|weeks?|days?|hours?|minutes?|min|seconds?|sec|sunday|sun\\.?|monday|mon\\.?|tuesday|tue\\.?|wednesday|wed\\.?|thursday|thu\\.?|friday|fri\\.?|saturday|sat\\.?)",!(n=e.match(new RegExp("([+-]?\\d+\\s(years?|months?|weeks?|days?|hours?|minutes?|min|seconds?|sec|sunday|sun\\.?|monday|mon\\.?|tuesday|tue\\.?|wednesday|wed\\.?|thursday|thu\\.?|friday|fri\\.?|saturday|sat\\.?)|(last|next)\\s(years?|months?|weeks?|days?|hours?|minutes?|min|seconds?|sec|sunday|sun\\.?|monday|mon\\.?|tuesday|tue\\.?|wednesday|wed\\.?|thursday|thu\\.?|friday|fri\\.?|saturday|sat\\.?))(\\sago)?","gi"))))return!1;for(p=0,r=n.length;p<r;p+=1)if(!u(n[p]))return!1;return l.getTime()/1e3},serializeObject:function(e){p.extend({},e);var o={},t=p.extend(!0,{include:[],exclude:[],includeByClass:""},e);return this.find(":input").each(function(){var e;!this.name||this.disabled||window.PUM.utilities.inArray(this.name,t.exclude)||t.include.length&&!window.PUM.utilities.inArray(this.name,t.include)||-1===this.className.indexOf(t.includeByClass)||(e=this.name.replace(s,"[$1").split("["))[0]&&(this.checked||window.PUM.utilities.inArray(this.type,n)||window.PUM.utilities.inArray(this.nodeName.toLowerCase(),i))&&("checkbox"===this.type&&e.push(""),function e(o,t,n){var i=t[0];1<t.length?(o[i]||(o[i]=t[1]?{}:[]),e(o[i],t.slice(1),n)):o[i=i||o.length]=n}(o,e,p(this).val()))}),o}},p.fn.popmake.utilies=p.fn.popmake.utilities,window.PUM=window.PUM||{},window.PUM.utilities=window.PUM.utilities||{},window.PUM.utilities=p.extend(window.PUM.utilities,p.fn.popmake.utilities)}(jQuery,document),function(e){!function(e,m){var d={validate:/^[a-z_][a-z0-9_]*(?:\[(?:\d*|[a-z0-9_]+)\])*$/i,key:/[a-z0-9_]+|(?=\[\])/gi,push:/^$/,fixed:/^\d+$/,named:/^[a-z0-9_]+$/i};function t(n,o){var t={},i={};function s(e,o,t){e[o]=t;return e}function r(e,o){var t=e.match(d.key),n;try{o=JSON.parse(o)}catch(e){}while((n=t.pop())!==undefined){if(d.push.test(n)){var i=a(e.replace(/\[\]$/,""));o=s([],i,o)}else if(d.fixed.test(n)){o=s([],n,o)}else if(d.named.test(n)){o=s({},n,o)}}return o}function a(e){if(i[e]===undefined){i[e]=0}return i[e]++}function p(e){switch(m('[name="'+e.name+'"]',o).attr("type")){case"checkbox":return e.value==="1"?true:e.value;default:return e.value}}function e(e){if(!d.validate.test(e.name))return this;var o=r(e.name,p(e));t=n.extend(true,t,o);return this}function u(e){if(!n.isArray(e)){throw new Error("formSerializer.addPairs expects an Array")}for(var o=0,t=e.length;o<t;o++){this.addPair(e[o])}return this}function l(){return t}function c(){return JSON.stringify(l())}this.addPair=e;this.addPairs=u;this.serialize=l;this.serializeJSON=c}if(t.patterns=d,t.serializeObject=function e(){var o;if(this.is("form")){o=this.serializeArray()}else{o=this.find(":input").serializeArray()}return new t(m,this).addPairs(o).serialize()},t.serializeJSON=function e(){var o;if(this.is("form")){o=this.serializeArray()}else{o=this.find(":input").serializeArray()}return new t(m,this).addPairs(o).serializeJSON()},typeof m.fn!=="undefined"){m.fn.pumSerializeObject=t.serializeObject;m.fn.pumSerializeJSON=t.serializeJSON}e.FormSerializer=t}(e,e.jQuery||e.Zepto||e.ender||e.$)}(this),function(e){"use strict";e.fn.popmake.version=1.8,e.fn.popmake.last_open_popup=null,e(void 0).ready(function(){e(".pum").popmake(),e(void 0).trigger("pumInitialized"),"object"==typeof pum_vars.form_success&&(pum_vars.form_success=e.extend({popup_id:null,settings:{}}),PUM.forms.success(pum_vars.form_success.popup_id,pum_vars.form_success.settings)),PUM.integrations.init()}),e(".pum").on("pumInit",function(){var e=PUM.getPopup(this),o=PUM.getSetting(e,"id"),t=e.find("form");t.length&&t.append('<input type="hidden" name="pum_form_popup_id" value="'+o+'" />')})}(jQuery);
|
1 |
+
var PUM,PUM_Accessibility,PUM_Analytics,pm_cookie,pm_cookie_json,pm_remove_cookie;!function(s){"use strict";void 0===s.fn.on&&(s.fn.on=function(e,o,t){return this.delegate(o,e,t)}),void 0===s.fn.off&&(s.fn.off=function(e,o,t){return this.undelegate(o,e,t)}),void 0===s.fn.bindFirst&&(s.fn.bindFirst=function(e,o){var t,n,i=s(this);i.unbind(e,o),i.bind(e,o),(n=(t=s._data(i[0]).events)[e]).unshift(n.pop()),t[e]=n}),void 0===s.fn.outerHtml&&(s.fn.outerHtml=function(){var e=s(this).clone();return s("<div/>").append(e).html()}),void 0===s.fn.isInViewport&&(s.fn.isInViewport=function(){var e=s(this).offset().top,o=e+s(this).outerHeight(),t=s(window).scrollTop(),n=t+s(window).height();return t<o&&e<n}),void 0===Date.now&&(Date.now=function(){return(new Date).getTime()})}(jQuery),function(p,s,r){"use strict";function i(e,o){function t(e,o,t){return o?e[o.slice(0,t?-1:o.length)]:e}return o.split(".").reduce(function(e,o){return o?o.split("[").reduce(t,e):e},e)}window.pum_vars=window.pum_vars||{default_theme:"0",home_url:"/",version:1.7,pm_dir_url:"",ajaxurl:"",restapi:!1,rest_nonce:null,debug_mode:!1,disable_tracking:!0,message_position:"top",core_sub_forms_enabled:!0,popups:{}},window.pum_popups=window.pum_popups||{},window.pum_vars.popups=window.pum_popups,PUM={get:new function(){function e(e,o,t){"boolean"==typeof o&&(t=o,o=!1);var n=o?o.selector+" "+e:e;return r!==i[n]&&!t||(i[n]=o?o.find(e):jQuery(e)),i[n]}var i={};return e.elementCache=i,e},getPopup:function(e){var o,t;return t=e,(o=isNaN(t)||parseInt(Number(t))!==parseInt(t)||isNaN(parseInt(t,10))?"current"===e?PUM.get(".pum-overlay.pum-active:eq(0)",!0):"open"===e?PUM.get(".pum-overlay.pum-active",!0):"closed"===e?PUM.get(".pum-overlay:not(.pum-active)",!0):e instanceof jQuery?e:p(e):PUM.get("#pum-"+e)).hasClass("pum-overlay")?o:o.hasClass("popmake")||o.parents(".pum-overlay").length?o.parents(".pum-overlay"):p()},open:function(e,o){PUM.getPopup(e).popmake("open",o)},close:function(e,o){PUM.getPopup(e).popmake("close",o)},preventOpen:function(e){PUM.getPopup(e).addClass("preventOpen")},getSettings:function(e){return PUM.getPopup(e).popmake("getSettings")},getSetting:function(e,o,t){var n=i(PUM.getSettings(e),o);return void 0!==n?n:t!==r?t:null},checkConditions:function(e){return PUM.getPopup(e).popmake("checkConditions")},getCookie:function(e){return p.pm_cookie(e)},getJSONCookie:function(e){return p.pm_cookie_json(e)},setCookie:function(e,o){PUM.getPopup(e).popmake("setCookie",jQuery.extend({name:"pum-"+PUM.getSetting(e,"id"),expires:"+30 days"},o))},clearCookie:function(e,o){p.pm_remove_cookie(e),"function"==typeof o&&o()},clearCookies:function(e,o){var t,n=PUM.getPopup(e).popmake("getSettings").cookies;if(n!==r&&n.length)for(t=0;n.length>t;t+=1)p.pm_remove_cookie(n[t].settings.name);"function"==typeof o&&o()},getClickTriggerSelector:function(e,o){var t=PUM.getPopup(e),n=PUM.getSettings(e),i=[".popmake-"+n.id,".popmake-"+decodeURIComponent(n.slug),'a[href$="#popmake-'+n.id+'"]'];return o.extra_selectors&&""!==o.extra_selectors&&i.push(o.extra_selectors),(i=pum.hooks.applyFilters("pum.trigger.click_open.selectors",i,o,t)).join(", ")},disableClickTriggers:function(e,o){if(e!==r)if(o!==r){var t=PUM.getClickTriggerSelector(e,o);p(t).removeClass("pum-trigger"),p(s).off("click.pumTrigger click.popmakeOpen",t)}else{var n=PUM.getSetting(e,"triggers",[]);if(n.length)for(var i=0;n.length>i;i++)if(-1!==pum.hooks.applyFilters("pum.disableClickTriggers.clickTriggerTypes",["click_open"]).indexOf(n[i].type)){t=PUM.getClickTriggerSelector(e,n[i].settings);p(t).removeClass("pum-trigger"),p(s).off("click.pumTrigger click.popmakeOpen",t)}}}},p.fn.popmake=function(e){return p.fn.popmake.methods[e]?(p(s).trigger("pumMethodCall",arguments),p.fn.popmake.methods[e].apply(this,Array.prototype.slice.call(arguments,1))):"object"!=typeof e&&e?void(window.console&&console.warn("Method "+e+" does not exist on $.fn.popmake")):p.fn.popmake.methods.init.apply(this,arguments)},p.fn.popmake.methods={init:function(){return this.each(function(){var e=PUM.getPopup(this),o=e.popmake("getSettings");if(o.theme_id<=0&&(o.theme_id=pum_vars.default_theme),o.disable_reposition!==r&&o.disable_reposition||p(window).on("resize",function(){(e.hasClass("pum-active")||e.find(".popmake.active").length)&&p.fn.popmake.utilities.throttle(setTimeout(function(){e.popmake("reposition")},25),500,!1)}),e.find(".pum-container").data("popmake",o),e.data("popmake",o).trigger("pumInit"),o.open_sound&&"none"!==o.open_sound){var t="custom"!==o.open_sound?new Audio(pum_vars.pm_dir_url+"/assets/sounds/"+o.open_sound):new Audio(o.custom_sound);t.addEventListener("canplaythrough",function(){e.data("popAudio",t)}),t.addEventListener("error",function(){console.warn("Error occurred when trying to load Popup opening sound.")}),t.load()}return this})},getOverlay:function(){return PUM.getPopup(this)},getContainer:function(){return PUM.getPopup(this).find(".pum-container")},getTitle:function(){return PUM.getPopup(this).find(".pum-title")||null},getContent:function(){return PUM.getPopup(this).find(".pum-content")||null},getClose:function(){return PUM.getPopup(this).find(".pum-content + .pum-close")||null},getSettings:function(){var e=PUM.getPopup(this);return p.extend(!0,{},p.fn.popmake.defaults,e.data("popmake")||{},"object"==typeof pum_popups&&void 0!==pum_popups[e.attr("id")]?pum_popups[e.attr("id")]:{})},state:function(e){var o=PUM.getPopup(this);if(r!==e)switch(e){case"isOpen":return o.hasClass("pum-open")||o.popmake("getContainer").hasClass("active");case"isClosed":return!o.hasClass("pum-open")&&!o.popmake("getContainer").hasClass("active")}},open:function(e){var o=PUM.getPopup(this),t=o.popmake("getContainer"),n=o.popmake("getClose"),i=o.popmake("getSettings"),s=p("html");return o.trigger("pumBeforeOpen"),o.hasClass("preventOpen")||t.hasClass("preventOpen")?(console.log("prevented"),o.removeClass("preventOpen").removeClass("pum-active").trigger("pumOpenPrevented")):(i.stackable||o.popmake("close_all"),o.addClass("pum-active"),0<i.close_button_delay&&n.fadeOut(0),s.addClass("pum-open"),i.overlay_disabled?s.addClass("pum-open-overlay-disabled"):s.addClass("pum-open-overlay"),i.position_fixed?s.addClass("pum-open-fixed"):s.addClass("pum-open-scrollable"),o.popmake("setup_close").popmake("reposition").popmake("animate",i.animation_type,function(){0<i.close_button_delay&&setTimeout(function(){n.fadeIn()},i.close_button_delay),o.trigger("pumAfterOpen"),p(window).trigger("resize"),p.fn.popmake.last_open_popup=o,e!==r&&e()}),void 0!==o.data("popAudio")&&o.data("popAudio").play().catch(function(e){console.warn("Sound was not able to play when popup opened. Reason: "+e)})),this},setup_close:function(){var t=PUM.getPopup(this),e=t.popmake("getClose"),n=t.popmake("getSettings");return(e=e.add(p(".popmake-close, .pum-close",t).not(e))).off("click.pum").on("click.pum",function(e){var o=p(this);o.hasClass("pum-do-default")||o.data("do-default")!==r&&o.data("do-default")||e.preventDefault(),p.fn.popmake.last_close_trigger="Close Button",t.popmake("close")}),(n.close_on_esc_press||n.close_on_f4_press)&&p(window).off("keyup.popmake").on("keyup.popmake",function(e){27===e.keyCode&&n.close_on_esc_press&&(p.fn.popmake.last_close_trigger="ESC Key",t.popmake("close")),115===e.keyCode&&n.close_on_f4_press&&(p.fn.popmake.last_close_trigger="F4 Key",t.popmake("close"))}),n.close_on_overlay_click&&(t.on("pumAfterOpen",function(){p(s).on("click.pumCloseOverlay",function(e){p(e.target).closest(".pum-container").length||(p.fn.popmake.last_close_trigger="Overlay Click",t.popmake("close"))})}),t.on("pumAfterClose",function(){p(s).off("click.pumCloseOverlay")})),n.close_on_form_submission&&PUM.hooks.addAction("pum.integration.form.success",function(e,o){o.popup&&o.popup[0]===t[0]&&setTimeout(function(){p.fn.popmake.last_close_trigger="Form Submission",t.popmake("close")},n.close_on_form_submission_delay||0)}),t.trigger("pumSetupClose"),this},close:function(n){return this.each(function(){var e=PUM.getPopup(this),o=e.popmake("getContainer"),t=e.popmake("getClose");return t=t.add(p(".popmake-close, .pum-close",e).not(t)),e.trigger("pumBeforeClose"),e.hasClass("preventClose")||o.hasClass("preventClose")?e.removeClass("preventClose").trigger("pumClosePrevented"):o.fadeOut("fast",function(){e.is(":visible")&&e.fadeOut("fast"),p(window).off("keyup.popmake"),e.off("click.popmake"),t.off("click.popmake"),1===p(".pum-active").length&&p("html").removeClass("pum-open").removeClass("pum-open-scrollable").removeClass("pum-open-overlay").removeClass("pum-open-overlay-disabled").removeClass("pum-open-fixed"),e.removeClass("pum-active").trigger("pumAfterClose"),o.find("iframe").filter('[src*="youtube"],[src*="vimeo"]').each(function(){var e=p(this),o=e.attr("src"),t=o.replace("autoplay=1","1=1");t!==o&&(o=t),e.prop("src",o)}),o.find("video").each(function(){this.pause()}),n!==r&&n()}),this})},close_all:function(){return p(".pum-active").popmake("close"),this},reposition:function(e){var o=PUM.getPopup(this).trigger("pumBeforeReposition"),t=o.popmake("getContainer"),n=o.popmake("getSettings"),i=n.location,s={my:"",at:"",of:window,collision:"none",using:"function"==typeof e?e:p.fn.popmake.callbacks.reposition_using},r={overlay:null,container:null},a=null;try{a=p(p.fn.popmake.last_open_trigger)}catch(e){a=p()}return n.position_from_trigger&&a.length?(s.of=a,0<=i.indexOf("left")&&(s.my+=" right",s.at+=" left"+(0!==n.position_left?"-"+n.position_left:"")),0<=i.indexOf("right")&&(s.my+=" left",s.at+=" right"+(0!==n.position_right?"+"+n.position_right:"")),0<=i.indexOf("center")&&(s.my="center"===i?"center":s.my+" center",s.at="center"===i?"center":s.at+" center"),0<=i.indexOf("top")&&(s.my+=" bottom",s.at+=" top"+(0!==n.position_top?"-"+n.position_top:"")),0<=i.indexOf("bottom")&&(s.my+=" top",s.at+=" bottom"+(0!==n.position_bottom?"+"+n.position_bottom:""))):(0<=i.indexOf("left")&&(s.my+=" left"+(0!==n.position_left?"+"+n.position_left:""),s.at+=" left"),0<=i.indexOf("right")&&(s.my+=" right"+(0!==n.position_right?"-"+n.position_right:""),s.at+=" right"),0<=i.indexOf("center")&&(s.my="center"===i?"center":s.my+" center",s.at="center"===i?"center":s.at+" center"),0<=i.indexOf("top")&&(s.my+=" top"+(0!==n.position_top?"+"+(p("body").hasClass("admin-bar")?parseInt(n.position_top,10)+32:n.position_top):""),s.at+=" top"),0<=i.indexOf("bottom")&&(s.my+=" bottom"+(0!==n.position_bottom?"-"+n.position_bottom:""),s.at+=" bottom")),s.my=p.trim(s.my),s.at=p.trim(s.at),o.is(":hidden")&&(r.overlay=o.css("opacity"),o.css({opacity:0}).show(0)),t.is(":hidden")&&(r.container=t.css("opacity"),t.css({opacity:0}).show(0)),n.position_fixed&&t.addClass("fixed"),"custom"===n.size?t.css({width:n.custom_width,height:n.custom_height_auto?"auto":n.custom_height}):"auto"!==n.size&&t.addClass("responsive").css({minWidth:""!==n.responsive_min_width?n.responsive_min_width:"auto",maxWidth:""!==n.responsive_max_width?n.responsive_max_width:"auto"}),o.trigger("pumAfterReposition"),t.addClass("custom-position").position(s).trigger("popmakeAfterReposition"),"center"===i&&t[0].offsetTop<0&&t.css({top:p("body").hasClass("admin-bar")?42:10}),r.overlay&&o.css({opacity:r.overlay}).hide(0),r.container&&t.css({opacity:r.container}).hide(0),this},animation_origin:function(e){var o=PUM.getPopup(this).popmake("getContainer"),t={my:"",at:""};switch(e){case"top":t={my:"left+"+o.offset().left+" bottom-100",at:"left top"};break;case"bottom":t={my:"left+"+o.offset().left+" top+100",at:"left bottom"};break;case"left":t={my:"right top+"+o.offset().top,at:"left top"};break;case"right":t={my:"left top+"+o.offset().top,at:"right top"};break;default:0<=e.indexOf("left")&&(t={my:t.my+" right",at:t.at+" left"}),0<=e.indexOf("right")&&(t={my:t.my+" left",at:t.at+" right"}),0<=e.indexOf("center")&&(t={my:t.my+" center",at:t.at+" center"}),0<=e.indexOf("top")&&(t={my:t.my+" bottom-100",at:t.at+" top"}),0<=e.indexOf("bottom")&&(t={my:t.my+" top+100",at:t.at+" bottom"}),t.my=p.trim(t.my),t.at=p.trim(t.at)}return t.of=window,t.collision="none",t}}}(jQuery,document),function(s,t){"use strict";var n,i,r,a="a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]",e=".pum:not(.pum-accessibility-disabled)";PUM_Accessibility={forceFocus:function(e){r&&r.length&&!r[0].contains(e.target)&&(e.stopPropagation(),PUM_Accessibility.setFocusToFirstItem())},trapTabKey:function(e){if(9===e.keyCode){var o=r.find(".pum-container *").filter(a).filter(":visible"),t=s(":focus"),n=o.length,i=o.index(t);e.shiftKey?0===i&&(o.get(n-1).focus(),e.preventDefault()):i===n-1&&(o.get(0).focus(),e.preventDefault())}},setFocusToFirstItem:function(){r.find(".pum-container *").filter(a).filter(":visible").filter(":not(.pum-close)").first().focus()}},s(t).on("pumInit",e,function(){PUM.getPopup(this).find("[tabindex]").each(function(){var e=s(this);e.data("tabindex",e.attr("tabindex")).prop("tabindex","0")})}).on("pumBeforeOpen",e,function(){var e=PUM.getPopup(this),o=s(":focus");e.has(o).length||(i=o),r=e.on("keydown.pum_accessibility",PUM_Accessibility.trapTabKey).attr("aria-hidden","false"),(n=s("body > *").filter(":visible").not(r)).attr("aria-hidden","true"),s(t).one("focusin.pum_accessibility",PUM_Accessibility.forceFocus),PUM_Accessibility.setFocusToFirstItem()}).on("pumAfterOpen",e,function(){}).on("pumBeforeClose",e,function(){}).on("pumAfterClose",e,function(){PUM.getPopup(this).off("keydown.pum_accessibility").attr("aria-hidden","true"),n&&(n.attr("aria-hidden","false"),n=null),void 0!==i&&i.length&&i.focus(),r=null,s(t).off("focusin.pum_accessibility")}).on("pumSetupClose",e,function(){}).on("pumOpenPrevented",e,function(){}).on("pumClosePrevented",e,function(){}).on("pumBeforeReposition",e,function(){})}(jQuery,document),function(s){"use strict";s.fn.popmake.last_open_trigger=null,s.fn.popmake.last_close_trigger=null,s.fn.popmake.conversion_trigger=null;var r=!(void 0===pum_vars.restapi||!pum_vars.restapi);PUM_Analytics={beacon:function(e,o){var t=new Image,n=r?pum_vars.restapi:pum_vars.ajaxurl,i={route:"/analytics/",data:s.extend({event:"open",pid:null,_cache:+new Date},e),callback:"function"==typeof o?o:function(){}};r?n+=i.route:i.data.action="pum_analytics",n&&(s(t).on("error success load done",i.callback),t.src=n+"?"+s.param(i.data))}},void 0!==pum_vars.disable_tracking&&pum_vars.disable_tracking||s(document).on("pumAfterOpen.core_analytics",".pum",function(){var e=PUM.getPopup(this),o={pid:parseInt(e.popmake("getSettings").id,10)||null};0<o.pid&&!s("body").hasClass("single-popup")&&PUM_Analytics.beacon(o)})}(jQuery),function(n,s){"use strict";function r(e){var o=e.popmake("getContainer"),t={display:"",opacity:""};e.css(t),o.css(t)}function a(e){return e.overlay_disabled?0:e.animation_speed/2}function p(e){return e.overlay_disabled?parseInt(e.animation_speed):e.animation_speed/2}n.fn.popmake.methods.animate_overlay=function(e,o,t){return PUM.getPopup(this).popmake("getSettings").overlay_disabled?n.fn.popmake.overlay_animations.none.apply(this,[o,t]):n.fn.popmake.overlay_animations[e]?n.fn.popmake.overlay_animations[e].apply(this,[o,t]):(window.console&&console.warn("Animation style "+e+" does not exist."),this)},n.fn.popmake.methods.animate=function(e){return n.fn.popmake.animations[e]?n.fn.popmake.animations[e].apply(this,Array.prototype.slice.call(arguments,1)):(window.console&&console.warn("Animation style "+e+" does not exist."),this)},n.fn.popmake.animations={none:function(e){var o=PUM.getPopup(this);return o.popmake("getContainer").css({opacity:1,display:"block"}),o.popmake("animate_overlay","none",0,function(){e!==s&&e()}),this},slide:function(o){var e=PUM.getPopup(this),t=e.popmake("getContainer"),n=e.popmake("getSettings"),i=e.popmake("animation_origin",n.animation_origin);return r(e),t.position(i),e.popmake("animate_overlay","fade",a(n),function(){t.popmake("reposition",function(e){t.animate(e,p(n),"swing",function(){o!==s&&o()})})}),this},fade:function(e){var o=PUM.getPopup(this),t=o.popmake("getContainer"),n=o.popmake("getSettings");return r(o),o.css({opacity:0,display:"block"}),t.css({opacity:0,display:"block"}),o.popmake("animate_overlay","fade",a(n),function(){t.animate({opacity:1},p(n),"swing",function(){e!==s&&e()})}),this},fadeAndSlide:function(o){var e=PUM.getPopup(this),t=e.popmake("getContainer"),n=e.popmake("getSettings"),i=e.popmake("animation_origin",n.animation_origin);return r(e),e.css({display:"block",opacity:0}),t.css({display:"block",opacity:0}),t.position(i),e.popmake("animate_overlay","fade",a(n),function(){t.popmake("reposition",function(e){e.opacity=1,t.animate(e,p(n),"swing",function(){o!==s&&o()})})}),this},grow:function(e){return n.fn.popmake.animations.fade.apply(this,arguments)},growAndSlide:function(e){return n.fn.popmake.animations.fadeAndSlide.apply(this,arguments)}},n.fn.popmake.overlay_animations={none:function(e,o){PUM.getPopup(this).css({opacity:1,display:"block"}),"function"==typeof o&&o()},fade:function(e,o){PUM.getPopup(this).css({opacity:0,display:"block"}).animate({opacity:1},e,"swing",o)},slide:function(e,o){PUM.getPopup(this).slideDown(e,o)}}}(jQuery,void document),function(e,o){"use strict";e(o).on("pumInit",".pum",function(){e(this).popmake("getContainer").trigger("popmakeInit")}).on("pumBeforeOpen",".pum",function(){e(this).popmake("getContainer").addClass("active").trigger("popmakeBeforeOpen")}).on("pumAfterOpen",".pum",function(){e(this).popmake("getContainer").trigger("popmakeAfterOpen")}).on("pumBeforeClose",".pum",function(){e(this).popmake("getContainer").trigger("popmakeBeforeClose")}).on("pumAfterClose",".pum",function(){e(this).popmake("getContainer").removeClass("active").trigger("popmakeAfterClose")}).on("pumSetupClose",".pum",function(){e(this).popmake("getContainer").trigger("popmakeSetupClose")}).on("pumOpenPrevented",".pum",function(){e(this).popmake("getContainer").removeClass("preventOpen").removeClass("active")}).on("pumClosePrevented",".pum",function(){e(this).popmake("getContainer").removeClass("preventClose")}).on("pumBeforeReposition",".pum",function(){e(this).popmake("getContainer").trigger("popmakeBeforeReposition")})}(jQuery,document),function(o){"use strict";o.fn.popmake.callbacks={reposition_using:function(e){o(this).css(e)}}}(jQuery,document),function(p){"use strict";function u(){return void 0===e&&(e="undefined"!=typeof MobileDetect?new MobileDetect(window.navigator.userAgent):{phone:function(){return!1},tablet:function(){return!1}}),e}var e;p.extend(p.fn.popmake.methods,{checkConditions:function(){var e,o,t,n,i,s=PUM.getPopup(this),r=s.popmake("getSettings"),a=!0;if(r.disable_on_mobile&&u().phone())return!1;if(r.disable_on_tablet&&u().tablet())return!1;if(r.conditions.length)for(o=0;r.conditions.length>o;o++){for(n=r.conditions[o],e=!1,t=0;n.length>t&&((!(i=p.extend({},{not_operand:!1},n[t])).not_operand&&s.popmake("checkCondition",i)||i.not_operand&&!s.popmake("checkCondition",i))&&(e=!0),p(this).trigger("pumCheckingCondition",[e,i]),!e);t++);e||(a=!1)}return a},checkCondition:function(e){var o=e.target||null;e.settings;return o?p.fn.popmake.conditions[o]?p.fn.popmake.conditions[o].apply(this,[e]):window.console?(console.warn("Condition "+o+" does not exist."),!0):void 0:(console.warn("Condition type not set."),!1)}}),p.fn.popmake.conditions={}}(jQuery,document),function(c){"use strict";function m(e,o,t){var n,i=new Date;if("undefined"!=typeof document){if(1<arguments.length){switch(typeof(t=c.extend({path:pum_vars.home_url},m.defaults,t)).expires){case"number":i.setMilliseconds(i.getMilliseconds()+864e5*t.expires),t.expires=i;break;case"string":i.setTime(1e3*c.fn.popmake.utilities.strtotime("+"+t.expires)),t.expires=i}try{n=JSON.stringify(o),/^[\{\[]/.test(n)&&(o=n)}catch(e){}return o=d.write?d.write(o,e):encodeURIComponent(String(o)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),e=(e=(e=encodeURIComponent(String(e))).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent)).replace(/[\(\)]/g,escape),document.cookie=[e,"=",o,t.expires?"; expires="+t.expires.toUTCString():"",t.path?"; path="+t.path:"",t.domain?"; domain="+t.domain:"",t.secure?"; secure":""].join("")}e||(n={});for(var s=document.cookie?document.cookie.split("; "):[],r=/(%[0-9A-Z]{2})+/g,a=0;a<s.length;a++){var p=s[a].split("="),u=p.slice(1).join("=");'"'===u.charAt(0)&&(u=u.slice(1,-1));try{var l=p[0].replace(r,decodeURIComponent);if(u=d.read?d.read(u,l):d(u,l)||u.replace(r,decodeURIComponent),this.json)try{u=JSON.parse(u)}catch(e){}if(e===l){n=u;break}e||(n[l]=u)}catch(e){}}return n}}var d;c.extend(c.fn.popmake,{cookie:(void 0===d&&(d=function(){}),(m.set=m).get=function(e){return m.call(m,e)},m.getJSON=function(){return m.apply({json:!0},[].slice.call(arguments))},m.defaults={},m.remove=function(e,o){m(e,"",c.extend({},o,{expires:-1,path:""})),m(e,"",c.extend({},o,{expires:-1}))},m.process=function(e,o,t,n){return m.apply(m,3<arguments.length&&"object"!=typeof t&&void 0!==o?[e,o,{expires:t,path:n}]:[].slice.call(arguments,[0,2]))},m.withConverter=c.fn.popmake.cookie,m)}),pm_cookie=c.pm_cookie=c.fn.popmake.cookie.process,pm_cookie_json=c.pm_cookie_json=c.fn.popmake.cookie.getJSON,pm_remove_cookie=c.pm_remove_cookie=c.fn.popmake.cookie.remove}(jQuery),function(i,e,n){"use strict";function s(e){i.pm_cookie(e.name,!0,e.session?null:e.time,e.path?pum_vars.home_url||"/":null),pum.hooks.doAction("popmake.setCookie",e)}i.extend(i.fn.popmake.methods,{addCookie:function(e){return pum.hooks.doAction("popmake.addCookie",arguments),i.fn.popmake.cookies[e]?i.fn.popmake.cookies[e].apply(this,Array.prototype.slice.call(arguments,1)):(window.console&&console.warn("Cookie type "+e+" does not exist."),this)},setCookie:s,checkCookies:function(e){var o,t=!1;if(e.cookie_name===n||null===e.cookie_name||""===e.cookie_name)return!1;switch(typeof e.cookie_name){case"object":case"array":for(o=0;e.cookie_name.length>o;o+=1)i.pm_cookie(e.cookie_name[o])!==n&&(t=!0);break;case"string":i.pm_cookie(e.cookie_name)!==n&&(t=!0)}return pum.hooks.doAction("popmake.checkCookies",e,t),t}}),i.fn.popmake.cookies=i.fn.popmake.cookies||{},i.extend(i.fn.popmake.cookies,{on_popup_open:function(e){var o=PUM.getPopup(this);o.on("pumAfterOpen",function(){o.popmake("setCookie",e)})},on_popup_close:function(e){var o=PUM.getPopup(this);o.on("pumBeforeClose",function(){o.popmake("setCookie",e)})},form_submission:function(t){var n=PUM.getPopup(this);t=i.extend({form:"",formInstanceId:"",only_in_popup:!1},t),PUM.hooks.addAction("pum.integration.form.success",function(e,o){t.form.length&&PUM.integrations.checkFormKeyMatches(t.form,t.formInstanceId,o)&&(t.only_in_popup&&PUM.getPopup(e).length&&PUM.getPopup(e).is(n)||!t.only_in_popup)&&n.popmake("setCookie",t)})},manual:function(e){var o=PUM.getPopup(this);o.on("pumSetCookie",function(){o.popmake("setCookie",e)})},form_success:function(e){var o=PUM.getPopup(this);o.on("pumFormSuccess",function(){o.popmake("setCookie",e)})},pum_sub_form_success:function(e){var o=PUM.getPopup(this);o.find("form.pum-sub-form").on("success",function(){o.popmake("setCookie",e)})},pum_sub_form_already_subscribed:function(e){var o=PUM.getPopup(this);o.find("form.pum-sub-form").on("success",function(){o.popmake("setCookie",e)})},ninja_form_success:function(e){return i.fn.popmake.cookies.form_success.apply(this,arguments)},cf7_form_success:function(e){return i.fn.popmake.cookies.form_success.apply(this,arguments)},gforms_form_success:function(e){return i.fn.popmake.cookies.form_success.apply(this,arguments)}}),i(e).ready(function(){var e=i(".pum-cookie");e.each(function(){var o=i(this),t=e.index(o),n=o.data("cookie-args");!o.data("only-onscreen")||o.isInViewport()&&o.is(":visible")?s(n):i(window).on("scroll.pum-cookie-"+t,i.fn.popmake.utilities.throttle(function(e){o.isInViewport()&&o.is(":visible")&&(s(n),i(window).off("scroll.pum-cookie-"+t))},100))})}).on("pumInit",".pum",function(){var e,o=PUM.getPopup(this),t=o.popmake("getSettings").cookies||[],n=null;if(t.length)for(e=0;e<t.length;e+=1)n=t[e],o.popmake("addCookie",n.event,n.settings)})}(jQuery,document);var pum_debug,pum_debug_mode=!1;!function(r,e){if(e=window.pum_vars||{debug_mode:!1},(pum_debug_mode=void 0!==e.debug_mode&&e.debug_mode)||-1===window.location.href.indexOf("pum_debug")||(pum_debug_mode=!0),pum_debug_mode){var a=!1,t=!1,p=window.pum_debug_vars||{debug_mode_enabled:"Popup Maker: Debug Mode Enabled",debug_started_at:"Debug started at:",debug_more_info:"For more information on how to use this information visit https://docs.wppopupmaker.com/?utm_medium=js-debug-info&utm_campaign=ContextualHelp&utm_source=browser-console&utm_content=more-info",global_info:"Global Information",localized_vars:"Localized variables",popups_initializing:"Popups Initializing",popups_initialized:"Popups Initialized",single_popup_label:"Popup: #",theme_id:"Theme ID: ",label_method_call:"Method Call:",label_method_args:"Method Arguments:",label_popup_settings:"Settings",label_triggers:"Triggers",label_cookies:"Cookies",label_delay:"Delay:",label_conditions:"Conditions",label_cookie:"Cookie:",label_settings:"Settings:",label_selector:"Selector:",label_mobile_disabled:"Mobile Disabled:",label_tablet_disabled:"Tablet Disabled:",label_event:"Event: %s",triggers:[],cookies:[]};pum_debug={odump:function(e){return r.extend({},e)},logo:function(){console.log(" -------------------------------------------------------------\n| ____ __ __ _ |\n| | _ \\ ___ _ __ _ _ _ __ | \\/ | __ _| | _____ _ __ |\n| | |_) / _ \\| '_ \\| | | | '_ \\ | |\\/| |/ _` | |/ / _ \\ '__| |\n| | __/ (_) | |_) | |_| | |_) | | | | | (_| | < __/ | |\n| |_| \\___/| .__/ \\__,_| .__/ |_| |_|\\__,_|_|\\_\\___|_| |\n| |_| |_| |\n -------------------------------------------------------------")},initialize:function(){a=!0,pum_debug.logo(),console.debug(p.debug_mode_enabled),console.log(p.debug_started_at,new Date),console.info(p.debug_more_info),pum_debug.divider(p.global_info),console.groupCollapsed(p.localized_vars),console.log("pum_vars:",pum_debug.odump(e)),r(document).trigger("pum_debug_initialize_localized_vars"),console.groupEnd(),r(document).trigger("pum_debug_initialize")},popup_event_header:function(e){var o=e.popmake("getSettings");t!==o.id&&(t=o.id,pum_debug.divider(p.single_popup_label+o.id+" - "+o.slug))},divider:function(e){var o=62,t=0,n=" "+new Array(63).join("-")+" ";"string"==typeof e?(o=62-e.length,(t={left:Math.floor(o/2),right:Math.floor(o/2)}).left+t.right===o-1&&t.right++,t.left=new Array(t.left+1).join(" "),t.right=new Array(t.right+1).join(" "),console.log(n+"\n|"+t.left+e+t.right+"|\n"+n)):console.log(n)},click_trigger:function(e,o){var t,n=e.popmake("getSettings"),i=[".popmake-"+n.id,".popmake-"+decodeURIComponent(n.slug),'a[href$="#popmake-'+n.id+'"]'];o.extra_selectors&&""!==o.extra_selectors&&i.push(o.extra_selectors),t=(i=pum.hooks.applyFilters("pum.trigger.click_open.selectors",i,o,e)).join(", "),console.log(p.label_selector,t)},trigger:function(e,o){if("string"==typeof p.triggers[o.type]){switch(console.groupCollapsed(p.triggers[o.type]),o.type){case"auto_open":console.log(p.label_delay,o.settings.delay),console.log(p.label_cookie,o.settings.cookie_name);break;case"click_open":pum_debug.click_trigger(e,o.settings),console.log(p.label_cookie,o.settings.cookie_name)}r(document).trigger("pum_debug_render_trigger",e,o),console.groupEnd()}},cookie:function(e,o){if("string"==typeof p.cookies[o.event]){switch(console.groupCollapsed(p.cookies[o.event]),o.event){case"on_popup_open":case"on_popup_close":case"manual":case"ninja_form_success":console.log(p.label_cookie,pum_debug.odump(o.settings))}r(document).trigger("pum_debug_render_trigger",e,o),console.groupEnd()}}},r(document).on("pumInit",".pum",function(){var e=PUM.getPopup(r(this)),o=e.popmake("getSettings"),t=o.triggers||[],n=o.cookies||[],i=o.conditions||[],s=0;if(a||(pum_debug.initialize(),pum_debug.divider(p.popups_initializing)),console.groupCollapsed(p.single_popup_label+o.id+" - "+o.slug),console.log(p.theme_id,o.theme_id),t.length){for(console.groupCollapsed(p.label_triggers),s=0;s<t.length;s++)pum_debug.trigger(e,t[s]);console.groupEnd()}if(n.length){for(console.groupCollapsed(p.label_cookies),s=0;s<n.length;s+=1)pum_debug.cookie(e,n[s]);console.groupEnd()}i.length&&(console.groupCollapsed(p.label_conditions),console.log(i),console.groupEnd()),console.groupCollapsed(p.label_popup_settings),console.log(p.label_mobile_disabled,!1!==o.disable_on_mobile),console.log(p.label_tablet_disabled,!1!==o.disable_on_tablet),console.log(p.label_display_settings,pum_debug.odump(o)),e.trigger("pum_debug_popup_settings"),console.groupEnd(),console.groupEnd()}).on("pumBeforeOpen",".pum",function(){var e=PUM.getPopup(r(this)),o=r.fn.popmake.last_open_trigger;pum_debug.popup_event_header(e),console.groupCollapsed(p.label_event.replace("%s","pumBeforeOpen"));try{o=(o=r(r.fn.popmake.last_open_trigger)).length?o:r.fn.popmake.last_open_trigger.toString()}catch(e){o=""}finally{console.log(p.label_triggers,[o])}console.groupEnd()}).on("pumOpenPrevented",".pum",function(){var e=PUM.getPopup(r(this));pum_debug.popup_event_header(e),console.groupCollapsed(p.label_event.replace("%s","pumOpenPrevented")),console.groupEnd()}).on("pumAfterOpen",".pum",function(){var e=PUM.getPopup(r(this));pum_debug.popup_event_header(e),console.groupCollapsed(p.label_event.replace("%s","pumAfterOpen")),console.groupEnd()}).on("pumSetupClose",".pum",function(){var e=PUM.getPopup(r(this));pum_debug.popup_event_header(e),console.groupCollapsed(p.label_event.replace("%s","pumSetupClose")),console.groupEnd()}).on("pumClosePrevented",".pum",function(){var e=PUM.getPopup(r(this));pum_debug.popup_event_header(e),console.groupCollapsed(p.label_event.replace("%s","pumClosePrevented")),console.groupEnd()}).on("pumBeforeClose",".pum",function(){var e=PUM.getPopup(r(this));pum_debug.popup_event_header(e),console.groupCollapsed(p.label_event.replace("%s","pumBeforeClose")),console.groupEnd()}).on("pumAfterClose",".pum",function(){var e=PUM.getPopup(r(this));pum_debug.popup_event_header(e),console.groupCollapsed(p.label_event.replace("%s","pumAfterClose")),console.groupEnd()}).on("pumBeforeReposition",".pum",function(){var e=PUM.getPopup(r(this));pum_debug.popup_event_header(e),console.groupCollapsed(p.label_event.replace("%s","pumBeforeReposition")),console.groupEnd()}).on("pumAfterReposition",".pum",function(){var e=PUM.getPopup(r(this));pum_debug.popup_event_header(e),console.groupCollapsed(p.label_event.replace("%s","pumAfterReposition")),console.groupEnd()}).on("pumCheckingCondition",".pum",function(e,o,t){var n=PUM.getPopup(r(this));pum_debug.popup_event_header(n),console.groupCollapsed(p.label_event.replace("%s","pumCheckingCondition")),console.log((t.not_operand?"(!) ":"")+t.target+": "+o,t),console.groupEnd()})}}(jQuery),function(e){"use strict";e.fn.popmake.defaults={id:null,slug:"",theme_id:null,cookies:[],triggers:[],conditions:[],mobile_disabled:null,tablet_disabled:null,custom_height_auto:!1,scrollable_content:!1,position_from_trigger:!1,position_fixed:!1,overlay_disabled:!1,stackable:!1,disable_reposition:!1,close_on_overlay_click:!1,close_on_form_submission:!1,close_on_form_submission_delay:0,close_on_esc_press:!1,close_on_f4_press:!1,disable_on_mobile:!1,disable_on_tablet:!1,size:"medium",responsive_min_width:"0%",responsive_max_width:"100%",custom_width:"640px",custom_height:"380px",animation_type:"fade",animation_speed:"350",animation_origin:"center top",location:"center top",position_top:"100",position_bottom:"0",position_left:"0",position_right:"0",zindex:"1999999999",close_button_delay:"0",meta:{display:{stackable:!1,overlay_disabled:!1,size:"medium",responsive_max_width:"100",responsive_max_width_unit:"%",responsive_min_width:"0",responsive_min_width_unit:"%",custom_width:"640",custom_width_unit:"px",custom_height:"380",custom_height_unit:"px",custom_height_auto:!1,location:"center top",position_top:100,position_left:0,position_bottom:0,position_right:0,position_fixed:!1,animation_type:"fade",animation_speed:350,animation_origin:"center top",scrollable_content:!1,disable_reposition:!1,position_from_trigger:!1,overlay_zindex:!1,zindex:"1999999999"},close:{overlay_click:!1,esc_press:!1,f4_press:!1,text:"",button_delay:0},click_open:[]},container:{active_class:"active",attr:{class:"popmake"}},title:{attr:{class:"popmake-title"}},content:{attr:{class:"popmake-content"}},close:{close_speed:0,attr:{class:"popmake-close"}},overlay:{attr:{id:"popmake-overlay",class:"popmake-overlay"}}}}(jQuery,document),function(s){"use strict";var r={openpopup:!1,openpopup_id:0,closepopup:!1,closedelay:0,redirect_enabled:!1,redirect:"",cookie:!1};window.PUM=window.PUM||{},window.PUM.forms=window.PUM.forms||{},s.extend(window.PUM.forms,{form:{validation:{errors:[]},responseHandler:function(e,o){var t=o.data;o.success?window.PUM.forms.form.success(e,t):window.PUM.forms.form.errors(e,t)},display_errors:function(e,o){window.PUM.forms.messages.add(e,o||this.validation.errors,"error")},beforeAjax:function(e){var o=e.find('[type="submit"]'),t=o.find(".pum-form__loader");window.PUM.forms.messages.clear_all(e),t.length||(t=s('<span class="pum-form__loader"></span>'),""!==o.attr("value")?t.insertAfter(o):o.append(t)),o.prop("disabled",!0),t.show(),e.addClass("pum-form--loading").removeClass("pum-form--errors")},afterAjax:function(e){var o=e.find('[type="submit"]'),t=o.find(".pum-form__loader");o.prop("disabled",!1),t.hide(),e.removeClass("pum-form--loading")},success:function(e,o){void 0!==o.message&&""!==o.message&&window.PUM.forms.messages.add(e,[{message:o.message}]),e.trigger("success",[o]),!e.data("noredirect")&&void 0!==e.data("redirect_enabled")&&o.redirect&&(""!==o.redirect?window.location=o.redirect:window.location.reload(!0))},errors:function(e,o){void 0!==o.errors&&o.errors.length&&(console.log(o.errors),window.PUM.forms.form.display_errors(e,o.errors),window.PUM.forms.messages.scroll_to_first(e),e.addClass("pum-form--errors").trigger("errors",[o]))},submit:function(e){var o=s(this),t=o.pumSerializeObject();e.preventDefault(),e.stopPropagation(),window.PUM.forms.form.beforeAjax(o),s.ajax({type:"POST",dataType:"json",url:pum_vars.ajaxurl,data:{action:"pum_form",values:t}}).always(function(){window.PUM.forms.form.afterAjax(o)}).done(function(e){window.PUM.forms.form.responseHandler(o,e)}).error(function(e,o,t){console.log("Error: type of "+o+" with message of "+t)})}},messages:{add:function(e,o,t){var n=e.find(".pum-form__messages"),i=0;if(t=t||"success",o=o||[],!n.length)switch(n=s('<div class="pum-form__messages">').hide(),pum_vars.message_position){case"bottom":e.append(n.addClass("pum-form__messages--bottom"));break;case"top":e.prepend(n.addClass("pum-form__messages--top"))}if(0<=["bottom","top"].indexOf(pum_vars.message_position))for(;o.length>i;i++)this.add_message(n,o[i].message,t);else for(;o.length>i;i++)void 0!==o[i].field?this.add_field_error(e,o[i]):this.add_message(n,o[i].message,t);n.is(":hidden")&&s(".pum-form__message",n).length&&n.slideDown()},add_message:function(e,o,t){var n=s('<p class="pum-form__message">').html(o);t=t||"success",n.addClass("pum-form__message--"+t),e.append(n),e.is(":visible")&&n.hide().slideDown()},add_field_error:function(e,o){var t=s('[name="'+o.field+'"]',e).parents(".pum-form__field").addClass("pum-form__field--error");this.add_message(t,o.message,"error")},clear_all:function(e,o){var t=e.find(".pum-form__messages"),n=t.find(".pum-form__message"),i=e.find(".pum-form__field.pum-form__field--error");o=o||!1,t.length&&n.slideUp("fast",function(){s(this).remove(),o&&t.hide()}),i.length&&i.removeClass("pum-form__field--error").find("p.pum-form__message").remove()},scroll_to_first:function(e){window.PUM.utilities.scrollTo(s(".pum-form__field.pum-form__field--error",e).eq(0))}},success:function(e,o){if(o=s.extend({},r,o)){var t=PUM.getPopup(e),n={},i=function(){o.openpopup&&PUM.getPopup(o.openpopup_id).length?PUM.open(o.openpopup_id):o.redirect_enabled&&(""!==o.redirect?window.location=o.redirect:window.location.reload(!0))};t.length&&(t.trigger("pumFormSuccess"),o.cookie&&(n=s.extend({name:"pum-"+PUM.getSetting(t,"id"),expires:"+1 year"},"object"==typeof o.cookie?o.cookie:{}),PUM.setCookie(t,n))),t.length&&o.closepopup?setTimeout(function(){t.popmake("close",i)},1e3*parseInt(o.closedelay)):i()}}})}(jQuery),function(e){"use strict";e.pum=e.pum||{},e.pum.hooks=e.pum.hooks||new function(){var t=Array.prototype.slice,i={removeFilter:function(e,o){"string"==typeof e&&n("filters",e,o);return i},applyFilters:function(){var e=t.call(arguments),o=e.shift();return"string"!=typeof o?i:r("filters",o,e)},addFilter:function(e,o,t,n){"string"==typeof e&&"function"==typeof o&&(t=parseInt(t||10,10),s("filters",e,o,t,n));return i},removeAction:function(e,o){"string"==typeof e&&n("actions",e,o);return i},doAction:function(){var e=t.call(arguments),o=e.shift();"string"==typeof o&&r("actions",o,e);return i},addAction:function(e,o,t,n){"string"==typeof e&&"function"==typeof o&&(t=parseInt(t||10,10),s("actions",e,o,t,n));return i}},a={actions:{},filters:{}};function n(e,o,t,n){var i,s,r;if(a[e][o])if(t)if(i=a[e][o],n)for(r=i.length;r--;)(s=i[r]).callback===t&&s.context===n&&i.splice(r,1);else for(r=i.length;r--;)i[r].callback===t&&i.splice(r,1);else a[e][o]=[]}function s(e,o,t,n,i){var s={callback:t,priority:n,context:i},r=a[e][o];r=r?(r.push(s),function(e){for(var o,t,n,i=1,s=e.length;i<s;i++){for(o=e[i],t=i;(n=e[t-1])&&n.priority>o.priority;)e[t]=e[t-1],--t;e[t]=o}return e}(r)):[s],a[e][o]=r}function r(e,o,t){var n,i,s=a[e][o];if(!s)return"filters"===e&&t[0];if(i=s.length,"filters"===e)for(n=0;n<i;n++)t[0]=s[n].callback.apply(s[n].context,t);else for(n=0;n<i;n++)s[n].callback.apply(s[n].context,t);return"filters"!==e||t[0]}return i},e.PUM=e.PUM||{},e.PUM.hooks=e.pum.hooks}(window),function(t){"use strict";function n(e){return e}window.PUM=window.PUM||{},window.PUM.integrations=window.PUM.integrations||{},t.extend(window.PUM.integrations,{init:function(){if(void 0!==pum_vars.form_submission){var e=pum_vars.form_submission;e.ajax=!1,e.popup=0<e.popupId?PUM.getPopup(e.popupId):null,PUM.integrations.formSubmission(null,e)}},formSubmission:function(e,o){(o=t.extend({popup:PUM.getPopup(e),formProvider:null,formId:null,formInstanceId:null,formKey:null,ajax:!0,tracked:!1},o)).formKey=o.formKey||[o.formProvider,o.formId,o.formInstanceId].filter(n).join("_"),o.popup&&o.popup.length&&(o.popupId=PUM.getSetting(o.popup,"id")),window.PUM.hooks.doAction("pum.integration.form.success",e,o)},checkFormKeyMatches:function(e,o,t){o=""===o&&o;var n=-1!==["any"===e,"pumsubform"===e&&"pumsubform"===t.formProvider,e===t.formProvider+"_any",!o&&new RegExp("^"+e+"(_[d]*)?").test(t.formKey),!!o&&e+"_"+o===t.formKey].indexOf(!0);return window.PUM.hooks.applyFilters("pum.integration.checkFormKeyMatches",n,{formIdentifier:e,formInstanceId:o,submittedFormArgs:t})}})}(window.jQuery),function(p){"use strict";pum_vars&&void 0!==pum_vars.core_sub_forms_enabled&&!pum_vars.core_sub_forms_enabled||(window.PUM=window.PUM||{},window.PUM.newsletter=window.PUM.newsletter||{},p.extend(window.PUM.newsletter,{form:p.extend({},window.PUM.forms.form,{submit:function(e){var o=p(this),t=o.pumSerializeObject();e.preventDefault(),e.stopPropagation(),window.PUM.newsletter.form.beforeAjax(o),p.ajax({type:"POST",dataType:"json",url:pum_vars.ajaxurl,data:{action:"pum_sub_form",values:t}}).always(function(){window.PUM.newsletter.form.afterAjax(o)}).done(function(e){window.PUM.newsletter.form.responseHandler(o,e)}).error(function(e,o,t){console.log("Error: type of "+o+" with message of "+t)})}})}),p(document).on("submit","form.pum-sub-form",window.PUM.newsletter.form.submit).on("success","form.pum-sub-form",function(e,o){var t=p(e.target),n=t.data("settings")||{},i=t.pumSerializeObject(),s=PUM.getPopup(t),r=PUM.getSetting(s,"id"),a=p("form.pum-sub-form",s).index(t)+1;window.PUM.integrations.formSubmission(t,{formProvider:"pumsubform",formId:r,formInstanceId:a,extras:{data:o,values:i,settings:n}}),t.trigger("pumNewsletterSuccess",[o]).addClass("pum-newsletter-success"),t[0].reset(),window.pum.hooks.doAction("pum-sub-form.success",o,t),"string"==typeof n.redirect&&""!==n.redirect&&(n.redirect=atob(n.redirect)),window.PUM.forms.success(t,n)}).on("error","form.pum-sub-form",function(e,o){var t=p(e.target);t.trigger("pumNewsletterError",[o]),window.pum.hooks.doAction("pum-sub-form.errors",o,t)}))}(jQuery),function(s,r){"use strict";s.extend(s.fn.popmake.methods,{addTrigger:function(e){return s.fn.popmake.triggers[e]?s.fn.popmake.triggers[e].apply(this,Array.prototype.slice.call(arguments,1)):(window.console&&console.warn("Trigger type "+e+" does not exist."),this)}}),s.fn.popmake.triggers={auto_open:function(e){var o=PUM.getPopup(this);setTimeout(function(){o.popmake("state","isOpen")||!o.popmake("checkCookies",e)&&o.popmake("checkConditions")&&(s.fn.popmake.last_open_trigger="Auto Open - Delay: "+e.delay,o.popmake("open"))},e.delay)},click_open:function(n){var e,i=PUM.getPopup(this),o=i.popmake("getSettings"),t=[".popmake-"+o.id,".popmake-"+decodeURIComponent(o.slug),'a[href$="#popmake-'+o.id+'"]'];n.extra_selectors&&""!==n.extra_selectors&&t.push(n.extra_selectors),e=(t=pum.hooks.applyFilters("pum.trigger.click_open.selectors",t,n,i)).join(", "),s(e).addClass("pum-trigger").css({cursor:"pointer"}),s(r).on("click.pumTrigger",e,function(e){var o=s(this),t=n.do_default||!1;0<i.has(o).length||i.popmake("state","isOpen")||!i.popmake("checkCookies",n)&&i.popmake("checkConditions")&&(o.data("do-default")?t=o.data("do-default"):(o.hasClass("do-default")||o.hasClass("popmake-do-default")||o.hasClass("pum-do-default"))&&(t=!0),e.ctrlKey||pum.hooks.applyFilters("pum.trigger.click_open.do_default",t,i,o)||(e.preventDefault(),e.stopPropagation()),s.fn.popmake.last_open_trigger=o,i.popmake("open"))})},form_submission:function(t){var n=PUM.getPopup(this);t=s.extend({form:"",formInstanceId:"",delay:0},t);PUM.hooks.addAction("pum.integration.form.success",function(e,o){t.form.length&&PUM.integrations.checkFormKeyMatches(t.form,t.formInstanceId,o)&&setTimeout(function(){n.popmake("state","isOpen")||!n.popmake("checkCookies",t)&&n.popmake("checkConditions")&&(s.fn.popmake.last_open_trigger="Form Submission",n.popmake("open"))},t.delay)})},admin_debug:function(){PUM.getPopup(this).popmake("open")}},s(r).on("pumInit",".pum",function(){var e,o=PUM.getPopup(this),t=o.popmake("getSettings").triggers||[],n=null;if(t.length)for(e=0;e<t.length;e+=1)n=t[e],o.popmake("addTrigger",n.type,n.settings)})}(jQuery,document),function(p){"use strict";var n="color,date,datetime,datetime-local,email,hidden,month,number,password,range,search,tel,text,time,url,week".split(","),i="select,textarea".split(","),s=/\[([^\]]*)\]/g;Array.prototype.indexOf||(Array.prototype.indexOf=function(e){if(null==this)throw new TypeError;var o=Object(this),t=o.length>>>0;if(0==t)return-1;var n=0;if(0<arguments.length&&((n=Number(arguments[1]))!=n?n=0:0!==n&&n!==1/0&&n!==-1/0&&(n=(0<n||-1)*Math.floor(Math.abs(n)))),t<=n)return-1;for(var i=0<=n?n:Math.max(t-Math.abs(n),0);i<t;i++)if(i in o&&o[i]===e)return i;return-1}),p.fn.popmake.utilities={scrollTo:function(e,o){var t=p(e)||p();t.length&&p("html, body").animate({scrollTop:t.offset().top-100},1e3,"swing",function(){var e=t.find(':input:not([type="button"]):not([type="hidden"]):not(button)').eq(0);e.hasClass("wp-editor-area")?tinyMCE.execCommand("mceFocus",!1,e.attr("id")):e.focus(),"function"==typeof o&&o()})},inArray:function(e,o){return!!~o.indexOf(e)},convert_hex:function(e,o){return e=e.replace("#",""),"rgba("+parseInt(e.substring(0,2),16)+","+parseInt(e.substring(2,4),16)+","+parseInt(e.substring(4,6),16)+","+o/100+")"},debounce:function(t,n){var i;return function(){var e=this,o=arguments;window.clearTimeout(i),i=window.setTimeout(function(){t.apply(e,o)},n)}},throttle:function(e,o){function t(){n=!1}var n=!1;return function(){n||(e.apply(this,arguments),window.setTimeout(t,o),n=!0)}},getXPath:function(e){var t,n,i,s,r,a=[];return p.each(p(e).parents(),function(e,o){if(t=p(o),n=t.attr("id")||"",i=t.attr("class")||"",s=t.get(0).tagName.toLowerCase(),r=t.parent().children(s).index(t),"body"===s)return!1;0<i.length&&(i=(i=i.split(" "))[0]),a.push(s+(0<n.length?"#"+n:0<i.length?"."+i.split(" ").join("."):":eq("+r+")"))}),a.reverse().join(" > ")},strtotime:function(e,o){var t,n,i,s,l,c,m,r,a,p;if(!e)return!1;if((n=(e=e.replace(/^\s+|\s+$/g,"").replace(/\s{2,}/g," ").replace(/[\t\r\n]/g,"").toLowerCase()).match(/^(\d{1,4})([\-\.\/\:])(\d{1,2})([\-\.\/\:])(\d{1,4})(?:\s(\d{1,2}):(\d{2})?:?(\d{2})?)?(?:\s([A-Z]+)?)?$/))&&n[2]===n[4])if(1901<n[1])switch(n[2]){case"-":return 12<n[3]||31<n[5]?!1:new Date(n[1],parseInt(n[3],10)-1,n[5],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3;case".":return!1;case"/":return 12<n[3]||31<n[5]?!1:new Date(n[1],parseInt(n[3],10)-1,n[5],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3}else if(1901<n[5])switch(n[2]){case"-":case".":return 12<n[3]||31<n[1]?!1:new Date(n[5],parseInt(n[3],10)-1,n[1],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3;case"/":return 12<n[1]||31<n[3]?!1:new Date(n[5],parseInt(n[1],10)-1,n[3],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3}else switch(n[2]){case"-":return 12<n[3]||31<n[5]||n[1]<70&&38<n[1]?!1:(s=0<=n[1]&&n[1]<=38?+n[1]+2e3:n[1],new Date(s,parseInt(n[3],10)-1,n[5],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3);case".":return 70<=n[5]?!(12<n[3]||31<n[1])&&new Date(n[5],parseInt(n[3],10)-1,n[1],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3:n[5]<60&&!n[6]&&(!(23<n[1]||59<n[3])&&(i=new Date,new Date(i.getFullYear(),i.getMonth(),i.getDate(),n[1]||0,n[3]||0,n[5]||0,n[9]||0)/1e3));case"/":return 12<n[1]||31<n[3]||n[5]<70&&38<n[5]?!1:(s=0<=n[5]&&n[5]<=38?+n[5]+2e3:n[5],new Date(s,parseInt(n[1],10)-1,n[3],n[6]||0,n[7]||0,n[8]||0,n[9]||0)/1e3);case":":return 23<n[1]||59<n[3]||59<n[5]?!1:(i=new Date,new Date(i.getFullYear(),i.getMonth(),i.getDate(),n[1]||0,n[3]||0,n[5]||0)/1e3)}if("now"===e)return null===o||isNaN(o)?(new Date).getTime()/1e3||0:o||0;if(t=Date.parse(e),!isNaN(t))return t/1e3||0;function u(e){var o,t,n,i,s=e.split(" "),r=s[0],a=s[1].substring(0,3),p=/\d+/.test(r),u=("last"===r?-1:1)*("ago"===s[2]?-1:1);if(p&&(u*=parseInt(r,10)),m.hasOwnProperty(a)&&!s[1].match(/^mon(day|\.)?$/i))return l["set"+m[a]](l["get"+m[a]]()+u);if("wee"===a)return l.setDate(l.getDate()+7*u);if("next"===r||"last"===r)o=r,t=u,void 0!==(i=c[a])&&(0===(n=i-l.getDay())?n=7*t:0<n&&"last"===o?n-=7:n<0&&"next"===o&&(n+=7),l.setDate(l.getDate()+n));else if(!p)return;return 1}if(l=o?new Date(1e3*o):new Date,c={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6},m={yea:"FullYear",mon:"Month",day:"Date",hou:"Hours",min:"Minutes",sec:"Seconds"},a="(years?|months?|weeks?|days?|hours?|minutes?|min|seconds?|sec|sunday|sun\\.?|monday|mon\\.?|tuesday|tue\\.?|wednesday|wed\\.?|thursday|thu\\.?|friday|fri\\.?|saturday|sat\\.?)",!(n=e.match(new RegExp("([+-]?\\d+\\s(years?|months?|weeks?|days?|hours?|minutes?|min|seconds?|sec|sunday|sun\\.?|monday|mon\\.?|tuesday|tue\\.?|wednesday|wed\\.?|thursday|thu\\.?|friday|fri\\.?|saturday|sat\\.?)|(last|next)\\s(years?|months?|weeks?|days?|hours?|minutes?|min|seconds?|sec|sunday|sun\\.?|monday|mon\\.?|tuesday|tue\\.?|wednesday|wed\\.?|thursday|thu\\.?|friday|fri\\.?|saturday|sat\\.?))(\\sago)?","gi"))))return!1;for(p=0,r=n.length;p<r;p+=1)if(!u(n[p]))return!1;return l.getTime()/1e3},serializeObject:function(e){p.extend({},e);var o={},t=p.extend(!0,{include:[],exclude:[],includeByClass:""},e);return this.find(":input").each(function(){var e;!this.name||this.disabled||window.PUM.utilities.inArray(this.name,t.exclude)||t.include.length&&!window.PUM.utilities.inArray(this.name,t.include)||-1===this.className.indexOf(t.includeByClass)||(e=this.name.replace(s,"[$1").split("["))[0]&&(this.checked||window.PUM.utilities.inArray(this.type,n)||window.PUM.utilities.inArray(this.nodeName.toLowerCase(),i))&&("checkbox"===this.type&&e.push(""),function e(o,t,n){var i=t[0];1<t.length?(o[i]||(o[i]=t[1]?{}:[]),e(o[i],t.slice(1),n)):o[i=i||o.length]=n}(o,e,p(this).val()))}),o}},p.fn.popmake.utilies=p.fn.popmake.utilities,window.PUM=window.PUM||{},window.PUM.utilities=window.PUM.utilities||{},window.PUM.utilities=p.extend(window.PUM.utilities,p.fn.popmake.utilities)}(jQuery,document),function(e){!function(e,m){var d={validate:/^[a-z_][a-z0-9_]*(?:\[(?:\d*|[a-z0-9_]+)\])*$/i,key:/[a-z0-9_]+|(?=\[\])/gi,push:/^$/,fixed:/^\d+$/,named:/^[a-z0-9_]+$/i};function t(n,o){var t={},i={};function s(e,o,t){e[o]=t;return e}function r(e,o){var t=e.match(d.key),n;try{o=JSON.parse(o)}catch(e){}while((n=t.pop())!==undefined){if(d.push.test(n)){var i=a(e.replace(/\[\]$/,""));o=s([],i,o)}else if(d.fixed.test(n)){o=s([],n,o)}else if(d.named.test(n)){o=s({},n,o)}}return o}function a(e){if(i[e]===undefined){i[e]=0}return i[e]++}function p(e){switch(m('[name="'+e.name+'"]',o).attr("type")){case"checkbox":return e.value==="1"?true:e.value;default:return e.value}}function e(e){if(!d.validate.test(e.name))return this;var o=r(e.name,p(e));t=n.extend(true,t,o);return this}function u(e){if(!n.isArray(e)){throw new Error("formSerializer.addPairs expects an Array")}for(var o=0,t=e.length;o<t;o++){this.addPair(e[o])}return this}function l(){return t}function c(){return JSON.stringify(l())}this.addPair=e;this.addPairs=u;this.serialize=l;this.serializeJSON=c}if(t.patterns=d,t.serializeObject=function e(){var o;if(this.is("form")){o=this.serializeArray()}else{o=this.find(":input").serializeArray()}return new t(m,this).addPairs(o).serialize()},t.serializeJSON=function e(){var o;if(this.is("form")){o=this.serializeArray()}else{o=this.find(":input").serializeArray()}return new t(m,this).addPairs(o).serializeJSON()},typeof m.fn!=="undefined"){m.fn.pumSerializeObject=t.serializeObject;m.fn.pumSerializeJSON=t.serializeJSON}e.FormSerializer=t}(e,e.jQuery||e.Zepto||e.ender||e.$)}(this),function(e){"use strict";e.fn.popmake.version=1.8,e.fn.popmake.last_open_popup=null,e(void 0).ready(function(){e(".pum").popmake(),e(void 0).trigger("pumInitialized"),"object"==typeof pum_vars.form_success&&(pum_vars.form_success=e.extend({popup_id:null,settings:{}}),PUM.forms.success(pum_vars.form_success.popup_id,pum_vars.form_success.settings)),PUM.integrations.init()}),e(".pum").on("pumInit",function(){var e=PUM.getPopup(this),o=PUM.getSetting(e,"id"),t=e.find("form");t.length&&t.append('<input type="hidden" name="pum_form_popup_id" value="'+o+'" />')})}(jQuery);
|
assets/sass/admin-batch.scss
DELETED
@@ -1,261 +0,0 @@
|
|
1 |
-
/*!******************************************************************************
|
2 |
-
* Copyright (c) 2019, Code Atlantic LLC
|
3 |
-
******************************************************************************/
|
4 |
-
|
5 |
-
$royalblue: #4169e1;
|
6 |
-
|
7 |
-
@mixin progress-bar-colors($color) {
|
8 |
-
.pum-batch-progress {
|
9 |
-
progress[value] {
|
10 |
-
background-color: $color;
|
11 |
-
/* Of all IE, only IE10 supports progress element that too partially. It only allows to change the background-color of the progress value using the 'color' attribute. */
|
12 |
-
color: $color;
|
13 |
-
|
14 |
-
&::-moz-progress-value,
|
15 |
-
&::-ms-progress-value,
|
16 |
-
&::progress-value {
|
17 |
-
background-color: $color;
|
18 |
-
}
|
19 |
-
|
20 |
-
// Firefox - ie styles must be entirely separate or it busts Webkit styles.
|
21 |
-
&::-webkit-progress-value {
|
22 |
-
background-color: $color;
|
23 |
-
}
|
24 |
-
}
|
25 |
-
|
26 |
-
progress:not([value]) {
|
27 |
-
background-color: $color;
|
28 |
-
}
|
29 |
-
}
|
30 |
-
}
|
31 |
-
|
32 |
-
.pum-batch-form {
|
33 |
-
|
34 |
-
.spinner {
|
35 |
-
float: none;
|
36 |
-
margin: 4px 10px 8px;
|
37 |
-
position: relative;
|
38 |
-
}
|
39 |
-
|
40 |
-
.pum-upgrade-messages {
|
41 |
-
margin-bottom: 10px;
|
42 |
-
max-height: 200px;
|
43 |
-
overflow: auto;
|
44 |
-
padding-right: 10px;
|
45 |
-
}
|
46 |
-
}
|
47 |
-
|
48 |
-
.pum-batch-progress {
|
49 |
-
//Animation
|
50 |
-
$progress-determinate-time: .15s;
|
51 |
-
$progress-indeterminate-time: .15s;
|
52 |
-
|
53 |
-
// PROGRESS STYLE
|
54 |
-
progress {
|
55 |
-
background-clip: padding-box;
|
56 |
-
background-color: #ddd;
|
57 |
-
border-radius: 0;
|
58 |
-
display: block;
|
59 |
-
height: 20px;
|
60 |
-
margin: 0 auto;
|
61 |
-
overflow: hidden;
|
62 |
-
position: relative;
|
63 |
-
width: 100%;
|
64 |
-
|
65 |
-
&::-moz-progress-bar,
|
66 |
-
&::-ms-progress-bar,
|
67 |
-
&::progress-bar {
|
68 |
-
// Firefox - ie styles must be entirely separate or it busts Webkit styles.
|
69 |
-
background-color: #ddd;
|
70 |
-
}
|
71 |
-
|
72 |
-
&::-webkit-progress-bar {
|
73 |
-
background-color: #ddd;
|
74 |
-
// box-shadow: 0 2px 3px rgba(0, 0, 0, .5) inset;
|
75 |
-
}
|
76 |
-
|
77 |
-
&[value] {
|
78 |
-
/* Get rid of the default appearance */
|
79 |
-
-webkit-appearance: none;
|
80 |
-
|
81 |
-
/* Although firefox doesn't provide any additional pseudo class to style the progress element container, any style applied here works on the container. */
|
82 |
-
background-color: $royalblue;
|
83 |
-
|
84 |
-
/* This unfortunately leaves a trail of border behind in Firefox and Opera. We can remove that by setting the border to none. */
|
85 |
-
border: none;
|
86 |
-
|
87 |
-
/* Of all IE, only IE10 supports progress element that too partially. It only allows to change the background-color of the progress value using the 'color' attribute. */
|
88 |
-
color: $royalblue;
|
89 |
-
|
90 |
-
margin: 0 0 10px;
|
91 |
-
|
92 |
-
&::-moz-progress-value,
|
93 |
-
&::-ms-progress-value,
|
94 |
-
&::progress-value {
|
95 |
-
background-color: $royalblue;
|
96 |
-
border-radius: 3px;
|
97 |
-
transition: width $progress-determinate-time cubic-bezier(0, 0, 1, -0.12);
|
98 |
-
}
|
99 |
-
|
100 |
-
// Firefox - ie styles must be entirely separate or it busts Webkit styles.
|
101 |
-
&::-webkit-progress-value {
|
102 |
-
background-color: $royalblue;
|
103 |
-
border-radius: 3px;
|
104 |
-
transition: width $progress-determinate-time cubic-bezier(0, 0, 1, -0.12);
|
105 |
-
|
106 |
-
// background-size: 35px 20px, 100% 100%, 100% 100%;
|
107 |
-
|
108 |
-
/* Let's animate this */
|
109 |
-
animation: animate-stripes 5s linear infinite;
|
110 |
-
|
111 |
-
/*
|
112 |
-
&::after {
|
113 |
-
content: '';
|
114 |
-
position: absolute;
|
115 |
-
|
116 |
-
width: 5px;
|
117 |
-
height: 5px;
|
118 |
-
top: 7px;
|
119 |
-
right: 7px;
|
120 |
-
|
121 |
-
background-color: white;
|
122 |
-
border-radius: 100%;
|
123 |
-
}
|
124 |
-
*/
|
125 |
-
|
126 |
-
}
|
127 |
-
}
|
128 |
-
|
129 |
-
&:not([value]) {
|
130 |
-
background-color: $royalblue;
|
131 |
-
position: relative;
|
132 |
-
|
133 |
-
&:before {
|
134 |
-
animation: indeterminate $progress-indeterminate-time cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
|
135 |
-
background-color: inherit;
|
136 |
-
bottom: 0;
|
137 |
-
content: '';
|
138 |
-
left: 0;
|
139 |
-
position: absolute;
|
140 |
-
top: 0;
|
141 |
-
will-change: left, right;
|
142 |
-
}
|
143 |
-
|
144 |
-
&:after {
|
145 |
-
animation: indeterminate-short $progress-indeterminate-time cubic-bezier(0.165, 0.84, 0.44, 1) infinite;
|
146 |
-
animation-delay: 1.15s;
|
147 |
-
background-color: inherit;
|
148 |
-
bottom: 0;
|
149 |
-
content: '';
|
150 |
-
left: 0;
|
151 |
-
position: absolute;
|
152 |
-
top: 0;
|
153 |
-
will-change: left, right;
|
154 |
-
}
|
155 |
-
}
|
156 |
-
}
|
157 |
-
|
158 |
-
@keyframes indeterminate {
|
159 |
-
0% {
|
160 |
-
left: -35%;
|
161 |
-
right: 100%;
|
162 |
-
}
|
163 |
-
60% {
|
164 |
-
left: 100%;
|
165 |
-
right: -90%;
|
166 |
-
}
|
167 |
-
100% {
|
168 |
-
left: 100%;
|
169 |
-
right: -90%;
|
170 |
-
}
|
171 |
-
}
|
172 |
-
|
173 |
-
@keyframes indeterminate-short {
|
174 |
-
0% {
|
175 |
-
left: -200%;
|
176 |
-
right: 100%;
|
177 |
-
}
|
178 |
-
60% {
|
179 |
-
left: 107%;
|
180 |
-
right: -8%;
|
181 |
-
}
|
182 |
-
100% {
|
183 |
-
left: 107%;
|
184 |
-
right: -8%;
|
185 |
-
}
|
186 |
-
}
|
187 |
-
|
188 |
-
@keyframes animate-stripes {
|
189 |
-
100% {
|
190 |
-
background-position: -100px 0;
|
191 |
-
}
|
192 |
-
}
|
193 |
-
|
194 |
-
/* Fallback technique styles */
|
195 |
-
.progress-bar {
|
196 |
-
background-color: whiteSmoke;
|
197 |
-
border-radius: 3px;
|
198 |
-
box-shadow: 0 2px 3px rgba(0, 0, 0, .5) inset;
|
199 |
-
|
200 |
-
/* Dimensions should be similar to the parent progress element. */
|
201 |
-
height: 20px;
|
202 |
-
width: 100%;
|
203 |
-
}
|
204 |
-
|
205 |
-
.progress-bar span {
|
206 |
-
background-color: $royalblue;
|
207 |
-
border-radius: 3px;
|
208 |
-
display: block;
|
209 |
-
text-indent: -9999px;
|
210 |
-
}
|
211 |
-
|
212 |
-
}
|
213 |
-
|
214 |
-
.admin-color-fresh {
|
215 |
-
@include progress-bar-colors(#0073aa);
|
216 |
-
}
|
217 |
-
|
218 |
-
.admin-color-light {
|
219 |
-
@include progress-bar-colors(#888);
|
220 |
-
}
|
221 |
-
|
222 |
-
.admin-color-blue {
|
223 |
-
@include progress-bar-colors(#096484);
|
224 |
-
}
|
225 |
-
|
226 |
-
.admin-color-coffee {
|
227 |
-
@include progress-bar-colors(#c7a589);
|
228 |
-
}
|
229 |
-
|
230 |
-
.admin-color-ectoplasm {
|
231 |
-
@include progress-bar-colors(#a3b745);
|
232 |
-
}
|
233 |
-
|
234 |
-
.admin-color-midnight {
|
235 |
-
@include progress-bar-colors(#e14d43);
|
236 |
-
}
|
237 |
-
|
238 |
-
.admin-color-sunrise {
|
239 |
-
@include progress-bar-colors(#dd823b);
|
240 |
-
}
|
241 |
-
|
242 |
-
.pum-batch-progress {
|
243 |
-
display: none;
|
244 |
-
|
245 |
-
progress, .pum-upgrade-message-textarea {
|
246 |
-
display: none;
|
247 |
-
}
|
248 |
-
|
249 |
-
&.pum-batch-progress--active {
|
250 |
-
display: block;
|
251 |
-
|
252 |
-
progress.active {
|
253 |
-
display: block;
|
254 |
-
}
|
255 |
-
|
256 |
-
.pum-upgrade-message-textarea--active {
|
257 |
-
display: block;
|
258 |
-
}
|
259 |
-
}
|
260 |
-
|
261 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/sass/admin-deprecated.scss
DELETED
File without changes
|
assets/sass/admin-editor-styles.scss
DELETED
@@ -1,7 +0,0 @@
|
|
1 |
-
/*!******************************************************************************
|
2 |
-
* Copyright (c) 2019, Code Atlantic LLC
|
3 |
-
******************************************************************************/
|
4 |
-
|
5 |
-
.wpview-wrap[data-wpview-text^="%5Bpopup_trigger"] {
|
6 |
-
display: inline-block;
|
7 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/sass/admin-extensions-page.scss
DELETED
@@ -1,136 +0,0 @@
|
|
1 |
-
/*!******************************************************************************
|
2 |
-
* Copyright (c) 2019, Code Atlantic LLC
|
3 |
-
******************************************************************************/
|
4 |
-
|
5 |
-
.popup_page_pum-extensions {
|
6 |
-
#poststuff {
|
7 |
-
.section-heading {
|
8 |
-
font-size: 18px;
|
9 |
-
padding: 0;
|
10 |
-
}
|
11 |
-
}
|
12 |
-
}
|
13 |
-
|
14 |
-
.extensions-available {
|
15 |
-
display: flex;
|
16 |
-
flex-wrap: wrap;
|
17 |
-
|
18 |
-
img {
|
19 |
-
width: 100%;
|
20 |
-
display: block;
|
21 |
-
height: auto;
|
22 |
-
max-width: 100%;
|
23 |
-
border-top: 1px solid transparent;
|
24 |
-
border-bottom: 1px solid transparent;
|
25 |
-
}
|
26 |
-
|
27 |
-
li {
|
28 |
-
box-sizing: border-box;
|
29 |
-
border: 1px solid #ccc;
|
30 |
-
background: #fff;
|
31 |
-
vertical-align: top;
|
32 |
-
width: 23.5%;
|
33 |
-
margin: 0 2% 20px 0;
|
34 |
-
box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.25);
|
35 |
-
|
36 |
-
&:nth-child(4n+0) {
|
37 |
-
margin-right: 0;
|
38 |
-
}
|
39 |
-
|
40 |
-
@media only screen and (max-width: 360px) {
|
41 |
-
display: block;
|
42 |
-
width: 100%;
|
43 |
-
margin-right: 0;
|
44 |
-
}
|
45 |
-
@media only screen and (min-width: 361px) and (max-width: 768px) {
|
46 |
-
width: 49%;
|
47 |
-
|
48 |
-
&:nth-child(4n+0) {
|
49 |
-
margin-right: 2%;
|
50 |
-
}
|
51 |
-
|
52 |
-
&:nth-child(2n+0) {
|
53 |
-
margin-right: 0;
|
54 |
-
}
|
55 |
-
}
|
56 |
-
@media only screen and (min-width: 769px) and (max-width: 980px) {
|
57 |
-
width: 32%;
|
58 |
-
|
59 |
-
&:nth-child(4n+0) {
|
60 |
-
margin-right: 2%;
|
61 |
-
}
|
62 |
-
|
63 |
-
&:nth-child(3n+0) {
|
64 |
-
margin-right: 0;
|
65 |
-
}
|
66 |
-
}
|
67 |
-
|
68 |
-
|
69 |
-
> .action-links {
|
70 |
-
text-align: center;
|
71 |
-
display: block;
|
72 |
-
border-top: 1px solid #ccc;
|
73 |
-
|
74 |
-
.button {
|
75 |
-
display: inline-block;
|
76 |
-
margin-bottom: 10px;
|
77 |
-
margin-top: 10px;
|
78 |
-
padding: 7px 30px;
|
79 |
-
font-weight: bold;
|
80 |
-
height: auto;
|
81 |
-
position: relative;
|
82 |
-
transition: transform .5s;
|
83 |
-
|
84 |
-
&.install {
|
85 |
-
background: #00a651;
|
86 |
-
}
|
87 |
-
}
|
88 |
-
}
|
89 |
-
|
90 |
-
}
|
91 |
-
|
92 |
-
h3 {
|
93 |
-
text-align: center;
|
94 |
-
font-size: 16px !important;
|
95 |
-
margin: 0;
|
96 |
-
padding: 1em 0;
|
97 |
-
|
98 |
-
a {
|
99 |
-
color: inherit;
|
100 |
-
}
|
101 |
-
}
|
102 |
-
|
103 |
-
p {
|
104 |
-
margin: 10px;
|
105 |
-
color: #2d2d2d;
|
106 |
-
font-size: 14px;
|
107 |
-
text-align: center;
|
108 |
-
font-style: italic;
|
109 |
-
min-height: 7.5em;
|
110 |
-
}
|
111 |
-
|
112 |
-
a {
|
113 |
-
display: block;
|
114 |
-
text-align: center;
|
115 |
-
text-decoration: none;
|
116 |
-
}
|
117 |
-
|
118 |
-
}
|
119 |
-
|
120 |
-
.extensions-available .core-extensions-bundle {
|
121 |
-
|
122 |
-
h3 {
|
123 |
-
color: #fff;
|
124 |
-
background: #98B727;
|
125 |
-
}
|
126 |
-
|
127 |
-
p {
|
128 |
-
background-color: #fff;
|
129 |
-
color: #2d2d2d;
|
130 |
-
}
|
131 |
-
|
132 |
-
.action-links {
|
133 |
-
background: #98B727;
|
134 |
-
border-top: 1px solid #A8C53A;
|
135 |
-
}
|
136 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/sass/admin-general.scss
DELETED
@@ -1,87 +0,0 @@
|
|
1 |
-
/*!******************************************************************************
|
2 |
-
* Copyright (c) 2019, Code Atlantic LLC
|
3 |
-
******************************************************************************/
|
4 |
-
|
5 |
-
$plugin-prefix: 'pum';
|
6 |
-
$custom-select2-selector: 'pumselect2';
|
7 |
-
$tab-color: #E4E4E4;
|
8 |
-
|
9 |
-
// Shared modules.
|
10 |
-
@import 'modules/general';
|
11 |
-
@import 'modules/fields';
|
12 |
-
@import 'modules/select2';
|
13 |
-
@import 'modules/tabs';
|
14 |
-
@import 'modules/modal';
|
15 |
-
@import 'modules/alerts';
|
16 |
-
|
17 |
-
@import 'partials/admin/mixins';
|
18 |
-
@import 'partials/admin/fields';
|
19 |
-
@import 'partials/admin/marketing';
|
20 |
-
@import 'partials/admin/deprecated';
|
21 |
-
|
22 |
-
.pum-tabbed-form {
|
23 |
-
.pum-field {
|
24 |
-
position: relative;
|
25 |
-
margin: 0 0 24px;
|
26 |
-
|
27 |
-
label,
|
28 |
-
.pum-desc {
|
29 |
-
display: block;
|
30 |
-
}
|
31 |
-
|
32 |
-
label {
|
33 |
-
margin-bottom: 4px;
|
34 |
-
}
|
35 |
-
|
36 |
-
.pum-desc {
|
37 |
-
margin-top: 4px;
|
38 |
-
margin-bottom: 0;
|
39 |
-
}
|
40 |
-
}
|
41 |
-
|
42 |
-
.pumselect2-container--default {
|
43 |
-
width: 100% !important;
|
44 |
-
}
|
45 |
-
|
46 |
-
.pum-field-select2 select {
|
47 |
-
width: 100%;
|
48 |
-
}
|
49 |
-
|
50 |
-
label {
|
51 |
-
display: block;
|
52 |
-
font-weight: bold;
|
53 |
-
font-size: 1.1em;
|
54 |
-
}
|
55 |
-
|
56 |
-
.pum-field.checkbox {
|
57 |
-
label {
|
58 |
-
|
59 |
-
&.pum-desc {
|
60 |
-
display: inline;
|
61 |
-
font-weight: inherit;
|
62 |
-
font-size: inherit;
|
63 |
-
margin: 0 0 1em;
|
64 |
-
}
|
65 |
-
}
|
66 |
-
}
|
67 |
-
|
68 |
-
.pum-required {
|
69 |
-
label::after {
|
70 |
-
color: #a00;
|
71 |
-
content: "*";
|
72 |
-
margin-left: 5px;
|
73 |
-
}
|
74 |
-
}
|
75 |
-
}
|
76 |
-
|
77 |
-
.edit-php.post-type-popup .wrap .nav-tab-wrapper .page-title-action,
|
78 |
-
.edit-php.post-type-popup_theme .wrap .nav-tab-wrapper .page-title-action,
|
79 |
-
.popup_page_pum-extensions .wrap .nav-tab-wrapper .page-title-action {
|
80 |
-
top: 7px;
|
81 |
-
margin-left: 5px;
|
82 |
-
|
83 |
-
@media only screen and (min-width: 0px) and (max-width: 783px) {
|
84 |
-
display: none!important;
|
85 |
-
}
|
86 |
-
|
87 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/sass/admin-popup-editor.scss
DELETED
@@ -1,159 +0,0 @@
|
|
1 |
-
/*!******************************************************************************
|
2 |
-
* Copyright (c) 2019, Code Atlantic LLC
|
3 |
-
******************************************************************************/
|
4 |
-
|
5 |
-
#wp-admin-bar-view {
|
6 |
-
display: none;
|
7 |
-
}
|
8 |
-
|
9 |
-
#popup-titlediv {
|
10 |
-
|
11 |
-
position: relative;
|
12 |
-
margin-top: 10px;
|
13 |
-
|
14 |
-
#popup-titlewrap {
|
15 |
-
border: 0;
|
16 |
-
padding: 0;
|
17 |
-
}
|
18 |
-
|
19 |
-
#popup-title-prompt-text {
|
20 |
-
color: #777;
|
21 |
-
position: absolute;
|
22 |
-
font-size: 1.7em;
|
23 |
-
padding: 11px 10px;
|
24 |
-
}
|
25 |
-
|
26 |
-
label {
|
27 |
-
cursor: text;
|
28 |
-
}
|
29 |
-
|
30 |
-
#popup-title {
|
31 |
-
padding: 3px 8px;
|
32 |
-
font-size: 1.7em;
|
33 |
-
line-height: 1.125;
|
34 |
-
height: 1.7em;
|
35 |
-
width: 100%;
|
36 |
-
outline: none;
|
37 |
-
margin: 0 0 3px;
|
38 |
-
background-color: #fff;
|
39 |
-
}
|
40 |
-
|
41 |
-
}
|
42 |
-
|
43 |
-
.post-type-popup {
|
44 |
-
#edit-slug-box {
|
45 |
-
margin-bottom: 5px;
|
46 |
-
}
|
47 |
-
}
|
48 |
-
|
49 |
-
#major-publishing-actions {
|
50 |
-
text-align: right;
|
51 |
-
}
|
52 |
-
|
53 |
-
#trigger-popmake-preview {
|
54 |
-
padding: 5px;
|
55 |
-
}
|
56 |
-
|
57 |
-
#pum_popup_settings {
|
58 |
-
> h2.hndle,
|
59 |
-
> .handlediv {
|
60 |
-
// display: none;
|
61 |
-
}
|
62 |
-
> .inside {
|
63 |
-
margin: 0;
|
64 |
-
padding: 0;
|
65 |
-
}
|
66 |
-
}
|
67 |
-
|
68 |
-
#popup_trigger_add_type,
|
69 |
-
#popup_cookie_add_event {
|
70 |
-
display: block;
|
71 |
-
font-size: 1.4em;
|
72 |
-
height: auto;
|
73 |
-
margin: 1.5em 0;
|
74 |
-
padding: 0.25em;
|
75 |
-
width: 100%;
|
76 |
-
}
|
77 |
-
|
78 |
-
#pum_trigger_add_type_modal,
|
79 |
-
#pum_cookie_add_event_modal {
|
80 |
-
.pum-modal-wrap {
|
81 |
-
width: 440px;
|
82 |
-
margin-left: -220px;
|
83 |
-
}
|
84 |
-
}
|
85 |
-
|
86 |
-
.pum-click-selector-presets {
|
87 |
-
position: absolute;
|
88 |
-
right: 2px;
|
89 |
-
bottom: 2px;
|
90 |
-
|
91 |
-
> span {
|
92 |
-
|
93 |
-
border: 1px solid;
|
94 |
-
border-radius: 2px;
|
95 |
-
background-color: rgba(0, 0, 0, .5);
|
96 |
-
color: #fff;
|
97 |
-
text-align: center;
|
98 |
-
cursor: pointer;
|
99 |
-
|
100 |
-
font-size: 21px;
|
101 |
-
height: 1em;
|
102 |
-
width: 1em;
|
103 |
-
|
104 |
-
&:hover {
|
105 |
-
background-color: #0085ba;
|
106 |
-
}
|
107 |
-
|
108 |
-
}
|
109 |
-
|
110 |
-
&.open > span {
|
111 |
-
background-color: #0085ba;
|
112 |
-
}
|
113 |
-
|
114 |
-
ul {
|
115 |
-
display: none;
|
116 |
-
margin: 0;
|
117 |
-
padding: 0;
|
118 |
-
position: absolute;
|
119 |
-
top: 1px;
|
120 |
-
left: 20px;
|
121 |
-
background-color: #fff;
|
122 |
-
width: auto;
|
123 |
-
z-index: 999;
|
124 |
-
box-shadow: 1px 1px 5px -1px;
|
125 |
-
border: 1px solid rgba(0, 0, 0, .25);
|
126 |
-
min-width: 125px;
|
127 |
-
|
128 |
-
li {
|
129 |
-
|
130 |
-
display: block;
|
131 |
-
padding: .5em;
|
132 |
-
border-bottom: 1px dashed rgba(0, 0, 0, .25);
|
133 |
-
|
134 |
-
text-wrap: none;
|
135 |
-
margin: 0;
|
136 |
-
|
137 |
-
span {
|
138 |
-
cursor: pointer;
|
139 |
-
display: block;
|
140 |
-
line-height: 1;
|
141 |
-
}
|
142 |
-
|
143 |
-
&:last-child {
|
144 |
-
border-bottom: 0;
|
145 |
-
}
|
146 |
-
|
147 |
-
&:hover {
|
148 |
-
color: #0085ba;
|
149 |
-
}
|
150 |
-
|
151 |
-
}
|
152 |
-
|
153 |
-
}
|
154 |
-
|
155 |
-
&.open ul {
|
156 |
-
display: block;
|
157 |
-
}
|
158 |
-
|
159 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/sass/admin-settings-page.scss
DELETED
@@ -1,96 +0,0 @@
|
|
1 |
-
/*!******************************************************************************
|
2 |
-
* Copyright (c) 2019, Code Atlantic LLC
|
3 |
-
******************************************************************************/
|
4 |
-
|
5 |
-
.wrap-licenses {
|
6 |
-
.form-table,
|
7 |
-
thead,
|
8 |
-
tbody,
|
9 |
-
tfoot,
|
10 |
-
tr,
|
11 |
-
td,
|
12 |
-
th,
|
13 |
-
caption {
|
14 |
-
display: block;
|
15 |
-
}
|
16 |
-
.form-table tr {
|
17 |
-
float: left;
|
18 |
-
margin: 0 15px 15px 0;
|
19 |
-
background: #fff;
|
20 |
-
border: 1px solid #ccc;
|
21 |
-
width: 30.5%;
|
22 |
-
max-width: 350px;
|
23 |
-
padding: 14px;
|
24 |
-
min-height: 220px;
|
25 |
-
position: relative;
|
26 |
-
box-sizing: border-box;
|
27 |
-
}
|
28 |
-
.form-table th {
|
29 |
-
background: #f9f9f9;
|
30 |
-
padding: 14px;
|
31 |
-
border-bottom: 1px solid #ccc;
|
32 |
-
margin: -14px -14px 20px;
|
33 |
-
width: 100%;
|
34 |
-
}
|
35 |
-
.form-table td {
|
36 |
-
padding: 0;
|
37 |
-
}
|
38 |
-
td input.regular-text {
|
39 |
-
margin: 0 0 8px;
|
40 |
-
width: 100%;
|
41 |
-
}
|
42 |
-
.popmake-license-data[class*="popmake-license-"] {
|
43 |
-
position: absolute;
|
44 |
-
background: #fafafa;
|
45 |
-
padding: 14px;
|
46 |
-
border-top: 1px solid #eee;
|
47 |
-
margin: 20px -14px -14px;
|
48 |
-
min-height: 67px;
|
49 |
-
width: 100%;
|
50 |
-
bottom: 14px;
|
51 |
-
box-sizing: border-box;
|
52 |
-
}
|
53 |
-
.popmake-license-data[class*="popmake-license-"] a {
|
54 |
-
color: #444;
|
55 |
-
}
|
56 |
-
.popmake-license-data[class*="popmake-license-"] a:hover {
|
57 |
-
text-decoration: none;
|
58 |
-
}
|
59 |
-
.popmake-license-data.license-expires-soon-notice {
|
60 |
-
background-color: #00a0d2;
|
61 |
-
color: #fff;
|
62 |
-
border-color: #00a0d2;
|
63 |
-
}
|
64 |
-
.popmake-license-data.popmake-license-valid {
|
65 |
-
|
66 |
-
}
|
67 |
-
.popmake-license-data.popmake-license-expired {
|
68 |
-
background-color: #e24e4e;
|
69 |
-
color: #fff;
|
70 |
-
border-color: #e24e4e;
|
71 |
-
}
|
72 |
-
.popmake-license-data.popmake-license-error,
|
73 |
-
.popmake-license-data.popmake-license-missing,
|
74 |
-
.popmake-license-data.popmake-license-invalid,
|
75 |
-
.popmake-license-data.popmake-license-site_inactive,
|
76 |
-
.popmake-license-data.popmake-license-item_name_mismatch {
|
77 |
-
background-color: #ffebcd;
|
78 |
-
border-color: #ffebcd;
|
79 |
-
}
|
80 |
-
.popmake-license-data p {
|
81 |
-
font-size: 13px;
|
82 |
-
margin-top: 0;
|
83 |
-
}
|
84 |
-
.popmake-license-data.license-expires-soon-notice a,
|
85 |
-
.popmake-license-data.popmake-license-expired a {
|
86 |
-
color: #fff;
|
87 |
-
}
|
88 |
-
.popmake-license-data.license-expires-soon-notice a:hover,
|
89 |
-
.popmake-license-data.popmake-license-expired a:hover {
|
90 |
-
text-decoration: none;
|
91 |
-
}
|
92 |
-
p.submit {
|
93 |
-
clear: both;
|
94 |
-
}
|
95 |
-
|
96 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/sass/admin-shortcode-ui.scss
DELETED
@@ -1,8 +0,0 @@
|
|
1 |
-
/*!******************************************************************************
|
2 |
-
* Copyright (c) 2019, Code Atlantic LLC
|
3 |
-
******************************************************************************/
|
4 |
-
|
5 |
-
i.mce-i-pum_shortcodes {
|
6 |
-
background: url('../images/admin/popup-maker-icon.png') no-repeat center center transparent;
|
7 |
-
background-size: contain;
|
8 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/sass/admin-support-page.scss
DELETED
@@ -1,33 +0,0 @@
|
|
1 |
-
/*!******************************************************************************
|
2 |
-
* Copyright (c) 2019, Code Atlantic LLC
|
3 |
-
******************************************************************************/
|
4 |
-
|
5 |
-
$wpblue: #20252b;
|
6 |
-
|
7 |
-
.popmake-support-links {
|
8 |
-
list-style: none;
|
9 |
-
|
10 |
-
li {
|
11 |
-
margin-bottom: 10px;
|
12 |
-
}
|
13 |
-
|
14 |
-
a {
|
15 |
-
color: $wpblue;
|
16 |
-
font-size: 1.25em;
|
17 |
-
text-decoration: none;
|
18 |
-
text-transform: uppercase;
|
19 |
-
|
20 |
-
span {
|
21 |
-
margin-left: 10px;
|
22 |
-
}
|
23 |
-
|
24 |
-
img {
|
25 |
-
max-height: 24px;
|
26 |
-
max-width: 24px;
|
27 |
-
min-height: 24px;
|
28 |
-
min-width: 24px;
|
29 |
-
position: relative;
|
30 |
-
top: 6px;
|
31 |
-
}
|
32 |
-
}
|
33 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/sass/admin-theme-editor.scss
DELETED
@@ -1,148 +0,0 @@
|
|
1 |
-
/*!******************************************************************************
|
2 |
-
* Copyright (c) 2019, Code Atlantic LLC
|
3 |
-
******************************************************************************/
|
4 |
-
|
5 |
-
// Reset
|
6 |
-
.pum-popup-overlay,
|
7 |
-
.pum-popup-overlay .pum-popup-container,
|
8 |
-
.pum-overlay .pum-popup-title,
|
9 |
-
.pum-overlay .pum-popup-content,
|
10 |
-
.pum-popup-overlay .pum-popup-close,
|
11 |
-
.pum-popup-overlay .pum-popup-closeclose-popup:hover,
|
12 |
-
.pum-popup-overlay .pum-popup-close:focus,
|
13 |
-
.pum-popup-overlay .pum-popup-close:active {
|
14 |
-
background: none;
|
15 |
-
border: none;
|
16 |
-
bottom: auto;
|
17 |
-
clear: none;
|
18 |
-
cursor: default;
|
19 |
-
/* didn't really know what the default for display should be*/
|
20 |
-
/*display:inline;*/
|
21 |
-
float: none;
|
22 |
-
font-family: Arial, Helvetica, sans-serif;
|
23 |
-
font-size: medium;
|
24 |
-
font-style: normal;
|
25 |
-
font-weight: normal;
|
26 |
-
height: auto;
|
27 |
-
left: auto;
|
28 |
-
letter-spacing: normal;
|
29 |
-
line-height: normal;
|
30 |
-
max-height: none;
|
31 |
-
max-width: none;
|
32 |
-
min-height: 0;
|
33 |
-
min-width: 0;
|
34 |
-
overflow: visible;
|
35 |
-
position: static;
|
36 |
-
right: auto;
|
37 |
-
text-align: left;
|
38 |
-
text-decoration: none;
|
39 |
-
text-indent: 0;
|
40 |
-
text-transform: none;
|
41 |
-
top: auto;
|
42 |
-
visibility: visible;
|
43 |
-
white-space: normal;
|
44 |
-
width: auto;
|
45 |
-
z-index: auto;
|
46 |
-
}
|
47 |
-
|
48 |
-
.pum-popup-container,
|
49 |
-
.pum-popup-container:before,
|
50 |
-
.pum-popup-container:after,
|
51 |
-
.pum-popup-container *,
|
52 |
-
.pum-popup-container *:before,
|
53 |
-
.pum-popup-container *:after {
|
54 |
-
box-sizing: border-box;
|
55 |
-
}
|
56 |
-
|
57 |
-
/**
|
58 |
-
*
|
59 |
-
*/
|
60 |
-
.pum-popup-content p {
|
61 |
-
margin-top: 0;
|
62 |
-
}
|
63 |
-
|
64 |
-
|
65 |
-
#pum_theme_settings {
|
66 |
-
.inside {
|
67 |
-
padding: 0;
|
68 |
-
margin: 0;
|
69 |
-
}
|
70 |
-
|
71 |
-
.wp-picker-container {
|
72 |
-
display: inline-block;
|
73 |
-
}
|
74 |
-
}
|
75 |
-
|
76 |
-
#pum_theme_preview {
|
77 |
-
|
78 |
-
.inside {
|
79 |
-
margin-top: 0;
|
80 |
-
padding: 0;
|
81 |
-
background: url(https://s.wordpress.com/mshots/v1/https://www.wordpress.org) no-repeat center top;
|
82 |
-
background-size: cover;
|
83 |
-
}
|
84 |
-
|
85 |
-
.pum-theme-preview {
|
86 |
-
padding: 50px 20px;
|
87 |
-
position: relative;
|
88 |
-
}
|
89 |
-
|
90 |
-
.pum-popup-overlay,
|
91 |
-
.pum-popup-container,
|
92 |
-
.pum-popup-title,
|
93 |
-
.pum-popup-content,
|
94 |
-
.pum-popup-close {
|
95 |
-
cursor: pointer;
|
96 |
-
}
|
97 |
-
}
|
98 |
-
|
99 |
-
.pum-theme-preview {
|
100 |
-
|
101 |
-
.pum-popup-overlay {
|
102 |
-
position: absolute;
|
103 |
-
display: block;
|
104 |
-
width: 100%;
|
105 |
-
height: 100%;
|
106 |
-
top: 0;
|
107 |
-
left: 0
|
108 |
-
}
|
109 |
-
|
110 |
-
.pum-desc,
|
111 |
-
.pum-popup-container {
|
112 |
-
display: block;
|
113 |
-
position: relative;
|
114 |
-
width: 95%;
|
115 |
-
max-width: 400px;
|
116 |
-
margin: 0 auto;
|
117 |
-
font-size: 16px;
|
118 |
-
z-index: 99;
|
119 |
-
|
120 |
-
.pum-popup-close {
|
121 |
-
text-decoration: none;
|
122 |
-
text-align: center;
|
123 |
-
line-height: 1;
|
124 |
-
position: absolute;
|
125 |
-
cursor: pointer;
|
126 |
-
min-width: 1em;
|
127 |
-
z-index: 9999999;
|
128 |
-
background-color: transparent;
|
129 |
-
}
|
130 |
-
}
|
131 |
-
|
132 |
-
.pum-desc {
|
133 |
-
box-sizing: border-box;
|
134 |
-
margin: 10px auto 0;
|
135 |
-
background-color: #fff;
|
136 |
-
border: 1px solid;
|
137 |
-
box-shadow: 0 2px 2px;
|
138 |
-
padding: .75em;
|
139 |
-
font-size: 11px;
|
140 |
-
z-index: 10;
|
141 |
-
|
142 |
-
.dashicons {
|
143 |
-
font-size: 16px;
|
144 |
-
width: 16px;
|
145 |
-
height: 16px;
|
146 |
-
}
|
147 |
-
}
|
148 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/sass/modules/_alerts.scss
DELETED
@@ -1,152 +0,0 @@
|
|
1 |
-
/*!******************************************************************************
|
2 |
-
* Copyright (c) 2019, Code Atlantic LLC
|
3 |
-
******************************************************************************/
|
4 |
-
|
5 |
-
.pum-alert {
|
6 |
-
position: relative;
|
7 |
-
padding: 0 12px;
|
8 |
-
border-left: 4px solid #ccc;
|
9 |
-
background: #fff;
|
10 |
-
box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
|
11 |
-
width: 100%;
|
12 |
-
|
13 |
-
|
14 |
-
&.pum-alert__success {
|
15 |
-
border-left-color: #46b450;
|
16 |
-
}
|
17 |
-
|
18 |
-
&.pum-alert__info {
|
19 |
-
border-left-color: #00a0d2;
|
20 |
-
}
|
21 |
-
|
22 |
-
&.pum-alert__warning {
|
23 |
-
border-left-color: #ffb900;
|
24 |
-
}
|
25 |
-
|
26 |
-
&.pum-alert__error {
|
27 |
-
border-left-color: #dc3232;
|
28 |
-
}
|
29 |
-
}
|
30 |
-
|
31 |
-
.pum-alert-holder {
|
32 |
-
display: flex;
|
33 |
-
margin-bottom: .8em;
|
34 |
-
}
|
35 |
-
|
36 |
-
.pum-alerts {
|
37 |
-
position: relative;
|
38 |
-
max-width: 1280px;
|
39 |
-
margin: 20px 0 1px;
|
40 |
-
padding: 20px 20px 0;
|
41 |
-
border: 1px solid #e5e5e5;
|
42 |
-
background-color: #fdfdfd;
|
43 |
-
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
|
44 |
-
clear: both;
|
45 |
-
top: 10px;
|
46 |
-
margin-right: 20px !important;
|
47 |
-
|
48 |
-
> h2:first-child {
|
49 |
-
margin: 0;
|
50 |
-
padding: 9px 0 4px;
|
51 |
-
font-size: 23px;
|
52 |
-
font-weight: 400;
|
53 |
-
line-height: 29px;
|
54 |
-
}
|
55 |
-
|
56 |
-
h3 {
|
57 |
-
margin: -20px -20px 0;
|
58 |
-
padding: 1em;
|
59 |
-
border-bottom: 1px solid #ccc;
|
60 |
-
background-color: #fdfdfd;
|
61 |
-
font-size: 1.4em;
|
62 |
-
}
|
63 |
-
|
64 |
-
img.logo {
|
65 |
-
width: 25px;
|
66 |
-
margin: -2px 5px -2px 0;
|
67 |
-
}
|
68 |
-
|
69 |
-
.pum-alert {
|
70 |
-
width: 100%;
|
71 |
-
}
|
72 |
-
|
73 |
-
.button {
|
74 |
-
&.dismiss, &.restore {
|
75 |
-
width: 45px;
|
76 |
-
height: 45px;
|
77 |
-
margin-left: 10px;
|
78 |
-
padding: 0;
|
79 |
-
outline: 0;
|
80 |
-
line-height: inherit;
|
81 |
-
cursor: pointer;
|
82 |
-
-ms-flex: 0 0 45px;
|
83 |
-
flex: 0 0 45px;
|
84 |
-
|
85 |
-
.dashicons {
|
86 |
-
width: 24px;
|
87 |
-
height: 24px;
|
88 |
-
font-size: 24px;
|
89 |
-
}
|
90 |
-
}
|
91 |
-
|
92 |
-
&.dismiss {
|
93 |
-
&:focus, &:hover {
|
94 |
-
background: 0 0;
|
95 |
-
}
|
96 |
-
}
|
97 |
-
|
98 |
-
&.restore {
|
99 |
-
&:focus, &:hover {
|
100 |
-
background: 0 0;
|
101 |
-
}
|
102 |
-
}
|
103 |
-
}
|
104 |
-
|
105 |
-
.popup_page_pum-extensions & {
|
106 |
-
top: 0;
|
107 |
-
}
|
108 |
-
|
109 |
-
.screen-reader-text {
|
110 |
-
overflow: hidden;
|
111 |
-
clip: rect(1px, 1px, 1px, 1px);
|
112 |
-
position: absolute !important;
|
113 |
-
width: 1px;
|
114 |
-
height: 1px;
|
115 |
-
padding: 0;
|
116 |
-
border: 0;
|
117 |
-
word-wrap: normal !important;
|
118 |
-
clip-path: inset(50%);
|
119 |
-
}
|
120 |
-
}
|
121 |
-
|
122 |
-
.pum-bottom-spacing {
|
123 |
-
margin-bottom: 20px;
|
124 |
-
}
|
125 |
-
|
126 |
-
.pum-container-disabled {
|
127 |
-
display: table-cell;
|
128 |
-
position: absolute;
|
129 |
-
top: 0;
|
130 |
-
right: 0;
|
131 |
-
bottom: 0;
|
132 |
-
left: 0;
|
133 |
-
border-radius: 4px;
|
134 |
-
background-color: rgba(232, 232, 232, 0.7);
|
135 |
-
}
|
136 |
-
|
137 |
-
.pum-muted-title {
|
138 |
-
overflow: hidden;
|
139 |
-
font-weight: 600;
|
140 |
-
font-style: italic;
|
141 |
-
|
142 |
-
&:after {
|
143 |
-
display: inline-block;
|
144 |
-
width: 100%;
|
145 |
-
height: .5em;
|
146 |
-
margin-right: -100%;
|
147 |
-
margin-left: 10px;
|
148 |
-
border-top: 1px solid #ddd;
|
149 |
-
vertical-align: bottom;
|
150 |
-
content: "";
|
151 |
-
}
|
152 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/sass/modules/_fields.scss
DELETED
@@ -1,644 +0,0 @@
|
|
1 |
-
/*!******************************************************************************
|
2 |
-
* Copyright (c) 2019, Code Atlantic LLC
|
3 |
-
******************************************************************************/
|
4 |
-
|
5 |
-
$plugin-prefix: 'plugin' !default;
|
6 |
-
$custom-select2-selector: 'select2' !default;
|
7 |
-
|
8 |
-
.#{$plugin-prefix}-desc {
|
9 |
-
margin-top: 4px;
|
10 |
-
margin-bottom: 0;
|
11 |
-
}
|
12 |
-
|
13 |
-
[data-#{$plugin-prefix}-dependencies] {
|
14 |
-
display: none;
|
15 |
-
}
|
16 |
-
|
17 |
-
.#{$plugin-prefix}-field {
|
18 |
-
position: relative;
|
19 |
-
|
20 |
-
margin-bottom: 1em;
|
21 |
-
|
22 |
-
> label {
|
23 |
-
display: block;
|
24 |
-
font-weight: bold;
|
25 |
-
}
|
26 |
-
|
27 |
-
.#{$plugin-prefix}-doclink {
|
28 |
-
font-size: 16px;
|
29 |
-
line-height: 20px;
|
30 |
-
}
|
31 |
-
|
32 |
-
}
|
33 |
-
|
34 |
-
/**
|
35 |
-
* Sections
|
36 |
-
*/
|
37 |
-
.#{$plugin-prefix}-field-section {
|
38 |
-
|
39 |
-
}
|
40 |
-
|
41 |
-
/**
|
42 |
-
* Heading & separator fields
|
43 |
-
*/
|
44 |
-
.#{$plugin-prefix}-field-heading,
|
45 |
-
.#{$plugin-prefix}-field-separator {
|
46 |
-
h3 {
|
47 |
-
// font-size: 1.2em;
|
48 |
-
// margin-top: 0;
|
49 |
-
// margin-bottom: 0;
|
50 |
-
}
|
51 |
-
|
52 |
-
h3 + .#{$plugin-prefix}-desc {
|
53 |
-
// margin-top: -1em !important;
|
54 |
-
}
|
55 |
-
|
56 |
-
hr {
|
57 |
-
// margin-bottom: 2em;
|
58 |
-
}
|
59 |
-
|
60 |
-
label,
|
61 |
-
.#{$plugin-prefix}-desc {
|
62 |
-
display: none !important;
|
63 |
-
}
|
64 |
-
|
65 |
-
h3 + hr {
|
66 |
-
// margin-top: 1em; // Reset
|
67 |
-
// margin-bottom: 2em;
|
68 |
-
}
|
69 |
-
|
70 |
-
hr + h3 {
|
71 |
-
// margin-top: 1em; // Reset to wp default.
|
72 |
-
// margin-bottom: 1em; // Reset to wp default.
|
73 |
-
}
|
74 |
-
}
|
75 |
-
|
76 |
-
.#{$plugin-prefix}-field-hidden {
|
77 |
-
display: none;
|
78 |
-
}
|
79 |
-
|
80 |
-
.#{$plugin-prefix}-field-editor {
|
81 |
-
#insert-media-button {
|
82 |
-
display: none;
|
83 |
-
}
|
84 |
-
}
|
85 |
-
|
86 |
-
/**
|
87 |
-
* Select fields
|
88 |
-
*/
|
89 |
-
.#{$plugin-prefix}-field-select {
|
90 |
-
option.bold {
|
91 |
-
font-weight: bold;
|
92 |
-
font-size: 1.125em;
|
93 |
-
}
|
94 |
-
}
|
95 |
-
|
96 |
-
/**
|
97 |
-
* Checkbox fields
|
98 |
-
*/
|
99 |
-
.#{$plugin-prefix}-field-checkbox {
|
100 |
-
position: relative;
|
101 |
-
|
102 |
-
label {
|
103 |
-
margin-left: 1.5em;
|
104 |
-
// display: block;
|
105 |
-
// font-size: 1.1em;
|
106 |
-
|
107 |
-
&.#{$plugin-prefix}-desc {
|
108 |
-
display: inline;
|
109 |
-
font-weight: inherit;
|
110 |
-
font-size: inherit;
|
111 |
-
margin: 0 0 1em;
|
112 |
-
}
|
113 |
-
}
|
114 |
-
|
115 |
-
input[type="checkbox"] {
|
116 |
-
position: absolute;
|
117 |
-
top: .25em;
|
118 |
-
}
|
119 |
-
}
|
120 |
-
|
121 |
-
/**
|
122 |
-
* Multicheck & Radio fields
|
123 |
-
*/
|
124 |
-
.#{$plugin-prefix}-field-multicheck,
|
125 |
-
.#{$plugin-prefix}-field-radio {
|
126 |
-
// margin: 0 0 1em;
|
127 |
-
|
128 |
-
input, label {
|
129 |
-
line-height: 1em;
|
130 |
-
}
|
131 |
-
|
132 |
-
label {
|
133 |
-
margin-bottom: 4px;
|
134 |
-
}
|
135 |
-
|
136 |
-
input[type="radio"] {
|
137 |
-
display: inline-block;
|
138 |
-
margin-right: .25em;
|
139 |
-
}
|
140 |
-
|
141 |
-
input + label {
|
142 |
-
font-weight: normal;
|
143 |
-
display: inline-block !important;
|
144 |
-
}
|
145 |
-
|
146 |
-
label:first-child {
|
147 |
-
font-weight: bold;
|
148 |
-
margin: 0 0 10px;
|
149 |
-
// display: block;
|
150 |
-
}
|
151 |
-
|
152 |
-
> p.#{$plugin-prefix}-desc {
|
153 |
-
margin: 0 0 .5em;
|
154 |
-
}
|
155 |
-
|
156 |
-
.pum-field-mulitcheck-list,
|
157 |
-
.pum-field-radio-list {
|
158 |
-
margin: 0;
|
159 |
-
}
|
160 |
-
|
161 |
-
}
|
162 |
-
|
163 |
-
/**
|
164 |
-
* Range & range slider fields
|
165 |
-
*/
|
166 |
-
.#{$plugin-prefix}-field-range,
|
167 |
-
.#{$plugin-prefix}-field-rangeslider {
|
168 |
-
input[type="range"] {
|
169 |
-
vertical-align: middle;
|
170 |
-
}
|
171 |
-
|
172 |
-
.#{$plugin-prefix}-range-manual {
|
173 |
-
padding-right: 25px;
|
174 |
-
text-align: right;
|
175 |
-
width: 80px;
|
176 |
-
}
|
177 |
-
|
178 |
-
.range-value-unit,
|
179 |
-
.#{$plugin-prefix}-range-value-unit {
|
180 |
-
position: relative;
|
181 |
-
display: inline-block;
|
182 |
-
margin-left: -30px;
|
183 |
-
margin-right: 10px;
|
184 |
-
width: 20px;
|
185 |
-
text-align: left;
|
186 |
-
top: .125em;
|
187 |
-
}
|
188 |
-
}
|
189 |
-
|
190 |
-
/**
|
191 |
-
* Image fields
|
192 |
-
*/
|
193 |
-
.#{$plugin-prefix}-field-color {
|
194 |
-
.wp-color-result-text {
|
195 |
-
line-height: 23px;
|
196 |
-
}
|
197 |
-
}
|
198 |
-
|
199 |
-
/**
|
200 |
-
* Image fields
|
201 |
-
*/
|
202 |
-
.#{$plugin-prefix}-field-image {
|
203 |
-
|
204 |
-
.#{$plugin-prefix}-image-field {
|
205 |
-
|
206 |
-
.#{$plugin-prefix}-image-select,
|
207 |
-
&.#{$plugin-prefix}-image-empty .#{$plugin-prefix}-image-preview {
|
208 |
-
display: none;
|
209 |
-
}
|
210 |
-
|
211 |
-
&.#{$plugin-prefix}-image-empty .#{$plugin-prefix}-image-select {
|
212 |
-
display: block;
|
213 |
-
}
|
214 |
-
}
|
215 |
-
|
216 |
-
.#{$plugin-prefix}-image-preview-img {
|
217 |
-
float: left;
|
218 |
-
line-height: 0;
|
219 |
-
margin: 5px 0;
|
220 |
-
|
221 |
-
img {
|
222 |
-
max-width: 60px;
|
223 |
-
width: auto;
|
224 |
-
height: auto;
|
225 |
-
}
|
226 |
-
}
|
227 |
-
|
228 |
-
select.pum-image-field__size {
|
229 |
-
margin: 8px 0 8px 10px;
|
230 |
-
width: 200px;
|
231 |
-
}
|
232 |
-
|
233 |
-
.#{$plugin-prefix}-image-edit {
|
234 |
-
margin: 0 0 0 11px;
|
235 |
-
}
|
236 |
-
|
237 |
-
.#{$plugin-prefix}-image-replace,
|
238 |
-
.#{$plugin-prefix}-image-remove {
|
239 |
-
margin: 0 0 0 8px;
|
240 |
-
}
|
241 |
-
|
242 |
-
}
|
243 |
-
|
244 |
-
/**
|
245 |
-
* Conditions field
|
246 |
-
*/
|
247 |
-
.#{$plugin-prefix}-field-conditions {
|
248 |
-
|
249 |
-
.facet-builder {
|
250 |
-
|
251 |
-
p {
|
252 |
-
margin: 0 0 1em;
|
253 |
-
}
|
254 |
-
|
255 |
-
a {
|
256 |
-
text-decoration: none;
|
257 |
-
}
|
258 |
-
|
259 |
-
.facet-groups {
|
260 |
-
|
261 |
-
display: none;
|
262 |
-
|
263 |
-
.facet-group-wrap {
|
264 |
-
|
265 |
-
.facet-group {
|
266 |
-
box-shadow: 0 1px 0 #ccc;
|
267 |
-
color: #555;
|
268 |
-
border: 1px solid #ccc;
|
269 |
-
background: #f7f7f7;
|
270 |
-
}
|
271 |
-
|
272 |
-
&:last-child .and,
|
273 |
-
.add-or {
|
274 |
-
em,
|
275 |
-
a,
|
276 |
-
button {
|
277 |
-
color: #0073aa;
|
278 |
-
cursor: pointer;
|
279 |
-
|
280 |
-
&::before {
|
281 |
-
content: "+ ";
|
282 |
-
}
|
283 |
-
|
284 |
-
}
|
285 |
-
|
286 |
-
}
|
287 |
-
|
288 |
-
}
|
289 |
-
|
290 |
-
}
|
291 |
-
|
292 |
-
.facet-list {
|
293 |
-
}
|
294 |
-
|
295 |
-
.facet {
|
296 |
-
position: relative;
|
297 |
-
padding: 12px 30px 6px 10px;
|
298 |
-
border-bottom: 1px solid #e1e1e1;
|
299 |
-
border-top: 1px solid #fff;
|
300 |
-
|
301 |
-
&:first-child {
|
302 |
-
border-top: 0;
|
303 |
-
|
304 |
-
.or {
|
305 |
-
display: none;
|
306 |
-
}
|
307 |
-
}
|
308 |
-
|
309 |
-
&::before,
|
310 |
-
&::after {
|
311 |
-
display: table;
|
312 |
-
content: "";
|
313 |
-
line-height: 0;
|
314 |
-
}
|
315 |
-
|
316 |
-
&::after {
|
317 |
-
clear: both;
|
318 |
-
}
|
319 |
-
|
320 |
-
}
|
321 |
-
|
322 |
-
.#{$plugin-prefix}-field {
|
323 |
-
margin-bottom: 0.5em;
|
324 |
-
}
|
325 |
-
|
326 |
-
.facet-col {
|
327 |
-
float: left;
|
328 |
-
margin-right: 20px;
|
329 |
-
padding-bottom: 6px;
|
330 |
-
position: relative;
|
331 |
-
min-width: 175px;
|
332 |
-
|
333 |
-
select,
|
334 |
-
input {
|
335 |
-
margin: 0;
|
336 |
-
max-width: 100%;
|
337 |
-
}
|
338 |
-
}
|
339 |
-
|
340 |
-
.facet-target {
|
341 |
-
|
342 |
-
position: relative;
|
343 |
-
max-width: 240px;
|
344 |
-
|
345 |
-
* {
|
346 |
-
box-sizing: border-box;
|
347 |
-
}
|
348 |
-
|
349 |
-
select,
|
350 |
-
.#{$custom-select2-selector}-container .#{$custom-select2-selector}-selection {
|
351 |
-
padding-left: 28px;
|
352 |
-
|
353 |
-
// Rendered Option
|
354 |
-
.#{$custom-select2-selector}-selection__rendered {
|
355 |
-
padding-left: 3px;
|
356 |
-
}
|
357 |
-
|
358 |
-
}
|
359 |
-
|
360 |
-
.#{$plugin-prefix}-not-operand {
|
361 |
-
cursor: pointer;
|
362 |
-
position: absolute;
|
363 |
-
left: 2px;
|
364 |
-
top: 2px;
|
365 |
-
z-index: 10;
|
366 |
-
//width: 23px;
|
367 |
-
line-height: 24px;
|
368 |
-
height: 25px;
|
369 |
-
|
370 |
-
//padding: 0;
|
371 |
-
background: #f7f7f7;
|
372 |
-
border: 1px solid transparent;
|
373 |
-
border-radius: 2px 0 0 2px;
|
374 |
-
border-right: 1px solid #ddd;
|
375 |
-
text-align: center;
|
376 |
-
|
377 |
-
span {
|
378 |
-
font-size: 1.25em;
|
379 |
-
}
|
380 |
-
|
381 |
-
&::before {
|
382 |
-
color: #555;
|
383 |
-
font-size: 16px;
|
384 |
-
line-height: 24px;
|
385 |
-
}
|
386 |
-
|
387 |
-
input[type="checkbox"] {
|
388 |
-
display: none;
|
389 |
-
}
|
390 |
-
|
391 |
-
&:focus {
|
392 |
-
outline: none;
|
393 |
-
border: 1px solid #5b9dd9;
|
394 |
-
box-shadow: 0 0 2px rgba(30, 140, 190, 0.8);
|
395 |
-
}
|
396 |
-
|
397 |
-
}
|
398 |
-
|
399 |
-
&.not-operand-checked {
|
400 |
-
|
401 |
-
.#{$plugin-prefix}-not-operand {
|
402 |
-
span,
|
403 |
-
&::before {
|
404 |
-
color: #a00;
|
405 |
-
|
406 |
-
}
|
407 |
-
}
|
408 |
-
|
409 |
-
select,
|
410 |
-
.#{$custom-select2-selector}-container .#{$custom-select2-selector}-selection {
|
411 |
-
//padding-left: 58px;
|
412 |
-
}
|
413 |
-
|
414 |
-
}
|
415 |
-
|
416 |
-
.#{$custom-select2-selector}-container-active {
|
417 |
-
.#{$custom-select2-selector}-choices,
|
418 |
-
.#{$custom-select2-selector}-single {
|
419 |
-
border-color: #5b9dd9;
|
420 |
-
box-shadow: 0 0 2px rgba(30, 140, 190, 0.8);
|
421 |
-
}
|
422 |
-
}
|
423 |
-
|
424 |
-
}
|
425 |
-
|
426 |
-
.facet-actions {
|
427 |
-
position: absolute;
|
428 |
-
right: 6px;
|
429 |
-
top: 18px;
|
430 |
-
|
431 |
-
button {
|
432 |
-
border: 0;
|
433 |
-
padding: 0;
|
434 |
-
background: none;
|
435 |
-
margin-left: 5px;
|
436 |
-
}
|
437 |
-
}
|
438 |
-
|
439 |
-
.dashicons-plus-alt,
|
440 |
-
.dashicons-dismiss {
|
441 |
-
color: #999;
|
442 |
-
}
|
443 |
-
|
444 |
-
/* + AND + OR link stylings */
|
445 |
-
.or {
|
446 |
-
color: #484848;
|
447 |
-
font-weight: 500;
|
448 |
-
margin-left: -21px;
|
449 |
-
left: 50%;
|
450 |
-
position: absolute;
|
451 |
-
top: -6px;
|
452 |
-
font-style: normal;
|
453 |
-
line-height: 10px;
|
454 |
-
text-transform: uppercase;
|
455 |
-
}
|
456 |
-
|
457 |
-
.add-or {
|
458 |
-
border-top: 1px solid #fff;
|
459 |
-
text-align: center;
|
460 |
-
|
461 |
-
> .add {
|
462 |
-
left: -6.5px;
|
463 |
-
position: relative;
|
464 |
-
top: -9px;
|
465 |
-
}
|
466 |
-
}
|
467 |
-
|
468 |
-
.and {
|
469 |
-
border-bottom: 1px dashed #e1e1e1;
|
470 |
-
margin: .5em 0 1.7em;
|
471 |
-
text-align: center;
|
472 |
-
}
|
473 |
-
|
474 |
-
.or,
|
475 |
-
.add-or > .add {
|
476 |
-
background: #f7f7f7;
|
477 |
-
font-size: 1.1em;
|
478 |
-
padding: 0 10px;
|
479 |
-
}
|
480 |
-
|
481 |
-
.and, .add-or {
|
482 |
-
em,
|
483 |
-
a,
|
484 |
-
button,
|
485 |
-
label {
|
486 |
-
background: #fff;
|
487 |
-
font-size: 1.1em;
|
488 |
-
font-style: normal;
|
489 |
-
margin: 0 10px;
|
490 |
-
padding: 0 10px;
|
491 |
-
position: relative;
|
492 |
-
top: 9px;
|
493 |
-
text-transform: uppercase;
|
494 |
-
box-shadow: none;
|
495 |
-
color: #484848;
|
496 |
-
cursor: default;
|
497 |
-
border: 0;
|
498 |
-
|
499 |
-
}
|
500 |
-
|
501 |
-
em {
|
502 |
-
color: #484848;
|
503 |
-
}
|
504 |
-
}
|
505 |
-
|
506 |
-
}
|
507 |
-
|
508 |
-
.no-facet-groups {
|
509 |
-
display: block;
|
510 |
-
|
511 |
-
.facet-target {
|
512 |
-
max-width: 100%;
|
513 |
-
}
|
514 |
-
}
|
515 |
-
|
516 |
-
/* Conditionals */
|
517 |
-
.has-conditions {
|
518 |
-
|
519 |
-
.facet-groups {
|
520 |
-
display: block;
|
521 |
-
}
|
522 |
-
|
523 |
-
.no-facet-groups {
|
524 |
-
display: none;
|
525 |
-
}
|
526 |
-
|
527 |
-
}
|
528 |
-
|
529 |
-
.#{$plugin-prefix}-field-select2 {
|
530 |
-
select {
|
531 |
-
width: 100% !important;
|
532 |
-
}
|
533 |
-
}
|
534 |
-
|
535 |
-
}
|
536 |
-
|
537 |
-
/**
|
538 |
-
* License fields.
|
539 |
-
*/
|
540 |
-
.#{$plugin-prefix}-field-license_key {
|
541 |
-
background: #fafafa;
|
542 |
-
padding: 14px;
|
543 |
-
border-top: 2px solid #999;
|
544 |
-
border-bottom: 2px solid #999;
|
545 |
-
margin: 0 -14px 14px;
|
546 |
-
|
547 |
-
p {
|
548 |
-
font-size: 13px;
|
549 |
-
margin-top: 0;
|
550 |
-
}
|
551 |
-
|
552 |
-
a {
|
553 |
-
color: #444;
|
554 |
-
}
|
555 |
-
|
556 |
-
a:hover {
|
557 |
-
text-decoration: none;
|
558 |
-
}
|
559 |
-
|
560 |
-
span.pum-license-status {
|
561 |
-
margin-left: 5px;
|
562 |
-
margin-right: 5px;
|
563 |
-
}
|
564 |
-
|
565 |
-
.#{$plugin-prefix}-license-messages {
|
566 |
-
p:last-child {
|
567 |
-
margin-bottom: 0;
|
568 |
-
}
|
569 |
-
}
|
570 |
-
|
571 |
-
&.#{$plugin-prefix}-license-expires-soon-notice {
|
572 |
-
//background-color: #00a0d2;
|
573 |
-
//color: #fff;
|
574 |
-
//border-color: #00a0d2;
|
575 |
-
border-color: #dc3232;
|
576 |
-
}
|
577 |
-
|
578 |
-
&.#{$plugin-prefix}-license-valid-notice {
|
579 |
-
//background-color: #60c560;
|
580 |
-
border-color: #46b450;
|
581 |
-
//color: #fff;
|
582 |
-
.pum-license-status {
|
583 |
-
color: #46b450;
|
584 |
-
}
|
585 |
-
}
|
586 |
-
|
587 |
-
&.#{$plugin-prefix}-license-inactive-notice {
|
588 |
-
//background-color: #0073aa;
|
589 |
-
border-color: #0073aa;
|
590 |
-
//color: #fff;
|
591 |
-
}
|
592 |
-
|
593 |
-
&.#{$plugin-prefix}-license-expiration-date-notice {
|
594 |
-
|
595 |
-
}
|
596 |
-
|
597 |
-
&.#{$plugin-prefix}-license-expired-notice {
|
598 |
-
background-color: #e24e4e;
|
599 |
-
color: #fff;
|
600 |
-
border-color: #dc3232;
|
601 |
-
}
|
602 |
-
|
603 |
-
&.#{$plugin-prefix}-license-error-notice,
|
604 |
-
&.#{$plugin-prefix}-license-missing-notice,
|
605 |
-
&.#{$plugin-prefix}-license-invalid-notice,
|
606 |
-
&.#{$plugin-prefix}-license-site_inactive-notice,
|
607 |
-
&.#{$plugin-prefix}-license-item_name_mismatch-notice {
|
608 |
-
background-color: #ffebcd;
|
609 |
-
border-color: #dc3232;
|
610 |
-
}
|
611 |
-
|
612 |
-
&.#{$plugin-prefix}-license-expired-notice {
|
613 |
-
a {
|
614 |
-
color: #fff;
|
615 |
-
|
616 |
-
&:hover {
|
617 |
-
text-decoration: none;
|
618 |
-
}
|
619 |
-
}
|
620 |
-
}
|
621 |
-
|
622 |
-
}
|
623 |
-
|
624 |
-
/**
|
625 |
-
* Link fields.
|
626 |
-
*/
|
627 |
-
.#{$plugin-prefix}-field-link {
|
628 |
-
input {
|
629 |
-
margin-right: 24px;
|
630 |
-
display: block;
|
631 |
-
}
|
632 |
-
|
633 |
-
button.dashicons {
|
634 |
-
float: right;
|
635 |
-
width: 1.5em;
|
636 |
-
height: 1.5em;
|
637 |
-
line-height: 1;
|
638 |
-
padding: 0;
|
639 |
-
font-size: 16px;
|
640 |
-
vertical-align: sub;
|
641 |
-
margin-top: 1px;
|
642 |
-
box-shadow: 0 0 0 #cccccc;
|
643 |
-
}
|
644 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/sass/modules/_general.scss
DELETED
@@ -1,51 +0,0 @@
|
|
1 |
-
/*!******************************************************************************
|
2 |
-
* Copyright (c) 2019, Code Atlantic LLC
|
3 |
-
******************************************************************************/
|
4 |
-
|
5 |
-
.no-button {
|
6 |
-
border: 0;
|
7 |
-
padding: 0;
|
8 |
-
background: none;
|
9 |
-
cursor: pointer;
|
10 |
-
|
11 |
-
&.link-button {
|
12 |
-
color: #0073aa;
|
13 |
-
&:hover {
|
14 |
-
color: #00a0d2;
|
15 |
-
}
|
16 |
-
}
|
17 |
-
|
18 |
-
&.delete-button {
|
19 |
-
color: #a00;
|
20 |
-
&:hover {
|
21 |
-
color: #f00;
|
22 |
-
}
|
23 |
-
}
|
24 |
-
}
|
25 |
-
|
26 |
-
|
27 |
-
.pum-half {
|
28 |
-
width: 47.5%;
|
29 |
-
max-width: 47.5%;
|
30 |
-
margin-right: 5%;
|
31 |
-
display: inline-block;
|
32 |
-
|
33 |
-
|
34 |
-
&.pum-dependencies-met {
|
35 |
-
display: inline-block!important;
|
36 |
-
}
|
37 |
-
|
38 |
-
> * {
|
39 |
-
max-width: 100%;
|
40 |
-
}
|
41 |
-
|
42 |
-
input, textarea, select {
|
43 |
-
max-width: 100%;
|
44 |
-
width: auto;
|
45 |
-
}
|
46 |
-
|
47 |
-
}
|
48 |
-
|
49 |
-
.pum-last {
|
50 |
-
margin-right:0!important;
|
51 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/sass/modules/_modal.scss
DELETED
@@ -1,165 +0,0 @@
|
|
1 |
-
$plugin-prefix: 'plugin' !default;
|
2 |
-
|
3 |
-
.#{$plugin-prefix}-modal-background {
|
4 |
-
|
5 |
-
&, &:before, &:after,
|
6 |
-
& *, & *:before, & *:after {
|
7 |
-
-webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
|
8 |
-
-moz-box-sizing: border-box; /* Firefox, other Gecko */
|
9 |
-
box-sizing: border-box;
|
10 |
-
}
|
11 |
-
|
12 |
-
display: none;
|
13 |
-
position: fixed;
|
14 |
-
top: 0;
|
15 |
-
left: 0;
|
16 |
-
right: 0;
|
17 |
-
bottom: 0;
|
18 |
-
height: 100%;
|
19 |
-
width: 100%;
|
20 |
-
background: rgba(0, 0, 0, 0.70);
|
21 |
-
z-index: 100100;
|
22 |
-
overflow-y: scroll;
|
23 |
-
|
24 |
-
.#{$plugin-prefix}-modal-wrap {
|
25 |
-
position: absolute;
|
26 |
-
top: 60px;
|
27 |
-
margin-bottom: 60px;
|
28 |
-
left: 50%;
|
29 |
-
width: 550px;
|
30 |
-
margin-left: -300px;
|
31 |
-
background-color: #fff;
|
32 |
-
box-shadow: 0 3px 6px rgba(0, 0, 0, .3);
|
33 |
-
z-index: 100105;
|
34 |
-
transition: height .2s, margin-top .2s;
|
35 |
-
|
36 |
-
@media screen and (max-width: 520px) {
|
37 |
-
width: auto;
|
38 |
-
margin-left: 0;
|
39 |
-
top: 10px;
|
40 |
-
right: 10px;
|
41 |
-
bottom: 10px;
|
42 |
-
left: 10px;
|
43 |
-
}
|
44 |
-
}
|
45 |
-
|
46 |
-
.#{$plugin-prefix}-modal-header {
|
47 |
-
position: absolute;
|
48 |
-
top: 0;
|
49 |
-
right: 0;
|
50 |
-
left: 0;
|
51 |
-
height: 36px;
|
52 |
-
padding: 0 36px 0 16px;
|
53 |
-
font-size: 18px;
|
54 |
-
font-weight: 600;
|
55 |
-
line-height: 36px;
|
56 |
-
background: #fcfcfc;
|
57 |
-
border-bottom: 1px solid #dfdfdf;
|
58 |
-
|
59 |
-
.#{$plugin-prefix}-modal-close {
|
60 |
-
position: absolute;
|
61 |
-
top: 0;
|
62 |
-
right: 0;
|
63 |
-
width: 36px;
|
64 |
-
height: 36px;
|
65 |
-
padding: 0;
|
66 |
-
color: #666;
|
67 |
-
text-align: center;
|
68 |
-
background: 0 0;
|
69 |
-
border: none;
|
70 |
-
cursor: pointer;
|
71 |
-
|
72 |
-
&::before {
|
73 |
-
font: 400 20px/36px dashicons;
|
74 |
-
vertical-align: top;
|
75 |
-
speak: none;
|
76 |
-
-webkit-font-smoothing: antialiased;
|
77 |
-
-moz-osx-font-smoothing: grayscale;
|
78 |
-
width: 36px;
|
79 |
-
height: 36px;
|
80 |
-
content: '\f158';
|
81 |
-
}
|
82 |
-
}
|
83 |
-
|
84 |
-
}
|
85 |
-
|
86 |
-
.#{$plugin-prefix}-modal-content {
|
87 |
-
padding: 52px 16px 60px;
|
88 |
-
|
89 |
-
div.error {
|
90 |
-
margin: 0 0 10px;
|
91 |
-
}
|
92 |
-
p {
|
93 |
-
margin-top: 0;
|
94 |
-
}
|
95 |
-
textarea {
|
96 |
-
width: 100%;
|
97 |
-
}
|
98 |
-
|
99 |
-
@media screen and (max-width: 782px) {
|
100 |
-
padding: 50px 16px 60px;
|
101 |
-
}
|
102 |
-
}
|
103 |
-
|
104 |
-
.#{$plugin-prefix}-modal-footer {
|
105 |
-
position: absolute;
|
106 |
-
bottom: 0;
|
107 |
-
left: 0;
|
108 |
-
right: 0;
|
109 |
-
padding: 8px 16px;
|
110 |
-
background: #fcfcfc;
|
111 |
-
border-top: 1px solid #dfdfdf;
|
112 |
-
|
113 |
-
.cancel {
|
114 |
-
line-height: 25px;
|
115 |
-
float: left;
|
116 |
-
|
117 |
-
.no-button {
|
118 |
-
border: 0;
|
119 |
-
padding: 0;
|
120 |
-
background: none;
|
121 |
-
cursor: pointer;
|
122 |
-
|
123 |
-
&.link-button {
|
124 |
-
color: #0073aa;
|
125 |
-
text-decoration: underline;
|
126 |
-
}
|
127 |
-
|
128 |
-
}
|
129 |
-
|
130 |
-
.submitdelete {
|
131 |
-
text-decoration: none;
|
132 |
-
padding: 1px 2px;
|
133 |
-
}
|
134 |
-
|
135 |
-
@media screen and (max-width: 782px) {
|
136 |
-
line-height: 32px;
|
137 |
-
}
|
138 |
-
}
|
139 |
-
|
140 |
-
.#{$plugin-prefix}-submit {
|
141 |
-
line-height: 23px;
|
142 |
-
float: right;
|
143 |
-
|
144 |
-
button {
|
145 |
-
float: right;
|
146 |
-
margin-bottom: 0;
|
147 |
-
|
148 |
-
}
|
149 |
-
|
150 |
-
.spinner {
|
151 |
-
float: left;
|
152 |
-
vertical-align: middle;
|
153 |
-
}
|
154 |
-
|
155 |
-
}
|
156 |
-
}
|
157 |
-
|
158 |
-
&.tabbed-content {
|
159 |
-
|
160 |
-
.#{$plugin-prefix}-modal-content {
|
161 |
-
padding: 36px 0 44px;
|
162 |
-
}
|
163 |
-
}
|
164 |
-
|
165 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/sass/modules/_select2.scss
DELETED
@@ -1,188 +0,0 @@
|
|
1 |
-
/*!******************************************************************************
|
2 |
-
* Copyright (c) 2019, Code Atlantic LLC
|
3 |
-
*
|
4 |
-
* The bulk of this is to style jquery select2 to better
|
5 |
-
* resemble the default WP dashboard inputs.
|
6 |
-
******************************************************************************/
|
7 |
-
|
8 |
-
$plugin-prefix: 'plugin' !default;
|
9 |
-
$custom-select2-selector: 'select2' !default;
|
10 |
-
|
11 |
-
.#{$plugin-prefix}-field-select2 {
|
12 |
-
position: relative;
|
13 |
-
|
14 |
-
.#{$custom-select2-selector}-container {
|
15 |
-
box-sizing: border-box;
|
16 |
-
|
17 |
-
display: inline-block;
|
18 |
-
margin: 0;
|
19 |
-
position: relative;
|
20 |
-
vertical-align: middle;
|
21 |
-
|
22 |
-
@import "../vendor/select2/single";
|
23 |
-
@import "../vendor/select2/multiple";
|
24 |
-
}
|
25 |
-
|
26 |
-
@import "../vendor/select2/dropdown";
|
27 |
-
|
28 |
-
.#{$custom-select2-selector}-close-mask {
|
29 |
-
border: 0;
|
30 |
-
margin: 0;
|
31 |
-
padding: 0;
|
32 |
-
display: block;
|
33 |
-
position: fixed;
|
34 |
-
left: 0;
|
35 |
-
top: 0;
|
36 |
-
min-height: 100%;
|
37 |
-
min-width: 100%;
|
38 |
-
height: auto;
|
39 |
-
width: auto;
|
40 |
-
opacity: 0;
|
41 |
-
z-index: 99;
|
42 |
-
|
43 |
-
// styles required for IE to work
|
44 |
-
background-color: #fff;
|
45 |
-
filter: alpha(opacity=0);
|
46 |
-
}
|
47 |
-
|
48 |
-
.#{$custom-select2-selector}-hidden-accessible {
|
49 |
-
border: 0 !important;
|
50 |
-
clip: rect(0 0 0 0) !important;
|
51 |
-
height: 1px !important;
|
52 |
-
margin: -1px !important;
|
53 |
-
overflow: hidden !important;
|
54 |
-
padding: 0 !important;
|
55 |
-
position: absolute !important;
|
56 |
-
width: 1px !important;
|
57 |
-
}
|
58 |
-
|
59 |
-
@import "../vendor/select2/theme/default/layout";
|
60 |
-
@import "../vendor/select2/theme/classic/layout";
|
61 |
-
|
62 |
-
> .#{$custom-select2-selector}-container--below.#{$custom-select2-selector}-container--open + .#{$custom-select2-selector}-container--open,
|
63 |
-
> .#{$custom-select2-selector}-container--below.#{$custom-select2-selector}-container--open + .#{$plugin-prefix}-desc + .#{$custom-select2-selector}-container--open {
|
64 |
-
position: absolute !important;
|
65 |
-
}
|
66 |
-
|
67 |
-
// All Select2 Containers - Wraps Both Selectbox & Dropdown Elements
|
68 |
-
.#{$custom-select2-selector}-container {
|
69 |
-
|
70 |
-
// Selectbox
|
71 |
-
.#{$custom-select2-selector}-selection {
|
72 |
-
margin: 1px;
|
73 |
-
font-size: 14px;
|
74 |
-
border-radius: 0;
|
75 |
-
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.07);
|
76 |
-
border-color: #ddd;
|
77 |
-
transition: 0.05s border-color ease-in-out;
|
78 |
-
|
79 |
-
}
|
80 |
-
|
81 |
-
&.#{$custom-select2-selector}-container--focus {
|
82 |
-
.#{$custom-select2-selector}-selection {
|
83 |
-
outline: none;
|
84 |
-
border-color: #5b9dd9;
|
85 |
-
box-shadow: 0 0 2px rgba(30, 140, 190, 0.8);
|
86 |
-
}
|
87 |
-
}
|
88 |
-
|
89 |
-
// Single Select
|
90 |
-
.#{$custom-select2-selector}-selection--single {
|
91 |
-
|
92 |
-
// Rendered Option
|
93 |
-
.#{$custom-select2-selector}-selection__rendered {
|
94 |
-
//padding-left: 0;
|
95 |
-
}
|
96 |
-
|
97 |
-
}
|
98 |
-
|
99 |
-
// Multiple Select
|
100 |
-
.#{$custom-select2-selector}-selection--multiple {
|
101 |
-
overflow-y: auto;
|
102 |
-
max-height: 150px;
|
103 |
-
min-height: 28px;
|
104 |
-
line-height: 16px;
|
105 |
-
font-size: 12px;
|
106 |
-
|
107 |
-
.#{$custom-select2-selector}-selection__clear {
|
108 |
-
margin-right: 3px;
|
109 |
-
}
|
110 |
-
|
111 |
-
.#{$custom-select2-selector}-selection__rendered {
|
112 |
-
|
113 |
-
}
|
114 |
-
|
115 |
-
.#{$custom-select2-selector}-search--inline {
|
116 |
-
margin: 0;
|
117 |
-
// Search Field
|
118 |
-
.#{$custom-select2-selector}-search__field {
|
119 |
-
border-color: #ddd;
|
120 |
-
padding: 3px 5px 0;
|
121 |
-
min-width: 5em;
|
122 |
-
width: 100% !important;
|
123 |
-
}
|
124 |
-
}
|
125 |
-
|
126 |
-
.#{$custom-select2-selector}-selection__choice {
|
127 |
-
margin-top: 4px;
|
128 |
-
margin-bottom: 0;
|
129 |
-
}
|
130 |
-
|
131 |
-
}
|
132 |
-
|
133 |
-
// Dropdown
|
134 |
-
.#{$custom-select2-selector}-dropdown {
|
135 |
-
margin: 0 1px;
|
136 |
-
border-color: #ddd;
|
137 |
-
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.07);
|
138 |
-
// Compensate for the margin applied to the Selectbox.
|
139 |
-
max-width: calc(100% - 4px);
|
140 |
-
position: relative;
|
141 |
-
|
142 |
-
// Search Field
|
143 |
-
.#{$custom-select2-selector}-search__field {
|
144 |
-
border-color: #ddd;
|
145 |
-
padding: 3px 5px;
|
146 |
-
min-width: 5em;
|
147 |
-
}
|
148 |
-
|
149 |
-
// Results
|
150 |
-
.#{$custom-select2-selector}-results {
|
151 |
-
|
152 |
-
// Each result set. Can be nested.
|
153 |
-
.#{$custom-select2-selector}-results__option {
|
154 |
-
padding: 3px 6px;
|
155 |
-
margin: 0;
|
156 |
-
|
157 |
-
&[aria-selected=true] {
|
158 |
-
}
|
159 |
-
|
160 |
-
}
|
161 |
-
.#{$custom-select2-selector}-results__option[role=group] {
|
162 |
-
padding: 3px 0 0;
|
163 |
-
|
164 |
-
.#{$custom-select2-selector}-results__group {
|
165 |
-
padding: 0 6px;
|
166 |
-
}
|
167 |
-
}
|
168 |
-
|
169 |
-
.#{$custom-select2-selector}-results__options--nested {
|
170 |
-
padding: 3px 6px 0;
|
171 |
-
}
|
172 |
-
|
173 |
-
// Hover
|
174 |
-
.#{$custom-select2-selector}-results__option--highlighted {
|
175 |
-
background: #3e86d0;
|
176 |
-
}
|
177 |
-
|
178 |
-
}
|
179 |
-
|
180 |
-
}
|
181 |
-
|
182 |
-
}
|
183 |
-
|
184 |
-
.#{$custom-select2-selector}-container + .#{$custom-select2-selector}-container--open {
|
185 |
-
top: inherit !important;
|
186 |
-
}
|
187 |
-
|
188 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/sass/modules/_tabs.scss
DELETED
@@ -1,206 +0,0 @@
|
|
1 |
-
/*!******************************************************************************
|
2 |
-
* Copyright (c) 2019, Code Atlantic LLC
|
3 |
-
******************************************************************************/
|
4 |
-
|
5 |
-
$tab-color: #E4E4E4 !default;
|
6 |
-
$plugin-prefix: 'plugin' !default;
|
7 |
-
|
8 |
-
.#{$plugin-prefix}-tabs-container {
|
9 |
-
box-sizing: border-box;
|
10 |
-
|
11 |
-
> * {
|
12 |
-
box-sizing: border-box;
|
13 |
-
}
|
14 |
-
|
15 |
-
position: relative;
|
16 |
-
|
17 |
-
> ul.tabs {
|
18 |
-
margin: 0;
|
19 |
-
|
20 |
-
.tab {
|
21 |
-
font-size: 1.2em;
|
22 |
-
|
23 |
-
a {
|
24 |
-
padding: 8px 16px;
|
25 |
-
border: 0;
|
26 |
-
display: block;
|
27 |
-
text-decoration: none;
|
28 |
-
&:focus {
|
29 |
-
box-shadow: none;
|
30 |
-
}
|
31 |
-
}
|
32 |
-
|
33 |
-
}
|
34 |
-
}
|
35 |
-
|
36 |
-
> .tab-content {
|
37 |
-
|
38 |
-
display: none;
|
39 |
-
padding: 16px;
|
40 |
-
|
41 |
-
&.active {
|
42 |
-
display: block;
|
43 |
-
}
|
44 |
-
|
45 |
-
.form-table {
|
46 |
-
display: block;
|
47 |
-
|
48 |
-
&:first-child {
|
49 |
-
margin-top: 0;
|
50 |
-
}
|
51 |
-
}
|
52 |
-
}
|
53 |
-
|
54 |
-
&.horizontal-tabs {
|
55 |
-
display: block;
|
56 |
-
|
57 |
-
> ul.tabs {
|
58 |
-
> li.tab {
|
59 |
-
|
60 |
-
display: inline-block;
|
61 |
-
padding: 0;
|
62 |
-
margin: 0;
|
63 |
-
|
64 |
-
a {
|
65 |
-
padding: .5em 1em;
|
66 |
-
|
67 |
-
}
|
68 |
-
|
69 |
-
}
|
70 |
-
|
71 |
-
}
|
72 |
-
|
73 |
-
> .tab-content {
|
74 |
-
padding-top: 16px;
|
75 |
-
}
|
76 |
-
}
|
77 |
-
|
78 |
-
&.vertical-tabs {
|
79 |
-
min-height: 100px;
|
80 |
-
//padding-left: 150px;
|
81 |
-
//width: calc(100% - 150px);
|
82 |
-
padding-left: 140px;
|
83 |
-
width: 100%;
|
84 |
-
|
85 |
-
> ul.tabs {
|
86 |
-
width: 140px;
|
87 |
-
min-height: 100%;
|
88 |
-
display: block;
|
89 |
-
position: absolute;
|
90 |
-
left: 0;
|
91 |
-
top: 0;
|
92 |
-
margin: 0;
|
93 |
-
//background: #23282D;
|
94 |
-
border-top: 0;
|
95 |
-
border-right: 1px solid #DFDFDF;
|
96 |
-
|
97 |
-
> .tab {
|
98 |
-
margin: 0;
|
99 |
-
display: block;
|
100 |
-
border-bottom: 1px solid #eee;
|
101 |
-
|
102 |
-
a {
|
103 |
-
background: #FCFCFC;
|
104 |
-
color: #000;
|
105 |
-
display: block;
|
106 |
-
}
|
107 |
-
|
108 |
-
&:hover a, a:focus {
|
109 |
-
background-color: #0073AA;
|
110 |
-
}
|
111 |
-
|
112 |
-
&.active {
|
113 |
-
|
114 |
-
a {
|
115 |
-
background-color: #32373C;
|
116 |
-
color: #fff;
|
117 |
-
}
|
118 |
-
}
|
119 |
-
|
120 |
-
&:first-child {
|
121 |
-
margin-top: 8px;
|
122 |
-
}
|
123 |
-
|
124 |
-
}
|
125 |
-
}
|
126 |
-
|
127 |
-
> .tab-content {
|
128 |
-
}
|
129 |
-
|
130 |
-
}
|
131 |
-
|
132 |
-
&.link-tabs {
|
133 |
-
|
134 |
-
> ul.tabs {
|
135 |
-
display: block;
|
136 |
-
|
137 |
-
> li.tab {
|
138 |
-
display: inline-block;
|
139 |
-
|
140 |
-
a {
|
141 |
-
display: inline;
|
142 |
-
padding: 0 0.25em;
|
143 |
-
color: #0073aa;
|
144 |
-
}
|
145 |
-
|
146 |
-
&.active a,
|
147 |
-
a:active {
|
148 |
-
color: #000;
|
149 |
-
}
|
150 |
-
|
151 |
-
&.active a,
|
152 |
-
&:hover a,
|
153 |
-
a:active {
|
154 |
-
text-decoration: underline;
|
155 |
-
}
|
156 |
-
|
157 |
-
&::after {
|
158 |
-
display: inline-block;
|
159 |
-
content: "|";
|
160 |
-
margin: 0 0.25em;
|
161 |
-
}
|
162 |
-
|
163 |
-
&:last-child::after {
|
164 |
-
content: "";
|
165 |
-
}
|
166 |
-
|
167 |
-
}
|
168 |
-
}
|
169 |
-
|
170 |
-
}
|
171 |
-
|
172 |
-
&.sub-tabs {
|
173 |
-
> .tab-content {
|
174 |
-
padding: 16px 0 0;
|
175 |
-
|
176 |
-
.#{$plugin-prefix}-field:first-child {
|
177 |
-
h3 {
|
178 |
-
margin-top: 0;
|
179 |
-
}
|
180 |
-
}
|
181 |
-
}
|
182 |
-
}
|
183 |
-
|
184 |
-
&[data-tab-count="0"],
|
185 |
-
&[data-tab-count="1"] {
|
186 |
-
&.horizontal-tabs {
|
187 |
-
> ul.tabs {
|
188 |
-
display: none;
|
189 |
-
}
|
190 |
-
}
|
191 |
-
|
192 |
-
&.sub-tabs {
|
193 |
-
> .tab-content {
|
194 |
-
padding-top: 0;
|
195 |
-
}
|
196 |
-
}
|
197 |
-
}
|
198 |
-
}
|
199 |
-
|
200 |
-
#pum-settings_extensions .pum-tabs-container[data-tab-count="1"].horizontal-tabs > ul.tabs {
|
201 |
-
display: block!important;
|
202 |
-
}
|
203 |
-
|
204 |
-
#pum-settings_extensions .pum-tabs-container[data-tab-count="1"].sub-tabs > .tab-content {
|
205 |
-
padding-top: 16px!important;
|
206 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/sass/partials/_compatibility.scss
DELETED
@@ -1,22 +0,0 @@
|
|
1 |
-
/** Backward Compatibility */
|
2 |
-
.popmake-close {
|
3 |
-
cursor: pointer;
|
4 |
-
}
|
5 |
-
|
6 |
-
/* Formidable forms fix */
|
7 |
-
.pum-container {
|
8 |
-
iframe.formidable {
|
9 |
-
width: 100%;
|
10 |
-
overflow: visible;
|
11 |
-
}
|
12 |
-
}
|
13 |
-
|
14 |
-
// jQuery UI Datepicker shows up behind the popups without this.
|
15 |
-
body div#ui-datepicker-div[style] {
|
16 |
-
z-index: 9999999999 !important;
|
17 |
-
}
|
18 |
-
|
19 |
-
/* NF DatePicker Fix */
|
20 |
-
.pika-single {
|
21 |
-
z-index: 9999999999 !important;
|
22 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/sass/partials/_pum_styles.scss
DELETED
@@ -1,267 +0,0 @@
|
|
1 |
-
/* Reset Overlay, Container, Title, Content(div) & Close button */
|
2 |
-
.pum-overlay,
|
3 |
-
.pum-container,
|
4 |
-
.pum-title,
|
5 |
-
.pum-content,
|
6 |
-
.pum-content + .pum-close,
|
7 |
-
.pum-content + .pum-close:hover,
|
8 |
-
.pum-content + .pum-close:focus,
|
9 |
-
.pum-content + .pum-close:active {
|
10 |
-
background: none;
|
11 |
-
border: none;
|
12 |
-
bottom: auto;
|
13 |
-
clear: none;
|
14 |
-
cursor: default;
|
15 |
-
/* didn't really know what the default for display should be*/
|
16 |
-
/*display:inline;*/
|
17 |
-
float: none;
|
18 |
-
font-family: inherit;
|
19 |
-
font-size: medium;
|
20 |
-
font-style: normal;
|
21 |
-
font-weight: normal;
|
22 |
-
height: auto;
|
23 |
-
left: auto;
|
24 |
-
letter-spacing: normal;
|
25 |
-
line-height: normal;
|
26 |
-
max-height: none;
|
27 |
-
max-width: none;
|
28 |
-
min-height: 0;
|
29 |
-
min-width: 0;
|
30 |
-
overflow: visible;
|
31 |
-
position: static;
|
32 |
-
right: auto;
|
33 |
-
text-align: left;
|
34 |
-
text-decoration: none;
|
35 |
-
text-indent: 0;
|
36 |
-
text-transform: none;
|
37 |
-
top: auto;
|
38 |
-
visibility: visible;
|
39 |
-
white-space: normal;
|
40 |
-
width: auto;
|
41 |
-
z-index: auto;
|
42 |
-
}
|
43 |
-
|
44 |
-
.pum-title,
|
45 |
-
.pum-content {
|
46 |
-
position: relative;
|
47 |
-
z-index: 1;
|
48 |
-
}
|
49 |
-
|
50 |
-
.pum-overlay {
|
51 |
-
position: fixed;
|
52 |
-
height: 100%;
|
53 |
-
width: 100%;
|
54 |
-
top: 0;
|
55 |
-
left: 0;
|
56 |
-
right: 0;
|
57 |
-
bottom: 0;
|
58 |
-
z-index: 1999999999;
|
59 |
-
overflow: auto;
|
60 |
-
overflow: initial;
|
61 |
-
display: none;
|
62 |
-
transition: all .15s ease-in-out;
|
63 |
-
|
64 |
-
&.pum-preview,
|
65 |
-
&.pum-form-submission-detected {
|
66 |
-
display: block;
|
67 |
-
}
|
68 |
-
|
69 |
-
/**
|
70 |
-
* Use border-box for all popup content. Providing more precise sizing.
|
71 |
-
*/
|
72 |
-
&, &:before, &:after,
|
73 |
-
& *, & *:before, & *:after {
|
74 |
-
-webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
|
75 |
-
-moz-box-sizing: border-box; /* Firefox, other Gecko */
|
76 |
-
box-sizing: border-box;
|
77 |
-
}
|
78 |
-
|
79 |
-
}
|
80 |
-
|
81 |
-
.pum-container {
|
82 |
-
top: 100px;
|
83 |
-
position: absolute;
|
84 |
-
margin-bottom: 3em;
|
85 |
-
z-index: 1999999999;
|
86 |
-
|
87 |
-
&.pum-responsive {
|
88 |
-
|
89 |
-
left: 50%;
|
90 |
-
margin-left: -47.5%;
|
91 |
-
width: 95%;
|
92 |
-
height: auto;
|
93 |
-
overflow: visible;
|
94 |
-
|
95 |
-
// Add Responsive Image Handling.
|
96 |
-
img {
|
97 |
-
max-width: 100%;
|
98 |
-
height: auto;
|
99 |
-
}
|
100 |
-
|
101 |
-
@media only screen and (min-width: 1024px) {
|
102 |
-
&.pum-responsive-nano {
|
103 |
-
margin-left: -5%;
|
104 |
-
width: 10%;
|
105 |
-
}
|
106 |
-
|
107 |
-
&.pum-responsive-micro {
|
108 |
-
margin-left: -10%;
|
109 |
-
width: 20%;
|
110 |
-
}
|
111 |
-
|
112 |
-
&.pum-responsive-tiny {
|
113 |
-
margin-left: -15%;
|
114 |
-
width: 30%;
|
115 |
-
}
|
116 |
-
|
117 |
-
&.pum-responsive-small {
|
118 |
-
margin-left: -20%;
|
119 |
-
width: 40%;
|
120 |
-
}
|
121 |
-
|
122 |
-
&.pum-responsive-medium {
|
123 |
-
margin-left: -30%;
|
124 |
-
width: 60%;
|
125 |
-
}
|
126 |
-
|
127 |
-
&.pum-responsive-normal {
|
128 |
-
margin-left: -30%;
|
129 |
-
width: 70%;
|
130 |
-
}
|
131 |
-
|
132 |
-
&.pum-responsive-large {
|
133 |
-
margin-left: -35%;
|
134 |
-
width: 80%;
|
135 |
-
}
|
136 |
-
|
137 |
-
&.pum-responsive-xlarge {
|
138 |
-
margin-left: -47.5%;
|
139 |
-
width: 95%;
|
140 |
-
}
|
141 |
-
|
142 |
-
&.pum-position-fixed {
|
143 |
-
position: fixed;
|
144 |
-
}
|
145 |
-
}
|
146 |
-
|
147 |
-
@media only screen and (max-width: 1024px) {
|
148 |
-
&.pum-position-fixed {
|
149 |
-
position: absolute;
|
150 |
-
}
|
151 |
-
}
|
152 |
-
|
153 |
-
}
|
154 |
-
|
155 |
-
&.custom-position {
|
156 |
-
left: auto;
|
157 |
-
top: auto;
|
158 |
-
margin-left: inherit;
|
159 |
-
}
|
160 |
-
|
161 |
-
.pum-title {
|
162 |
-
}
|
163 |
-
|
164 |
-
.pum-content {
|
165 |
-
|
166 |
-
> :last-child {
|
167 |
-
margin-bottom: 0;
|
168 |
-
}
|
169 |
-
|
170 |
-
+ .pum-close {
|
171 |
-
text-decoration: none;
|
172 |
-
text-align: center;
|
173 |
-
line-height: 1;
|
174 |
-
position: absolute;
|
175 |
-
cursor: pointer;
|
176 |
-
min-width: 1em;
|
177 |
-
z-index: 2;
|
178 |
-
background-color: transparent;
|
179 |
-
|
180 |
-
> span {
|
181 |
-
position: relative;
|
182 |
-
z-index: 1;
|
183 |
-
}
|
184 |
-
}
|
185 |
-
}
|
186 |
-
|
187 |
-
&.pum-scrollable {
|
188 |
-
|
189 |
-
.pum-content {
|
190 |
-
|
191 |
-
overflow: auto;
|
192 |
-
overflow-y: scroll;
|
193 |
-
max-height: 95%;
|
194 |
-
|
195 |
-
}
|
196 |
-
|
197 |
-
}
|
198 |
-
|
199 |
-
}
|
200 |
-
|
201 |
-
.pum-overlay.pum-overlay-disabled {
|
202 |
-
visibility: hidden;
|
203 |
-
|
204 |
-
&::-webkit-scrollbar {
|
205 |
-
display: block;
|
206 |
-
}
|
207 |
-
|
208 |
-
.pum-container {
|
209 |
-
visibility: visible;
|
210 |
-
}
|
211 |
-
}
|
212 |
-
|
213 |
-
.pum-overlay.pum-click-to-close {
|
214 |
-
/* Hack for iOS devices so they properly treat it as a clickable element */
|
215 |
-
cursor: pointer;
|
216 |
-
}
|
217 |
-
|
218 |
-
html.pum-open {
|
219 |
-
|
220 |
-
&.pum-open-overlay {
|
221 |
-
overflow: hidden;
|
222 |
-
|
223 |
-
&.pum-open-fixed {
|
224 |
-
|
225 |
-
.pum-overlay {
|
226 |
-
overflow: hidden;
|
227 |
-
}
|
228 |
-
|
229 |
-
.pum-container {
|
230 |
-
position: fixed;
|
231 |
-
}
|
232 |
-
}
|
233 |
-
|
234 |
-
&.pum-open-scrollable {
|
235 |
-
|
236 |
-
body > *[aria-hidden] {
|
237 |
-
padding-right: 15px;
|
238 |
-
}
|
239 |
-
|
240 |
-
.pum-overlay.pum-active {
|
241 |
-
overflow-y: scroll;
|
242 |
-
-webkit-overflow-scrolling: touch;
|
243 |
-
}
|
244 |
-
|
245 |
-
}
|
246 |
-
|
247 |
-
}
|
248 |
-
|
249 |
-
&.pum-open-overlay-disabled {
|
250 |
-
|
251 |
-
&.pum-open-fixed {
|
252 |
-
.pum-container {
|
253 |
-
position: fixed;
|
254 |
-
}
|
255 |
-
}
|
256 |
-
|
257 |
-
&.pum-open-scrollable {
|
258 |
-
.pum-overlay.pum-active {
|
259 |
-
position: static;
|
260 |
-
height: auto;
|
261 |
-
width: auto;
|
262 |
-
}
|
263 |
-
}
|
264 |
-
|
265 |
-
}
|
266 |
-
|
267 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/sass/partials/admin/_deprecated.scss
DELETED
@@ -1,31 +0,0 @@
|
|
1 |
-
/* Form Table Dividers */
|
2 |
-
/*!******************************************************************************
|
3 |
-
* Copyright (c) 2019, Code Atlantic LLC
|
4 |
-
******************************************************************************/
|
5 |
-
|
6 |
-
.title-divider {
|
7 |
-
th {
|
8 |
-
border-top: 1px solid #ccc;
|
9 |
-
padding: 0;
|
10 |
-
}
|
11 |
-
|
12 |
-
.title {
|
13 |
-
font-size: 1.125em;
|
14 |
-
padding-left: 0 !important;
|
15 |
-
padding-top: 20px !important;
|
16 |
-
padding-bottom: 0 !important;
|
17 |
-
}
|
18 |
-
}
|
19 |
-
|
20 |
-
.form-table {
|
21 |
-
td, tr {
|
22 |
-
padding-top: 10px;
|
23 |
-
}
|
24 |
-
}
|
25 |
-
|
26 |
-
.posttypediv,
|
27 |
-
.taxonomydiv {
|
28 |
-
margin-bottom: 10px;
|
29 |
-
clear: both;
|
30 |
-
overflow: auto;
|
31 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/sass/partials/admin/_fields.scss
DELETED
@@ -1,38 +0,0 @@
|
|
1 |
-
/*!******************************************************************************
|
2 |
-
* Copyright (c) 2019, Code Atlantic LLC
|
3 |
-
******************************************************************************/
|
4 |
-
|
5 |
-
$plugin-prefix: 'plugin' !default;
|
6 |
-
$custom-select2-selector: 'select2' !default;
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Triggers field
|
10 |
-
*/
|
11 |
-
.#{$plugin-prefix}-field-triggers {
|
12 |
-
.#{$plugin-prefix}-popup-trigger-editor {
|
13 |
-
@include add-more-table-lists();
|
14 |
-
}
|
15 |
-
}
|
16 |
-
|
17 |
-
/**
|
18 |
-
* Cookies field
|
19 |
-
*/
|
20 |
-
.#{$plugin-prefix}-field-cookies {
|
21 |
-
.#{$plugin-prefix}-popup-cookie-editor {
|
22 |
-
@include add-more-table-lists();
|
23 |
-
}
|
24 |
-
}
|
25 |
-
|
26 |
-
.#{$plugin-prefix}-field-cookie_key {
|
27 |
-
.cookie-key {
|
28 |
-
position: relative;
|
29 |
-
display: inline-block;
|
30 |
-
button.reset {
|
31 |
-
position: absolute;
|
32 |
-
right: 0;
|
33 |
-
top: 0;
|
34 |
-
bottom: 0;
|
35 |
-
height: 100%;
|
36 |
-
}
|
37 |
-
}
|
38 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/sass/partials/admin/_marketing.scss
DELETED
@@ -1,20 +0,0 @@
|
|
1 |
-
/* Upgrade Tips */
|
2 |
-
/*!******************************************************************************
|
3 |
-
* Copyright (c) 2019, Code Atlantic LLC
|
4 |
-
******************************************************************************/
|
5 |
-
|
6 |
-
.pum-upgrade-tip {
|
7 |
-
color: #333;
|
8 |
-
line-height: 2em !important;
|
9 |
-
|
10 |
-
&div {
|
11 |
-
margin-bottom: 15px;
|
12 |
-
display: block;
|
13 |
-
font-weight: bold;
|
14 |
-
}
|
15 |
-
|
16 |
-
img {
|
17 |
-
float: left;
|
18 |
-
margin-right: 15px;
|
19 |
-
}
|
20 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/sass/partials/admin/_mixins.scss
DELETED
@@ -1,76 +0,0 @@
|
|
1 |
-
/*!******************************************************************************
|
2 |
-
* Copyright (c) 2019, Code Atlantic LLC
|
3 |
-
******************************************************************************/
|
4 |
-
|
5 |
-
@mixin table-alignments() {
|
6 |
-
thead, tbody {
|
7 |
-
th, td {
|
8 |
-
text-align: center;
|
9 |
-
|
10 |
-
&:first-child {
|
11 |
-
text-align: left;
|
12 |
-
}
|
13 |
-
|
14 |
-
&:last-child {
|
15 |
-
text-align: right;
|
16 |
-
}
|
17 |
-
}
|
18 |
-
}
|
19 |
-
|
20 |
-
tbody {
|
21 |
-
th, td {
|
22 |
-
&:first-child {
|
23 |
-
padding-left: 0;
|
24 |
-
}
|
25 |
-
|
26 |
-
&:last-child {
|
27 |
-
padding-right: 0;
|
28 |
-
}
|
29 |
-
}
|
30 |
-
}
|
31 |
-
|
32 |
-
}
|
33 |
-
|
34 |
-
@mixin add-more-table-lists() {
|
35 |
-
.pum-add-new, .add-new {
|
36 |
-
float: right;
|
37 |
-
}
|
38 |
-
|
39 |
-
.list-table {
|
40 |
-
display: none !important;
|
41 |
-
|
42 |
-
@include table-alignments();
|
43 |
-
}
|
44 |
-
|
45 |
-
span.edit {
|
46 |
-
cursor: pointer;
|
47 |
-
color: #0073aa;
|
48 |
-
text-decoration: underline;
|
49 |
-
}
|
50 |
-
|
51 |
-
.list-item-actions {
|
52 |
-
i {
|
53 |
-
cursor: pointer;
|
54 |
-
}
|
55 |
-
}
|
56 |
-
|
57 |
-
.no-list-items {
|
58 |
-
display: block;
|
59 |
-
select {
|
60 |
-
max-width: 100%;
|
61 |
-
}
|
62 |
-
}
|
63 |
-
|
64 |
-
&.has-list-items {
|
65 |
-
|
66 |
-
.list-table {
|
67 |
-
display: block !important;;
|
68 |
-
}
|
69 |
-
|
70 |
-
.no-list-items {
|
71 |
-
display: none !important;;
|
72 |
-
}
|
73 |
-
|
74 |
-
}
|
75 |
-
|
76 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/sass/partials/site/_animations.scss
DELETED
@@ -1,21 +0,0 @@
|
|
1 |
-
/*!******************************************************************************
|
2 |
-
* Copyright (c) 2019, Code Atlantic LLC
|
3 |
-
******************************************************************************/
|
4 |
-
|
5 |
-
@keyframes rotate-forever {
|
6 |
-
0% {
|
7 |
-
transform: rotate(0deg);
|
8 |
-
}
|
9 |
-
100% {
|
10 |
-
transform: rotate(360deg);
|
11 |
-
}
|
12 |
-
}
|
13 |
-
|
14 |
-
@keyframes spinner-loader {
|
15 |
-
0% {
|
16 |
-
transform: rotate(0deg);
|
17 |
-
}
|
18 |
-
100% {
|
19 |
-
transform: rotate(360deg);
|
20 |
-
}
|
21 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/sass/partials/site/form/_alignments.scss
DELETED
@@ -1,31 +0,0 @@
|
|
1 |
-
/*!******************************************************************************
|
2 |
-
* Copyright (c) 2019, Code Atlantic LLC
|
3 |
-
******************************************************************************/
|
4 |
-
|
5 |
-
.pum-alignment-left {
|
6 |
-
text-align: left;
|
7 |
-
}
|
8 |
-
|
9 |
-
.pum-alignment-center {
|
10 |
-
text-align: center;
|
11 |
-
}
|
12 |
-
|
13 |
-
.pum-alignment-right {
|
14 |
-
text-align: right;
|
15 |
-
}
|
16 |
-
|
17 |
-
|
18 |
-
/*
|
19 |
-
* Form Alignments
|
20 |
-
*/
|
21 |
-
.pum-form--alignment-left {
|
22 |
-
text-align: left;
|
23 |
-
}
|
24 |
-
|
25 |
-
.pum-form--alignment-center {
|
26 |
-
text-align: center;
|
27 |
-
}
|
28 |
-
|
29 |
-
.pum-form--alignment-right {
|
30 |
-
text-align: right;
|
31 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/sass/partials/site/form/_general.scss
DELETED
@@ -1,88 +0,0 @@
|
|
1 |
-
/*!******************************************************************************
|
2 |
-
* Copyright (c) 2019, Code Atlantic LLC
|
3 |
-
******************************************************************************/
|
4 |
-
|
5 |
-
.pum-form {
|
6 |
-
margin: 0 auto 16px;
|
7 |
-
}
|
8 |
-
|
9 |
-
.pum-form--loading {
|
10 |
-
opacity: 0.5;
|
11 |
-
}
|
12 |
-
|
13 |
-
.pum-form__field {
|
14 |
-
margin-bottom: 1em;
|
15 |
-
|
16 |
-
label {
|
17 |
-
font-weight: bold;
|
18 |
-
}
|
19 |
-
|
20 |
-
select,
|
21 |
-
input[type="date"] {
|
22 |
-
margin: 0 auto;
|
23 |
-
font-size: 18px;
|
24 |
-
line-height: 26px;
|
25 |
-
text-align: center;
|
26 |
-
padding: 3px;
|
27 |
-
vertical-align: middle;
|
28 |
-
}
|
29 |
-
|
30 |
-
select {
|
31 |
-
padding: 5px 3px;
|
32 |
-
}
|
33 |
-
}
|
34 |
-
|
35 |
-
.pum-form__loader {
|
36 |
-
font-size: 2em;
|
37 |
-
animation-duration: 0.75s;
|
38 |
-
animation-iteration-count: infinite;
|
39 |
-
animation-name: rotate-forever;
|
40 |
-
animation-timing-function: linear;
|
41 |
-
height: .75em;
|
42 |
-
width: .75em;
|
43 |
-
border: 0.25em solid rgba(0, 0, 0, 0.5);
|
44 |
-
border-right-color: transparent;
|
45 |
-
border-radius: 50%;
|
46 |
-
display: inline-block;
|
47 |
-
}
|
48 |
-
|
49 |
-
.pum-form__submit {
|
50 |
-
position: relative;
|
51 |
-
|
52 |
-
.pum-form__loader {
|
53 |
-
margin-left: .5em;
|
54 |
-
border: 0.25em solid rgba(255, 255, 255, 0.5);
|
55 |
-
border-right-color: transparent;
|
56 |
-
}
|
57 |
-
}
|
58 |
-
|
59 |
-
.pum-form__messages {
|
60 |
-
display: none;
|
61 |
-
border: 1px solid rgba(0, 0, 0, 0.25);
|
62 |
-
margin-bottom: .5em;
|
63 |
-
padding: 1em;
|
64 |
-
position: relative;
|
65 |
-
}
|
66 |
-
|
67 |
-
.pum-form__message {
|
68 |
-
margin-bottom: .5em;
|
69 |
-
|
70 |
-
&:last-child {
|
71 |
-
margin-bottom: 0;
|
72 |
-
}
|
73 |
-
}
|
74 |
-
|
75 |
-
.pum-form__message--error {
|
76 |
-
color: red !important;
|
77 |
-
border-color: red;
|
78 |
-
}
|
79 |
-
|
80 |
-
.pum-form__message--success {
|
81 |
-
color: green !important;
|
82 |
-
border-color: green;
|
83 |
-
}
|
84 |
-
|
85 |
-
.pum-form--loading {
|
86 |
-
opacity: 0.5;
|
87 |
-
}
|
88 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/sass/partials/site/form/_privacy.scss
DELETED
@@ -1,64 +0,0 @@
|
|
1 |
-
/*!******************************************************************************
|
2 |
-
* Copyright (c) 2019, Code Atlantic LLC
|
3 |
-
******************************************************************************/
|
4 |
-
|
5 |
-
.pum-form__field--consent {
|
6 |
-
text-align: left;
|
7 |
-
|
8 |
-
&.pum-form__field--checkbox {
|
9 |
-
label {
|
10 |
-
display: inline-block;
|
11 |
-
vertical-align: middle;
|
12 |
-
|
13 |
-
input {
|
14 |
-
display: inline-block;
|
15 |
-
width: inherit;
|
16 |
-
margin: 0;
|
17 |
-
vertical-align: middle;
|
18 |
-
}
|
19 |
-
}
|
20 |
-
|
21 |
-
}
|
22 |
-
|
23 |
-
&.pum-form__field--radio {
|
24 |
-
|
25 |
-
.pum-form__consent-radios {
|
26 |
-
|
27 |
-
&.pum-form__consent-radios--inline {
|
28 |
-
label {
|
29 |
-
display: inline-block;
|
30 |
-
vertical-align: middle;
|
31 |
-
|
32 |
-
input {
|
33 |
-
display: inline-block;
|
34 |
-
width: inherit;
|
35 |
-
margin: 0;
|
36 |
-
vertical-align: middle;
|
37 |
-
}
|
38 |
-
}
|
39 |
-
|
40 |
-
label + label {
|
41 |
-
margin-left: 1em;
|
42 |
-
}
|
43 |
-
|
44 |
-
}
|
45 |
-
|
46 |
-
&.pum-form__consent-radios--stacked {
|
47 |
-
|
48 |
-
label {
|
49 |
-
display: block;
|
50 |
-
vertical-align: middle;
|
51 |
-
|
52 |
-
input {
|
53 |
-
display: inline-block;
|
54 |
-
width: inherit;
|
55 |
-
margin: 0;
|
56 |
-
vertical-align: middle;
|
57 |
-
}
|
58 |
-
}
|
59 |
-
}
|
60 |
-
|
61 |
-
}
|
62 |
-
|
63 |
-
}
|
64 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/sass/partials/site/form/_sub_form.scss
DELETED
@@ -1,34 +0,0 @@
|
|
1 |
-
/*!******************************************************************************
|
2 |
-
* Copyright (c) 2019, Code Atlantic LLC
|
3 |
-
******************************************************************************/
|
4 |
-
|
5 |
-
.pum-sub-form {
|
6 |
-
.pum-sub-form-loading {
|
7 |
-
opacity: 0.5;
|
8 |
-
}
|
9 |
-
|
10 |
-
p.pum-newsletter-error-msg {
|
11 |
-
margin: 0;
|
12 |
-
}
|
13 |
-
|
14 |
-
.spinner-loader {
|
15 |
-
right: 50%;
|
16 |
-
position: absolute;
|
17 |
-
bottom: 40%;
|
18 |
-
}
|
19 |
-
|
20 |
-
/* :not(:required) hides this rule from IE9 and below */
|
21 |
-
.spinner-loader:not(:required) {
|
22 |
-
animation: spinner-loader 1500ms infinite linear;
|
23 |
-
border-radius: 0.5em;
|
24 |
-
box-shadow: rgba(0, 0, 51, 0.3) 1.5em 0 0 0, rgba(0, 0, 51, 0.3) 1.1em 1.1em 0 0, rgba(0, 0, 51, 0.3) 0 1.5em 0 0, rgba(0, 0, 51, 0.3) -1.1em 1.1em 0 0, rgba(0, 0, 51, 0.3) -1.5em 0 0 0, rgba(0, 0, 51, 0.3) -1.1em -1.1em 0 0, rgba(0, 0, 51, 0.3) 0 -1.5em 0 0, rgba(0, 0, 51, 0.3) 1.1em -1.1em 0 0;
|
25 |
-
display: inline-block;
|
26 |
-
font-size: 10px;
|
27 |
-
width: 1em;
|
28 |
-
height: 1em;
|
29 |
-
margin: 1.5em;
|
30 |
-
overflow: hidden;
|
31 |
-
text-indent: 100%;
|
32 |
-
}
|
33 |
-
|
34 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/sass/partials/site/form/layout/_block.scss
DELETED
@@ -1,11 +0,0 @@
|
|
1 |
-
/*!******************************************************************************
|
2 |
-
* Copyright (c) 2019, Code Atlantic LLC
|
3 |
-
******************************************************************************/
|
4 |
-
|
5 |
-
.pum-form--layout-block {
|
6 |
-
.pum-form__field,
|
7 |
-
div, input, button {
|
8 |
-
display: block;
|
9 |
-
width: 100%;
|
10 |
-
}
|
11 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/sass/partials/site/form/layout/_inline.scss
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
/*!******************************************************************************
|
2 |
-
* Copyright (c) 2019, Code Atlantic LLC
|
3 |
-
******************************************************************************/
|
4 |
-
|
5 |
-
.pum-form--layout-inline {
|
6 |
-
.pum-form__field {
|
7 |
-
display: inline-block;
|
8 |
-
}
|
9 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/sass/partials/site/form/layout/_standard.scss
DELETED
@@ -1,12 +0,0 @@
|
|
1 |
-
/*!******************************************************************************
|
2 |
-
* Copyright (c) 2019, Code Atlantic LLC
|
3 |
-
******************************************************************************/
|
4 |
-
|
5 |
-
.pum-form--layout-standard {
|
6 |
-
.pum-form__field {
|
7 |
-
> label {
|
8 |
-
margin-bottom: .25em;
|
9 |
-
display: block;
|
10 |
-
}
|
11 |
-
}
|
12 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/sass/partials/site/form/style/_default.scss
DELETED
@@ -1,28 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* Form Styles
|
3 |
-
*/
|
4 |
-
/*!******************************************************************************
|
5 |
-
* Copyright (c) 2019, Code Atlantic LLC
|
6 |
-
******************************************************************************/
|
7 |
-
|
8 |
-
.pum-form--style-default {
|
9 |
-
label {
|
10 |
-
font-size: 14px;
|
11 |
-
font-weight: bold;
|
12 |
-
}
|
13 |
-
|
14 |
-
input[type=text],
|
15 |
-
input[type=email] {
|
16 |
-
background-color: #f8f7f7;
|
17 |
-
margin-bottom: 5px;
|
18 |
-
font-size: 14px;
|
19 |
-
padding: 10px 8px;
|
20 |
-
}
|
21 |
-
|
22 |
-
button {
|
23 |
-
font-size: 18px;
|
24 |
-
margin: 10px 0 0;
|
25 |
-
padding: 10px 5px;
|
26 |
-
cursor: pointer;
|
27 |
-
}
|
28 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/sass/site.scss
DELETED
@@ -1,15 +0,0 @@
|
|
1 |
-
/* Animations */
|
2 |
-
@import 'partials/site/animations';
|
3 |
-
/* Popup Core Styles */
|
4 |
-
@import 'partials/pum_styles';
|
5 |
-
/* PM Forms */
|
6 |
-
@import 'partials/site/form/general';
|
7 |
-
@import 'partials/site/form/alignments';
|
8 |
-
@import 'partials/site/form/layout/standard';
|
9 |
-
@import 'partials/site/form/layout/inline';
|
10 |
-
@import 'partials/site/form/layout/block';
|
11 |
-
@import 'partials/site/form/style/default';
|
12 |
-
@import 'partials/site/form/sub_form';
|
13 |
-
@import 'partials/site/form/privacy';
|
14 |
-
/* 3rd Party Plugin Compatibility Fixes */
|
15 |
-
@import 'partials/compatibility';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/sass/vendor/select2/_dropdown.scss
DELETED
@@ -1,73 +0,0 @@
|
|
1 |
-
.pumselect2-dropdown {
|
2 |
-
background-color: white;
|
3 |
-
|
4 |
-
border: 1px solid #aaa;
|
5 |
-
border-radius: 4px;
|
6 |
-
|
7 |
-
box-sizing: border-box;
|
8 |
-
|
9 |
-
display: block;
|
10 |
-
|
11 |
-
position: absolute;
|
12 |
-
left: -100000px;
|
13 |
-
|
14 |
-
width: 100%;
|
15 |
-
|
16 |
-
z-index: 1051;
|
17 |
-
}
|
18 |
-
|
19 |
-
.pumselect2-results {
|
20 |
-
display: block;
|
21 |
-
}
|
22 |
-
|
23 |
-
.pumselect2-results__options {
|
24 |
-
list-style: none;
|
25 |
-
margin: 0;
|
26 |
-
padding: 0;
|
27 |
-
}
|
28 |
-
|
29 |
-
.pumselect2-results__option {
|
30 |
-
padding: 6px;
|
31 |
-
|
32 |
-
user-select: none;
|
33 |
-
-webkit-user-select: none;
|
34 |
-
|
35 |
-
&[aria-selected] {
|
36 |
-
cursor: pointer;
|
37 |
-
}
|
38 |
-
}
|
39 |
-
|
40 |
-
.pumselect2-container--open .pumselect2-dropdown {
|
41 |
-
left: 0;
|
42 |
-
}
|
43 |
-
|
44 |
-
.pumselect2-container--open .pumselect2-dropdown--above {
|
45 |
-
border-bottom: none;
|
46 |
-
border-bottom-left-radius: 0;
|
47 |
-
border-bottom-right-radius: 0;
|
48 |
-
}
|
49 |
-
|
50 |
-
.pumselect2-container--open .pumselect2-dropdown--below {
|
51 |
-
border-top: none;
|
52 |
-
border-top-left-radius: 0;
|
53 |
-
border-top-right-radius: 0;
|
54 |
-
}
|
55 |
-
|
56 |
-
.pumselect2-search--dropdown {
|
57 |
-
display: block;
|
58 |
-
padding: 4px;
|
59 |
-
|
60 |
-
.pumselect2-search__field {
|
61 |
-
padding: 4px;
|
62 |
-
width: 100%;
|
63 |
-
box-sizing: border-box;
|
64 |
-
|
65 |
-
&::-webkit-search-cancel-button {
|
66 |
-
-webkit-appearance: none;
|
67 |
-
}
|
68 |
-
}
|
69 |
-
|
70 |
-
&.pumselect2-search--hide {
|
71 |
-
display: none;
|
72 |
-
}
|
73 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/sass/vendor/select2/_multiple.scss
DELETED
@@ -1,35 +0,0 @@
|
|
1 |
-
.pumselect2-selection--multiple {
|
2 |
-
box-sizing: border-box;
|
3 |
-
|
4 |
-
cursor: pointer;
|
5 |
-
display: block;
|
6 |
-
|
7 |
-
min-height: 32px;
|
8 |
-
|
9 |
-
user-select: none;
|
10 |
-
-webkit-user-select: none;
|
11 |
-
|
12 |
-
.pumselect2-selection__rendered {
|
13 |
-
display: inline-block;
|
14 |
-
overflow: hidden;
|
15 |
-
padding-left: 8px;
|
16 |
-
text-overflow: ellipsis;
|
17 |
-
white-space: nowrap;
|
18 |
-
}
|
19 |
-
}
|
20 |
-
|
21 |
-
.pumselect2-search--inline {
|
22 |
-
float: left;
|
23 |
-
|
24 |
-
.pumselect2-search__field {
|
25 |
-
box-sizing: border-box;
|
26 |
-
border: none;
|
27 |
-
font-size: 100%;
|
28 |
-
margin-top: 5px;
|
29 |
-
padding: 0;
|
30 |
-
|
31 |
-
&::-webkit-search-cancel-button {
|
32 |
-
-webkit-appearance: none;
|
33 |
-
}
|
34 |
-
}
|
35 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/sass/vendor/select2/_single.scss
DELETED
@@ -1,34 +0,0 @@
|
|
1 |
-
.pumselect2-selection--single {
|
2 |
-
box-sizing: border-box;
|
3 |
-
|
4 |
-
cursor: pointer;
|
5 |
-
display: block;
|
6 |
-
|
7 |
-
height: 28px;
|
8 |
-
|
9 |
-
user-select: none;
|
10 |
-
-webkit-user-select: none;
|
11 |
-
|
12 |
-
.pumselect2-selection__rendered {
|
13 |
-
display: block;
|
14 |
-
padding-left: 8px;
|
15 |
-
padding-right: 20px;
|
16 |
-
|
17 |
-
overflow: hidden;
|
18 |
-
text-overflow: ellipsis;
|
19 |
-
white-space: nowrap;
|
20 |
-
}
|
21 |
-
|
22 |
-
.pumselect2-selection__clear {
|
23 |
-
position: relative;
|
24 |
-
}
|
25 |
-
}
|
26 |
-
|
27 |
-
&[dir="rtl"] {
|
28 |
-
.pumselect2-selection--single {
|
29 |
-
.pumselect2-selection__rendered {
|
30 |
-
padding-right: 8px;
|
31 |
-
padding-left: 20px;
|
32 |
-
}
|
33 |
-
}
|
34 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/sass/vendor/select2/mixins/_gradients.scss
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
// https://github.com/twbs/bootstrap-sass/blob/3.3-stable/assets/stylesheets/bootstrap/mixins/_gradients.scss#L17-L27
|
2 |
-
|
3 |
-
// Vertical gradient, from top to bottom
|
4 |
-
//
|
5 |
-
// Creates two color stops, start and end, by specifying a color and position for each color stop.
|
6 |
-
// Color stops are not available in IE9 and below.
|
7 |
-
@mixin gradient-vertical($start-color: #555, $end-color: #333, $start-percent: 0%, $end-percent: 100%) {
|
8 |
-
background-image: -webkit-linear-gradient(top, $start-color $start-percent, $end-color $end-percent); // Safari 5.1-6, Chrome 10+
|
9 |
-
background-image: -o-linear-gradient(top, $start-color $start-percent, $end-color $end-percent); // Opera 12
|
10 |
-
background-image: linear-gradient(to bottom, $start-color $start-percent, $end-color $end-percent); // Standard, IE10, Firefox 16+, Opera 12.10+, Safari 7+, Chrome 26+
|
11 |
-
background-repeat: repeat-x;
|
12 |
-
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}', GradientType=0); // IE9 and down
|
13 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/sass/vendor/select2/theme/classic/_defaults.scss
DELETED
@@ -1,34 +0,0 @@
|
|
1 |
-
$remove-color: #888 !default;
|
2 |
-
$remove-hover-color: #555 !default;
|
3 |
-
$remove-width: 20px !default;
|
4 |
-
|
5 |
-
$selection-color: #444 !default;
|
6 |
-
|
7 |
-
$border-color: #aaa !default;
|
8 |
-
$border-radius: 4px !default;
|
9 |
-
|
10 |
-
$focus-border-color: #5897fb !default;
|
11 |
-
|
12 |
-
$container-height: 28px !default;
|
13 |
-
|
14 |
-
$selection-bg-top-color: white !default;
|
15 |
-
$selection-bg-bottom-color: #eeeeee !default;
|
16 |
-
|
17 |
-
$container-placeholder-color: #999 !default;
|
18 |
-
|
19 |
-
$container-focus-border-color: blue !default;
|
20 |
-
|
21 |
-
$selection-opened-bg-top-color: $selection-bg-bottom-color !default;
|
22 |
-
$selection-opened-bg-bottom-color: $selection-bg-top-color !default;
|
23 |
-
|
24 |
-
$dropdown-z-index: 1 !default;
|
25 |
-
|
26 |
-
$dropdown-bg-color: $selection-bg-top-color !default;
|
27 |
-
|
28 |
-
$results-max-height: 200px !default;
|
29 |
-
$results-nested-padding: 20px !default;
|
30 |
-
|
31 |
-
$results-choice-bg-hover-color: #3875d7 !default;
|
32 |
-
$results-choice-fg-hover-color: white !default;
|
33 |
-
|
34 |
-
$results-choice-fg-unselectable-color: grey !default;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/sass/vendor/select2/theme/classic/_multiple.scss
DELETED
@@ -1,93 +0,0 @@
|
|
1 |
-
.pumselect2-selection--multiple {
|
2 |
-
background-color: white;
|
3 |
-
|
4 |
-
border: 1px solid $border-color;
|
5 |
-
border-radius: $border-radius;
|
6 |
-
|
7 |
-
cursor: text;
|
8 |
-
|
9 |
-
outline: 0;
|
10 |
-
|
11 |
-
&:focus {
|
12 |
-
border: 1px solid $focus-border-color;
|
13 |
-
}
|
14 |
-
|
15 |
-
.pumselect2-selection__rendered {
|
16 |
-
list-style: none;
|
17 |
-
margin: 0;
|
18 |
-
padding: 0 5px;
|
19 |
-
}
|
20 |
-
|
21 |
-
.pumselect2-selection__clear {
|
22 |
-
display: none;
|
23 |
-
}
|
24 |
-
|
25 |
-
.pumselect2-selection__choice {
|
26 |
-
background-color: #e4e4e4;
|
27 |
-
|
28 |
-
border: 1px solid $border-color;
|
29 |
-
border-radius: $border-radius;
|
30 |
-
|
31 |
-
cursor: default;
|
32 |
-
|
33 |
-
float: left;
|
34 |
-
|
35 |
-
margin-right: 5px;
|
36 |
-
margin-top: 5px;
|
37 |
-
padding: 0 5px;
|
38 |
-
}
|
39 |
-
|
40 |
-
.pumselect2-selection__choice__remove {
|
41 |
-
color: $remove-color;
|
42 |
-
cursor: pointer;
|
43 |
-
|
44 |
-
display: inline-block;
|
45 |
-
font-weight: bold;
|
46 |
-
|
47 |
-
margin-right: 2px;
|
48 |
-
|
49 |
-
&:hover {
|
50 |
-
color: $remove-hover-color;
|
51 |
-
}
|
52 |
-
}
|
53 |
-
}
|
54 |
-
|
55 |
-
&[dir="rtl"] {
|
56 |
-
.pumselect2-selection--multiple {
|
57 |
-
.pumselect2-selection__choice {
|
58 |
-
float: right;
|
59 |
-
}
|
60 |
-
|
61 |
-
.pumselect2-selection__choice {
|
62 |
-
margin-left: 5px;
|
63 |
-
margin-right: auto;
|
64 |
-
}
|
65 |
-
|
66 |
-
.pumselect2-selection__choice__remove {
|
67 |
-
margin-left: 2px;
|
68 |
-
margin-right: auto;
|
69 |
-
}
|
70 |
-
}
|
71 |
-
}
|
72 |
-
|
73 |
-
&.pumselect2-container--open {
|
74 |
-
.pumselect2-selection--multiple {
|
75 |
-
border: 1px solid $focus-border-color;
|
76 |
-
}
|
77 |
-
|
78 |
-
&.pumselect2-container--above {
|
79 |
-
.pumselect2-selection--multiple {
|
80 |
-
border-top: none;
|
81 |
-
border-top-left-radius: 0;
|
82 |
-
border-top-right-radius: 0;
|
83 |
-
}
|
84 |
-
}
|
85 |
-
|
86 |
-
&.pumselect2-container--below {
|
87 |
-
.pumselect2-selection--multiple {
|
88 |
-
border-bottom: none;
|
89 |
-
border-bottom-left-radius: 0;
|
90 |
-
border-bottom-right-radius: 0;
|
91 |
-
}
|
92 |
-
}
|
93 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/sass/vendor/select2/theme/classic/_single.scss
DELETED
@@ -1,124 +0,0 @@
|
|
1 |
-
.pumselect2-selection--single {
|
2 |
-
background-color: mix($selection-bg-top-color, $selection-bg-bottom-color);
|
3 |
-
|
4 |
-
border: 1px solid $border-color;
|
5 |
-
border-radius: $border-radius;
|
6 |
-
|
7 |
-
outline: 0;
|
8 |
-
|
9 |
-
@include gradient-vertical($selection-bg-top-color, $selection-bg-bottom-color, 50%, 100%);
|
10 |
-
|
11 |
-
&:focus {
|
12 |
-
border: 1px solid $focus-border-color;
|
13 |
-
}
|
14 |
-
|
15 |
-
.pumselect2-selection__rendered {
|
16 |
-
color: #444;
|
17 |
-
line-height: 28px;
|
18 |
-
}
|
19 |
-
|
20 |
-
.pumselect2-selection__clear {
|
21 |
-
cursor: pointer;
|
22 |
-
float: right;
|
23 |
-
font-weight: bold;
|
24 |
-
margin-right: 10px;
|
25 |
-
}
|
26 |
-
|
27 |
-
.pumselect2-selection__placeholder {
|
28 |
-
color: #999;
|
29 |
-
}
|
30 |
-
|
31 |
-
.pumselect2-selection__arrow {
|
32 |
-
background-color: #ddd;
|
33 |
-
|
34 |
-
border: none;
|
35 |
-
border-left: 1px solid $border-color;
|
36 |
-
border-top-right-radius: $border-radius;
|
37 |
-
border-bottom-right-radius: $border-radius;
|
38 |
-
|
39 |
-
height: 26px;
|
40 |
-
|
41 |
-
position: absolute;
|
42 |
-
|
43 |
-
top: 1px;
|
44 |
-
right: 1px;
|
45 |
-
|
46 |
-
width: 20px;
|
47 |
-
|
48 |
-
@include gradient-vertical(#eeeeee, #cccccc, 50%, 100%);
|
49 |
-
|
50 |
-
b {
|
51 |
-
border-color: #888 transparent transparent transparent;
|
52 |
-
border-style: solid;
|
53 |
-
border-width: 5px 4px 0 4px;
|
54 |
-
|
55 |
-
height: 0;
|
56 |
-
left: 50%;
|
57 |
-
|
58 |
-
margin-left: -4px;
|
59 |
-
margin-top: -2px;
|
60 |
-
|
61 |
-
position: absolute;
|
62 |
-
|
63 |
-
top: 50%;
|
64 |
-
width: 0;
|
65 |
-
}
|
66 |
-
}
|
67 |
-
}
|
68 |
-
|
69 |
-
&[dir="rtl"] {
|
70 |
-
.pumselect2-selection--single {
|
71 |
-
.pumselect2-selection__clear {
|
72 |
-
float: left;
|
73 |
-
}
|
74 |
-
|
75 |
-
.pumselect2-selection__arrow {
|
76 |
-
border: none;
|
77 |
-
border-right: 1px solid $border-color;
|
78 |
-
|
79 |
-
border-radius: 0;
|
80 |
-
border-top-left-radius: $border-radius;
|
81 |
-
border-bottom-left-radius: $border-radius;
|
82 |
-
|
83 |
-
left: 1px;
|
84 |
-
right: auto;
|
85 |
-
}
|
86 |
-
}
|
87 |
-
}
|
88 |
-
|
89 |
-
&.pumselect2-container--open {
|
90 |
-
.pumselect2-selection--single {
|
91 |
-
border: 1px solid $focus-border-color;
|
92 |
-
|
93 |
-
.pumselect2-selection__arrow {
|
94 |
-
background: transparent;
|
95 |
-
|
96 |
-
border: none;
|
97 |
-
|
98 |
-
b {
|
99 |
-
border-color: transparent transparent #888 transparent;
|
100 |
-
border-width: 0 4px 5px 4px;
|
101 |
-
}
|
102 |
-
}
|
103 |
-
}
|
104 |
-
|
105 |
-
&.pumselect2-container--above {
|
106 |
-
.pumselect2-selection--single {
|
107 |
-
border-top: none;
|
108 |
-
border-top-left-radius: 0;
|
109 |
-
border-top-right-radius: 0;
|
110 |
-
|
111 |
-
@include gradient-vertical($selection-opened-bg-bottom-color, $selection-opened-bg-top-color, 0%, 50%);
|
112 |
-
}
|
113 |
-
}
|
114 |
-
|
115 |
-
&.pumselect2-container--below {
|
116 |
-
.pumselect2-selection--single {
|
117 |
-
border-bottom: none;
|
118 |
-
border-bottom-left-radius: 0;
|
119 |
-
border-bottom-right-radius: 0;
|
120 |
-
|
121 |
-
@include gradient-vertical($selection-opened-bg-top-color, $selection-opened-bg-bottom-color, 50%, 100%);
|
122 |
-
}
|
123 |
-
}
|
124 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/sass/vendor/select2/theme/classic/layout.scss
DELETED
@@ -1,64 +0,0 @@
|
|
1 |
-
@import "defaults";
|
2 |
-
@import "../../mixins/gradients";
|
3 |
-
|
4 |
-
.pumselect2-container--classic {
|
5 |
-
@import "single";
|
6 |
-
@import "multiple";
|
7 |
-
|
8 |
-
.pumselect2-search--dropdown {
|
9 |
-
.pumselect2-search__field {
|
10 |
-
border: 1px solid $border-color;
|
11 |
-
outline: 0;
|
12 |
-
}
|
13 |
-
}
|
14 |
-
|
15 |
-
.pumselect2-search--inline {
|
16 |
-
.pumselect2-search__field {
|
17 |
-
outline: 0;
|
18 |
-
box-shadow: none;
|
19 |
-
}
|
20 |
-
}
|
21 |
-
|
22 |
-
.pumselect2-dropdown {
|
23 |
-
background-color: $dropdown-bg-color;
|
24 |
-
border: 1px solid transparent;
|
25 |
-
}
|
26 |
-
|
27 |
-
.pumselect2-dropdown--above {
|
28 |
-
border-bottom: none;
|
29 |
-
}
|
30 |
-
|
31 |
-
.pumselect2-dropdown--below {
|
32 |
-
border-top: none;
|
33 |
-
}
|
34 |
-
|
35 |
-
.pumselect2-results > .pumselect2-results__options {
|
36 |
-
max-height: $results-max-height;
|
37 |
-
overflow-y: auto;
|
38 |
-
}
|
39 |
-
|
40 |
-
.pumselect2-results__option {
|
41 |
-
&[role=group] {
|
42 |
-
padding: 0;
|
43 |
-
}
|
44 |
-
|
45 |
-
&[aria-disabled=true] {
|
46 |
-
color: $results-choice-fg-unselectable-color;
|
47 |
-
}
|
48 |
-
}
|
49 |
-
|
50 |
-
.pumselect2-results__option--highlighted[aria-selected] {
|
51 |
-
background-color: $results-choice-bg-hover-color;
|
52 |
-
color: $results-choice-fg-hover-color;
|
53 |
-
}
|
54 |
-
|
55 |
-
.pumselect2-results__group {
|
56 |
-
cursor: default;
|
57 |
-
display: block;
|
58 |
-
padding: 6px;
|
59 |
-
}
|
60 |
-
|
61 |
-
&.pumselect2-container--open .pumselect2-dropdown {
|
62 |
-
border-color: $focus-border-color;
|
63 |
-
}
|
64 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/sass/vendor/select2/theme/default/_multiple.scss
DELETED
@@ -1,98 +0,0 @@
|
|
1 |
-
.pumselect2-selection--multiple {
|
2 |
-
background-color: white;
|
3 |
-
border: 1px solid #aaa;
|
4 |
-
border-radius: 4px;
|
5 |
-
cursor: text;
|
6 |
-
|
7 |
-
.pumselect2-selection__rendered {
|
8 |
-
box-sizing: border-box;
|
9 |
-
list-style: none;
|
10 |
-
margin: 0;
|
11 |
-
padding: 0 5px;
|
12 |
-
width: 100%;
|
13 |
-
|
14 |
-
li {
|
15 |
-
list-style: none;
|
16 |
-
}
|
17 |
-
}
|
18 |
-
|
19 |
-
.pumselect2-selection__placeholder {
|
20 |
-
color: #999;
|
21 |
-
|
22 |
-
margin-top: 5px;
|
23 |
-
|
24 |
-
float: left;
|
25 |
-
}
|
26 |
-
|
27 |
-
.pumselect2-selection__clear {
|
28 |
-
cursor: pointer;
|
29 |
-
float: right;
|
30 |
-
font-weight: bold;
|
31 |
-
margin-top: 5px;
|
32 |
-
margin-right: 10px;
|
33 |
-
}
|
34 |
-
|
35 |
-
.pumselect2-selection__choice {
|
36 |
-
background-color: #e4e4e4;
|
37 |
-
|
38 |
-
border: 1px solid #aaa;
|
39 |
-
border-radius: 4px;
|
40 |
-
cursor: default;
|
41 |
-
|
42 |
-
float: left;
|
43 |
-
|
44 |
-
margin-right: 5px;
|
45 |
-
margin-top: 5px;
|
46 |
-
padding: 0 5px;
|
47 |
-
}
|
48 |
-
|
49 |
-
.pumselect2-selection__choice__remove {
|
50 |
-
color: #999;
|
51 |
-
cursor: pointer;
|
52 |
-
|
53 |
-
display: inline-block;
|
54 |
-
font-weight: bold;
|
55 |
-
|
56 |
-
margin-right: 2px;
|
57 |
-
|
58 |
-
&:hover {
|
59 |
-
color: #333;
|
60 |
-
}
|
61 |
-
}
|
62 |
-
}
|
63 |
-
|
64 |
-
&[dir="rtl"] {
|
65 |
-
.pumselect2-selection--multiple {
|
66 |
-
.pumselect2-selection__choice, .pumselect2-selection__placeholder, .pumselect2-search--inline {
|
67 |
-
float: right;
|
68 |
-
}
|
69 |
-
|
70 |
-
.pumselect2-selection__choice {
|
71 |
-
margin-left: 5px;
|
72 |
-
margin-right: auto;
|
73 |
-
}
|
74 |
-
|
75 |
-
.pumselect2-selection__choice__remove {
|
76 |
-
margin-left: 2px;
|
77 |
-
margin-right: auto;
|
78 |
-
}
|
79 |
-
}
|
80 |
-
}
|
81 |
-
|
82 |
-
&.pumselect2-container--focus {
|
83 |
-
.pumselect2-selection--multiple {
|
84 |
-
border: solid black 1px;
|
85 |
-
outline: 0;
|
86 |
-
}
|
87 |
-
}
|
88 |
-
|
89 |
-
&.pumselect2-container--disabled {
|
90 |
-
.pumselect2-selection--multiple {
|
91 |
-
background-color: #eee;
|
92 |
-
cursor: default;
|
93 |
-
}
|
94 |
-
|
95 |
-
.pumselect2-selection__choice__remove {
|
96 |
-
display: none;
|
97 |
-
}
|
98 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/sass/vendor/select2/theme/default/_single.scss
DELETED
@@ -1,83 +0,0 @@
|
|
1 |
-
.pumselect2-selection--single {
|
2 |
-
background-color: #fff;
|
3 |
-
border: 1px solid #aaa;
|
4 |
-
border-radius: 4px;
|
5 |
-
|
6 |
-
.pumselect2-selection__rendered {
|
7 |
-
color: #444;
|
8 |
-
line-height: 28px;
|
9 |
-
}
|
10 |
-
|
11 |
-
.pumselect2-selection__clear {
|
12 |
-
cursor: pointer;
|
13 |
-
float: right;
|
14 |
-
font-weight: bold;
|
15 |
-
}
|
16 |
-
|
17 |
-
.pumselect2-selection__placeholder {
|
18 |
-
color: #999;
|
19 |
-
}
|
20 |
-
|
21 |
-
.pumselect2-selection__arrow {
|
22 |
-
height: 26px;
|
23 |
-
|
24 |
-
position: absolute;
|
25 |
-
|
26 |
-
top: 1px;
|
27 |
-
right: 1px;
|
28 |
-
|
29 |
-
width: 20px;
|
30 |
-
|
31 |
-
b {
|
32 |
-
border-color: #888 transparent transparent transparent;
|
33 |
-
border-style: solid;
|
34 |
-
border-width: 5px 4px 0 4px;
|
35 |
-
|
36 |
-
height: 0;
|
37 |
-
left: 50%;
|
38 |
-
|
39 |
-
margin-left: -4px;
|
40 |
-
margin-top: -2px;
|
41 |
-
|
42 |
-
position: absolute;
|
43 |
-
|
44 |
-
top: 50%;
|
45 |
-
width: 0;
|
46 |
-
}
|
47 |
-
}
|
48 |
-
}
|
49 |
-
|
50 |
-
&[dir="rtl"] {
|
51 |
-
.pumselect2-selection--single {
|
52 |
-
.pumselect2-selection__clear {
|
53 |
-
float: left;
|
54 |
-
}
|
55 |
-
|
56 |
-
.pumselect2-selection__arrow {
|
57 |
-
left: 1px;
|
58 |
-
right: auto;
|
59 |
-
}
|
60 |
-
}
|
61 |
-
}
|
62 |
-
|
63 |
-
&.pumselect2-container--disabled {
|
64 |
-
.pumselect2-selection--single {
|
65 |
-
background-color: #eee;
|
66 |
-
cursor: default;
|
67 |
-
|
68 |
-
.pumselect2-selection__clear {
|
69 |
-
display: none;
|
70 |
-
}
|
71 |
-
}
|
72 |
-
}
|
73 |
-
|
74 |
-
&.pumselect2-container--open {
|
75 |
-
.pumselect2-selection--single {
|
76 |
-
.pumselect2-selection__arrow {
|
77 |
-
b {
|
78 |
-
border-color: transparent transparent #888 transparent;
|
79 |
-
border-width: 0 4px 5px 4px;
|
80 |
-
}
|
81 |
-
}
|
82 |
-
}
|
83 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/sass/vendor/select2/theme/default/layout.scss
DELETED
@@ -1,97 +0,0 @@
|
|
1 |
-
.pumselect2-container--default {
|
2 |
-
@import "single";
|
3 |
-
@import "multiple";
|
4 |
-
|
5 |
-
&.pumselect2-container--open.pumselect2-container--above {
|
6 |
-
.pumselect2-selection--single, .pumselect2-selection--multiple {
|
7 |
-
border-top-left-radius: 0;
|
8 |
-
border-top-right-radius: 0;
|
9 |
-
}
|
10 |
-
}
|
11 |
-
|
12 |
-
&.pumselect2-container--open.pumselect2-container--below {
|
13 |
-
.pumselect2-selection--single, .pumselect2-selection--multiple {
|
14 |
-
border-bottom-left-radius: 0;
|
15 |
-
border-bottom-right-radius: 0;
|
16 |
-
}
|
17 |
-
}
|
18 |
-
|
19 |
-
.pumselect2-search--dropdown {
|
20 |
-
.pumselect2-search__field {
|
21 |
-
border: 1px solid #aaa;
|
22 |
-
}
|
23 |
-
}
|
24 |
-
|
25 |
-
.pumselect2-search--inline {
|
26 |
-
.pumselect2-search__field {
|
27 |
-
background: transparent;
|
28 |
-
border: none;
|
29 |
-
outline: 0;
|
30 |
-
box-shadow: none;
|
31 |
-
-webkit-appearance: textfield;
|
32 |
-
}
|
33 |
-
}
|
34 |
-
|
35 |
-
.pumselect2-results > .pumselect2-results__options {
|
36 |
-
max-height: 200px;
|
37 |
-
overflow-y: auto;
|
38 |
-
}
|
39 |
-
|
40 |
-
.pumselect2-results__option {
|
41 |
-
&[role=group] {
|
42 |
-
padding: 0;
|
43 |
-
}
|
44 |
-
|
45 |
-
&[aria-disabled=true] {
|
46 |
-
color: #999;
|
47 |
-
}
|
48 |
-
|
49 |
-
&[aria-selected=true] {
|
50 |
-
background-color: #ddd;
|
51 |
-
}
|
52 |
-
|
53 |
-
.pumselect2-results__option {
|
54 |
-
padding-left: 1em;
|
55 |
-
|
56 |
-
.pumselect2-results__group {
|
57 |
-
padding-left: 0;
|
58 |
-
}
|
59 |
-
|
60 |
-
.pumselect2-results__option {
|
61 |
-
margin-left: -1em;
|
62 |
-
padding-left: 2em;
|
63 |
-
|
64 |
-
.pumselect2-results__option {
|
65 |
-
margin-left: -2em;
|
66 |
-
padding-left: 3em;
|
67 |
-
|
68 |
-
.pumselect2-results__option {
|
69 |
-
margin-left: -3em;
|
70 |
-
padding-left: 4em;
|
71 |
-
|
72 |
-
.pumselect2-results__option {
|
73 |
-
margin-left: -4em;
|
74 |
-
padding-left: 5em;
|
75 |
-
|
76 |
-
.pumselect2-results__option {
|
77 |
-
margin-left: -5em;
|
78 |
-
padding-left: 6em;
|
79 |
-
}
|
80 |
-
}
|
81 |
-
}
|
82 |
-
}
|
83 |
-
}
|
84 |
-
}
|
85 |
-
}
|
86 |
-
|
87 |
-
.pumselect2-results__option--highlighted[aria-selected] {
|
88 |
-
background-color: #5897fb;
|
89 |
-
color: white;
|
90 |
-
}
|
91 |
-
|
92 |
-
.pumselect2-results__group {
|
93 |
-
cursor: default;
|
94 |
-
display: block;
|
95 |
-
padding: 6px;
|
96 |
-
}
|
97 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
assets/sounds/beep-two.mp3
ADDED
Binary file
|
assets/sounds/beep-up.mp3
ADDED
Binary file
|
assets/sounds/beep.mp3
ADDED
Binary file
|
assets/sounds/chimes.mp3
ADDED
Binary file
|
assets/sounds/correct.mp3
ADDED
Binary file
|
assets/sounds/index.php
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Silence is golden.
|
classes/Admin.php
CHANGED
@@ -6,6 +6,7 @@
|
|
6 |
class PUM_Admin {
|
7 |
|
8 |
public static function init() {
|
|
|
9 |
PUM_Admin_Pages::init();
|
10 |
PUM_Admin_Ajax::init();
|
11 |
PUM_Admin_Assets::init();
|
6 |
class PUM_Admin {
|
7 |
|
8 |
public static function init() {
|
9 |
+
PUM_Admin_BlockEditor::init();
|
10 |
PUM_Admin_Pages::init();
|
11 |
PUM_Admin_Ajax::init();
|
12 |
PUM_Admin_Assets::init();
|
classes/Admin/Assets.php
CHANGED
@@ -60,6 +60,7 @@ class PUM_Admin_Assets {
|
|
60 |
|
61 |
$admin_vars = apply_filters( 'pum_admin_vars', apply_filters( 'pum_admin_var', array(
|
62 |
'post_id' => ! empty( $_GET['post'] ) ? intval( $_GET['post'] ) : null,
|
|
|
63 |
'default_provider' => pum_get_option( 'newsletter_default_provider', 'none' ),
|
64 |
'homeurl' => home_url(),
|
65 |
'I10n' => array(
|
60 |
|
61 |
$admin_vars = apply_filters( 'pum_admin_vars', apply_filters( 'pum_admin_var', array(
|
62 |
'post_id' => ! empty( $_GET['post'] ) ? intval( $_GET['post'] ) : null,
|
63 |
+
'pm_dir_url' => Popup_Maker::$URL,
|
64 |
'default_provider' => pum_get_option( 'newsletter_default_provider', 'none' ),
|
65 |
'homeurl' => home_url(),
|
66 |
'I10n' => array(
|
classes/Admin/BlockEditor.php
ADDED
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*******************************************************************************
|
3 |
+
* Copyright (c) 2019, Code Atlantic LLC
|
4 |
+
******************************************************************************/
|
5 |
+
|
6 |
+
/**
|
7 |
+
* Class PUM_Admin_BlockEditor
|
8 |
+
*
|
9 |
+
* @since 1.10.0
|
10 |
+
*/
|
11 |
+
class PUM_Admin_BlockEditor {
|
12 |
+
|
13 |
+
public static $version = '1.0.0';
|
14 |
+
|
15 |
+
/**
|
16 |
+
* Initialize
|
17 |
+
*/
|
18 |
+
public static function init() {
|
19 |
+
// Bail early if the Block Playground is active and ahead of core.
|
20 |
+
if ( defined( 'PUM_BLOCK_PLAYGROUND' ) && version_compare( PUM_BLOCK_PLAYGROUND, self::$version, '>' ) ) {
|
21 |
+
return;
|
22 |
+
}
|
23 |
+
|
24 |
+
// TODO Test if this is needed in core or not.
|
25 |
+
add_action( 'enqueue_block_editor_assets', array( 'PUM_Site_Assets', 'register_styles' ) );
|
26 |
+
add_action( 'enqueue_block_editor_assets', [ __CLASS__, 'register_editor_assets' ] );
|
27 |
+
|
28 |
+
// Here for future use.
|
29 |
+
// add_action( 'enqueue_block_assets', [ __CLASS__, 'register_block_assets' ] );
|
30 |
+
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Registers all block assets so that they can be enqueued through Gutenberg in
|
34 |
+
* the corresponding context.
|
35 |
+
*
|
36 |
+
* Passes translations to JavaScript.
|
37 |
+
*
|
38 |
+
* @since 1.10.0
|
39 |
+
*/
|
40 |
+
public static function register_editor_assets() {
|
41 |
+
$build_path = 'dist/block-editor/';
|
42 |
+
|
43 |
+
$script_path = $build_path . 'block-editor.js';
|
44 |
+
$script_asset_path = $build_path . 'block-editor.asset.php';
|
45 |
+
$script_asset = file_exists( Popup_Maker::$DIR . $script_asset_path ) ? require( Popup_Maker::$DIR . $script_asset_path ) : array( 'dependencies' => array(), 'version' => Popup_Maker::$VER );
|
46 |
+
$script_url = plugins_url( $script_path, Popup_Maker::$FILE );
|
47 |
+
wp_enqueue_script( 'popup-maker-block-editor', $script_url, array_merge( $script_asset['dependencies'], array( 'wp-edit-post' ) ), $script_asset['version'] );
|
48 |
+
|
49 |
+
wp_localize_script( 'popup-maker-block-editor', 'pum_block_editor_vars', [
|
50 |
+
'popups' => pum_get_all_popups(),
|
51 |
+
] );
|
52 |
+
|
53 |
+
$editor_styles_path = $build_path . 'block-editor-styles.css';
|
54 |
+
$editor_styles_asset_path = $build_path . 'block-editor-styles.asset.php';
|
55 |
+
$editor_styles_asset = file_exists( Popup_Maker::$DIR . $editor_styles_asset_path ) ? require( Popup_Maker::$DIR . $editor_styles_asset_path ) : array( 'dependencies' => array(), 'version' => Popup_Maker::$VER );
|
56 |
+
wp_enqueue_style( 'popup-maker-block-editor', plugins_url( $editor_styles_path, Popup_Maker::$FILE ), array(), $editor_styles_asset['version'] );
|
57 |
+
|
58 |
+
if ( function_exists( 'wp_set_script_translations' ) ) {
|
59 |
+
/**
|
60 |
+
* May be extended to wp_set_script_translations( 'my-handle', 'my-domain',
|
61 |
+
* plugin_dir_path( MY_PLUGIN ) . 'languages' ) ). For details see
|
62 |
+
* https://make.wordpress.org/core/2018/11/09/new-javascript-i18n-support-in-wordpress/
|
63 |
+
*/
|
64 |
+
wp_set_script_translations( 'popup-maker-block-editor', 'popup-maker' );
|
65 |
+
}
|
66 |
+
}
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Register assets for individual block styles
|
70 |
+
*/
|
71 |
+
public static function register_block_assets() {
|
72 |
+
$build_path = 'dist/block-editor/';
|
73 |
+
$block_styles_path = $build_path . 'block-styles.css';
|
74 |
+
$block_styles_asset_path = $build_path . 'block-styles.asset.php';
|
75 |
+
$block_styles_asset = file_exists( Popup_Maker::$DIR . $block_styles_asset_path ) ? require( Popup_Maker::$DIR . $block_styles_asset_path ) : array( 'dependencies' => array(), 'version' => Popup_Maker::$VER );
|
76 |
+
wp_enqueue_style( 'popup-maker-block-styles', plugins_url( $block_styles_path, Popup_Maker::$FILE ), array(), $block_styles_asset['version'] );
|
77 |
+
}
|
78 |
+
}
|
classes/Admin/Extend.php
CHANGED
@@ -155,10 +155,22 @@ class PUM_Admin_Extend {
|
|
155 |
'desc' => __( 'CF7 is one of the most downloaded plugins on the WordPress repo. Make simple forms with ease and plenty of free addons available.', 'popup-maker' ),
|
156 |
),
|
157 |
array(
|
158 |
-
'slug' => '
|
159 |
-
'name' => __( '
|
160 |
-
'url' => 'https://wppopupmaker.com/recommends/
|
161 |
-
'desc' => __( '
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
162 |
),
|
163 |
);
|
164 |
|
@@ -200,7 +212,24 @@ class PUM_Admin_Extend {
|
|
200 |
* @return array
|
201 |
*/
|
202 |
public static function other_plugins() {
|
203 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
204 |
}
|
205 |
|
206 |
/**
|
@@ -238,7 +267,7 @@ class PUM_Admin_Extend {
|
|
238 |
} elseif ( 'page-builders' === $active_tab ) {
|
239 |
self::render_page_builders_list();
|
240 |
} elseif ( 'other' === $active_tab ) {
|
241 |
-
|
242 |
} else { ?>
|
243 |
|
244 |
<?php self::render_extension_list(); ?>
|
@@ -435,6 +464,42 @@ class PUM_Admin_Extend {
|
|
435 |
<?php
|
436 |
}
|
437 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
438 |
/**
|
439 |
* Render extension tab extensions list.
|
440 |
*/
|
@@ -486,10 +551,6 @@ class PUM_Admin_Extend {
|
|
486 |
$extensions[ $ext['slug'] ] = $ext;
|
487 |
}
|
488 |
|
489 |
-
// Set core bundle to be first item listed.
|
490 |
-
// TODO Replace this with a full width banner instead.
|
491 |
-
$extensions = array_merge( array( 'core-extensions-bundle' => $extensions['core-extensions-bundle'] ), $extensions );
|
492 |
-
|
493 |
$i = 0;
|
494 |
|
495 |
foreach ( $extensions as $extension ) : ?>
|
155 |
'desc' => __( 'CF7 is one of the most downloaded plugins on the WordPress repo. Make simple forms with ease and plenty of free addons available.', 'popup-maker' ),
|
156 |
),
|
157 |
array(
|
158 |
+
'slug' => 'mc4wp',
|
159 |
+
'name' => __( 'MailChimp For WordPress', 'popup-maker' ),
|
160 |
+
'url' => 'https://wppopupmaker.com/recommends/mailchimp-for-wordpress',
|
161 |
+
'desc' => __( 'Allowing your visitors to subscribe to your newsletter should be easy. With this plugin, it finally is.', 'popup-maker' ),
|
162 |
+
),
|
163 |
+
array(
|
164 |
+
'slug' => 'caldera-forms',
|
165 |
+
'name' => __( 'Caldera Forms', 'popup-maker' ),
|
166 |
+
'url' => 'https://wppopupmaker.com/recommends/caldera-forms',
|
167 |
+
'desc' => __( 'Responsive form builder for contact forms, user registration and login forms, Mailchimp, PayPal Express and more.', 'popup-maker' ),
|
168 |
+
),
|
169 |
+
array(
|
170 |
+
'slug' => 'wp-forms',
|
171 |
+
'name' => __( 'WP Forms', 'popup-maker' ),
|
172 |
+
'url' => 'https://wppopupmaker.com/recommends/wp-forms',
|
173 |
+
'desc' => __( 'Drag & Drop online form builder that helps you create beautiful contact forms with just a few clicks.', 'popup-maker' ),
|
174 |
),
|
175 |
);
|
176 |
|
212 |
* @return array
|
213 |
*/
|
214 |
public static function other_plugins() {
|
215 |
+
$other_plugins = array(
|
216 |
+
array(
|
217 |
+
'slug' => 'user-menus',
|
218 |
+
'name' => __( 'User Menus', 'popup-maker' ),
|
219 |
+
'url' => 'https://wppopupmaker.com/recommends/user-menus',
|
220 |
+
'desc' => __( "Show/hide menu items to logged in users, logged out users or specific user roles. Display logged in user details in menu. Add a logout link to menu.", 'popup-maker' ),
|
221 |
+
),
|
222 |
+
array(
|
223 |
+
'slug' => 'content-control',
|
224 |
+
'name' => __( 'Content Control', 'popup-maker' ),
|
225 |
+
'url' => 'https://wppopupmaker.com/recommends/content-control',
|
226 |
+
'desc' => __( " Restrict content to logged in/out users or specific user roles. Restrict access to certain parts of a page/post. Control the visibility of widgets.", 'popup-maker' ),
|
227 |
+
),
|
228 |
+
);
|
229 |
+
|
230 |
+
shuffle( $other_plugins );
|
231 |
+
|
232 |
+
return apply_filters( 'pum_extend_page_other_plugins', $other_plugins );
|
233 |
}
|
234 |
|
235 |
/**
|
267 |
} elseif ( 'page-builders' === $active_tab ) {
|
268 |
self::render_page_builders_list();
|
269 |
} elseif ( 'other' === $active_tab ) {
|
270 |
+
self::render_other_list();
|
271 |
} else { ?>
|
272 |
|
273 |
<?php self::render_extension_list(); ?>
|
464 |
<?php
|
465 |
}
|
466 |
|
467 |
+
/**
|
468 |
+
* Renders extensions tab other plugins list.
|
469 |
+
*
|
470 |
+
* @since 1.10.0
|
471 |
+
*/
|
472 |
+
public static function render_other_list() {
|
473 |
+
$recommended_plugins = self::other_plugins();
|
474 |
+
?>
|
475 |
+
<h4><?php _e( 'These plugins work great alongside our popups!', 'popup-maker' ); ?></h4>
|
476 |
+
|
477 |
+
<ul class="extensions-available">
|
478 |
+
<?php
|
479 |
+
foreach ( $recommended_plugins as $plugin ) : ?>
|
480 |
+
<li class="available-extension-inner <?php echo esc_attr( $plugin['slug'] ); ?>">
|
481 |
+
<h3>
|
482 |
+
<a target="_blank" href="<?php echo esc_attr( $plugin['url'] ); ?>">
|
483 |
+
<?php echo esc_html( $plugin['name'] ) ?>
|
484 |
+
</a>
|
485 |
+
</h3>
|
486 |
+
|
487 |
+
<img class="extension-thumbnail" src="<?php echo esc_attr( POPMAKE_URL . '/assets/images/plugins/' . $plugin['slug'] . '.png' ) ?>" />
|
488 |
+
|
489 |
+
<p><?php echo esc_html( $plugin['desc'] ); ?></p>
|
490 |
+
|
491 |
+
<span class="action-links">
|
492 |
+
<a class="button" target="_blank" href="<?php echo esc_attr( $plugin['url'] ); ?>"><?php _e( 'Check it out', 'popup-maker' ); ?></a>
|
493 |
+
</span>
|
494 |
+
</li>
|
495 |
+
<?php
|
496 |
+
endforeach; ?>
|
497 |
+
</ul>
|
498 |
+
|
499 |
+
|
500 |
+
<?php
|
501 |
+
}
|
502 |
+
|
503 |
/**
|
504 |
* Render extension tab extensions list.
|
505 |
*/
|
551 |
$extensions[ $ext['slug'] ] = $ext;
|
552 |
}
|
553 |
|
|
|
|
|
|
|
|
|
554 |
$i = 0;
|
555 |
|
556 |
foreach ( $extensions as $extension ) : ?>
|
classes/Admin/Pages.php
CHANGED
@@ -149,9 +149,9 @@ class PUM_Admin_Pages {
|
|
149 |
__( 'Extend', 'popup-maker' ),
|
150 |
__( 'Settings', 'popup-maker' ),
|
151 |
__( 'Tools', 'popup-maker' ),
|
152 |
-
__( 'Support Forum', '
|
153 |
-
__( 'Account', '
|
154 |
-
__( 'Contact Us', '
|
155 |
__( 'Help & Support', 'popup-maker' ),
|
156 |
) );
|
157 |
|
149 |
__( 'Extend', 'popup-maker' ),
|
150 |
__( 'Settings', 'popup-maker' ),
|
151 |
__( 'Tools', 'popup-maker' ),
|
152 |
+
__( 'Support Forum', 'popup-maker' ),
|
153 |
+
__( 'Account', 'popup-maker' ),
|
154 |
+
__( 'Contact Us', 'popup-maker' ),
|
155 |
__( 'Help & Support', 'popup-maker' ),
|
156 |
) );
|
157 |
|
classes/Admin/Popups.php
CHANGED
@@ -66,7 +66,7 @@ class PUM_Admin_Popups {
|
|
66 |
}
|
67 |
|
68 |
if ( 'popup' == $screen->post_type ) {
|
69 |
-
$title = __( 'Popup Name
|
70 |
}
|
71 |
|
72 |
return $title;
|
@@ -341,9 +341,11 @@ class PUM_Admin_Popups {
|
|
341 |
'main' => __( 'Conditions', 'popup-maker' ),
|
342 |
),
|
343 |
'display' => array(
|
|
|
344 |
'main' => __( 'Appearance', 'popup-maker' ),
|
345 |
'size' => __( 'Size', 'popup-maker' ),
|
346 |
'animation' => __( 'Animation', 'popup-maker' ),
|
|
|
347 |
'position' => __( 'Position', 'popup-maker' ),
|
348 |
'advanced' => __( 'Advanced', 'popup-maker' ),
|
349 |
),
|
@@ -411,6 +413,22 @@ class PUM_Admin_Popups {
|
|
411 |
),
|
412 |
) ),
|
413 |
'display' => apply_filters( 'pum_popup_display_settings_fields', array(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
414 |
'main' => array(
|
415 |
'theme_id' => array(
|
416 |
'label' => __( 'Popup Theme', 'popup-maker' ),
|
@@ -562,6 +580,34 @@ class PUM_Admin_Popups {
|
|
562 |
),
|
563 |
),
|
564 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
565 |
'position' => array(
|
566 |
'location' => array(
|
567 |
'label' => __( 'Location', 'popup-maker' ),
|
@@ -686,7 +732,7 @@ class PUM_Admin_Popups {
|
|
686 |
'close_text' => array(
|
687 |
'label' => __( 'Close Text', 'popup-maker' ),
|
688 |
'placeholder' => __( 'Close', 'popup-maker' ),
|
689 |
-
'desc' => __( 'Override the default close text.', 'popup-maker' ),
|
690 |
'priority' => 10,
|
691 |
'private' => true,
|
692 |
),
|
66 |
}
|
67 |
|
68 |
if ( 'popup' == $screen->post_type ) {
|
69 |
+
$title = __( 'Popup Name', 'popup-maker' );
|
70 |
}
|
71 |
|
72 |
return $title;
|
341 |
'main' => __( 'Conditions', 'popup-maker' ),
|
342 |
),
|
343 |
'display' => array(
|
344 |
+
'preset' => __( 'Display Presets', 'popup-maker' ),
|
345 |
'main' => __( 'Appearance', 'popup-maker' ),
|
346 |
'size' => __( 'Size', 'popup-maker' ),
|
347 |
'animation' => __( 'Animation', 'popup-maker' ),
|
348 |
+
'sound' => __( 'Sounds', 'popup-maker' ),
|
349 |
'position' => __( 'Position', 'popup-maker' ),
|
350 |
'advanced' => __( 'Advanced', 'popup-maker' ),
|
351 |
),
|
413 |
),
|
414 |
) ),
|
415 |
'display' => apply_filters( 'pum_popup_display_settings_fields', array(
|
416 |
+
'preset' => array(
|
417 |
+
'explain' => array(
|
418 |
+
'type' => 'html',
|
419 |
+
'content' => '<p>Select one of the types below to get started! Once selected, you can adjust the display settings using the tabs above.</p>'
|
420 |
+
),
|
421 |
+
'type_section' => array(
|
422 |
+
'type' => 'section',
|
423 |
+
'classes' => 'popup-types',
|
424 |
+
'fields' => array(
|
425 |
+
'<div class="popup-type" data-popup-type="center-popup"><img src="' . Popup_Maker::$URL . 'assets/images/admin/display-switcher/center-popup.png" alt="' . __( 'Center Popup', 'popup-maker' ) . '"/><button class="button">' . __( 'Center Popup', 'popup-maker' ) . '</button></div>',
|
426 |
+
'<div class="popup-type" data-popup-type="right-bottom-slidein"><img src="' . Popup_Maker::$URL . 'assets/images/admin/display-switcher/right-bottom-slidein.png" alt="' . __( 'Right Bottom Slide-in', 'popup-maker' ) . '"/><button class="button">' . __( 'Right Bottom Slide-in', 'popup-maker' ) . '</button></div>',
|
427 |
+
'<div class="popup-type" data-popup-type="top-bar"><img src="' . Popup_Maker::$URL . 'assets/images/admin/display-switcher/top-bar.png" alt="' . __( 'Top Bar', 'popup-maker' ) . '"/><button class="button">' . __( 'Top Bar', 'popup-maker' ) . '</button></div>',
|
428 |
+
'<div class="popup-type" data-popup-type="left-bottom-notice"><img src="' . Popup_Maker::$URL . 'assets/images/admin/display-switcher/left-bottom-notice.png" alt="' . __( 'Left Bottom Notice', 'popup-maker' ) . '"/><button class="button">' . __( 'Left Bottom Notice', 'popup-maker' ) . '</button></div>',
|
429 |
+
),
|
430 |
+
),
|
431 |
+
),
|
432 |
'main' => array(
|
433 |
'theme_id' => array(
|
434 |
'label' => __( 'Popup Theme', 'popup-maker' ),
|
580 |
),
|
581 |
),
|
582 |
),
|
583 |
+
'sound' => array(
|
584 |
+
'open_sound' => array(
|
585 |
+
'label' => __( 'Opening Sound', 'popup-maker' ),
|
586 |
+
'desc' => __( 'Select a sound to play when the popup opens.', 'popup-maker' ),
|
587 |
+
'type' => 'select',
|
588 |
+
'std' => 'none',
|
589 |
+
'priority' => 10,
|
590 |
+
'options' => array(
|
591 |
+
'none' => __( 'None', 'popup-maker' ),
|
592 |
+
'beep.mp3' => __( 'Beep', 'popup-maker' ),
|
593 |
+
'beep-two.mp3' => __( 'Beep 2', 'popup-maker' ),
|
594 |
+
'beep-up.mp3' => __( 'Beep Up', 'popup-maker' ),
|
595 |
+
'chimes.mp3' => __( 'Chimes', 'popup-maker' ),
|
596 |
+
'correct.mp3' => __( 'Correct', 'popup-maker' ),
|
597 |
+
'custom' => __( 'Custom Sound', 'popup-maker' ),
|
598 |
+
),
|
599 |
+
),
|
600 |
+
'custom_sound' => array(
|
601 |
+
'label' => __( 'Custom Sound URL', 'popup-maker' ),
|
602 |
+
'desc' => __( 'Enter URL to sound file.', 'popup-maker' ),
|
603 |
+
'type' => 'text',
|
604 |
+
'std' => '',
|
605 |
+
'priority' => 10,
|
606 |
+
'dependencies' => array(
|
607 |
+
'open_sound' => array( 'custom' ),
|
608 |
+
),
|
609 |
+
),
|
610 |
+
),
|
611 |
'position' => array(
|
612 |
'location' => array(
|
613 |
'label' => __( 'Location', 'popup-maker' ),
|
732 |
'close_text' => array(
|
733 |
'label' => __( 'Close Text', 'popup-maker' ),
|
734 |
'placeholder' => __( 'Close', 'popup-maker' ),
|
735 |
+
'desc' => __( 'Override the default close text. To use a Font Awesome icon instead of text, enter the CSS classes such as "fas fa-camera".', 'popup-maker' ),
|
736 |
'priority' => 10,
|
737 |
'private' => true,
|
738 |
),
|
classes/Admin/Settings.php
CHANGED
@@ -244,8 +244,8 @@ class PUM_Admin_Settings {
|
|
244 |
'std' => pum_get_default_theme_id(),
|
245 |
),
|
246 |
'gutenberg_support_enabled' => array(
|
247 |
-
'label' => __( 'Enable
|
248 |
-
'desc' => __( 'Enable experimental
|
249 |
'type' => 'checkbox',
|
250 |
),
|
251 |
'google_fonts_api_key' => array(
|
@@ -441,6 +441,20 @@ class PUM_Admin_Settings {
|
|
441 |
'adblock_bypass_url_method' => 'custom',
|
442 |
),
|
443 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
444 |
'disabled_admin_bar' => array(
|
445 |
'type' => 'checkbox',
|
446 |
'label' => __( 'Disable Popups Admin Bar', 'popup-maker' ),
|
@@ -472,8 +486,8 @@ class PUM_Admin_Settings {
|
|
472 |
),
|
473 |
'complete_uninstall' => array(
|
474 |
'type' => 'checkbox',
|
475 |
-
'label' => __( '
|
476 |
-
'desc' => __( 'Check this to completely uninstall
|
477 |
'priority' => 1000,
|
478 |
),
|
479 |
),
|
@@ -788,7 +802,7 @@ class PUM_Admin_Settings {
|
|
788 |
try {
|
789 |
$value = json_decode( stripslashes( $value ) );
|
790 |
} catch ( Exception $e ) {
|
791 |
-
}
|
792 |
}
|
793 |
|
794 |
$meta[ $key ] = PUM_Admin_Helpers::object_to_array( $value );
|
244 |
'std' => pum_get_default_theme_id(),
|
245 |
),
|
246 |
'gutenberg_support_enabled' => array(
|
247 |
+
'label' => __( 'Enable Block Editor Support', 'popup-maker' ),
|
248 |
+
'desc' => __( 'Enable experimental support for using the block editor to edit popups.', 'popup-maker' ),
|
249 |
'type' => 'checkbox',
|
250 |
),
|
251 |
'google_fonts_api_key' => array(
|
441 |
'adblock_bypass_url_method' => 'custom',
|
442 |
),
|
443 |
),
|
444 |
+
'adjust_body_padding' => array(
|
445 |
+
'type' => 'checkbox',
|
446 |
+
'label' => __( 'Adjust the right padding added to the body when popups are shown with an overlay.', 'popup-maker' ),
|
447 |
+
'doclink' => 'https://docs.wppopupmaker.com/article/314-why-does-my-site-shift-jump-or-skip-when-a-popup-is-triggered',
|
448 |
+
),
|
449 |
+
'body_padding_override' => array(
|
450 |
+
'type' => 'text',
|
451 |
+
'placeholder' => '15px',
|
452 |
+
'label' => __( 'Body Padding Override', 'popup-maker' ),
|
453 |
+
'dependencies' => array(
|
454 |
+
'adjust_body_padding' => true,
|
455 |
+
),
|
456 |
+
'std' => '15px',
|
457 |
+
),
|
458 |
'disabled_admin_bar' => array(
|
459 |
'type' => 'checkbox',
|
460 |
'label' => __( 'Disable Popups Admin Bar', 'popup-maker' ),
|
486 |
),
|
487 |
'complete_uninstall' => array(
|
488 |
'type' => 'checkbox',
|
489 |
+
'label' => __( 'Delete all Popup Maker data on deactivation', 'popup-maker' ),
|
490 |
+
'desc' => __( 'Check this to completely uninstall Popup Maker.', 'popup-maker' ),
|
491 |
'priority' => 1000,
|
492 |
),
|
493 |
),
|
802 |
try {
|
803 |
$value = json_decode( stripslashes( $value ) );
|
804 |
} catch ( Exception $e ) {
|
805 |
+
}
|
806 |
}
|
807 |
|
808 |
$meta[ $key ] = PUM_Admin_Helpers::object_to_array( $value );
|
classes/Admin/Shortcode/UI.php
CHANGED
@@ -80,7 +80,12 @@ class PUM_Admin_Shortcode_UI {
|
|
80 |
*/
|
81 |
public static function mce_buttons( $buttons ) {
|
82 |
// Enqueue scripts when editor is detected.
|
83 |
-
|
|
|
|
|
|
|
|
|
|
|
84 |
|
85 |
array_push( $buttons, 'pum_shortcodes' );
|
86 |
|
@@ -92,7 +97,7 @@ class PUM_Admin_Shortcode_UI {
|
|
92 |
*/
|
93 |
public static function enqueue_scripts() {
|
94 |
// Register editor styles.
|
95 |
-
add_editor_style( PUM_Admin_Assets::$css_url . 'admin-editor-styles' . PUM_Admin_Assets::$suffix . '.css' );
|
96 |
|
97 |
wp_enqueue_style( 'pum-admin-shortcode-ui' );
|
98 |
wp_enqueue_script( 'pum-admin-shortcode-ui' );
|
@@ -119,15 +124,16 @@ class PUM_Admin_Shortcode_UI {
|
|
119 |
$shortcodes = array();
|
120 |
|
121 |
foreach ( PUM_Shortcodes::instance()->get_shortcodes() as $tag => $shortcode ) {
|
|
|
|
|
|
|
122 |
/**
|
123 |
* @var $shortcode PUM_Shortcode
|
124 |
*/
|
125 |
-
if ( ! in_array(
|
126 |
continue;
|
127 |
}
|
128 |
|
129 |
-
|
130 |
-
|
131 |
$shortcodes[ $tag ] = array(
|
132 |
'version' => $shortcode->version,
|
133 |
'label' => $shortcode->label(),
|
80 |
*/
|
81 |
public static function mce_buttons( $buttons ) {
|
82 |
// Enqueue scripts when editor is detected.
|
83 |
+
|
84 |
+
if ( ! did_action( 'admin_enqueue_scripts' ) ) {
|
85 |
+
add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_scripts' ), 120 ); // 120 because core styles are registered at 100 for some reason.
|
86 |
+
} else {
|
87 |
+
self::enqueue_scripts();
|
88 |
+
}
|
89 |
|
90 |
array_push( $buttons, 'pum_shortcodes' );
|
91 |
|
97 |
*/
|
98 |
public static function enqueue_scripts() {
|
99 |
// Register editor styles.
|
100 |
+
add_editor_style( PUM_Admin_Assets::$css_url . 'pum-admin-editor-styles' . PUM_Admin_Assets::$suffix . '.css' );
|
101 |
|
102 |
wp_enqueue_style( 'pum-admin-shortcode-ui' );
|
103 |
wp_enqueue_script( 'pum-admin-shortcode-ui' );
|
124 |
$shortcodes = array();
|
125 |
|
126 |
foreach ( PUM_Shortcodes::instance()->get_shortcodes() as $tag => $shortcode ) {
|
127 |
+
|
128 |
+
$post_types = apply_filters( 'pum_shortcode_post_types', $shortcode->post_types(), $shortcode );
|
129 |
+
|
130 |
/**
|
131 |
* @var $shortcode PUM_Shortcode
|
132 |
*/
|
133 |
+
if ( ! in_array( '*', $post_types ) && ! in_array( $type, $post_types ) ) {
|
134 |
continue;
|
135 |
}
|
136 |
|
|
|
|
|
137 |
$shortcodes[ $tag ] = array(
|
138 |
'version' => $shortcode->version,
|
139 |
'label' => $shortcode->label(),
|
classes/Admin/Themes.php
CHANGED
@@ -466,7 +466,7 @@ class PUM_Admin_Themes {
|
|
466 |
$font_weight_options = self::font_weight_options();
|
467 |
|
468 |
$fields = apply_filters( 'pum_theme_settings_fields', array(
|
469 |
-
'general' => apply_filters( '
|
470 |
'main' => array(),
|
471 |
) ),
|
472 |
'overlay' => apply_filters( 'pum_theme_overlay_settings_fields', array(
|
@@ -788,6 +788,7 @@ class PUM_Admin_Themes {
|
|
788 |
'main' => array(
|
789 |
'close_text' => array(
|
790 |
'label' => __( 'Close Button Text', 'popup-maker' ),
|
|
|
791 |
'placeholder' => __( 'CLOSE', 'popup-maker' ),
|
792 |
'std' => __( 'CLOSE', 'popup-maker' ),
|
793 |
'priority' => 10,
|
466 |
$font_weight_options = self::font_weight_options();
|
467 |
|
468 |
$fields = apply_filters( 'pum_theme_settings_fields', array(
|
469 |
+
'general' => apply_filters( 'pum_theme_general_settings_fields', array(
|
470 |
'main' => array(),
|
471 |
) ),
|
472 |
'overlay' => apply_filters( 'pum_theme_overlay_settings_fields', array(
|
788 |
'main' => array(
|
789 |
'close_text' => array(
|
790 |
'label' => __( 'Close Button Text', 'popup-maker' ),
|
791 |
+
'desc' => __( 'To use a Font Awesome icon instead of text, enter the CSS classes such as "fas fa-camera".', 'popup-maker' ),
|
792 |
'placeholder' => __( 'CLOSE', 'popup-maker' ),
|
793 |
'std' => __( 'CLOSE', 'popup-maker' ),
|
794 |
'priority' => 10,
|
classes/AssetCache.php
CHANGED
@@ -57,7 +57,11 @@ class PUM_AssetCache {
|
|
57 |
self::$asset_url = Popup_Maker::$URL . 'assets/';
|
58 |
self::$js_url = self::$asset_url . 'js/';
|
59 |
self::$css_url = self::$asset_url . 'css/';
|
60 |
-
|
|
|
|
|
|
|
|
|
61 |
|
62 |
add_action( 'pum_extension_updated', array( __CLASS__, 'reset_cache' ) );
|
63 |
add_action( 'pum_extension_deactivated', array( __CLASS__, 'reset_cache' ) );
|
@@ -69,6 +73,8 @@ class PUM_AssetCache {
|
|
69 |
add_action( 'pum_update_core_version', array( __CLASS__, 'reset_cache' ) );
|
70 |
add_filter( 'pum_alert_list', array( __CLASS__, 'cache_alert' ) );
|
71 |
|
|
|
|
|
72 |
if ( null === get_option( 'pum_files_writeable', null ) ) {
|
73 |
add_option( 'pum_files_writeable', true );
|
74 |
add_option( '_pum_writeable_notice_dismissed', true );
|
@@ -134,13 +140,13 @@ class PUM_AssetCache {
|
|
134 |
}
|
135 |
|
136 |
// Checks and create cachedir.
|
137 |
-
if ( ! is_dir( self
|
138 |
|
139 |
/** @var WP_Filesystem_Base $wp_filesystem */
|
140 |
-
$wp_filesystem->mkdir( self
|
141 |
}
|
142 |
|
143 |
-
return is_writable( self
|
144 |
}
|
145 |
|
146 |
/**
|
@@ -159,9 +165,10 @@ class PUM_AssetCache {
|
|
159 |
* @return array|string
|
160 |
*/
|
161 |
public static function get_cache_dir() {
|
162 |
-
$
|
163 |
-
|
164 |
-
|
|
|
165 |
|
166 |
if ( ! pum_get_option( 'bypass_adblockers', false ) ) {
|
167 |
return trailingslashit( $upload_dir ) . 'pum';
|
@@ -203,7 +210,10 @@ class PUM_AssetCache {
|
|
203 |
* Generate JS cache file.
|
204 |
*/
|
205 |
public static function cache_js() {
|
206 |
-
|
|
|
|
|
|
|
207 |
|
208 |
$js = "/**\n";
|
209 |
$js .= " * Do not touch this file! This file created by the Popup Maker plugin using PHP\n";
|
@@ -222,7 +232,10 @@ class PUM_AssetCache {
|
|
222 |
* Generate CSS cache file.
|
223 |
*/
|
224 |
public static function cache_css() {
|
225 |
-
|
|
|
|
|
|
|
226 |
|
227 |
$css = "/**\n";
|
228 |
$css .= " * Do not touch this file! This file created by the Popup Maker plugin using PHP\n";
|
@@ -312,22 +325,37 @@ class PUM_AssetCache {
|
|
312 |
/**
|
313 |
* Cache file contents.
|
314 |
*
|
315 |
-
* @param $file
|
316 |
-
* @param $contents
|
317 |
*
|
318 |
* @return bool
|
319 |
*/
|
320 |
-
public static function cache_file( $
|
|
|
|
|
|
|
321 |
if ( ! function_exists( 'WP_Filesystem' ) ) {
|
322 |
require_once( ABSPATH . 'wp-admin/includes/file.php' );
|
323 |
}
|
324 |
|
|
|
|
|
325 |
WP_Filesystem();
|
326 |
|
327 |
/** @var WP_Filesystem_Base $wp_filesystem */
|
328 |
global $wp_filesystem;
|
329 |
|
330 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
331 |
}
|
332 |
|
333 |
/**
|
@@ -389,6 +417,14 @@ class PUM_AssetCache {
|
|
389 |
return $css_code;
|
390 |
}
|
391 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
392 |
/**
|
393 |
* @return string
|
394 |
*/
|
@@ -612,4 +648,45 @@ class PUM_AssetCache {
|
|
612 |
public static function should_not_show_alert() {
|
613 |
return true == get_option( 'pum_files_writeable', true ) || true == get_option( '_pum_writeable_notice_dismissed', true );
|
614 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
615 |
}
|
57 |
self::$asset_url = Popup_Maker::$URL . 'assets/';
|
58 |
self::$js_url = self::$asset_url . 'js/';
|
59 |
self::$css_url = self::$asset_url . 'css/';
|
60 |
+
if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
|
61 |
+
self::$disabled = true;
|
62 |
+
} else {
|
63 |
+
self::$disabled = pum_get_option( 'disable_asset_caching', false );
|
64 |
+
}
|
65 |
|
66 |
add_action( 'pum_extension_updated', array( __CLASS__, 'reset_cache' ) );
|
67 |
add_action( 'pum_extension_deactivated', array( __CLASS__, 'reset_cache' ) );
|
73 |
add_action( 'pum_update_core_version', array( __CLASS__, 'reset_cache' ) );
|
74 |
add_filter( 'pum_alert_list', array( __CLASS__, 'cache_alert' ) );
|
75 |
|
76 |
+
add_action( 'pum_styles', array( __CLASS__, 'global_custom_styles' ) );
|
77 |
+
|
78 |
if ( null === get_option( 'pum_files_writeable', null ) ) {
|
79 |
add_option( 'pum_files_writeable', true );
|
80 |
add_option( '_pum_writeable_notice_dismissed', true );
|
140 |
}
|
141 |
|
142 |
// Checks and create cachedir.
|
143 |
+
if ( false !== self::$cache_dir && ! is_dir( self::$cache_dir ) ) {
|
144 |
|
145 |
/** @var WP_Filesystem_Base $wp_filesystem */
|
146 |
+
$wp_filesystem->mkdir( self::$cache_dir );
|
147 |
}
|
148 |
|
149 |
+
return false !== self::$cache_dir && is_writable( self::$cache_dir ) && ! isset( $_POST['wp_customize'] );
|
150 |
}
|
151 |
|
152 |
/**
|
165 |
* @return array|string
|
166 |
*/
|
167 |
public static function get_cache_dir() {
|
168 |
+
$upload_dir = PUM_Helpers::get_upload_dir_path();
|
169 |
+
if ( false === $upload_dir ) {
|
170 |
+
return false;
|
171 |
+
}
|
172 |
|
173 |
if ( ! pum_get_option( 'bypass_adblockers', false ) ) {
|
174 |
return trailingslashit( $upload_dir ) . 'pum';
|
210 |
* Generate JS cache file.
|
211 |
*/
|
212 |
public static function cache_js() {
|
213 |
+
if ( false === self::$cache_dir ) {
|
214 |
+
return;
|
215 |
+
}
|
216 |
+
$js_file = self::generate_cache_filename( 'pum-site-scripts' ) . '.js';
|
217 |
|
218 |
$js = "/**\n";
|
219 |
$js .= " * Do not touch this file! This file created by the Popup Maker plugin using PHP\n";
|
232 |
* Generate CSS cache file.
|
233 |
*/
|
234 |
public static function cache_css() {
|
235 |
+
if ( false === self::$cache_dir ) {
|
236 |
+
return;
|
237 |
+
}
|
238 |
+
$css_file = self::generate_cache_filename( 'pum-site-styles' ) . '.css';
|
239 |
|
240 |
$css = "/**\n";
|
241 |
$css .= " * Do not touch this file! This file created by the Popup Maker plugin using PHP\n";
|
325 |
/**
|
326 |
* Cache file contents.
|
327 |
*
|
328 |
+
* @param string $filename Filename of file to generate.
|
329 |
+
* @param string $contents Contents to put into file.
|
330 |
*
|
331 |
* @return bool
|
332 |
*/
|
333 |
+
public static function cache_file( $filename, $contents ) {
|
334 |
+
if ( false === self::$cache_dir ) {
|
335 |
+
return false;
|
336 |
+
}
|
337 |
if ( ! function_exists( 'WP_Filesystem' ) ) {
|
338 |
require_once( ABSPATH . 'wp-admin/includes/file.php' );
|
339 |
}
|
340 |
|
341 |
+
$file = trailingslashit( self::$cache_dir ) . $filename;
|
342 |
+
|
343 |
WP_Filesystem();
|
344 |
|
345 |
/** @var WP_Filesystem_Base $wp_filesystem */
|
346 |
global $wp_filesystem;
|
347 |
|
348 |
+
$results = $wp_filesystem->put_contents( $file, $contents, defined( 'FS_CHMOD_FILE' ) ? FS_CHMOD_FILE : false );
|
349 |
+
|
350 |
+
// If the file is generated and is accessible...
|
351 |
+
if ( true === $results && self::is_file_accessible( $filename ) ) {
|
352 |
+
return true;
|
353 |
+
} else {
|
354 |
+
// ... else, let's set our flags to prevent cache running again for now.
|
355 |
+
update_option( 'pum_files_writeable', false );
|
356 |
+
update_option( '_pum_writeable_notice_dismissed', false );
|
357 |
+
return false;
|
358 |
+
}
|
359 |
}
|
360 |
|
361 |
/**
|
417 |
return $css_code;
|
418 |
}
|
419 |
|
420 |
+
public static function global_custom_styles() {
|
421 |
+
|
422 |
+
if ( pum_get_option( 'adjust_body_padding' ) ) {
|
423 |
+
echo "html.pum-open.pum-open-overlay.pum-open-scrollable body > *[aria-hidden] { padding-right: " . pum_get_option( 'body_padding_override', '15px' ) . "!important; }";
|
424 |
+
}
|
425 |
+
|
426 |
+
}
|
427 |
+
|
428 |
/**
|
429 |
* @return string
|
430 |
*/
|
648 |
public static function should_not_show_alert() {
|
649 |
return true == get_option( 'pum_files_writeable', true ) || true == get_option( '_pum_writeable_notice_dismissed', true );
|
650 |
}
|
651 |
+
|
652 |
+
/**
|
653 |
+
* Tests whether the file is accessible and returns 200 status code
|
654 |
+
*
|
655 |
+
* @param string $filename Filename of cache file to test.
|
656 |
+
* @return bool True if file exists and is accessible
|
657 |
+
*/
|
658 |
+
private static function is_file_accessible( $filename ) {
|
659 |
+
if ( ! $filename || empty( $filename ) || ! is_string( $filename ) ) {
|
660 |
+
return false;
|
661 |
+
}
|
662 |
+
$cache_url = PUM_Helpers::get_cache_dir_url();
|
663 |
+
if ( false === $cache_url ) {
|
664 |
+
PUM_Utils_Logging::instance()->log( 'Cannot access cache file when tested. Cache URL returned false.' );
|
665 |
+
}
|
666 |
+
$protocol = is_ssl() ? 'https:' : 'http:';
|
667 |
+
$file = $protocol . $cache_url . '/' . $filename;
|
668 |
+
$results = wp_remote_request( $file, array(
|
669 |
+
'method' => 'HEAD',
|
670 |
+
'sslverify' => false,
|
671 |
+
));
|
672 |
+
|
673 |
+
// If it returned a WP_Error, let's log its error message.
|
674 |
+
if ( is_wp_error( $results ) ) {
|
675 |
+
$error = $results->get_error_message();
|
676 |
+
PUM_Utils_Logging::instance()->log( sprintf( 'Cannot access cache file when tested. Tested file: %s Error given: %s', esc_html( $file ), esc_html( $error ) ) );
|
677 |
+
}
|
678 |
+
|
679 |
+
// If it returned valid array...
|
680 |
+
if ( is_array( $results ) && isset( $results['response'] ) ) {
|
681 |
+
$status_code = $results['response']['code'];
|
682 |
+
|
683 |
+
// ... then, check if it's a valid status code. Only if it is a valid 2XX code, will this method return true.
|
684 |
+
if ( false !== $status_code && ( 200 <= $status_code && 300 > $status_code ) ) {
|
685 |
+
return true;
|
686 |
+
} else {
|
687 |
+
PUM_Utils_Logging::instance()->log( sprintf( 'Cannot access cache file when tested. Status code received was: %s', esc_html( $status_code ) ) );
|
688 |
+
}
|
689 |
+
}
|
690 |
+
return false;
|
691 |
+
}
|
692 |
}
|
classes/Cookies.php
CHANGED
@@ -111,7 +111,8 @@ class PUM_Cookies {
|
|
111 |
'name' => __( 'Subscription Form: Already Subscribed', 'popup-maker' ),
|
112 |
),
|
113 |
'manual' => array(
|
114 |
-
'name' => __( 'Manual
|
|
|
115 |
),
|
116 |
) );
|
117 |
|
111 |
'name' => __( 'Subscription Form: Already Subscribed', 'popup-maker' ),
|
112 |
),
|
113 |
'manual' => array(
|
114 |
+
'name' => __( 'Manual', 'popup-maker' ),
|
115 |
+
'settings_column' => '<pre class="manual-cookie-shortcode"><code>[popup_cookie name="{{data.name}}" expires="{{data.time}}" sitewide="{{data.path ? 1 : 0}}"]</code></pre>',
|
116 |
),
|
117 |
) );
|
118 |
|
classes/Freemius.php
DELETED
@@ -1,316 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// Exit if accessed directly
|
4 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
5 |
-
exit;
|
6 |
-
}
|
7 |
-
|
8 |
-
/**
|
9 |
-
* Class PUM_Freemius controls the freemius integration.
|
10 |
-
*/
|
11 |
-
class PUM_Freemius {
|
12 |
-
|
13 |
-
/**
|
14 |
-
* @var \PUM_Freemius
|
15 |
-
*/
|
16 |
-
private static $instance;
|
17 |
-
|
18 |
-
/**
|
19 |
-
* @var \Freemius $fs
|
20 |
-
*/
|
21 |
-
public $fs;
|
22 |
-
|
23 |
-
/**
|
24 |
-
* @return \PUM_Freemius
|
25 |
-
*/
|
26 |
-
public static function instance() {
|
27 |
-
if ( ! isset( self::$instance ) && ! ( self::$instance instanceof PUM_Freemius ) ) {
|
28 |
-
self::$instance = new PUM_Freemius;
|
29 |
-
|
30 |
-
// Initialize Freemius
|
31 |
-
self::$instance->fs();
|
32 |
-
|
33 |
-
// Add customizations.
|
34 |
-
self::$instance->init();
|
35 |
-
}
|
36 |
-
|
37 |
-
return self::$instance;
|
38 |
-
}
|
39 |
-
|
40 |
-
/**
|
41 |
-
* Returns the Popup Maker instance of Freemius.
|
42 |
-
*
|
43 |
-
* @return \Freemius
|
44 |
-
*/
|
45 |
-
public function fs() {
|
46 |
-
|
47 |
-
if ( ! isset( $this->fs ) ) {
|
48 |
-
// Include Freemius SDK.
|
49 |
-
require_once Popup_Maker::$DIR . 'includes/pum-sdk/freemius/start.php';
|
50 |
-
|
51 |
-
$this->fs = fs_dynamic_init( array(
|
52 |
-
'id' => '147',
|
53 |
-
'slug' => 'popup-maker',
|
54 |
-
'public_key' => 'pk_0a02cbd99443e0ab7211b19222fe3',
|
55 |
-
'is_premium' => false,
|
56 |
-
'has_addons' => false,
|
57 |
-
'has_paid_plans' => false,
|
58 |
-
'permissions' => array(
|
59 |
-
'newsletter' => true,
|
60 |
-
),
|
61 |
-
'menu' => array(
|
62 |
-
'slug' => 'edit.php?post_type=popup',
|
63 |
-
'contact' => false,
|
64 |
-
'account' => false,
|
65 |
-
'support' => false,
|
66 |
-
),
|
67 |
-
) );
|
68 |
-
}
|
69 |
-
|
70 |
-
|
71 |
-
return $this->fs;
|
72 |
-
}
|
73 |
-
|
74 |
-
/**
|
75 |
-
*
|
76 |
-
*/
|
77 |
-
public function init() {
|
78 |
-
//$this->fs()->add_filter( 'is_submenu_visible', array( $this, 'menu_permissions' ), 10, 2 );
|
79 |
-
//$this->fs()->add_filter( 'connect_message', array( $this, 'custom_connect_message' ), WP_FS__DEFAULT_PRIORITY, 6 );
|
80 |
-
//$this->fs()->add_filter( 'permission_list', array( $this, 'permission_list' ) );
|
81 |
-
// API Synchronization.
|
82 |
-
$this->fs()->add_action( 'after_account_connection', array( $this, 'account_connection' ), 10, 2 );
|
83 |
-
$this->fs()->add_action( 'after_sync_cron', array( $this, 'plan_sync' ), 10, 2 );
|
84 |
-
}
|
85 |
-
|
86 |
-
|
87 |
-
/**
|
88 |
-
* Renders the popup maker usage statistics permission notification.
|
89 |
-
*
|
90 |
-
public function permission_list( $permissions = array() ) {
|
91 |
-
$permissions['metrics'] = array(
|
92 |
-
'icon-class' => 'dashicons dashicons-performance',
|
93 |
-
'label' => __( 'Usage Statistics', 'popup-maker' ),
|
94 |
-
'desc' => __( 'Popup & Theme Counts, Open Counts', 'popup-maker' ),
|
95 |
-
'priority' => 25,
|
96 |
-
);
|
97 |
-
|
98 |
-
return $permissions;
|
99 |
-
}
|
100 |
-
*/
|
101 |
-
|
102 |
-
/**
|
103 |
-
* Filters the optin activation screen messaging.
|
104 |
-
*
|
105 |
-
* @param $message
|
106 |
-
* @param $user_first_name
|
107 |
-
* @param $plugin_title
|
108 |
-
* @param $user_login
|
109 |
-
* @param $site_link
|
110 |
-
* @param $freemius_link
|
111 |
-
*
|
112 |
-
* @return string
|
113 |
-
*
|
114 |
-
public function custom_connect_message( $message, $user_first_name, $plugin_title, $user_login, $site_link, $freemius_link ) {
|
115 |
-
|
116 |
-
$intro = __fs( 'hey-x' ) . '<br/><br/>';
|
117 |
-
|
118 |
-
$intro .= __( 'Allow %3$sPopup Maker%4$s to collect some usage data with %2$s to make the plugin even more awesome. If you skip this, that\'s okay! %3$sPopup Maker%4$s will still work just fine.', 'popup-maker' );
|
119 |
-
|
120 |
-
return sprintf( $intro, $user_first_name, '<a href="https://freemius.com/wordpress/insights/">Freemius</a>', '<strong>', '</strong>' );
|
121 |
-
|
122 |
-
}
|
123 |
-
*/
|
124 |
-
|
125 |
-
/**
|
126 |
-
* User just opted in.
|
127 |
-
*
|
128 |
-
* Forward the request to our server for discount code generation.
|
129 |
-
*
|
130 |
-
* @see https://github.com/PopupMaker/tracking-server
|
131 |
-
*
|
132 |
-
* @param \FS_User $user
|
133 |
-
*/
|
134 |
-
public function account_connection( FS_User $user ) {
|
135 |
-
|
136 |
-
$args = array_merge( $this->setup_data(), array(
|
137 |
-
/*
|
138 |
-
* Opt-in Info.
|
139 |
-
*
|
140 |
-
* Privacy Notices: None of this user info is
|
141 |
-
* stored. It is passed directly to our mailing
|
142 |
-
* list provider and then disposed.
|
143 |
-
*
|
144 |
-
* Our server side tracking API is open source.
|
145 |
-
* @see https://github.com/PopupMaker/tracking-server
|
146 |
-
*/
|
147 |
-
'user' => array(
|
148 |
-
'fs_id' => ! empty( $user->id ) ? $user->id : $user->email,
|
149 |
-
'email' => $user->email,
|
150 |
-
'first' => $user->first,
|
151 |
-
'last' => $user->last,
|
152 |
-
'display' => $user->get_name(),
|
153 |
-
'verified' => $user->is_verified(),
|
154 |
-
),
|
155 |
-
) );
|
156 |
-
|
157 |
-
$this->api_call( 'new_opt_in', $args );
|
158 |
-
|
159 |
-
set_transient( 'pum_tracking_last_send', true, 3 * DAY_IN_SECONDS + 12 * HOUR_IN_SECONDS );
|
160 |
-
}
|
161 |
-
|
162 |
-
/**
|
163 |
-
* Sync tracking data with freemius.
|
164 |
-
*/
|
165 |
-
public function plan_sync() {
|
166 |
-
|
167 |
-
// Send a maximum of once per week
|
168 |
-
if ( get_transient( 'pum_tracking_last_send' ) ) {
|
169 |
-
return;
|
170 |
-
}
|
171 |
-
|
172 |
-
$args = $this->setup_data();
|
173 |
-
|
174 |
-
$this->api_call( 'check_in', $args );
|
175 |
-
|
176 |
-
// Twice per week.
|
177 |
-
set_transient( 'pum_tracking_last_send', true, 3 * DAY_IN_SECONDS + 12 * HOUR_IN_SECONDS );
|
178 |
-
}
|
179 |
-
|
180 |
-
/**
|
181 |
-
* @return bool
|
182 |
-
*/
|
183 |
-
public function is_localhost() {
|
184 |
-
|
185 |
-
if ( defined( 'WP_FS__IS_LOCALHOST_FOR_SERVER' ) ) {
|
186 |
-
return WP_FS__IS_LOCALHOST_FOR_SERVER;
|
187 |
-
}
|
188 |
-
|
189 |
-
$url = network_site_url( '/' );
|
190 |
-
|
191 |
-
return stristr( $url, 'dev' ) !== false || stristr( $url, 'localhost' ) !== false || stristr( $url, ':8888' ) !== false;
|
192 |
-
|
193 |
-
}
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
/**
|
198 |
-
* Determine which freemius menu items appear.
|
199 |
-
*
|
200 |
-
* If the user is registered they can submit support requests.
|
201 |
-
* Otherwise they can use the support forums.
|
202 |
-
*
|
203 |
-
* @param $is_visible
|
204 |
-
* @param $menu_id
|
205 |
-
*
|
206 |
-
* @return bool
|
207 |
-
*
|
208 |
-
public function menu_permissions( $is_visible, $menu_id ) {
|
209 |
-
if ( 'contact' === $menu_id ) {
|
210 |
-
return $this->fs->is_registered();
|
211 |
-
}
|
212 |
-
if ( 'support' === $menu_id ) {
|
213 |
-
return ! $this->fs->is_registered();
|
214 |
-
}
|
215 |
-
return $is_visible;
|
216 |
-
}
|
217 |
-
*/
|
218 |
-
|
219 |
-
/**
|
220 |
-
* @return array
|
221 |
-
*/
|
222 |
-
public function setup_data() {
|
223 |
-
global $wpdb;
|
224 |
-
|
225 |
-
// Retrieve current theme info
|
226 |
-
if ( get_bloginfo( 'version' ) < '3.4' ) {
|
227 |
-
$theme_data = get_theme_data( get_stylesheet_directory() . '/style.css' );
|
228 |
-
$theme = $theme_data['Name'] . ' ' . $theme_data['Version'];
|
229 |
-
} else {
|
230 |
-
$theme_data = wp_get_theme();
|
231 |
-
$theme = $theme_data->Name . ' ' . $theme_data->Version;
|
232 |
-
}
|
233 |
-
|
234 |
-
// Retrieve current plugin information
|
235 |
-
if ( ! function_exists( 'get_plugins' ) ) {
|
236 |
-
include ABSPATH . '/wp-admin/includes/plugin.php';
|
237 |
-
}
|
238 |
-
|
239 |
-
$plugins = array_keys( get_plugins() );
|
240 |
-
$active_plugins = get_option( 'active_plugins', array() );
|
241 |
-
|
242 |
-
foreach ( $plugins as $key => $plugin ) {
|
243 |
-
if ( in_array( $plugin, $active_plugins ) ) {
|
244 |
-
// Remove active plugins from list so we can show active and inactive separately
|
245 |
-
unset( $plugins[ $key ] );
|
246 |
-
}
|
247 |
-
}
|
248 |
-
|
249 |
-
$popups = 0;
|
250 |
-
foreach ( wp_count_posts( 'popup' ) as $status ) {
|
251 |
-
$popups += $status;
|
252 |
-
}
|
253 |
-
|
254 |
-
$popup_themes = 0;
|
255 |
-
foreach ( wp_count_posts( 'popup_theme' ) as $status ) {
|
256 |
-
$popup_themes += $status;
|
257 |
-
}
|
258 |
-
|
259 |
-
$user = PUM_Freemius::instance()->fs->get_user();
|
260 |
-
|
261 |
-
$args = array(
|
262 |
-
// UID
|
263 |
-
'uid' => md5( strtolower( ! empty( $user->email ) ? $user->email : '' ) ),
|
264 |
-
|
265 |
-
// Language Info
|
266 |
-
'language' => get_bloginfo( 'language' ), // Language
|
267 |
-
'charset' => get_bloginfo( 'charset' ), // Character Set
|
268 |
-
|
269 |
-
// Server Info
|
270 |
-
'php_version' => phpversion(),
|
271 |
-
'mysql_version' => $wpdb->db_version(),
|
272 |
-
'is_localhost' => $this->is_localhost(),
|
273 |
-
|
274 |
-
// WP Install Info
|
275 |
-
'url' => get_site_url(),
|
276 |
-
'version' => Popup_Maker::$VER, // Plugin Version
|
277 |
-
'wp_version' => get_bloginfo( 'version' ), // WP Version
|
278 |
-
'theme' => $theme,
|
279 |
-
'active_plugins' => $active_plugins,
|
280 |
-
'inactive_plugins' => array_values( $plugins ),
|
281 |
-
|
282 |
-
// Popup Metrics
|
283 |
-
'popups' => $popups,
|
284 |
-
'popup_themes' => $popup_themes,
|
285 |
-
'open_count' => get_option( 'pum_total_open_count', 0 ),
|
286 |
-
);
|
287 |
-
|
288 |
-
return $args;
|
289 |
-
}
|
290 |
-
|
291 |
-
|
292 |
-
/**
|
293 |
-
* Send the data to the Popup Maker V2 Server
|
294 |
-
*
|
295 |
-
* @param string $action
|
296 |
-
* @param array $data
|
297 |
-
*
|
298 |
-
* @return array|WP_Error
|
299 |
-
*/
|
300 |
-
public function api_call( $action = '', $data = array() ) {
|
301 |
-
|
302 |
-
$response = wp_remote_post( 'https://api.wppopupmaker.com/wp-json/pmapi/v1/' . $action, array(
|
303 |
-
'method' => 'POST',
|
304 |
-
'timeout' => 20,
|
305 |
-
'redirection' => 5,
|
306 |
-
'httpversion' => '1.1',
|
307 |
-
'blocking' => false,
|
308 |
-
'body' => $data,
|
309 |
-
'user-agent' => 'POPMAKE/' . Popup_Maker::$VER . '; ' . get_site_url(),
|
310 |
-
) );
|
311 |
-
|
312 |
-
return $response;
|
313 |
-
}
|
314 |
-
|
315 |
-
|
316 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
classes/Helpers.php
CHANGED
@@ -53,6 +53,93 @@ class PUM_Helpers {
|
|
53 |
return $shortcodes;
|
54 |
}
|
55 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
public static function upload_dir_url( $path = '' ) {
|
57 |
$upload_dir = wp_upload_dir();
|
58 |
$upload_dir = $upload_dir['baseurl'];
|
53 |
return $shortcodes;
|
54 |
}
|
55 |
|
56 |
+
/**
|
57 |
+
* Gets the directory caching should be stored in.
|
58 |
+
*
|
59 |
+
* Accounts for various adblock bypass options.
|
60 |
+
*
|
61 |
+
* @return bool|string
|
62 |
+
*/
|
63 |
+
public static function get_cache_dir_url() {
|
64 |
+
$upload_dir = self::get_upload_dir_url();
|
65 |
+
if ( false === $upload_dir ) {
|
66 |
+
return false;
|
67 |
+
}
|
68 |
+
|
69 |
+
if ( ! pum_get_option( 'bypass_adblockers', false ) ) {
|
70 |
+
return trailingslashit( $upload_dir ) . 'pum';
|
71 |
+
}
|
72 |
+
|
73 |
+
return $upload_dir;
|
74 |
+
}
|
75 |
+
|
76 |
+
/**
|
77 |
+
* Gets the uploads directory path
|
78 |
+
*
|
79 |
+
* @since 1.10
|
80 |
+
* @param string $path A path to append to end of upload directory URL.
|
81 |
+
* @return bool|string The uploads directory path or false on failure
|
82 |
+
*/
|
83 |
+
public static function get_upload_dir_path( $path = '' ) {
|
84 |
+
$upload_dir = self::get_upload_dir();
|
85 |
+
if ( false !== $upload_dir && isset( $upload_dir['basedir'] ) ) {
|
86 |
+
$dir = $upload_dir['basedir'];
|
87 |
+
if ( ! empty( $path ) ) {
|
88 |
+
$dir = trailingslashit( $dir ) . $path;
|
89 |
+
}
|
90 |
+
return $dir;
|
91 |
+
} else {
|
92 |
+
return false;
|
93 |
+
}
|
94 |
+
}
|
95 |
+
|
96 |
+
/**
|
97 |
+
* Gets the uploads directory URL
|
98 |
+
*
|
99 |
+
* @since 1.10
|
100 |
+
* @param string $path A path to append to end of upload directory URL.
|
101 |
+
* @return bool|string The uploads directory URL or false on failure
|
102 |
+
*/
|
103 |
+
public static function get_upload_dir_url( $path = '' ) {
|
104 |
+
$upload_dir = self::get_upload_dir();
|
105 |
+
if ( false !== $upload_dir && isset( $upload_dir['baseurl'] ) ) {
|
106 |
+
$url = preg_replace( '/^https?:/', '', $upload_dir['baseurl'] );
|
107 |
+
if ( null === $url ) {
|
108 |
+
return false;
|
109 |
+
}
|
110 |
+
if ( ! empty( $path ) ) {
|
111 |
+
$url = trailingslashit( $url ) . $path;
|
112 |
+
}
|
113 |
+
return $url;
|
114 |
+
} else {
|
115 |
+
return false;
|
116 |
+
}
|
117 |
+
}
|
118 |
+
|
119 |
+
/**
|
120 |
+
* Gets the Uploads directory
|
121 |
+
*
|
122 |
+
* @since 1.10
|
123 |
+
* @return bool|array An associated array with baseurl and basedir or false on failure
|
124 |
+
*/
|
125 |
+
public static function get_upload_dir() {
|
126 |
+
if ( defined( 'IS_WPCOM' ) && IS_WPCOM ) {
|
127 |
+
$wp_upload_dir = wp_get_upload_dir();
|
128 |
+
} else {
|
129 |
+
$wp_upload_dir = wp_upload_dir();
|
130 |
+
}
|
131 |
+
|
132 |
+
if ( isset( $wp_upload_dir['error'] ) && false !== $wp_upload_dir['error'] ) {
|
133 |
+
PUM_Utils_Logging::instance()->log( sprintf( 'Getting uploads directory failed. Error given: %s', esc_html( $wp_upload_dir['error'] ) ) );
|
134 |
+
return false;
|
135 |
+
} else {
|
136 |
+
return $wp_upload_dir;
|
137 |
+
}
|
138 |
+
}
|
139 |
+
|
140 |
+
/**
|
141 |
+
* @deprecated Use get_upload_dir_url instead.
|
142 |
+
*/
|
143 |
public static function upload_dir_url( $path = '' ) {
|
144 |
$upload_dir = wp_upload_dir();
|
145 |
$upload_dir = $upload_dir['baseurl'];
|
classes/Repository/Popups.php
CHANGED
@@ -49,8 +49,6 @@ class PUM_Repository_Popups extends PUM_Abstract_Repository_Posts {
|
|
49 |
$args['post__in'] = wp_parse_id_list( $args['popups'] );
|
50 |
|
51 |
unset( $args['popups'] );
|
52 |
-
} elseif ( empty( $args['post__in'] ) ) {
|
53 |
-
|
54 |
}
|
55 |
|
56 |
/**
|
49 |
$args['post__in'] = wp_parse_id_list( $args['popups'] );
|
50 |
|
51 |
unset( $args['popups'] );
|
|
|
|
|
52 |
}
|
53 |
|
54 |
/**
|
classes/Repository/Themes.php
CHANGED
@@ -49,8 +49,6 @@ class PUM_Repository_Themes extends PUM_Abstract_Repository_Posts {
|
|
49 |
$args['post__in'] = wp_parse_id_list( $args['themes'] );
|
50 |
|
51 |
unset( $args['themes'] );
|
52 |
-
} elseif ( empty( $args['post__in'] ) ) {
|
53 |
-
|
54 |
}
|
55 |
|
56 |
/**
|
49 |
$args['post__in'] = wp_parse_id_list( $args['themes'] );
|
50 |
|
51 |
unset( $args['themes'] );
|
|
|
|
|
52 |
}
|
53 |
|
54 |
/**
|
classes/Shortcode/PopupCookie.php
ADDED
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
4 |
+
exit;
|
5 |
+
}
|
6 |
+
|
7 |
+
/**
|
8 |
+
* Class PUM_Shortcode_PopupCookie
|
9 |
+
*
|
10 |
+
* Registers the popup_cookie shortcode.
|
11 |
+
*/
|
12 |
+
class PUM_Shortcode_PopupCookie extends PUM_Shortcode {
|
13 |
+
|
14 |
+
public $version = 2;
|
15 |
+
|
16 |
+
public $has_content = false;
|
17 |
+
|
18 |
+
/**
|
19 |
+
* The shortcode tag.
|
20 |
+
*/
|
21 |
+
public function tag() {
|
22 |
+
return 'popup_cookie';
|
23 |
+
}
|
24 |
+
|
25 |
+
public function label() {
|
26 |
+
return __( 'Popup Cookie', 'popup-maker' );
|
27 |
+
}
|
28 |
+
|
29 |
+
public function description() {
|
30 |
+
return __( 'Insert this to manually set cookies when users view the content containing the code.', 'popup-maker' );
|
31 |
+
}
|
32 |
+
|
33 |
+
public function post_types() {
|
34 |
+
return array( '*' );
|
35 |
+
}
|
36 |
+
|
37 |
+
public function fields() {
|
38 |
+
return [
|
39 |
+
'general' => [
|
40 |
+
'main' => [
|
41 |
+
'name' => [
|
42 |
+
'label' => __( 'Cookie Name', 'popup-maker' ),
|
43 |
+
'placeholder' => __( 'Cookie Name ex. popmaker-123', 'popup-maker' ),
|
44 |
+
'desc' => __( 'The name that will be used when checking for or saving this cookie.', 'popup-maker' ),
|
45 |
+
'std' => '',
|
46 |
+
],
|
47 |
+
'expires' => [
|
48 |
+
'label' => __( 'Cookie Time', 'popup-maker' ),
|
49 |
+
'placeholder' => __( '364 days 23 hours 59 minutes 59 seconds', 'popup-maker' ),
|
50 |
+
'desc' => __( 'Enter a plain english time before cookie expires.', 'popup-maker' ),
|
51 |
+
'std' => '1 month',
|
52 |
+
],
|
53 |
+
'sitewide' => [
|
54 |
+
'label' => __( 'Sitewide Cookie', 'popup-maker' ),
|
55 |
+
'desc' => __( 'This will prevent the popup from triggering on all pages until the cookie expires.', 'popup-maker' ),
|
56 |
+
'type' => 'checkbox',
|
57 |
+
'std' => true,
|
58 |
+
],
|
59 |
+
'only_onscreen' => [
|
60 |
+
'label' => __( 'Only when visible on-screen', 'popup-maker' ),
|
61 |
+
'desc' => __( 'This will prevent the cookie from getting set until the user scrolls it into viewport.', 'popup-maker' ),
|
62 |
+
'type' => 'checkbox',
|
63 |
+
'std' => false,
|
64 |
+
],
|
65 |
+
],
|
66 |
+
],
|
67 |
+
];
|
68 |
+
}
|
69 |
+
|
70 |
+
/**
|
71 |
+
* Shortcode handler
|
72 |
+
*
|
73 |
+
* @param array $atts shortcode attributes
|
74 |
+
* @param string $content shortcode content
|
75 |
+
*
|
76 |
+
* @return string
|
77 |
+
*/
|
78 |
+
public function handler( $atts, $content = null ) {
|
79 |
+
$atts = $this->shortcode_atts( $atts );
|
80 |
+
|
81 |
+
$args = [
|
82 |
+
'name' => $atts['name'],
|
83 |
+
'time' => $atts['expires'],
|
84 |
+
'path' => $atts['sitewide'],
|
85 |
+
];
|
86 |
+
|
87 |
+
// This shortcode requires our scripts, but can be used on pages where no popups exist.
|
88 |
+
wp_enqueue_script( 'popup-maker-site' );
|
89 |
+
|
90 |
+
$onscreen = 'data-only-onscreen="' . ( $atts['only_onscreen'] ? 1 : 0 ) . '"';
|
91 |
+
|
92 |
+
return "<div class='pum-cookie' data-cookie-args='" . json_encode( $args ) . "' $onscreen />";
|
93 |
+
}
|
94 |
+
|
95 |
+
public function template() { ?>
|
96 |
+
<div class="pum-cookie"><?php echo __( 'Popup Cookie', 'popup-maker' ); ?></div><?php
|
97 |
+
}
|
98 |
+
|
99 |
+
}
|
100 |
+
|
classes/Site.php
CHANGED
@@ -10,25 +10,107 @@ class PUM_Site {
|
|
10 |
PUM_Site_Popups::init();
|
11 |
PUM_Analytics::init();
|
12 |
|
|
|
|
|
13 |
add_action( 'init', array( __CLASS__, 'actions' ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
/**
|
|
|
|
|
|
|
|
|
15 |
* @since 1.4 hooks & filters
|
16 |
*/
|
17 |
add_filter( 'pum_popup_content', array( $GLOBALS['wp_embed'], 'run_shortcode' ), 8 );
|
18 |
add_filter( 'pum_popup_content', array( $GLOBALS['wp_embed'], 'autoembed' ), 8 );
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
add_filter(
|
30 |
}
|
31 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
}
|
33 |
|
34 |
/**
|
10 |
PUM_Site_Popups::init();
|
11 |
PUM_Analytics::init();
|
12 |
|
13 |
+
self::add_core_content_filters();
|
14 |
+
|
15 |
add_action( 'init', array( __CLASS__, 'actions' ) );
|
16 |
+
}
|
17 |
+
|
18 |
+
/**
|
19 |
+
* Hook core filters into `pum_popup_content`.
|
20 |
+
*/
|
21 |
+
public static function add_core_content_filters() {
|
22 |
/**
|
23 |
+
* Copied from wp-includes/class-wp-embed.php:32:40
|
24 |
+
*
|
25 |
+
* @note Hack to get the [embed] shortcode to run before wpautop().
|
26 |
+
*
|
27 |
* @since 1.4 hooks & filters
|
28 |
*/
|
29 |
add_filter( 'pum_popup_content', array( $GLOBALS['wp_embed'], 'run_shortcode' ), 8 );
|
30 |
add_filter( 'pum_popup_content', array( $GLOBALS['wp_embed'], 'autoembed' ), 8 );
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Copied & from wp-includes/default-filters.php:141:144.
|
34 |
+
*
|
35 |
+
* Format WordPress.
|
36 |
+
*
|
37 |
+
* @since 1.10.0
|
38 |
+
* @sinceWP 5.4
|
39 |
+
*/
|
40 |
+
foreach ( array( 'pum_popup_content', 'pum_popup_title' ) as $filter ) {
|
41 |
+
add_filter( $filter, 'capital_P_dangit', 11 );
|
42 |
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Copied & from wp-includes/default-filters.php:172:178.
|
46 |
+
*
|
47 |
+
* @since 1.10.0
|
48 |
+
* @sinceWP 5.4
|
49 |
+
*/
|
50 |
+
add_filter( 'pum_popup_content', [ __CLASS__, 'do_blocks' ], 9 );
|
51 |
+
add_filter( 'pum_popup_content', 'wptexturize' );
|
52 |
+
add_filter( 'pum_popup_content', 'convert_smilies', 20 );
|
53 |
+
add_filter( 'pum_popup_content', 'wpautop' );
|
54 |
+
add_filter( 'pum_popup_content', 'shortcode_unautop' );
|
55 |
+
add_filter( 'pum_popup_content', 'prepend_attachment' );
|
56 |
+
add_filter( 'pum_popup_content', 'wp_make_content_images_responsive' );
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Copied & from wp-includes/default-filters.php:172:178.
|
60 |
+
*
|
61 |
+
* @note Shortcodes must run AFTER wpautop().
|
62 |
+
*
|
63 |
+
* @since 1.10.0
|
64 |
+
* @sinceWP 5.4
|
65 |
+
*/
|
66 |
+
$do_shortcode_handler = pum_get_option( 'disable_shortcode_compatibility_mode' ) ? 'do_shortcode' : ['PUM_Helpers', 'do_shortcode' ];
|
67 |
+
add_filter( 'pum_popup_content', $do_shortcode_handler, 11 );
|
68 |
+
}
|
69 |
+
|
70 |
+
/**
|
71 |
+
* Parses dynamic blocks out of `post_content` and re-renders them.
|
72 |
+
*
|
73 |
+
* @since 5.0.0
|
74 |
+
*
|
75 |
+
* @param string $content Post content.
|
76 |
+
* @return string Updated post content.
|
77 |
+
*/
|
78 |
+
public static function do_blocks( $content ) {
|
79 |
+
$blocks = parse_blocks( $content );
|
80 |
+
$output = '';
|
81 |
+
|
82 |
+
foreach ( $blocks as $block ) {
|
83 |
+
$output .= render_block( $block );
|
84 |
+
}
|
85 |
+
|
86 |
+
// If there are blocks in this content, we shouldn't run wpautop() on it later.
|
87 |
+
$priority = has_filter( 'pum_popup_content', 'wpautop' );
|
88 |
+
if ( false !== $priority && doing_filter( 'pum_popup_content' ) && has_blocks( $content ) ) {
|
89 |
+
remove_filter( 'pum_popup_content', 'wpautop', $priority );
|
90 |
+
add_filter( 'pum_popup_content', [ __CLASS__, '_restore_wpautop_hook' ], $priority + 1 );
|
91 |
+
}
|
92 |
+
|
93 |
+
return $output;
|
94 |
+
}
|
95 |
+
|
96 |
+
/**
|
97 |
+
* If do_blocks() needs to remove wpautop() from the `the_content` filter, this re-adds it afterwards,
|
98 |
+
* for subsequent `the_content` usage.
|
99 |
+
*
|
100 |
+
* @access private
|
101 |
+
*
|
102 |
+
* @since 5.0.0
|
103 |
+
*
|
104 |
+
* @param string $content The post content running through this filter.
|
105 |
+
* @return string The unmodified content.
|
106 |
+
*/
|
107 |
+
public static function _restore_wpautop_hook( $content ) {
|
108 |
+
$current_priority = has_filter( 'the_content', [ __CLASS__, '_restore_wpautop_hook' ] );
|
109 |
+
|
110 |
+
add_filter( 'the_content', 'wpautop', $current_priority - 1 );
|
111 |
+
remove_filter( 'the_content', [ __CLASS__, '_restore_wpautop_hook' ], $current_priority );
|
112 |
+
|
113 |
+
return $content;
|
114 |
}
|
115 |
|
116 |
/**
|
classes/Site/Assets.php
CHANGED
@@ -54,7 +54,7 @@ class PUM_Site_Assets {
|
|
54 |
* Initialize
|
55 |
*/
|
56 |
public static function init() {
|
57 |
-
self::$cache_url =
|
58 |
self::$debug = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG;
|
59 |
self::$suffix = self::$debug ? '' : '.min';
|
60 |
self::$js_url = Popup_Maker::$URL . 'assets/js/';
|
@@ -115,24 +115,6 @@ class PUM_Site_Assets {
|
|
115 |
|
116 |
}
|
117 |
|
118 |
-
|
119 |
-
/**
|
120 |
-
* Gets the directory caching should be stored in.
|
121 |
-
*
|
122 |
-
* Accounts for various adblock bypass options.
|
123 |
-
*
|
124 |
-
* @return array|string
|
125 |
-
*/
|
126 |
-
public static function get_cache_dir_url() {
|
127 |
-
$upload_dir = PUM_Helpers::upload_dir_url();
|
128 |
-
|
129 |
-
if ( ! pum_get_option( 'bypass_adblockers', false ) ) {
|
130 |
-
return trailingslashit( $upload_dir ) . 'pum';
|
131 |
-
}
|
132 |
-
|
133 |
-
return $upload_dir;
|
134 |
-
}
|
135 |
-
|
136 |
/**
|
137 |
* Checks the current page content for the newsletter shortcode.
|
138 |
*/
|
@@ -191,7 +173,7 @@ class PUM_Site_Assets {
|
|
191 |
wp_register_script( 'mobile-detect', self::$js_url . 'vendor/mobile-detect.min.js', null, '1.3.3', true );
|
192 |
wp_register_script( 'iframe-resizer', self::$js_url . 'vendor/iframeResizer.min.js', array( 'jquery' ) );
|
193 |
|
194 |
-
if ( PUM_AssetCache::enabled() ) {
|
195 |
$cached = get_option( 'pum-has-cached-js' );
|
196 |
|
197 |
if ( ! $cached || self::$debug ) {
|
@@ -200,7 +182,7 @@ class PUM_Site_Assets {
|
|
200 |
}
|
201 |
|
202 |
|
203 |
-
wp_register_script( 'popup-maker-site', self
|
204 |
'jquery',
|
205 |
'jquery-ui-core',
|
206 |
'jquery-ui-position',
|
@@ -230,6 +212,7 @@ class PUM_Site_Assets {
|
|
230 |
|
231 |
wp_localize_script( 'popup-maker-site', 'pum_vars', apply_filters( 'pum_vars', array(
|
232 |
'version' => Popup_Maker::$VER,
|
|
|
233 |
'ajaxurl' => admin_url( 'admin-ajax.php' ),
|
234 |
'restapi' => function_exists( 'rest_url' ) ? esc_url_raw( rest_url( 'pum/v1' ) ) : false,
|
235 |
'rest_nonce' => is_user_logged_in() ? wp_create_nonce( 'wp_rest' ) : null,
|
@@ -330,7 +313,7 @@ class PUM_Site_Assets {
|
|
330 |
public static function register_styles() {
|
331 |
self::$styles_registered = true;
|
332 |
|
333 |
-
if ( PUM_AssetCache::enabled() ) {
|
334 |
$cached = get_option( 'pum-has-cached-css' );
|
335 |
|
336 |
if ( ! $cached || self::$debug ) {
|
@@ -338,7 +321,7 @@ class PUM_Site_Assets {
|
|
338 |
$cached = get_option( 'pum-has-cached-css' );
|
339 |
}
|
340 |
|
341 |
-
wp_register_style( 'popup-maker-site', self
|
342 |
} else {
|
343 |
wp_register_style( 'popup-maker-site', self::$css_url . 'pum-site' . ( is_rtl() ? '-rtl' : '' ) . self::$suffix . '.css', array(), Popup_Maker::$VER );
|
344 |
self::inline_styles();
|
54 |
* Initialize
|
55 |
*/
|
56 |
public static function init() {
|
57 |
+
self::$cache_url = PUM_Helpers::get_cache_dir_url();
|
58 |
self::$debug = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG;
|
59 |
self::$suffix = self::$debug ? '' : '.min';
|
60 |
self::$js_url = Popup_Maker::$URL . 'assets/js/';
|
115 |
|
116 |
}
|
117 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
/**
|
119 |
* Checks the current page content for the newsletter shortcode.
|
120 |
*/
|
173 |
wp_register_script( 'mobile-detect', self::$js_url . 'vendor/mobile-detect.min.js', null, '1.3.3', true );
|
174 |
wp_register_script( 'iframe-resizer', self::$js_url . 'vendor/iframeResizer.min.js', array( 'jquery' ) );
|
175 |
|
176 |
+
if ( PUM_AssetCache::enabled() && false !== self::$cache_url ) {
|
177 |
$cached = get_option( 'pum-has-cached-js' );
|
178 |
|
179 |
if ( ! $cached || self::$debug ) {
|
182 |
}
|
183 |
|
184 |
|
185 |
+
wp_register_script( 'popup-maker-site', self::$cache_url . '/' . PUM_AssetCache::generate_cache_filename( 'pum-site-scripts' ) . '.js?defer&generated=' . $cached, array(
|
186 |
'jquery',
|
187 |
'jquery-ui-core',
|
188 |
'jquery-ui-position',
|
212 |
|
213 |
wp_localize_script( 'popup-maker-site', 'pum_vars', apply_filters( 'pum_vars', array(
|
214 |
'version' => Popup_Maker::$VER,
|
215 |
+
'pm_dir_url' => Popup_Maker::$URL,
|
216 |
'ajaxurl' => admin_url( 'admin-ajax.php' ),
|
217 |
'restapi' => function_exists( 'rest_url' ) ? esc_url_raw( rest_url( 'pum/v1' ) ) : false,
|
218 |
'rest_nonce' => is_user_logged_in() ? wp_create_nonce( 'wp_rest' ) : null,
|
313 |
public static function register_styles() {
|
314 |
self::$styles_registered = true;
|
315 |
|
316 |
+
if ( PUM_AssetCache::enabled() && false !== self::$cache_url ) {
|
317 |
$cached = get_option( 'pum-has-cached-css' );
|
318 |
|
319 |
if ( ! $cached || self::$debug ) {
|
321 |
$cached = get_option( 'pum-has-cached-css' );
|
322 |
}
|
323 |
|
324 |
+
wp_register_style( 'popup-maker-site', self::$cache_url . '/' . PUM_AssetCache::generate_cache_filename( 'pum-site-styles' ) . '.css?generated=' . $cached, array(), Popup_Maker::$VER );
|
325 |
} else {
|
326 |
wp_register_style( 'popup-maker-site', self::$css_url . 'pum-site' . ( is_rtl() ? '-rtl' : '' ) . self::$suffix . '.css', array(), Popup_Maker::$VER );
|
327 |
self::inline_styles();
|
classes/Utils/Fields.php
CHANGED
@@ -35,7 +35,6 @@ class PUM_Utils_Fields {
|
|
35 |
return static::get_field_default_values( $fields );
|
36 |
}
|
37 |
|
38 |
-
|
39 |
/**
|
40 |
* @param array $fields
|
41 |
*
|
@@ -50,12 +49,11 @@ class PUM_Utils_Fields {
|
|
50 |
$defaults[ $field_id ] = ! empty( $field['std'] ) ? $field['std'] : false;
|
51 |
break;
|
52 |
default:
|
53 |
-
$defaults[ $field_id ] =
|
54 |
}
|
55 |
}
|
56 |
|
57 |
return $defaults;
|
58 |
-
|
59 |
}
|
60 |
|
61 |
/**
|
@@ -199,7 +197,7 @@ class PUM_Utils_Fields {
|
|
199 |
if ( is_numeric( $field_id ) && ! empty( $field['id'] ) ) {
|
200 |
try {
|
201 |
$fields = PUM_Utils_Array::replace_key( $fields, $field_id, $field['id'] );
|
202 |
-
} catch (
|
203 |
}
|
204 |
|
205 |
$field_id = $field['id'];
|
35 |
return static::get_field_default_values( $fields );
|
36 |
}
|
37 |
|
|
|
38 |
/**
|
39 |
* @param array $fields
|
40 |
*
|
49 |
$defaults[ $field_id ] = ! empty( $field['std'] ) ? $field['std'] : false;
|
50 |
break;
|
51 |
default:
|
52 |
+
$defaults[ $field_id ] = isset( $field['std'] ) ? $field['std'] : null;
|
53 |
}
|
54 |
}
|
55 |
|
56 |
return $defaults;
|
|
|
57 |
}
|
58 |
|
59 |
/**
|
197 |
if ( is_numeric( $field_id ) && ! empty( $field['id'] ) ) {
|
198 |
try {
|
199 |
$fields = PUM_Utils_Array::replace_key( $fields, $field_id, $field['id'] );
|
200 |
+
} catch ( Exception $e ) {
|
201 |
}
|
202 |
|
203 |
$field_id = $field['id'];
|
dist/block-editor/block-editor-styles.asset.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php return array('dependencies' => array('wp-polyfill'), 'version' => '290cd398ee9540d3f1ac71bf94f44afd');
|
dist/block-editor/block-editor-styles.css
ADDED
@@ -0,0 +1,243 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*!******************************************************************************
|
2 |
+
* Copyright (c) 2020, Code Atlantic LLC.
|
3 |
+
******************************************************************************/
|
4 |
+
/**
|
5 |
+
* Colors
|
6 |
+
*/
|
7 |
+
/**
|
8 |
+
* Colors
|
9 |
+
*/
|
10 |
+
/**
|
11 |
+
* Fonts & basic variables.
|
12 |
+
*/
|
13 |
+
/**
|
14 |
+
* Grid System.
|
15 |
+
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
|
16 |
+
*/
|
17 |
+
/**
|
18 |
+
* Dimensions.
|
19 |
+
*/
|
20 |
+
/**
|
21 |
+
* Shadows.
|
22 |
+
*/
|
23 |
+
/**
|
24 |
+
* Editor widths.
|
25 |
+
*/
|
26 |
+
/**
|
27 |
+
* Block UI.
|
28 |
+
*/
|
29 |
+
/**
|
30 |
+
* Border radii.
|
31 |
+
*/
|
32 |
+
/**
|
33 |
+
* Breakpoint mixins
|
34 |
+
*/
|
35 |
+
/**
|
36 |
+
* Long content fade mixin
|
37 |
+
*
|
38 |
+
* Creates a fading overlay to signify that the content is longer
|
39 |
+
* than the space allows.
|
40 |
+
*/
|
41 |
+
/**
|
42 |
+
* Button states and focus styles
|
43 |
+
*/
|
44 |
+
/**
|
45 |
+
* Block Toolbar/Formatting Buttons
|
46 |
+
*/
|
47 |
+
/**
|
48 |
+
* Applies editor left position to the selector passed as argument
|
49 |
+
*/
|
50 |
+
/**
|
51 |
+
* Styles that are reused verbatim in a few places
|
52 |
+
*/
|
53 |
+
/**
|
54 |
+
* Allows users to opt-out of animations via OS-level preferences.
|
55 |
+
*/
|
56 |
+
/**
|
57 |
+
* Reset default styles for JavaScript UI based pages.
|
58 |
+
* This is a WP-admin agnostic reset
|
59 |
+
*/
|
60 |
+
/**
|
61 |
+
* Reset the WP Admin page styles for Gutenberg-like pages.
|
62 |
+
*/
|
63 |
+
/**
|
64 |
+
* Breakpoints & Media Queries
|
65 |
+
*/
|
66 |
+
.components-popover .block-editor-popup-select-input {
|
67 |
+
flex-grow: 1;
|
68 |
+
position: relative;
|
69 |
+
padding: 1px; }
|
70 |
+
.components-popover .block-editor-popup-select-input .components-base-control__field {
|
71 |
+
margin-bottom: 0; }
|
72 |
+
.components-popover .block-editor-popup-select-input input[type="text"],
|
73 |
+
.components-popover .block-editor-popup-select-input select {
|
74 |
+
width: 100%;
|
75 |
+
border: none;
|
76 |
+
border-radius: 0;
|
77 |
+
/* Fonts smaller than 16px causes mobile safari to zoom. */
|
78 |
+
font-size: 16px; }
|
79 |
+
@media (min-width: 600px) {
|
80 |
+
.components-popover .block-editor-popup-select-input input[type="text"],
|
81 |
+
.components-popover .block-editor-popup-select-input select {
|
82 |
+
width: 300px; } }
|
83 |
+
@media (min-width: 600px) {
|
84 |
+
.components-popover .block-editor-popup-select-input input[type="text"],
|
85 |
+
.components-popover .block-editor-popup-select-input select {
|
86 |
+
font-size: 13px; } }
|
87 |
+
.components-popover .block-editor-popup-select-input input[type="text"]::-ms-clear,
|
88 |
+
.components-popover .block-editor-popup-select-input select::-ms-clear {
|
89 |
+
display: none; }
|
90 |
+
|
91 |
+
/**
|
92 |
+
* Colors
|
93 |
+
*/
|
94 |
+
/**
|
95 |
+
* Fonts & basic variables.
|
96 |
+
*/
|
97 |
+
/**
|
98 |
+
* Grid System.
|
99 |
+
* https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/
|
100 |
+
*/
|
101 |
+
/**
|
102 |
+
* Dimensions.
|
103 |
+
*/
|
104 |
+
/**
|
105 |
+
* Shadows.
|
106 |
+
*/
|
107 |
+
/**
|
108 |
+
* Editor widths.
|
109 |
+
*/
|
110 |
+
/**
|
111 |
+
* Block UI.
|
112 |
+
*/
|
113 |
+
/**
|
114 |
+
* Border radii.
|
115 |
+
*/
|
116 |
+
/**
|
117 |
+
* Breakpoint mixins
|
118 |
+
*/
|
119 |
+
/**
|
120 |
+
* Long content fade mixin
|
121 |
+
*
|
122 |
+
* Creates a fading overlay to signify that the content is longer
|
123 |
+
* than the space allows.
|
124 |
+
*/
|
125 |
+
/**
|
126 |
+
* Button states and focus styles
|
127 |
+
*/
|
128 |
+
/**
|
129 |
+
* Block Toolbar/Formatting Buttons
|
130 |
+
*/
|
131 |
+
/**
|
132 |
+
* Applies editor left position to the selector passed as argument
|
133 |
+
*/
|
134 |
+
/**
|
135 |
+
* Styles that are reused verbatim in a few places
|
136 |
+
*/
|
137 |
+
/**
|
138 |
+
* Allows users to opt-out of animations via OS-level preferences.
|
139 |
+
*/
|
140 |
+
/**
|
141 |
+
* Reset default styles for JavaScript UI based pages.
|
142 |
+
* This is a WP-admin agnostic reset
|
143 |
+
*/
|
144 |
+
/**
|
145 |
+
* Reset the WP Admin page styles for Gutenberg-like pages.
|
146 |
+
*/
|
147 |
+
/** Copied from @wordpress/block-editor/src/components/url-popover/style.scss */
|
148 |
+
.block-editor-popup-trigger-popover__additional-controls {
|
149 |
+
border-top: 1px solid #e2e4e7; }
|
150 |
+
|
151 |
+
.block-editor-popup-trigger-popover__additional-controls > div[role="menu"] .components-icon-button:not(:disabled):not([aria-disabled="true"]):not(.is-default) > svg {
|
152 |
+
box-shadow: none; }
|
153 |
+
|
154 |
+
.block-editor-popup-trigger-popover__additional-controls div[role="menu"] > .components-icon-button {
|
155 |
+
padding-left: 2px; }
|
156 |
+
|
157 |
+
.block-editor-popup-trigger-popover .components-notice.is-dismissible {
|
158 |
+
margin: 0;
|
159 |
+
padding-right: 0; }
|
160 |
+
.block-editor-popup-trigger-popover .components-notice.is-dismissible .components-notice__content {
|
161 |
+
margin: 0; }
|
162 |
+
|
163 |
+
.block-editor-popup-trigger-popover__row {
|
164 |
+
display: flex; }
|
165 |
+
|
166 |
+
.block-editor-popup-trigger-popover__row > :not(.block-editor-popup-trigger-popover__settings-toggle) {
|
167 |
+
flex-grow: 1; }
|
168 |
+
|
169 |
+
.block-editor-popup-trigger-popover .components-icon-button {
|
170 |
+
padding: 3px; }
|
171 |
+
.block-editor-popup-trigger-popover .components-icon-button > svg {
|
172 |
+
padding: 5px;
|
173 |
+
border-radius: 4px;
|
174 |
+
height: 30px;
|
175 |
+
width: 30px; }
|
176 |
+
.block-editor-popup-trigger-popover .components-icon-button:not(:disabled):not([aria-disabled="true"]):not(.is-default):hover {
|
177 |
+
box-shadow: none; }
|
178 |
+
.block-editor-popup-trigger-popover .components-icon-button:not(:disabled):not([aria-disabled="true"]):not(.is-default):hover > svg {
|
179 |
+
outline: none;
|
180 |
+
background-color: #fff;
|
181 |
+
color: #191e23;
|
182 |
+
box-shadow: inset 0 0 0 1px #ccd0d4, inset 0 0 0 2px #fff; }
|
183 |
+
.block-editor-popup-trigger-popover .components-icon-button:not(:disabled):focus {
|
184 |
+
box-shadow: none; }
|
185 |
+
.block-editor-popup-trigger-popover .components-icon-button:not(:disabled):focus > svg {
|
186 |
+
box-shadow: 0 0 0 1px color(theme(button));
|
187 |
+
outline: 1px solid transparent; }
|
188 |
+
|
189 |
+
.block-editor-popup-trigger-popover__settings-toggle {
|
190 |
+
flex-shrink: 0;
|
191 |
+
border-radius: 0;
|
192 |
+
border-left: 1px solid #e2e4e7;
|
193 |
+
margin-left: 1px; }
|
194 |
+
.block-editor-popup-trigger-popover__settings-toggle[aria-expanded="true"] .dashicon {
|
195 |
+
transform: rotate(180deg); }
|
196 |
+
|
197 |
+
.block-editor-popup-trigger-popover__settings {
|
198 |
+
display: block;
|
199 |
+
padding: 16px;
|
200 |
+
border-top: 1px solid #e2e4e7; }
|
201 |
+
.block-editor-popup-trigger-popover__settings .components-base-control:last-child,
|
202 |
+
.block-editor-popup-trigger-popover__settings .components-base-control:last-child .components-base-control__field {
|
203 |
+
margin-bottom: 0; }
|
204 |
+
|
205 |
+
.block-editor-popup-trigger-popover__popup-editor,
|
206 |
+
.block-editor-popup-trigger-popover__popup-viewer {
|
207 |
+
display: flex; }
|
208 |
+
|
209 |
+
.block-editor-popup-trigger-popover__popup-viewer-text {
|
210 |
+
margin: 7px;
|
211 |
+
flex-grow: 1;
|
212 |
+
flex-shrink: 1;
|
213 |
+
overflow: hidden;
|
214 |
+
text-overflow: ellipsis;
|
215 |
+
white-space: nowrap;
|
216 |
+
min-width: 150px;
|
217 |
+
max-width: 500px; }
|
218 |
+
.block-editor-popup-trigger-popover__popup-viewer-text.has-invalid-link {
|
219 |
+
color: #d94f4f; }
|
220 |
+
|
221 |
+
.popup-trigger[data-popup-id] {
|
222 |
+
border-bottom: 1px dashed #9aba27; }
|
223 |
+
|
224 |
+
.popup-trigger[data-popup-id]::after {
|
225 |
+
/*background: url("/wp-content/plugins/popup-maker/assets/images/logo.png") bottom center no-repeat;*/
|
226 |
+
background: url(/wp-content/plugins/popup-maker/assets/images/logo.png) bottom center no-repeat;
|
227 |
+
display: inline-block;
|
228 |
+
width: 0.9em;
|
229 |
+
height: 0.9em;
|
230 |
+
content: " ";
|
231 |
+
position: relative;
|
232 |
+
background-size: contain;
|
233 |
+
margin-left: 2px;
|
234 |
+
vertical-align: text-top;
|
235 |
+
pointer-events: none;
|
236 |
+
touch-action: none; }
|
237 |
+
|
238 |
+
.components-dropdown-menu__menu .components-dropdown-menu__menu-item:not(:disabled):not([aria-disabled="true"]):not(.is-default).is-active > svg.popup-trigger-button-svg,
|
239 |
+
.components-dropdown-menu__menu .components-menu-item:not(:disabled):not([aria-disabled="true"]):not(.is-default).is-active > svg.popup-trigger-button-svg {
|
240 |
+
background: #ededed; }
|
241 |
+
|
242 |
+
|
243 |
+
/*# sourceMappingURL=block-editor-styles.css.map*/
|
dist/block-editor/block-editor-styles.css.map
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
{"version":3,"sources":["webpack:///editor.scss"],"names":[],"mappings":"AAAA;;+EAE+E;AAC/E;;EAEE;AACF;;EAEE;AACF;;EAEE;AACF;;;EAGE;AACF;;EAEE;AACF;;EAEE;AACF;;EAEE;AACF;;EAEE;AACF;;EAEE;AACF;;EAEE;AACF;;;;;EAKE;AACF;;EAEE;AACF;;EAEE;AACF;;EAEE;AACF;;EAEE;AACF;;EAEE;AACF;;;EAGE;AACF;;EAEE;AACF;;EAEE;AACF;EACE,YAAY;EACZ,kBAAkB;EAClB,YAAY,EAAE;EACd;IACE,gBAAgB,EAAE;EACpB;;IAEE,WAAW;IACX,YAAY;IACZ,gBAAgB;IAChB,0DAA0D;IAC1D,eAAe,EAAE;IACjB;MACE;;QAEE,YAAY,EAAE,EAAE;IACpB;MACE;;QAEE,eAAe,EAAE,EAAE;IACvB;;MAEE,aAAa,EAAE;;AAErB;;EAEE;AACF;;EAEE;AACF;;;EAGE;AACF;;EAEE;AACF;;EAEE;AACF;;EAEE;AACF;;EAEE;AACF;;EAEE;AACF;;EAEE;AACF;;;;;EAKE;AACF;;EAEE;AACF;;EAEE;AACF;;EAEE;AACF;;EAEE;AACF;;EAEE;AACF;;;EAGE;AACF;;EAEE;AACF,+EAA+E;AAC/E;EACE,6BAA6B,EAAE;;AAEjC;EACE,gBAAgB,EAAE;;AAEpB;EACE,iBAAiB,EAAE;;AAErB;EACE,SAAS;EACT,gBAAgB,EAAE;EAClB;IACE,SAAS,EAAE;;AAEf;EACE,aAAa,EAAE;;AAEjB;EACE,YAAY,EAAE;;AAEhB;EACE,YAAY,EAAE;EACd;IACE,YAAY;IACZ,kBAAkB;IAClB,YAAY;IACZ,WAAW,EAAE;EACf;IACE,gBAAgB,EAAE;IAClB;MACE,aAAa;MACb,sBAAsB;MACtB,cAAc;MACd,yDAAyD,EAAE;EAC/D;IACE,gBAAgB,EAAE;IAClB;MACE,0CAA0C;MAC1C,8BAA8B,EAAE;;AAEtC;EACE,cAAc;EACd,gBAAgB;EAChB,8BAA8B;EAC9B,gBAAgB,EAAE;EAClB;IACE,yBAAyB,EAAE;;AAE/B;EACE,cAAc;EACd,aAAa;EACb,6BAA6B,EAAE;EAC/B;;IAEE,gBAAgB,EAAE;;AAEtB;;EAEE,aAAa,EAAE;;AAEjB;EACE,WAAW;EACX,YAAY;EACZ,cAAc;EACd,gBAAgB;EAChB,uBAAuB;EACvB,mBAAmB;EACnB,gBAAgB;EAChB,gBAAgB,EAAE;EAClB;IACE,cAAc,EAAE;;AAEpB;EACE,iCAAiC,EAAE;;AAErC;EACE,qGAAqG;EACrG,+FAA+F;EAC/F,qBAAqB;EACrB,YAAY;EACZ,aAAa;EACb,YAAY;EACZ,kBAAkB;EAClB,wBAAwB;EACxB,gBAAgB;EAChB,wBAAwB;EACxB,oBAAoB;EACpB,kBAAkB,EAAE;;AAEtB;;EAEE,mBAAmB,EAAE","file":"block-editor/block-editor-styles.css","sourcesContent":["/*!******************************************************************************\n * Copyright (c) 2020, Code Atlantic LLC.\n ******************************************************************************/\n/**\n * Colors\n */\n/**\n * Colors\n */\n/**\n * Fonts & basic variables.\n */\n/**\n * Grid System.\n * https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/\n */\n/**\n * Dimensions.\n */\n/**\n * Shadows.\n */\n/**\n * Editor widths.\n */\n/**\n * Block UI.\n */\n/**\n * Border radii.\n */\n/**\n * Breakpoint mixins\n */\n/**\n * Long content fade mixin\n *\n * Creates a fading overlay to signify that the content is longer\n * than the space allows.\n */\n/**\n * Button states and focus styles\n */\n/**\n * Block Toolbar/Formatting Buttons\n */\n/**\n * Applies editor left position to the selector passed as argument\n */\n/**\n * Styles that are reused verbatim in a few places\n */\n/**\n * Allows users to opt-out of animations via OS-level preferences.\n */\n/**\n * Reset default styles for JavaScript UI based pages.\n * This is a WP-admin agnostic reset\n */\n/**\n * Reset the WP Admin page styles for Gutenberg-like pages.\n */\n/**\n * Breakpoints & Media Queries\n */\n.components-popover .block-editor-popup-select-input {\n flex-grow: 1;\n position: relative;\n padding: 1px; }\n .components-popover .block-editor-popup-select-input .components-base-control__field {\n margin-bottom: 0; }\n .components-popover .block-editor-popup-select-input input[type=\"text\"],\n .components-popover .block-editor-popup-select-input select {\n width: 100%;\n border: none;\n border-radius: 0;\n /* Fonts smaller than 16px causes mobile safari to zoom. */\n font-size: 16px; }\n @media (min-width: 600px) {\n .components-popover .block-editor-popup-select-input input[type=\"text\"],\n .components-popover .block-editor-popup-select-input select {\n width: 300px; } }\n @media (min-width: 600px) {\n .components-popover .block-editor-popup-select-input input[type=\"text\"],\n .components-popover .block-editor-popup-select-input select {\n font-size: 13px; } }\n .components-popover .block-editor-popup-select-input input[type=\"text\"]::-ms-clear,\n .components-popover .block-editor-popup-select-input select::-ms-clear {\n display: none; }\n\n/**\n * Colors\n */\n/**\n * Fonts & basic variables.\n */\n/**\n * Grid System.\n * https://make.wordpress.org/design/2019/10/31/proposal-a-consistent-spacing-system-for-wordpress/\n */\n/**\n * Dimensions.\n */\n/**\n * Shadows.\n */\n/**\n * Editor widths.\n */\n/**\n * Block UI.\n */\n/**\n * Border radii.\n */\n/**\n * Breakpoint mixins\n */\n/**\n * Long content fade mixin\n *\n * Creates a fading overlay to signify that the content is longer\n * than the space allows.\n */\n/**\n * Button states and focus styles\n */\n/**\n * Block Toolbar/Formatting Buttons\n */\n/**\n * Applies editor left position to the selector passed as argument\n */\n/**\n * Styles that are reused verbatim in a few places\n */\n/**\n * Allows users to opt-out of animations via OS-level preferences.\n */\n/**\n * Reset default styles for JavaScript UI based pages.\n * This is a WP-admin agnostic reset\n */\n/**\n * Reset the WP Admin page styles for Gutenberg-like pages.\n */\n/** Copied from @wordpress/block-editor/src/components/url-popover/style.scss */\n.block-editor-popup-trigger-popover__additional-controls {\n border-top: 1px solid #e2e4e7; }\n\n.block-editor-popup-trigger-popover__additional-controls > div[role=\"menu\"] .components-icon-button:not(:disabled):not([aria-disabled=\"true\"]):not(.is-default) > svg {\n box-shadow: none; }\n\n.block-editor-popup-trigger-popover__additional-controls div[role=\"menu\"] > .components-icon-button {\n padding-left: 2px; }\n\n.block-editor-popup-trigger-popover .components-notice.is-dismissible {\n margin: 0;\n padding-right: 0; }\n .block-editor-popup-trigger-popover .components-notice.is-dismissible .components-notice__content {\n margin: 0; }\n\n.block-editor-popup-trigger-popover__row {\n display: flex; }\n\n.block-editor-popup-trigger-popover__row > :not(.block-editor-popup-trigger-popover__settings-toggle) {\n flex-grow: 1; }\n\n.block-editor-popup-trigger-popover .components-icon-button {\n padding: 3px; }\n .block-editor-popup-trigger-popover .components-icon-button > svg {\n padding: 5px;\n border-radius: 4px;\n height: 30px;\n width: 30px; }\n .block-editor-popup-trigger-popover .components-icon-button:not(:disabled):not([aria-disabled=\"true\"]):not(.is-default):hover {\n box-shadow: none; }\n .block-editor-popup-trigger-popover .components-icon-button:not(:disabled):not([aria-disabled=\"true\"]):not(.is-default):hover > svg {\n outline: none;\n background-color: #fff;\n color: #191e23;\n box-shadow: inset 0 0 0 1px #ccd0d4, inset 0 0 0 2px #fff; }\n .block-editor-popup-trigger-popover .components-icon-button:not(:disabled):focus {\n box-shadow: none; }\n .block-editor-popup-trigger-popover .components-icon-button:not(:disabled):focus > svg {\n box-shadow: 0 0 0 1px color(theme(button));\n outline: 1px solid transparent; }\n\n.block-editor-popup-trigger-popover__settings-toggle {\n flex-shrink: 0;\n border-radius: 0;\n border-left: 1px solid #e2e4e7;\n margin-left: 1px; }\n .block-editor-popup-trigger-popover__settings-toggle[aria-expanded=\"true\"] .dashicon {\n transform: rotate(180deg); }\n\n.block-editor-popup-trigger-popover__settings {\n display: block;\n padding: 16px;\n border-top: 1px solid #e2e4e7; }\n .block-editor-popup-trigger-popover__settings .components-base-control:last-child,\n .block-editor-popup-trigger-popover__settings .components-base-control:last-child .components-base-control__field {\n margin-bottom: 0; }\n\n.block-editor-popup-trigger-popover__popup-editor,\n.block-editor-popup-trigger-popover__popup-viewer {\n display: flex; }\n\n.block-editor-popup-trigger-popover__popup-viewer-text {\n margin: 7px;\n flex-grow: 1;\n flex-shrink: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n min-width: 150px;\n max-width: 500px; }\n .block-editor-popup-trigger-popover__popup-viewer-text.has-invalid-link {\n color: #d94f4f; }\n\n.popup-trigger[data-popup-id] {\n border-bottom: 1px dashed #9aba27; }\n\n.popup-trigger[data-popup-id]::after {\n /*background: url(\"/wp-content/plugins/popup-maker/assets/images/logo.png\") bottom center no-repeat;*/\n background: url(/wp-content/plugins/popup-maker/assets/images/logo.png) bottom center no-repeat;\n display: inline-block;\n width: 0.9em;\n height: 0.9em;\n content: \" \";\n position: relative;\n background-size: contain;\n margin-left: 2px;\n vertical-align: text-top;\n pointer-events: none;\n touch-action: none; }\n\n.components-dropdown-menu__menu .components-dropdown-menu__menu-item:not(:disabled):not([aria-disabled=\"true\"]):not(.is-default).is-active > svg.popup-trigger-button-svg,\n.components-dropdown-menu__menu .components-menu-item:not(:disabled):not([aria-disabled=\"true\"]):not(.is-default).is-active > svg.popup-trigger-button-svg {\n background: #ededed; }\n"],"sourceRoot":""}
|
dist/block-editor/block-editor.asset.php
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<?php return array('dependencies' => array('wp-block-editor', 'wp-components', 'wp-compose', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keycodes', 'wp-polyfill', 'wp-rich-text'), 'version' => 'f1a5e277c1cd2392945ada87dfd9ea5b');
|
dist/block-editor/block-editor.js
ADDED
@@ -0,0 +1,1877 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/******/ (function(modules) { // webpackBootstrap
|
2 |
+
/******/ // The module cache
|
3 |
+
/******/ var installedModules = {};
|
4 |
+
/******/
|
5 |
+
/******/ // The require function
|
6 |
+
/******/ function __webpack_require__(moduleId) {
|
7 |
+
/******/
|
8 |
+
/******/ // Check if module is in cache
|
9 |
+
/******/ if(installedModules[moduleId]) {
|
10 |
+
/******/ return installedModules[moduleId].exports;
|
11 |
+
/******/ }
|
12 |
+
/******/ // Create a new module (and put it into the cache)
|
13 |
+
/******/ var module = installedModules[moduleId] = {
|
14 |
+
/******/ i: moduleId,
|
15 |
+
/******/ l: false,
|
16 |
+
/******/ exports: {}
|
17 |
+
/******/ };
|
18 |
+
/******/
|
19 |
+
/******/ // Execute the module function
|
20 |
+
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
21 |
+
/******/
|
22 |
+
/******/ // Flag the module as loaded
|
23 |
+
/******/ module.l = true;
|
24 |
+
/******/
|
25 |
+
/******/ // Return the exports of the module
|
26 |
+
/******/ return module.exports;
|
27 |
+
/******/ }
|
28 |
+
/******/
|
29 |
+
/******/
|
30 |
+
/******/ // expose the modules object (__webpack_modules__)
|
31 |
+
/******/ __webpack_require__.m = modules;
|
32 |
+
/******/
|
33 |
+
/******/ // expose the module cache
|
34 |
+
/******/ __webpack_require__.c = installedModules;
|
35 |
+
/******/
|
36 |
+
/******/ // define getter function for harmony exports
|
37 |
+
/******/ __webpack_require__.d = function(exports, name, getter) {
|
38 |
+
/******/ if(!__webpack_require__.o(exports, name)) {
|
39 |
+
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
40 |
+
/******/ }
|
41 |
+
/******/ };
|
42 |
+
/******/
|
43 |
+
/******/ // define __esModule on exports
|
44 |
+
/******/ __webpack_require__.r = function(exports) {
|
45 |
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
46 |
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
47 |
+
/******/ }
|
48 |
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
49 |
+
/******/ };
|
50 |
+
/******/
|
51 |
+
/******/ // create a fake namespace object
|
52 |
+
/******/ // mode & 1: value is a module id, require it
|
53 |
+
/******/ // mode & 2: merge all properties of value into the ns
|
54 |
+
/******/ // mode & 4: return value when already ns object
|
55 |
+
/******/ // mode & 8|1: behave like require
|
56 |
+
/******/ __webpack_require__.t = function(value, mode) {
|
57 |
+
/******/ if(mode & 1) value = __webpack_require__(value);
|
58 |
+
/******/ if(mode & 8) return value;
|
59 |
+
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
60 |
+
/******/ var ns = Object.create(null);
|
61 |
+
/******/ __webpack_require__.r(ns);
|
62 |
+
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
63 |
+
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
64 |
+
/******/ return ns;
|
65 |
+
/******/ };
|
66 |
+
/******/
|
67 |
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
68 |
+
/******/ __webpack_require__.n = function(module) {
|
69 |
+
/******/ var getter = module && module.__esModule ?
|
70 |
+
/******/ function getDefault() { return module['default']; } :
|
71 |
+
/******/ function getModuleExports() { return module; };
|
72 |
+
/******/ __webpack_require__.d(getter, 'a', getter);
|
73 |
+
/******/ return getter;
|
74 |
+
/******/ };
|
75 |
+
/******/
|
76 |
+
/******/ // Object.prototype.hasOwnProperty.call
|
77 |
+
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
78 |
+
/******/
|
79 |
+
/******/ // __webpack_public_path__
|
80 |
+
/******/ __webpack_require__.p = "";
|
81 |
+
/******/
|
82 |
+
/******/
|
83 |
+
/******/ // Load entry module and return exports
|
84 |
+
/******/ return __webpack_require__(__webpack_require__.s = "./src/block-editor/index.js");
|
85 |
+
/******/ })
|
86 |
+
/************************************************************************/
|
87 |
+
/******/ ({
|
88 |
+
|
89 |
+
/***/ "./node_modules/@babel/runtime/helpers/arrayLikeToArray.js":
|
90 |
+
/*!*****************************************************************!*\
|
91 |
+
!*** ./node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
|
92 |
+
\*****************************************************************/
|
93 |
+
/*! no static exports found */
|
94 |
+
/***/ (function(module, exports) {
|
95 |
+
|
96 |
+
function _arrayLikeToArray(arr, len) {
|
97 |
+
if (len == null || len > arr.length) len = arr.length;
|
98 |
+
|
99 |
+
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
100 |
+
arr2[i] = arr[i];
|
101 |
+
}
|
102 |
+
|
103 |
+
return arr2;
|
104 |
+
}
|
105 |
+
|
106 |
+
module.exports = _arrayLikeToArray;
|
107 |
+
|
108 |
+
/***/ }),
|
109 |
+
|
110 |
+
/***/ "./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js":
|
111 |
+
/*!******************************************************************!*\
|
112 |
+
!*** ./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***!
|
113 |
+
\******************************************************************/
|
114 |
+
/*! no static exports found */
|
115 |
+
/***/ (function(module, exports, __webpack_require__) {
|
116 |
+
|
117 |
+
var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray */ "./node_modules/@babel/runtime/helpers/arrayLikeToArray.js");
|
118 |
+
|
119 |
+
function _arrayWithoutHoles(arr) {
|
120 |
+
if (Array.isArray(arr)) return arrayLikeToArray(arr);
|
121 |
+
}
|
122 |
+
|
123 |
+
module.exports = _arrayWithoutHoles;
|
124 |
+
|
125 |
+
/***/ }),
|
126 |
+
|
127 |
+
/***/ "./node_modules/@babel/runtime/helpers/assertThisInitialized.js":
|
128 |
+
/*!**********************************************************************!*\
|
129 |
+
!*** ./node_modules/@babel/runtime/helpers/assertThisInitialized.js ***!
|
130 |
+
\**********************************************************************/
|
131 |
+
/*! no static exports found */
|
132 |
+
/***/ (function(module, exports) {
|
133 |
+
|
134 |
+
function _assertThisInitialized(self) {
|
135 |
+
if (self === void 0) {
|
136 |
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
137 |
+
}
|
138 |
+
|
139 |
+
return self;
|
140 |
+
}
|
141 |
+
|
142 |
+
module.exports = _assertThisInitialized;
|
143 |
+
|
144 |
+
/***/ }),
|
145 |
+
|
146 |
+
/***/ "./node_modules/@babel/runtime/helpers/classCallCheck.js":
|
147 |
+
/*!***************************************************************!*\
|
148 |
+
!*** ./node_modules/@babel/runtime/helpers/classCallCheck.js ***!
|
149 |
+
\***************************************************************/
|
150 |
+
/*! no static exports found */
|
151 |
+
/***/ (function(module, exports) {
|
152 |
+
|
153 |
+
function _classCallCheck(instance, Constructor) {
|
154 |
+
if (!(instance instanceof Constructor)) {
|
155 |
+
throw new TypeError("Cannot call a class as a function");
|
156 |
+
}
|
157 |
+
}
|
158 |
+
|
159 |
+
module.exports = _classCallCheck;
|
160 |
+
|
161 |
+
/***/ }),
|
162 |
+
|
163 |
+
/***/ "./node_modules/@babel/runtime/helpers/createClass.js":
|
164 |
+
/*!************************************************************!*\
|
165 |
+
!*** ./node_modules/@babel/runtime/helpers/createClass.js ***!
|
166 |
+
\************************************************************/
|
167 |
+
/*! no static exports found */
|
168 |
+
/***/ (function(module, exports) {
|
169 |
+
|
170 |
+
function _defineProperties(target, props) {
|
171 |
+
for (var i = 0; i < props.length; i++) {
|
172 |
+
var descriptor = props[i];
|
173 |
+
descriptor.enumerable = descriptor.enumerable || false;
|
174 |
+
descriptor.configurable = true;
|
175 |
+
if ("value" in descriptor) descriptor.writable = true;
|
176 |
+
Object.defineProperty(target, descriptor.key, descriptor);
|
177 |
+
}
|
178 |
+
}
|
179 |
+
|
180 |
+
function _createClass(Constructor, protoProps, staticProps) {
|
181 |
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
182 |
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
183 |
+
return Constructor;
|
184 |
+
}
|
185 |
+
|
186 |
+
module.exports = _createClass;
|
187 |
+
|
188 |
+
/***/ }),
|
189 |
+
|
190 |
+
/***/ "./node_modules/@babel/runtime/helpers/extends.js":
|
191 |
+
/*!********************************************************!*\
|
192 |
+
!*** ./node_modules/@babel/runtime/helpers/extends.js ***!
|
193 |
+
\********************************************************/
|
194 |
+
/*! no static exports found */
|
195 |
+
/***/ (function(module, exports) {
|
196 |
+
|
197 |
+
function _extends() {
|
198 |
+
module.exports = _extends = Object.assign || function (target) {
|
199 |
+
for (var i = 1; i < arguments.length; i++) {
|
200 |
+
var source = arguments[i];
|
201 |
+
|
202 |
+
for (var key in source) {
|
203 |
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
204 |
+
target[key] = source[key];
|
205 |
+
}
|
206 |
+
}
|
207 |
+
}
|
208 |
+
|
209 |
+
return target;
|
210 |
+
};
|
211 |
+
|
212 |
+
return _extends.apply(this, arguments);
|
213 |
+
}
|
214 |
+
|
215 |
+
module.exports = _extends;
|
216 |
+
|
217 |
+
/***/ }),
|
218 |
+
|
219 |
+
/***/ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js":
|
220 |
+
/*!***************************************************************!*\
|
221 |
+
!*** ./node_modules/@babel/runtime/helpers/getPrototypeOf.js ***!
|
222 |
+
\***************************************************************/
|
223 |
+
/*! no static exports found */
|
224 |
+
/***/ (function(module, exports) {
|
225 |
+
|
226 |
+
function _getPrototypeOf(o) {
|
227 |
+
module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
228 |
+
return o.__proto__ || Object.getPrototypeOf(o);
|
229 |
+
};
|
230 |
+
return _getPrototypeOf(o);
|
231 |
+
}
|
232 |
+
|
233 |
+
module.exports = _getPrototypeOf;
|
234 |
+
|
235 |
+
/***/ }),
|
236 |
+
|
237 |
+
/***/ "./node_modules/@babel/runtime/helpers/inherits.js":
|
238 |
+
/*!*********************************************************!*\
|
239 |
+
!*** ./node_modules/@babel/runtime/helpers/inherits.js ***!
|
240 |
+
\*********************************************************/
|
241 |
+
/*! no static exports found */
|
242 |
+
/***/ (function(module, exports, __webpack_require__) {
|
243 |
+
|
244 |
+
var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf */ "./node_modules/@babel/runtime/helpers/setPrototypeOf.js");
|
245 |
+
|
246 |
+
function _inherits(subClass, superClass) {
|
247 |
+
if (typeof superClass !== "function" && superClass !== null) {
|
248 |
+
throw new TypeError("Super expression must either be null or a function");
|
249 |
+
}
|
250 |
+
|
251 |
+
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
252 |
+
constructor: {
|
253 |
+
value: subClass,
|
254 |
+
writable: true,
|
255 |
+
configurable: true
|
256 |
+
}
|
257 |
+
});
|
258 |
+
if (superClass) setPrototypeOf(subClass, superClass);
|
259 |
+
}
|
260 |
+
|
261 |
+
module.exports = _inherits;
|
262 |
+
|
263 |
+
/***/ }),
|
264 |
+
|
265 |
+
/***/ "./node_modules/@babel/runtime/helpers/iterableToArray.js":
|
266 |
+
/*!****************************************************************!*\
|
267 |
+
!*** ./node_modules/@babel/runtime/helpers/iterableToArray.js ***!
|
268 |
+
\****************************************************************/
|
269 |
+
/*! no static exports found */
|
270 |
+
/***/ (function(module, exports) {
|
271 |
+
|
272 |
+
function _iterableToArray(iter) {
|
273 |
+
if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
|
274 |
+
}
|
275 |
+
|
276 |
+
module.exports = _iterableToArray;
|
277 |
+
|
278 |
+
/***/ }),
|
279 |
+
|
280 |
+
/***/ "./node_modules/@babel/runtime/helpers/nonIterableSpread.js":
|
281 |
+
/*!******************************************************************!*\
|
282 |
+
!*** ./node_modules/@babel/runtime/helpers/nonIterableSpread.js ***!
|
283 |
+
\******************************************************************/
|
284 |
+
/*! no static exports found */
|
285 |
+
/***/ (function(module, exports) {
|
286 |
+
|
287 |
+
function _nonIterableSpread() {
|
288 |
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
289 |
+
}
|
290 |
+
|
291 |
+
module.exports = _nonIterableSpread;
|
292 |
+
|
293 |
+
/***/ }),
|
294 |
+
|
295 |
+
/***/ "./node_modules/@babel/runtime/helpers/objectWithoutProperties.js":
|
296 |
+
/*!************************************************************************!*\
|
297 |
+
!*** ./node_modules/@babel/runtime/helpers/objectWithoutProperties.js ***!
|
298 |
+
\************************************************************************/
|
299 |
+
/*! no static exports found */
|
300 |
+
/***/ (function(module, exports, __webpack_require__) {
|
301 |
+
|
302 |
+
var objectWithoutPropertiesLoose = __webpack_require__(/*! ./objectWithoutPropertiesLoose */ "./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js");
|
303 |
+
|
304 |
+
function _objectWithoutProperties(source, excluded) {
|
305 |
+
if (source == null) return {};
|
306 |
+
var target = objectWithoutPropertiesLoose(source, excluded);
|
307 |
+
var key, i;
|
308 |
+
|
309 |
+
if (Object.getOwnPropertySymbols) {
|
310 |
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
311 |
+
|
312 |
+
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
313 |
+
key = sourceSymbolKeys[i];
|
314 |
+
if (excluded.indexOf(key) >= 0) continue;
|
315 |
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
316 |
+
target[key] = source[key];
|
317 |
+
}
|
318 |
+
}
|
319 |
+
|
320 |
+
return target;
|
321 |
+
}
|
322 |
+
|
323 |
+
module.exports = _objectWithoutProperties;
|
324 |
+
|
325 |
+
/***/ }),
|
326 |
+
|
327 |
+
/***/ "./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js":
|
328 |
+
/*!*****************************************************************************!*\
|
329 |
+
!*** ./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js ***!
|
330 |
+
\*****************************************************************************/
|
331 |
+
/*! no static exports found */
|
332 |
+
/***/ (function(module, exports) {
|
333 |
+
|
334 |
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
335 |
+
if (source == null) return {};
|
336 |
+
var target = {};
|
337 |
+
var sourceKeys = Object.keys(source);
|
338 |
+
var key, i;
|
339 |
+
|
340 |
+
for (i = 0; i < sourceKeys.length; i++) {
|
341 |
+
key = sourceKeys[i];
|
342 |
+
if (excluded.indexOf(key) >= 0) continue;
|
343 |
+
target[key] = source[key];
|
344 |
+
}
|
345 |
+
|
346 |
+
return target;
|
347 |
+
}
|
348 |
+
|
349 |
+
module.exports = _objectWithoutPropertiesLoose;
|
350 |
+
|
351 |
+
/***/ }),
|
352 |
+
|
353 |
+
/***/ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js":
|
354 |
+
/*!**************************************************************************!*\
|
355 |
+
!*** ./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***!
|
356 |
+
\**************************************************************************/
|
357 |
+
/*! no static exports found */
|
358 |
+
/***/ (function(module, exports, __webpack_require__) {
|
359 |
+
|
360 |
+
var _typeof = __webpack_require__(/*! ../helpers/typeof */ "./node_modules/@babel/runtime/helpers/typeof.js");
|
361 |
+
|
362 |
+
var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized */ "./node_modules/@babel/runtime/helpers/assertThisInitialized.js");
|
363 |
+
|
364 |
+
function _possibleConstructorReturn(self, call) {
|
365 |
+
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
366 |
+
return call;
|
367 |
+
}
|
368 |
+
|
369 |
+
return assertThisInitialized(self);
|
370 |
+
}
|
371 |
+
|
372 |
+
module.exports = _possibleConstructorReturn;
|
373 |
+
|
374 |
+
/***/ }),
|
375 |
+
|
376 |
+
/***/ "./node_modules/@babel/runtime/helpers/setPrototypeOf.js":
|
377 |
+
/*!***************************************************************!*\
|
378 |
+
!*** ./node_modules/@babel/runtime/helpers/setPrototypeOf.js ***!
|
379 |
+
\***************************************************************/
|
380 |
+
/*! no static exports found */
|
381 |
+
/***/ (function(module, exports) {
|
382 |
+
|
383 |
+
function _setPrototypeOf(o, p) {
|
384 |
+
module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
385 |
+
o.__proto__ = p;
|
386 |
+
return o;
|
387 |
+
};
|
388 |
+
|
389 |
+
return _setPrototypeOf(o, p);
|
390 |
+
}
|
391 |
+
|
392 |
+
module.exports = _setPrototypeOf;
|
393 |
+
|
394 |
+
/***/ }),
|
395 |
+
|
396 |
+
/***/ "./node_modules/@babel/runtime/helpers/toConsumableArray.js":
|
397 |
+
/*!******************************************************************!*\
|
398 |
+
!*** ./node_modules/@babel/runtime/helpers/toConsumableArray.js ***!
|
399 |
+
\******************************************************************/
|
400 |
+
/*! no static exports found */
|
401 |
+
/***/ (function(module, exports, __webpack_require__) {
|
402 |
+
|
403 |
+
var arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles */ "./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js");
|
404 |
+
|
405 |
+
var iterableToArray = __webpack_require__(/*! ./iterableToArray */ "./node_modules/@babel/runtime/helpers/iterableToArray.js");
|
406 |
+
|
407 |
+
var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray */ "./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js");
|
408 |
+
|
409 |
+
var nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread */ "./node_modules/@babel/runtime/helpers/nonIterableSpread.js");
|
410 |
+
|
411 |
+
function _toConsumableArray(arr) {
|
412 |
+
return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();
|
413 |
+
}
|
414 |
+
|
415 |
+
module.exports = _toConsumableArray;
|
416 |
+
|
417 |
+
/***/ }),
|
418 |
+
|
419 |
+
/***/ "./node_modules/@babel/runtime/helpers/typeof.js":
|
420 |
+
/*!*******************************************************!*\
|
421 |
+
!*** ./node_modules/@babel/runtime/helpers/typeof.js ***!
|
422 |
+
\*******************************************************/
|
423 |
+
/*! no static exports found */
|
424 |
+
/***/ (function(module, exports) {
|
425 |
+
|
426 |
+
function _typeof(obj) {
|
427 |
+
"@babel/helpers - typeof";
|
428 |
+
|
429 |
+
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
430 |
+
module.exports = _typeof = function _typeof(obj) {
|
431 |
+
return typeof obj;
|
432 |
+
};
|
433 |
+
} else {
|
434 |
+
module.exports = _typeof = function _typeof(obj) {
|
435 |
+
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
436 |
+
};
|
437 |
+
}
|
438 |
+
|
439 |
+
return _typeof(obj);
|
440 |
+
}
|
441 |
+
|
442 |
+
module.exports = _typeof;
|
443 |
+
|
444 |
+
/***/ }),
|
445 |
+
|
446 |
+
/***/ "./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js":
|
447 |
+
/*!***************************************************************************!*\
|
448 |
+
!*** ./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
|
449 |
+
\***************************************************************************/
|
450 |
+
/*! no static exports found */
|
451 |
+
/***/ (function(module, exports, __webpack_require__) {
|
452 |
+
|
453 |
+
var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray */ "./node_modules/@babel/runtime/helpers/arrayLikeToArray.js");
|
454 |
+
|
455 |
+
function _unsupportedIterableToArray(o, minLen) {
|
456 |
+
if (!o) return;
|
457 |
+
if (typeof o === "string") return arrayLikeToArray(o, minLen);
|
458 |
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
459 |
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
460 |
+
if (n === "Map" || n === "Set") return Array.from(n);
|
461 |
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
|
462 |
+
}
|
463 |
+
|
464 |
+
module.exports = _unsupportedIterableToArray;
|
465 |
+
|
466 |
+
/***/ }),
|
467 |
+
|
468 |
+
/***/ "./node_modules/classnames/index.js":
|
469 |
+
/*!******************************************!*\
|
470 |
+
!*** ./node_modules/classnames/index.js ***!
|
471 |
+
\******************************************/
|
472 |
+
/*! no static exports found */
|
473 |
+
/***/ (function(module, exports, __webpack_require__) {
|
474 |
+
|
475 |
+
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
|
476 |
+
Copyright (c) 2017 Jed Watson.
|
477 |
+
Licensed under the MIT License (MIT), see
|
478 |
+
http://jedwatson.github.io/classnames
|
479 |
+
*/
|
480 |
+
/* global define */
|
481 |
+
|
482 |
+
(function () {
|
483 |
+
'use strict';
|
484 |
+
|
485 |
+
var hasOwn = {}.hasOwnProperty;
|
486 |
+
|
487 |
+
function classNames () {
|
488 |
+
var classes = [];
|
489 |
+
|
490 |
+
for (var i = 0; i < arguments.length; i++) {
|
491 |
+
var arg = arguments[i];
|
492 |
+
if (!arg) continue;
|
493 |
+
|
494 |
+
var argType = typeof arg;
|
495 |
+
|
496 |
+
if (argType === 'string' || argType === 'number') {
|
497 |
+
classes.push(arg);
|
498 |
+
} else if (Array.isArray(arg) && arg.length) {
|
499 |
+
var inner = classNames.apply(null, arg);
|
500 |
+
if (inner) {
|
501 |
+
classes.push(inner);
|
502 |
+
}
|
503 |
+
} else if (argType === 'object') {
|
504 |
+
for (var key in arg) {
|
505 |
+
if (hasOwn.call(arg, key) && arg[key]) {
|
506 |
+
classes.push(key);
|
507 |
+
}
|
508 |
+
}
|
509 |
+
}
|
510 |
+
}
|
511 |
+
|
512 |
+
return classes.join(' ');
|
513 |
+
}
|
514 |
+
|
515 |
+
if ( true && module.exports) {
|
516 |
+
classNames.default = classNames;
|
517 |
+
module.exports = classNames;
|
518 |
+
} else if (true) {
|
519 |
+
// register as 'classnames', consistent with npm package name
|
520 |
+
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
|
521 |
+
return classNames;
|
522 |
+
}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
|
523 |
+
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
524 |
+
} else {}
|
525 |
+
}());
|
526 |
+
|
527 |
+
|
528 |
+
/***/ }),
|
529 |
+
|
530 |
+
/***/ "./src/block-editor/block-extensions/index.js":
|
531 |
+
/*!****************************************************!*\
|
532 |
+
!*** ./src/block-editor/block-extensions/index.js ***!
|
533 |
+
\****************************************************/
|
534 |
+
/*! no exports provided */
|
535 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
536 |
+
|
537 |
+
"use strict";
|
538 |
+
__webpack_require__.r(__webpack_exports__);
|
539 |
+
/* harmony import */ var _popup_trigger__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./popup-trigger */ "./src/block-editor/block-extensions/popup-trigger/index.js");
|
540 |
+
/**
|
541 |
+
* Internal dependencies
|
542 |
+
*/
|
543 |
+
|
544 |
+
|
545 |
+
/***/ }),
|
546 |
+
|
547 |
+
/***/ "./src/block-editor/block-extensions/popup-trigger/index.js":
|
548 |
+
/*!******************************************************************!*\
|
549 |
+
!*** ./src/block-editor/block-extensions/popup-trigger/index.js ***!
|
550 |
+
\******************************************************************/
|
551 |
+
/*! no exports provided */
|
552 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
553 |
+
|
554 |
+
"use strict";
|
555 |
+
__webpack_require__.r(__webpack_exports__);
|
556 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
|
557 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
|
558 |
+
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
|
559 |
+
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__);
|
560 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
|
561 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__);
|
562 |
+
/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks");
|
563 |
+
/* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_3__);
|
564 |
+
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
|
565 |
+
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__);
|
566 |
+
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
|
567 |
+
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__);
|
568 |
+
/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/compose */ "@wordpress/compose");
|
569 |
+
/* harmony import */ var _wordpress_compose__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_compose__WEBPACK_IMPORTED_MODULE_6__);
|
570 |
+
/* harmony import */ var _components_popup_select_control__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../components/popup-select-control */ "./src/block-editor/components/popup-select-control/index.js");
|
571 |
+
/* harmony import */ var _icons_gears__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../icons/gears */ "./src/block-editor/icons/gears.js");
|
572 |
+
|
573 |
+
|
574 |
+
/**
|
575 |
+
* External Dependencies
|
576 |
+
*/
|
577 |
+
|
578 |
+
/**
|
579 |
+
* WordPress Dependencies
|
580 |
+
*/
|
581 |
+
|
582 |
+
|
583 |
+
|
584 |
+
|
585 |
+
|
586 |
+
|
587 |
+
/**
|
588 |
+
* Internal dependencies
|
589 |
+
*/
|
590 |
+
|
591 |
+
|
592 |
+
|
593 |
+
/**
|
594 |
+
* Either allowedBlocks or excludedBlocks should be used, not both.
|
595 |
+
*
|
596 |
+
* @type {Array}
|
597 |
+
*/
|
598 |
+
|
599 |
+
var allowedBlocks = [];
|
600 |
+
var excludedBlocks = ['core/nextpage'];
|
601 |
+
|
602 |
+
function isAllowedForBlockType(name) {
|
603 |
+
if (!allowedBlocks.length && !excludedBlocks.length) {
|
604 |
+
return true;
|
605 |
+
}
|
606 |
+
|
607 |
+
if (allowedBlocks.length) {
|
608 |
+
return allowedBlocks.includes(name);
|
609 |
+
}
|
610 |
+
|
611 |
+
if (excludedBlocks.length) {
|
612 |
+
return !excludedBlocks.includes(name);
|
613 |
+
}
|
614 |
+
|
615 |
+
return true;
|
616 |
+
}
|
617 |
+
/**
|
618 |
+
* Add custom attribute for mobile visibility.
|
619 |
+
*
|
620 |
+
* @param {Object} settings Settings for the block.
|
621 |
+
*
|
622 |
+
* @return {Object} settings Modified settings.
|
623 |
+
*/
|
624 |
+
|
625 |
+
|
626 |
+
function addAttributes(settings) {
|
627 |
+
//check if object exists for old Gutenberg version compatibility
|
628 |
+
//add allowedBlocks restriction
|
629 |
+
if (typeof settings.attributes !== 'undefined' && isAllowedForBlockType(settings.name)) {
|
630 |
+
settings.attributes = Object.assign(settings.attributes, {
|
631 |
+
openPopupId: {
|
632 |
+
type: 'string',
|
633 |
+
default: ''
|
634 |
+
}
|
635 |
+
});
|
636 |
+
}
|
637 |
+
|
638 |
+
return settings;
|
639 |
+
}
|
640 |
+
/**
|
641 |
+
* Add mobile visibility controls on Advanced Block Panel.
|
642 |
+
*
|
643 |
+
* @param {Function} BlockEdit Block edit component.
|
644 |
+
*
|
645 |
+
* @return {Function} BlockEdit Modified block edit component.
|
646 |
+
*/
|
647 |
+
|
648 |
+
|
649 |
+
var withAdvancedControls = Object(_wordpress_compose__WEBPACK_IMPORTED_MODULE_6__["createHigherOrderComponent"])(function (BlockEdit) {
|
650 |
+
return function (props) {
|
651 |
+
var name = props.name,
|
652 |
+
attributes = props.attributes,
|
653 |
+
setAttributes = props.setAttributes,
|
654 |
+
isSelected = props.isSelected;
|
655 |
+
var openPopupId = attributes.openPopupId;
|
656 |
+
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(BlockEdit, props), isSelected && isAllowedForBlockType(name) && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__["InspectorControls"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__["Panel"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__["PanelBody"], {
|
657 |
+
title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Popup Controls', 'popup-maker'),
|
658 |
+
icon: _icons_gears__WEBPACK_IMPORTED_MODULE_8__["default"],
|
659 |
+
initialOpen: false
|
660 |
+
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__["PanelRow"], null, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('These settings allow you to control popups with this block.', 'popup-maker')), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__["PanelRow"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_components_popup_select_control__WEBPACK_IMPORTED_MODULE_7__["default"], {
|
661 |
+
label: Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["Fragment"], null, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Open Popup', 'popup-maker'), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__["Tooltip"], {
|
662 |
+
position: "top",
|
663 |
+
text: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('This method does not work well with all block types.', 'popup-maker')
|
664 |
+
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])("a", {
|
665 |
+
href: "https://docs.wppopupmaker.com/article/395-trigger-click-open-overview-methods",
|
666 |
+
target: "_blank",
|
667 |
+
rel: "noopener noreferrer"
|
668 |
+
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__["Icon"], {
|
669 |
+
size: "16",
|
670 |
+
icon: "editor-help",
|
671 |
+
title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Open documentation', 'popup-maker'),
|
672 |
+
style: {
|
673 |
+
verticalAlign: 'middle'
|
674 |
+
}
|
675 |
+
})))),
|
676 |
+
value: openPopupId,
|
677 |
+
onChange: function onChange(popupId) {
|
678 |
+
return setAttributes({
|
679 |
+
openPopupId: popupId
|
680 |
+
});
|
681 |
+
},
|
682 |
+
help: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__["__"])('Open a popup when clicking this block', 'popup-maker')
|
683 |
+
}))))));
|
684 |
+
};
|
685 |
+
}, 'withAdvancedControls');
|
686 |
+
/**
|
687 |
+
* Add custom element class in save element.
|
688 |
+
*
|
689 |
+
* @param {Object} extraProps Block element.
|
690 |
+
* @param {Object} blockType Blocks object.
|
691 |
+
* @param {Object} attributes Blocks attributes.
|
692 |
+
*
|
693 |
+
* @return {Object} extraProps Modified block element.
|
694 |
+
*/
|
695 |
+
|
696 |
+
function applyTriggerClass(extraProps, blockType, attributes) {
|
697 |
+
var openPopupId = attributes.openPopupId; //check if attribute exists for old Gutenberg version compatibility
|
698 |
+
//add class only when visibleOnMobile = false
|
699 |
+
//add allowedBlocks restriction
|
700 |
+
|
701 |
+
if (typeof openPopupId !== 'undefined' && openPopupId > 0 && isAllowedForBlockType(blockType.name)) {
|
702 |
+
extraProps.className = classnames__WEBPACK_IMPORTED_MODULE_1___default()(extraProps.className, 'popmake-' + openPopupId);
|
703 |
+
}
|
704 |
+
|
705 |
+
return extraProps;
|
706 |
+
} //add filters
|
707 |
+
|
708 |
+
|
709 |
+
Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_3__["addFilter"])('blocks.registerBlockType', 'popup-maker/popup-trigger-attributes', addAttributes);
|
710 |
+
Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_3__["addFilter"])('editor.BlockEdit', 'popup-maker/popup-trigger-advanced-control', withAdvancedControls);
|
711 |
+
Object(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_3__["addFilter"])('blocks.getSaveContent.extraProps', 'popup-maker/applyTriggerClass', applyTriggerClass);
|
712 |
+
|
713 |
+
/***/ }),
|
714 |
+
|
715 |
+
/***/ "./src/block-editor/components/popup-select-control/index.js":
|
716 |
+
/*!*******************************************************************!*\
|
717 |
+
!*** ./src/block-editor/components/popup-select-control/index.js ***!
|
718 |
+
\*******************************************************************/
|
719 |
+
/*! exports provided: default */
|
720 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
721 |
+
|
722 |
+
"use strict";
|
723 |
+
__webpack_require__.r(__webpack_exports__);
|
724 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return PopupSelectControl; });
|
725 |
+
/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/extends.js");
|
726 |
+
/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);
|
727 |
+
/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ "./node_modules/@babel/runtime/helpers/toConsumableArray.js");
|
728 |
+
/* harmony import */ var _babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1__);
|
729 |
+
/* harmony import */ var _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/objectWithoutProperties.js");
|
730 |
+
/* harmony import */ var _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__);
|
731 |
+
/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js");
|
732 |
+
/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3__);
|
733 |
+
/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js");
|
734 |
+
/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4__);
|
735 |
+
/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/inherits.js");
|
736 |
+
/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);
|
737 |
+
/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js");
|
738 |
+
/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_6__);
|
739 |
+
/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js");
|
740 |
+
/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_7__);
|
741 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
|
742 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__);
|
743 |
+
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
|
744 |
+
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__);
|
745 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
|
746 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__);
|
747 |
+
|
748 |
+
|
749 |
+
|
750 |
+
|
751 |
+
|
752 |
+
|
753 |
+
|
754 |
+
|
755 |
+
|
756 |
+
|
757 |
+
function _createSuper(Derived) { return function () { var Super = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_7___default()(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_7___default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_6___default()(this, result); }; }
|
758 |
+
|
759 |
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
760 |
+
|
761 |
+
//import Select from 'react-select/src/Select';
|
762 |
+
|
763 |
+
/**
|
764 |
+
* WordPress dependencies
|
765 |
+
*/
|
766 |
+
|
767 |
+
|
768 |
+
|
769 |
+
/**
|
770 |
+
* Internal vars.
|
771 |
+
*/
|
772 |
+
|
773 |
+
var popups = window.pum_block_editor_vars.popups;
|
774 |
+
|
775 |
+
var PopupSelectControl = /*#__PURE__*/function (_Component) {
|
776 |
+
_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(PopupSelectControl, _Component);
|
777 |
+
|
778 |
+
var _super = _createSuper(PopupSelectControl);
|
779 |
+
|
780 |
+
function PopupSelectControl() {
|
781 |
+
_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_3___default()(this, PopupSelectControl);
|
782 |
+
|
783 |
+
return _super.apply(this, arguments);
|
784 |
+
}
|
785 |
+
|
786 |
+
_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_4___default()(PopupSelectControl, [{
|
787 |
+
key: "render",
|
788 |
+
value: function render() {
|
789 |
+
var _this$props = this.props,
|
790 |
+
onChangeInputValue = _this$props.onChangeInputValue,
|
791 |
+
value = _this$props.value,
|
792 |
+
_this$props$label = _this$props.label,
|
793 |
+
label = _this$props$label === void 0 ? Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__["__"])('Select Popup', 'popup-maker') : _this$props$label,
|
794 |
+
_this$props$emptyValu = _this$props.emptyValueLabel,
|
795 |
+
emptyValueLabel = _this$props$emptyValu === void 0 ? Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_10__["__"])('Choose a popup', 'popup-maker') : _this$props$emptyValu,
|
796 |
+
_this$props$hideLabel = _this$props.hideLabelFromVision,
|
797 |
+
hideLabelFromVision = _this$props$hideLabel === void 0 ? false : _this$props$hideLabel,
|
798 |
+
props = _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2___default()(_this$props, ["onChangeInputValue", "value", "label", "emptyValueLabel", "hideLabelFromVision"]);
|
799 |
+
|
800 |
+
var options = [{
|
801 |
+
value: '',
|
802 |
+
label: emptyValueLabel
|
803 |
+
}].concat(_babel_runtime_helpers_toConsumableArray__WEBPACK_IMPORTED_MODULE_1___default()(popups.map(function (popup) {
|
804 |
+
return {
|
805 |
+
value: "".concat(popup.ID),
|
806 |
+
label: popup.post_title //disabled: true
|
807 |
+
|
808 |
+
};
|
809 |
+
})));
|
810 |
+
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])("div", {
|
811 |
+
className: "block-editor-popup-select-input"
|
812 |
+
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__["SelectControl"], _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({
|
813 |
+
label: label,
|
814 |
+
hideLabelFromVision: hideLabelFromVision,
|
815 |
+
value: value,
|
816 |
+
onChange: onChangeInputValue,
|
817 |
+
options: options
|
818 |
+
}, props)));
|
819 |
+
}
|
820 |
+
}]);
|
821 |
+
|
822 |
+
return PopupSelectControl;
|
823 |
+
}(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["Component"]);
|
824 |
+
|
825 |
+
|
826 |
+
|
827 |
+
/***/ }),
|
828 |
+
|
829 |
+
/***/ "./src/block-editor/components/trigger-popover/index.js":
|
830 |
+
/*!**************************************************************!*\
|
831 |
+
!*** ./src/block-editor/components/trigger-popover/index.js ***!
|
832 |
+
\**************************************************************/
|
833 |
+
/*! exports provided: default */
|
834 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
835 |
+
|
836 |
+
"use strict";
|
837 |
+
__webpack_require__.r(__webpack_exports__);
|
838 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return TriggerPopover; });
|
839 |
+
/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/extends.js");
|
840 |
+
/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);
|
841 |
+
/* harmony import */ var _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/objectWithoutProperties.js");
|
842 |
+
/* harmony import */ var _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__);
|
843 |
+
/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js");
|
844 |
+
/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__);
|
845 |
+
/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js");
|
846 |
+
/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__);
|
847 |
+
/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/assertThisInitialized.js");
|
848 |
+
/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4__);
|
849 |
+
/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/inherits.js");
|
850 |
+
/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__);
|
851 |
+
/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js");
|
852 |
+
/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_6__);
|
853 |
+
/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js");
|
854 |
+
/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_7__);
|
855 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
|
856 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__);
|
857 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
|
858 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__);
|
859 |
+
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
|
860 |
+
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__);
|
861 |
+
|
862 |
+
|
863 |
+
|
864 |
+
|
865 |
+
|
866 |
+
|
867 |
+
|
868 |
+
|
869 |
+
|
870 |
+
|
871 |
+
function _createSuper(Derived) { return function () { var Super = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_7___default()(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_7___default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_6___default()(this, result); }; }
|
872 |
+
|
873 |
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
874 |
+
|
875 |
+
/**
|
876 |
+
* WordPress dependencies
|
877 |
+
*/
|
878 |
+
|
879 |
+
|
880 |
+
|
881 |
+
/**
|
882 |
+
* Style Dependencies.
|
883 |
+
* import './editor.scss';
|
884 |
+
*/
|
885 |
+
|
886 |
+
var TriggerPopover = /*#__PURE__*/function (_Component) {
|
887 |
+
_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5___default()(TriggerPopover, _Component);
|
888 |
+
|
889 |
+
var _super = _createSuper(TriggerPopover);
|
890 |
+
|
891 |
+
function TriggerPopover() {
|
892 |
+
var _this;
|
893 |
+
|
894 |
+
_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2___default()(this, TriggerPopover);
|
895 |
+
|
896 |
+
_this = _super.apply(this, arguments);
|
897 |
+
_this.toggleSettingsVisibility = _this.toggleSettingsVisibility.bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_4___default()(_this));
|
898 |
+
_this.state = {
|
899 |
+
isSettingsExpanded: false
|
900 |
+
};
|
901 |
+
return _this;
|
902 |
+
}
|
903 |
+
|
904 |
+
_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3___default()(TriggerPopover, [{
|
905 |
+
key: "toggleSettingsVisibility",
|
906 |
+
value: function toggleSettingsVisibility() {
|
907 |
+
this.setState({
|
908 |
+
isSettingsExpanded: !this.state.isSettingsExpanded
|
909 |
+
});
|
910 |
+
}
|
911 |
+
}, {
|
912 |
+
key: "render",
|
913 |
+
value: function render() {
|
914 |
+
var _this$props = this.props,
|
915 |
+
additionalControls = _this$props.additionalControls,
|
916 |
+
children = _this$props.children,
|
917 |
+
renderSettings = _this$props.renderSettings,
|
918 |
+
_this$props$position = _this$props.position,
|
919 |
+
position = _this$props$position === void 0 ? 'bottom center' : _this$props$position,
|
920 |
+
_this$props$focusOnMo = _this$props.focusOnMount,
|
921 |
+
focusOnMount = _this$props$focusOnMo === void 0 ? 'firstElement' : _this$props$focusOnMo,
|
922 |
+
noticeUI = _this$props.noticeUI,
|
923 |
+
popoverProps = _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1___default()(_this$props, ["additionalControls", "children", "renderSettings", "position", "focusOnMount", "noticeUI"]);
|
924 |
+
|
925 |
+
var isSettingsExpanded = this.state.isSettingsExpanded;
|
926 |
+
var showSettings = !!renderSettings && isSettingsExpanded;
|
927 |
+
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__["Popover"], _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({
|
928 |
+
className: "editor-popup-trigger-popover block-editor-popup-trigger-popover",
|
929 |
+
focusOnMount: focusOnMount,
|
930 |
+
position: position
|
931 |
+
}, popoverProps), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])("div", {
|
932 |
+
className: "block-editor-popup-trigger-popover__input-container"
|
933 |
+
}, noticeUI, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])("div", {
|
934 |
+
className: "editor-popup-trigger-popover__row block-editor-popup-trigger-popover__row"
|
935 |
+
}, children, !!renderSettings && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__["IconButton"], {
|
936 |
+
className: "editor-popup-trigger-popover__settings-toggle block-editor-popup-trigger-popover__settings-toggle",
|
937 |
+
icon: "arrow-down-alt2",
|
938 |
+
label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__["__"])('Trigger settings', 'popup-maker'),
|
939 |
+
onClick: this.toggleSettingsVisibility,
|
940 |
+
"aria-expanded": isSettingsExpanded
|
941 |
+
})), showSettings && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])("div", {
|
942 |
+
className: "editor-popup-trigger-popover__row block-editor-popup-trigger-popover__row editor-popup-trigger-popover__settings block-editor-popup-trigger-popover__settings"
|
943 |
+
}, renderSettings())), additionalControls && !showSettings && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])("div", {
|
944 |
+
className: "block-editor-popup-trigger-popover__additional-controls"
|
945 |
+
}, additionalControls));
|
946 |
+
}
|
947 |
+
}]);
|
948 |
+
|
949 |
+
return TriggerPopover;
|
950 |
+
}(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["Component"]);
|
951 |
+
|
952 |
+
|
953 |
+
|
954 |
+
/***/ }),
|
955 |
+
|
956 |
+
/***/ "./src/block-editor/components/trigger-popover/popup-trigger-editor.js":
|
957 |
+
/*!*****************************************************************************!*\
|
958 |
+
!*** ./src/block-editor/components/trigger-popover/popup-trigger-editor.js ***!
|
959 |
+
\*****************************************************************************/
|
960 |
+
/*! exports provided: default */
|
961 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
962 |
+
|
963 |
+
"use strict";
|
964 |
+
__webpack_require__.r(__webpack_exports__);
|
965 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return PopupTriggerEditor; });
|
966 |
+
/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/extends.js");
|
967 |
+
/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);
|
968 |
+
/* harmony import */ var _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/objectWithoutProperties.js");
|
969 |
+
/* harmony import */ var _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__);
|
970 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
|
971 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__);
|
972 |
+
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
|
973 |
+
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__);
|
974 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
|
975 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__);
|
976 |
+
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
|
977 |
+
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__);
|
978 |
+
/* harmony import */ var _popup_select_control__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../popup-select-control */ "./src/block-editor/components/popup-select-control/index.js");
|
979 |
+
|
980 |
+
|
981 |
+
|
982 |
+
|
983 |
+
/**
|
984 |
+
* External dependencies
|
985 |
+
*/
|
986 |
+
|
987 |
+
/**
|
988 |
+
* WordPress dependencies
|
989 |
+
*/
|
990 |
+
|
991 |
+
|
992 |
+
|
993 |
+
/**
|
994 |
+
* Internal dependencies
|
995 |
+
*/
|
996 |
+
|
997 |
+
|
998 |
+
function PopupTriggerEditor(_ref) {
|
999 |
+
var className = _ref.className,
|
1000 |
+
onChangeInputValue = _ref.onChangeInputValue,
|
1001 |
+
value = _ref.value,
|
1002 |
+
props = _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1___default()(_ref, ["className", "onChangeInputValue", "value"]);
|
1003 |
+
|
1004 |
+
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])("form", _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({
|
1005 |
+
className: classnames__WEBPACK_IMPORTED_MODULE_3___default()('block-editor-popup-trigger-popover__popup-editor', className)
|
1006 |
+
}, props), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])(_popup_select_control__WEBPACK_IMPORTED_MODULE_6__["default"], {
|
1007 |
+
emptyValueLabel: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__["__"])('Which popup should open?', 'popup-maker'),
|
1008 |
+
hideLabelFromVision: true,
|
1009 |
+
value: value,
|
1010 |
+
onChange: onChangeInputValue,
|
1011 |
+
required: true // postType="popup"
|
1012 |
+
|
1013 |
+
}), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__["IconButton"], {
|
1014 |
+
icon: "editor-break",
|
1015 |
+
label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__["__"])('Apply', 'popup-maker'),
|
1016 |
+
type: "submit"
|
1017 |
+
}));
|
1018 |
+
}
|
1019 |
+
|
1020 |
+
/***/ }),
|
1021 |
+
|
1022 |
+
/***/ "./src/block-editor/components/trigger-popover/popup-trigger-viewer.js":
|
1023 |
+
/*!*****************************************************************************!*\
|
1024 |
+
!*** ./src/block-editor/components/trigger-popover/popup-trigger-viewer.js ***!
|
1025 |
+
\*****************************************************************************/
|
1026 |
+
/*! exports provided: default */
|
1027 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1028 |
+
|
1029 |
+
"use strict";
|
1030 |
+
__webpack_require__.r(__webpack_exports__);
|
1031 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return PopupTriggerViewer; });
|
1032 |
+
/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/extends.js");
|
1033 |
+
/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);
|
1034 |
+
/* harmony import */ var _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/objectWithoutProperties.js");
|
1035 |
+
/* harmony import */ var _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__);
|
1036 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
|
1037 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__);
|
1038 |
+
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! classnames */ "./node_modules/classnames/index.js");
|
1039 |
+
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_3__);
|
1040 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
|
1041 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__);
|
1042 |
+
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
|
1043 |
+
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__);
|
1044 |
+
|
1045 |
+
|
1046 |
+
|
1047 |
+
|
1048 |
+
/**
|
1049 |
+
* External dependencies
|
1050 |
+
*/
|
1051 |
+
|
1052 |
+
/**
|
1053 |
+
* WordPress dependencies
|
1054 |
+
*/
|
1055 |
+
|
1056 |
+
|
1057 |
+
|
1058 |
+
|
1059 |
+
var _ref = window.pum_block_editor_vars || [],
|
1060 |
+
popups = _ref.popups;
|
1061 |
+
|
1062 |
+
function getPopupById() {
|
1063 |
+
var popupId = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
1064 |
+
popupId = parseInt(popupId) || 0;
|
1065 |
+
var popup = popups.filter(function (_ref2) {
|
1066 |
+
var ID = _ref2.ID;
|
1067 |
+
return popupId === ID;
|
1068 |
+
});
|
1069 |
+
return popup.length === 1 ? popup[0] : false;
|
1070 |
+
}
|
1071 |
+
|
1072 |
+
function PopupView(_ref3) {
|
1073 |
+
var popupId = _ref3.popupId,
|
1074 |
+
className = _ref3.className;
|
1075 |
+
var spanClassName = classnames__WEBPACK_IMPORTED_MODULE_3___default()(className, 'block-editor-popup-trigger-popover__popup-viewer-text');
|
1076 |
+
var popup = getPopupById(popupId);
|
1077 |
+
var label = !!popup ? Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__["sprintf"])(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__["__"])('Open "%s" popup', 'popup-maker'), popup.post_title) : '';
|
1078 |
+
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])("span", {
|
1079 |
+
className: spanClassName
|
1080 |
+
}, label);
|
1081 |
+
}
|
1082 |
+
|
1083 |
+
function PopupTriggerViewer(_ref4) {
|
1084 |
+
var className = _ref4.className,
|
1085 |
+
spanClassName = _ref4.spanClassName,
|
1086 |
+
onEditLinkClick = _ref4.onEditLinkClick,
|
1087 |
+
popupId = _ref4.popupId,
|
1088 |
+
props = _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1___default()(_ref4, ["className", "spanClassName", "onEditLinkClick", "popupId"]);
|
1089 |
+
|
1090 |
+
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])("div", _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({
|
1091 |
+
className: classnames__WEBPACK_IMPORTED_MODULE_3___default()('block-editor-popup-trigger-popover__popup-viewer', className)
|
1092 |
+
}, props), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])(PopupView, {
|
1093 |
+
popupId: popupId,
|
1094 |
+
className: spanClassName
|
1095 |
+
}), onEditLinkClick && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_2__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__["IconButton"], {
|
1096 |
+
icon: "edit",
|
1097 |
+
label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__["__"])('Edit', 'popup-maker'),
|
1098 |
+
onClick: onEditLinkClick
|
1099 |
+
}));
|
1100 |
+
}
|
1101 |
+
|
1102 |
+
/***/ }),
|
1103 |
+
|
1104 |
+
/***/ "./src/block-editor/formats/index.js":
|
1105 |
+
/*!*******************************************!*\
|
1106 |
+
!*** ./src/block-editor/formats/index.js ***!
|
1107 |
+
\*******************************************/
|
1108 |
+
/*! no exports provided */
|
1109 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1110 |
+
|
1111 |
+
"use strict";
|
1112 |
+
__webpack_require__.r(__webpack_exports__);
|
1113 |
+
/* harmony import */ var _wordpress_rich_text__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/rich-text */ "@wordpress/rich-text");
|
1114 |
+
/* harmony import */ var _wordpress_rich_text__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_0__);
|
1115 |
+
/* harmony import */ var _popup_trigger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./popup-trigger */ "./src/block-editor/formats/popup-trigger/index.js");
|
1116 |
+
/**
|
1117 |
+
* WordPress dependencies
|
1118 |
+
*/
|
1119 |
+
|
1120 |
+
/**
|
1121 |
+
* Internal dependencies
|
1122 |
+
*/
|
1123 |
+
|
1124 |
+
|
1125 |
+
[_popup_trigger__WEBPACK_IMPORTED_MODULE_1__].forEach(function (_ref) {
|
1126 |
+
var name = _ref.name,
|
1127 |
+
settings = _ref.settings;
|
1128 |
+
return Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_0__["registerFormatType"])(name, settings);
|
1129 |
+
});
|
1130 |
+
|
1131 |
+
/***/ }),
|
1132 |
+
|
1133 |
+
/***/ "./src/block-editor/formats/popup-trigger/index.js":
|
1134 |
+
/*!*********************************************************!*\
|
1135 |
+
!*** ./src/block-editor/formats/popup-trigger/index.js ***!
|
1136 |
+
\*********************************************************/
|
1137 |
+
/*! exports provided: name, settings */
|
1138 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1139 |
+
|
1140 |
+
"use strict";
|
1141 |
+
__webpack_require__.r(__webpack_exports__);
|
1142 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "name", function() { return name; });
|
1143 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "settings", function() { return settings; });
|
1144 |
+
/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js");
|
1145 |
+
/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__);
|
1146 |
+
/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js");
|
1147 |
+
/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__);
|
1148 |
+
/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/assertThisInitialized.js");
|
1149 |
+
/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2__);
|
1150 |
+
/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/inherits.js");
|
1151 |
+
/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3__);
|
1152 |
+
/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js");
|
1153 |
+
/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__);
|
1154 |
+
/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js");
|
1155 |
+
/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__);
|
1156 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
|
1157 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__);
|
1158 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
|
1159 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__);
|
1160 |
+
/* harmony import */ var _wordpress_rich_text__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/rich-text */ "@wordpress/rich-text");
|
1161 |
+
/* harmony import */ var _wordpress_rich_text__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_8__);
|
1162 |
+
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
|
1163 |
+
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__);
|
1164 |
+
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor");
|
1165 |
+
/* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_10__);
|
1166 |
+
/* harmony import */ var _icons_logo__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../icons/logo */ "./src/block-editor/icons/logo.js");
|
1167 |
+
/* harmony import */ var _inline__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./inline */ "./src/block-editor/formats/popup-trigger/inline.js");
|
1168 |
+
|
1169 |
+
|
1170 |
+
|
1171 |
+
|
1172 |
+
|
1173 |
+
|
1174 |
+
|
1175 |
+
|
1176 |
+
function _createSuper(Derived) { return function () { var Super = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default()(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default()(this, result); }; }
|
1177 |
+
|
1178 |
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
1179 |
+
|
1180 |
+
/**
|
1181 |
+
* WordPress dependencies
|
1182 |
+
*/
|
1183 |
+
|
1184 |
+
|
1185 |
+
|
1186 |
+
|
1187 |
+
|
1188 |
+
/**
|
1189 |
+
* Internal dependencies
|
1190 |
+
*/
|
1191 |
+
|
1192 |
+
|
1193 |
+
|
1194 |
+
|
1195 |
+
var title = Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__["__"])('Popup Trigger', 'popup-maker');
|
1196 |
+
|
1197 |
+
var name = "popup-maker/popup-trigger";
|
1198 |
+
var settings = {
|
1199 |
+
name: name,
|
1200 |
+
title: title,
|
1201 |
+
tagName: 'span',
|
1202 |
+
className: 'popup-trigger',
|
1203 |
+
attributes: {
|
1204 |
+
popupId: 'data-popup-id',
|
1205 |
+
doDefault: 'data-do-default'
|
1206 |
+
},
|
1207 |
+
edit: Object(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__["withSpokenMessages"])( /*#__PURE__*/function (_Component) {
|
1208 |
+
_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3___default()(TriggerEdit, _Component);
|
1209 |
+
|
1210 |
+
var _super = _createSuper(TriggerEdit);
|
1211 |
+
|
1212 |
+
function TriggerEdit() {
|
1213 |
+
var _this;
|
1214 |
+
|
1215 |
+
_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, TriggerEdit);
|
1216 |
+
|
1217 |
+
_this = _super.apply(this, arguments);
|
1218 |
+
_this.addTrigger = _this.addTrigger.bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2___default()(_this));
|
1219 |
+
_this.stopAddingTrigger = _this.stopAddingTrigger.bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2___default()(_this));
|
1220 |
+
_this.onRemoveFormat = _this.onRemoveFormat.bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2___default()(_this));
|
1221 |
+
_this.state = {
|
1222 |
+
addingTrigger: false
|
1223 |
+
};
|
1224 |
+
return _this;
|
1225 |
+
}
|
1226 |
+
|
1227 |
+
_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(TriggerEdit, [{
|
1228 |
+
key: "addTrigger",
|
1229 |
+
value: function addTrigger() {
|
1230 |
+
this.setState({
|
1231 |
+
addingTrigger: true
|
1232 |
+
});
|
1233 |
+
}
|
1234 |
+
}, {
|
1235 |
+
key: "stopAddingTrigger",
|
1236 |
+
value: function stopAddingTrigger() {
|
1237 |
+
this.setState({
|
1238 |
+
addingTrigger: false
|
1239 |
+
});
|
1240 |
+
}
|
1241 |
+
}, {
|
1242 |
+
key: "onRemoveFormat",
|
1243 |
+
value: function onRemoveFormat() {
|
1244 |
+
var _this$props = this.props,
|
1245 |
+
value = _this$props.value,
|
1246 |
+
onChange = _this$props.onChange,
|
1247 |
+
speak = _this$props.speak;
|
1248 |
+
onChange(Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_8__["removeFormat"])(value, name));
|
1249 |
+
speak(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__["__"])('Trigger removed.', 'popup-maker'), 'assertive');
|
1250 |
+
}
|
1251 |
+
}, {
|
1252 |
+
key: "render",
|
1253 |
+
value: function render() {
|
1254 |
+
var _this$props2 = this.props,
|
1255 |
+
isActive = _this$props2.isActive,
|
1256 |
+
activeAttributes = _this$props2.activeAttributes,
|
1257 |
+
value = _this$props2.value,
|
1258 |
+
onChange = _this$props2.onChange;
|
1259 |
+
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["Fragment"], null, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_10__["RichTextShortcut"], {
|
1260 |
+
type: "primary",
|
1261 |
+
character: "[",
|
1262 |
+
onUse: this.addTrigger
|
1263 |
+
}), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_10__["RichTextShortcut"], {
|
1264 |
+
type: "primaryShift",
|
1265 |
+
character: "[",
|
1266 |
+
onUse: this.onRemoveFormat
|
1267 |
+
}), isActive && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_10__["RichTextToolbarButton"], {
|
1268 |
+
icon: _icons_logo__WEBPACK_IMPORTED_MODULE_11__["default"],
|
1269 |
+
title: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_7__["__"])('Remove Trigger', 'popup-maker'),
|
1270 |
+
onClick: this.onRemoveFormat,
|
1271 |
+
isActive: isActive,
|
1272 |
+
shortcutType: "primaryShift",
|
1273 |
+
shortcutCharacter: "["
|
1274 |
+
}), !isActive && Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_10__["RichTextToolbarButton"], {
|
1275 |
+
icon: _icons_logo__WEBPACK_IMPORTED_MODULE_11__["default"],
|
1276 |
+
title: title,
|
1277 |
+
onClick: this.addTrigger,
|
1278 |
+
isActive: isActive,
|
1279 |
+
shortcutType: "primary",
|
1280 |
+
shortcutCharacter: "["
|
1281 |
+
}), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["createElement"])(_inline__WEBPACK_IMPORTED_MODULE_12__["default"], {
|
1282 |
+
addingTrigger: this.state.addingTrigger,
|
1283 |
+
stopAddingTrigger: this.stopAddingTrigger,
|
1284 |
+
isActive: isActive,
|
1285 |
+
activeAttributes: activeAttributes,
|
1286 |
+
value: value,
|
1287 |
+
onChange: onChange
|
1288 |
+
}));
|
1289 |
+
}
|
1290 |
+
}]);
|
1291 |
+
|
1292 |
+
return TriggerEdit;
|
1293 |
+
}(_wordpress_element__WEBPACK_IMPORTED_MODULE_6__["Component"]))
|
1294 |
+
};
|
1295 |
+
|
1296 |
+
/***/ }),
|
1297 |
+
|
1298 |
+
/***/ "./src/block-editor/formats/popup-trigger/inline.js":
|
1299 |
+
/*!**********************************************************!*\
|
1300 |
+
!*** ./src/block-editor/formats/popup-trigger/inline.js ***!
|
1301 |
+
\**********************************************************/
|
1302 |
+
/*! exports provided: default */
|
1303 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1304 |
+
|
1305 |
+
"use strict";
|
1306 |
+
__webpack_require__.r(__webpack_exports__);
|
1307 |
+
/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "./node_modules/@babel/runtime/helpers/classCallCheck.js");
|
1308 |
+
/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__);
|
1309 |
+
/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "./node_modules/@babel/runtime/helpers/createClass.js");
|
1310 |
+
/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__);
|
1311 |
+
/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ "./node_modules/@babel/runtime/helpers/assertThisInitialized.js");
|
1312 |
+
/* harmony import */ var _babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2__);
|
1313 |
+
/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ "./node_modules/@babel/runtime/helpers/inherits.js");
|
1314 |
+
/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3__);
|
1315 |
+
/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js");
|
1316 |
+
/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__);
|
1317 |
+
/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js");
|
1318 |
+
/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__);
|
1319 |
+
/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/extends.js");
|
1320 |
+
/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_6__);
|
1321 |
+
/* harmony import */ var _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ "./node_modules/@babel/runtime/helpers/objectWithoutProperties.js");
|
1322 |
+
/* harmony import */ var _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_7__);
|
1323 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
|
1324 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__);
|
1325 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n");
|
1326 |
+
/* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__);
|
1327 |
+
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components");
|
1328 |
+
/* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__);
|
1329 |
+
/* harmony import */ var _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/keycodes */ "@wordpress/keycodes");
|
1330 |
+
/* harmony import */ var _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_keycodes__WEBPACK_IMPORTED_MODULE_11__);
|
1331 |
+
/* harmony import */ var _wordpress_dom__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @wordpress/dom */ "@wordpress/dom");
|
1332 |
+
/* harmony import */ var _wordpress_dom__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_wordpress_dom__WEBPACK_IMPORTED_MODULE_12__);
|
1333 |
+
/* harmony import */ var _wordpress_rich_text__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @wordpress/rich-text */ "@wordpress/rich-text");
|
1334 |
+
/* harmony import */ var _wordpress_rich_text__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_13__);
|
1335 |
+
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./utils */ "./src/block-editor/formats/popup-trigger/utils.js");
|
1336 |
+
/* harmony import */ var _components_trigger_popover__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/trigger-popover */ "./src/block-editor/components/trigger-popover/index.js");
|
1337 |
+
/* harmony import */ var _components_trigger_popover_popup_trigger_editor__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/trigger-popover/popup-trigger-editor */ "./src/block-editor/components/trigger-popover/popup-trigger-editor.js");
|
1338 |
+
/* harmony import */ var _components_trigger_popover_popup_trigger_viewer__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/trigger-popover/popup-trigger-viewer */ "./src/block-editor/components/trigger-popover/popup-trigger-viewer.js");
|
1339 |
+
|
1340 |
+
|
1341 |
+
|
1342 |
+
|
1343 |
+
|
1344 |
+
|
1345 |
+
|
1346 |
+
|
1347 |
+
|
1348 |
+
|
1349 |
+
function _createSuper(Derived) { return function () { var Super = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default()(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5___default()(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4___default()(this, result); }; }
|
1350 |
+
|
1351 |
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
1352 |
+
|
1353 |
+
/**
|
1354 |
+
* WordPress dependencies
|
1355 |
+
*/
|
1356 |
+
|
1357 |
+
|
1358 |
+
|
1359 |
+
|
1360 |
+
|
1361 |
+
|
1362 |
+
/**
|
1363 |
+
* Internal dependencies
|
1364 |
+
*/
|
1365 |
+
|
1366 |
+
|
1367 |
+
|
1368 |
+
|
1369 |
+
|
1370 |
+
|
1371 |
+
var stopKeyPropagation = function stopKeyPropagation(event) {
|
1372 |
+
return event.stopPropagation();
|
1373 |
+
};
|
1374 |
+
|
1375 |
+
function isShowingInput(props, state) {
|
1376 |
+
return props.addingTrigger || state.editTrigger;
|
1377 |
+
}
|
1378 |
+
|
1379 |
+
var TriggerPopoverAtText = function TriggerPopoverAtText(_ref) {
|
1380 |
+
var isActive = _ref.isActive,
|
1381 |
+
addingTrigger = _ref.addingTrigger,
|
1382 |
+
value = _ref.value,
|
1383 |
+
props = _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_7___default()(_ref, ["isActive", "addingTrigger", "value"]);
|
1384 |
+
|
1385 |
+
var anchorRect = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["useMemo"])(function () {
|
1386 |
+
var selection = window.getSelection();
|
1387 |
+
var range = selection.rangeCount > 0 ? selection.getRangeAt(0) : null;
|
1388 |
+
|
1389 |
+
if (!range) {
|
1390 |
+
return;
|
1391 |
+
}
|
1392 |
+
|
1393 |
+
if (addingTrigger) {
|
1394 |
+
return Object(_wordpress_dom__WEBPACK_IMPORTED_MODULE_12__["getRectangleFromRange"])(range);
|
1395 |
+
}
|
1396 |
+
|
1397 |
+
var element = range.startContainer; // If the caret is right before the element, select the next element.
|
1398 |
+
|
1399 |
+
element = element.nextElementSibling || element;
|
1400 |
+
|
1401 |
+
while (element.nodeType !== window.Node.ELEMENT_NODE) {
|
1402 |
+
element = element.parentNode;
|
1403 |
+
}
|
1404 |
+
|
1405 |
+
var closest = element.closest('span.popup-trigger');
|
1406 |
+
|
1407 |
+
if (closest) {
|
1408 |
+
return closest.getBoundingClientRect();
|
1409 |
+
}
|
1410 |
+
}, [isActive, addingTrigger, value.start, value.end]);
|
1411 |
+
|
1412 |
+
if (!anchorRect) {
|
1413 |
+
return null;
|
1414 |
+
}
|
1415 |
+
|
1416 |
+
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])(_components_trigger_popover__WEBPACK_IMPORTED_MODULE_15__["default"], _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_6___default()({
|
1417 |
+
anchorRect: anchorRect
|
1418 |
+
}, props));
|
1419 |
+
};
|
1420 |
+
/**
|
1421 |
+
* Generates a Popover with a select field to choose a popup, inline with the Rich Text editors.
|
1422 |
+
*/
|
1423 |
+
|
1424 |
+
|
1425 |
+
var InlinePopupTriggerUI = /*#__PURE__*/function (_Component) {
|
1426 |
+
_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_3___default()(InlinePopupTriggerUI, _Component);
|
1427 |
+
|
1428 |
+
var _super = _createSuper(InlinePopupTriggerUI);
|
1429 |
+
|
1430 |
+
function InlinePopupTriggerUI() {
|
1431 |
+
var _this;
|
1432 |
+
|
1433 |
+
_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, InlinePopupTriggerUI);
|
1434 |
+
|
1435 |
+
_this = _super.apply(this, arguments);
|
1436 |
+
_this.editTrigger = _this.editTrigger.bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2___default()(_this));
|
1437 |
+
_this.setPopupID = _this.setPopupID.bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2___default()(_this));
|
1438 |
+
_this.setDoDefault = _this.setDoDefault.bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2___default()(_this));
|
1439 |
+
_this.onFocusOutside = _this.onFocusOutside.bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2___default()(_this));
|
1440 |
+
_this.submitTrigger = _this.submitTrigger.bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2___default()(_this));
|
1441 |
+
_this.resetState = _this.resetState.bind(_babel_runtime_helpers_assertThisInitialized__WEBPACK_IMPORTED_MODULE_2___default()(_this));
|
1442 |
+
_this.state = {
|
1443 |
+
doDefault: false,
|
1444 |
+
popupId: ''
|
1445 |
+
};
|
1446 |
+
return _this;
|
1447 |
+
}
|
1448 |
+
|
1449 |
+
_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(InlinePopupTriggerUI, [{
|
1450 |
+
key: "onKeyDown",
|
1451 |
+
value: function onKeyDown(event) {
|
1452 |
+
if ([_wordpress_keycodes__WEBPACK_IMPORTED_MODULE_11__["LEFT"], _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_11__["DOWN"], _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_11__["RIGHT"], _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_11__["UP"], _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_11__["BACKSPACE"], _wordpress_keycodes__WEBPACK_IMPORTED_MODULE_11__["ENTER"]].indexOf(event.keyCode) > -1) {
|
1453 |
+
// Stop the key event from propagating up to ObserveTyping.startTypingInTextField.
|
1454 |
+
event.stopPropagation();
|
1455 |
+
}
|
1456 |
+
}
|
1457 |
+
}, {
|
1458 |
+
key: "setPopupID",
|
1459 |
+
value: function setPopupID(popupId) {
|
1460 |
+
var noticeOperations = this.props.noticeOperations;
|
1461 |
+
noticeOperations.removeNotice('missingPopupId');
|
1462 |
+
|
1463 |
+
if ('' === popupId) {
|
1464 |
+
noticeOperations.createNotice({
|
1465 |
+
id: 'missingPopupId',
|
1466 |
+
status: 'error',
|
1467 |
+
content: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__["__"])('Choose a popup or the trigger won\'t function.', 'popup-maker')
|
1468 |
+
});
|
1469 |
+
}
|
1470 |
+
|
1471 |
+
this.setState({
|
1472 |
+
popupId: popupId
|
1473 |
+
});
|
1474 |
+
}
|
1475 |
+
}, {
|
1476 |
+
key: "setDoDefault",
|
1477 |
+
value: function setDoDefault(doDefault) {
|
1478 |
+
var _this$props = this.props,
|
1479 |
+
_this$props$activeAtt = _this$props.activeAttributes.popupId,
|
1480 |
+
popupId = _this$props$activeAtt === void 0 ? 0 : _this$props$activeAtt,
|
1481 |
+
value = _this$props.value,
|
1482 |
+
onChange = _this$props.onChange;
|
1483 |
+
this.setState({
|
1484 |
+
doDefault: doDefault
|
1485 |
+
}); // Apply now if URL is not being edited.
|
1486 |
+
|
1487 |
+
if (!isShowingInput(this.props, this.state)) {
|
1488 |
+
onChange(Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_13__["applyFormat"])(value, Object(_utils__WEBPACK_IMPORTED_MODULE_14__["createTriggerFormat"])({
|
1489 |
+
popupId: popupId,
|
1490 |
+
doDefault: doDefault
|
1491 |
+
})));
|
1492 |
+
}
|
1493 |
+
}
|
1494 |
+
}, {
|
1495 |
+
key: "editTrigger",
|
1496 |
+
value: function editTrigger(event) {
|
1497 |
+
this.setState({
|
1498 |
+
editTrigger: true
|
1499 |
+
});
|
1500 |
+
event.preventDefault();
|
1501 |
+
}
|
1502 |
+
}, {
|
1503 |
+
key: "submitTrigger",
|
1504 |
+
value: function submitTrigger(event) {
|
1505 |
+
var _this$props2 = this.props,
|
1506 |
+
isActive = _this$props2.isActive,
|
1507 |
+
value = _this$props2.value,
|
1508 |
+
onChange = _this$props2.onChange,
|
1509 |
+
speak = _this$props2.speak;
|
1510 |
+
var _this$state = this.state,
|
1511 |
+
popupId = _this$state.popupId,
|
1512 |
+
doDefault = _this$state.doDefault;
|
1513 |
+
var format = Object(_utils__WEBPACK_IMPORTED_MODULE_14__["createTriggerFormat"])({
|
1514 |
+
popupId: popupId,
|
1515 |
+
doDefault: doDefault
|
1516 |
+
});
|
1517 |
+
event.preventDefault();
|
1518 |
+
|
1519 |
+
if (Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_13__["isCollapsed"])(value) && !isActive) {
|
1520 |
+
var toInsert = Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_13__["applyFormat"])(Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_13__["create"])({
|
1521 |
+
text: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__["__"])('Open Popup', 'popup-maker')
|
1522 |
+
}), format, 0, Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__["__"])('Open Popup', 'popup-maker').length);
|
1523 |
+
onChange(Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_13__["insert"])(value, toInsert));
|
1524 |
+
} else {
|
1525 |
+
onChange(Object(_wordpress_rich_text__WEBPACK_IMPORTED_MODULE_13__["applyFormat"])(value, format));
|
1526 |
+
}
|
1527 |
+
|
1528 |
+
this.resetState();
|
1529 |
+
|
1530 |
+
if (isActive) {
|
1531 |
+
speak(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__["__"])('Trigger edited.', 'popup-maker'), 'assertive');
|
1532 |
+
} else {
|
1533 |
+
speak(Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__["__"])('Trigger inserted.', 'popup-maker'), 'assertive');
|
1534 |
+
}
|
1535 |
+
}
|
1536 |
+
}, {
|
1537 |
+
key: "onFocusOutside",
|
1538 |
+
value: function onFocusOutside() {
|
1539 |
+
this.resetState();
|
1540 |
+
}
|
1541 |
+
}, {
|
1542 |
+
key: "resetState",
|
1543 |
+
value: function resetState() {
|
1544 |
+
this.props.stopAddingTrigger();
|
1545 |
+
this.setState({
|
1546 |
+
editTrigger: false
|
1547 |
+
});
|
1548 |
+
}
|
1549 |
+
}, {
|
1550 |
+
key: "render",
|
1551 |
+
value: function render() {
|
1552 |
+
var _this2 = this;
|
1553 |
+
|
1554 |
+
/**
|
1555 |
+
* @constant {boolean} isActive True when the cursor is inside an existing trigger
|
1556 |
+
* @constant {boolean} addingTrigger True when the user has clicked the add trigger button
|
1557 |
+
* @constant {Object} activeAttributes Object containing the current attribute values for the selected text.
|
1558 |
+
* @constant {Object} value Object containing the current rich text selection object containing position & formats.
|
1559 |
+
* @constant {Object} value.activeFormats Array of registered & active WPFormat objects.
|
1560 |
+
* @constant {number} value.formats ?? Array of format history for the active text.
|
1561 |
+
* @constant {number} value.start Start offset of selected text
|
1562 |
+
* @constant {number} value.end End offset of selected text.
|
1563 |
+
* @constant {string} value.text Selected text.
|
1564 |
+
*/
|
1565 |
+
var _this$props3 = this.props,
|
1566 |
+
isActive = _this$props3.isActive,
|
1567 |
+
addingTrigger = _this$props3.addingTrigger,
|
1568 |
+
value = _this$props3.value,
|
1569 |
+
noticeUI = _this$props3.noticeUI; // If the user is not adding a trigger from the toolbar or actively inside render nothing.
|
1570 |
+
|
1571 |
+
if (!isActive && !addingTrigger) {
|
1572 |
+
return null;
|
1573 |
+
}
|
1574 |
+
|
1575 |
+
var _this$state2 = this.state,
|
1576 |
+
popupId = _this$state2.popupId,
|
1577 |
+
doDefault = _this$state2.doDefault;
|
1578 |
+
var showInput = isShowingInput(this.props, this.state);
|
1579 |
+
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])(TriggerPopoverAtText, {
|
1580 |
+
value: value,
|
1581 |
+
isActive: isActive,
|
1582 |
+
addingTrigger: addingTrigger,
|
1583 |
+
onFocusOutside: this.onFocusOutside,
|
1584 |
+
onClose: this.resetState,
|
1585 |
+
noticeUI: noticeUI,
|
1586 |
+
focusOnMount: showInput ? 'firstElement' : false,
|
1587 |
+
renderSettings: function renderSettings() {
|
1588 |
+
return Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__["ToggleControl"], {
|
1589 |
+
label: Object(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_9__["__"])('Do default browser action?', 'popup-maker'),
|
1590 |
+
checked: doDefault,
|
1591 |
+
onChange: _this2.setDoDefault
|
1592 |
+
});
|
1593 |
+
}
|
1594 |
+
}, showInput ? Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])(_components_trigger_popover_popup_trigger_editor__WEBPACK_IMPORTED_MODULE_16__["default"], {
|
1595 |
+
className: "editor-format-toolbar__link-container-content block-editor-format-toolbar__link-container-content",
|
1596 |
+
value: popupId,
|
1597 |
+
onChangeInputValue: this.setPopupID,
|
1598 |
+
onKeyDown: this.onKeyDown,
|
1599 |
+
onKeyPress: stopKeyPropagation,
|
1600 |
+
onSubmit: this.submitTrigger
|
1601 |
+
}) : Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["createElement"])(_components_trigger_popover_popup_trigger_viewer__WEBPACK_IMPORTED_MODULE_17__["default"], {
|
1602 |
+
className: "editor-format-toolbar__link-container-content block-editor-format-toolbar__link-container-content",
|
1603 |
+
onKeyPress: stopKeyPropagation,
|
1604 |
+
popupId: popupId,
|
1605 |
+
onEditLinkClick: this.editTrigger // linkClassName=""
|
1606 |
+
|
1607 |
+
}));
|
1608 |
+
}
|
1609 |
+
}], [{
|
1610 |
+
key: "getDerivedStateFromProps",
|
1611 |
+
value: function getDerivedStateFromProps(props, state) {
|
1612 |
+
var activeAttributes = props.activeAttributes;
|
1613 |
+
var _activeAttributes$pop = activeAttributes.popupId,
|
1614 |
+
popupId = _activeAttributes$pop === void 0 ? '' : _activeAttributes$pop;
|
1615 |
+
var _activeAttributes$doD = activeAttributes.doDefault,
|
1616 |
+
doDefault = _activeAttributes$doD === void 0 ? false : _activeAttributes$doD; // Convert string value to boolean for comparison.
|
1617 |
+
|
1618 |
+
if (window._.isString(doDefault)) {
|
1619 |
+
doDefault = '1' === doDefault;
|
1620 |
+
}
|
1621 |
+
|
1622 |
+
if (!isShowingInput(props, state)) {
|
1623 |
+
var update = {};
|
1624 |
+
|
1625 |
+
if (popupId !== state.popupId) {
|
1626 |
+
update.popupId = popupId;
|
1627 |
+
}
|
1628 |
+
|
1629 |
+
if (doDefault !== state.doDefault) {
|
1630 |
+
update.doDefault = doDefault;
|
1631 |
+
}
|
1632 |
+
|
1633 |
+
return Object.keys(update).length ? update : null;
|
1634 |
+
}
|
1635 |
+
|
1636 |
+
return null;
|
1637 |
+
}
|
1638 |
+
}]);
|
1639 |
+
|
1640 |
+
return InlinePopupTriggerUI;
|
1641 |
+
}(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__["Component"]);
|
1642 |
+
|
1643 |
+
/* harmony default export */ __webpack_exports__["default"] = (Object(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__["withSpokenMessages"])(Object(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__["withNotices"])(InlinePopupTriggerUI)));
|
1644 |
+
|
1645 |
+
/***/ }),
|
1646 |
+
|
1647 |
+
/***/ "./src/block-editor/formats/popup-trigger/utils.js":
|
1648 |
+
/*!*********************************************************!*\
|
1649 |
+
!*** ./src/block-editor/formats/popup-trigger/utils.js ***!
|
1650 |
+
\*********************************************************/
|
1651 |
+
/*! exports provided: createTriggerFormat */
|
1652 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1653 |
+
|
1654 |
+
"use strict";
|
1655 |
+
__webpack_require__.r(__webpack_exports__);
|
1656 |
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createTriggerFormat", function() { return createTriggerFormat; });
|
1657 |
+
/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index */ "./src/block-editor/formats/popup-trigger/index.js");
|
1658 |
+
/**
|
1659 |
+
* Internal dependencies
|
1660 |
+
*/
|
1661 |
+
|
1662 |
+
/**
|
1663 |
+
* Generates the format object that will be applied to the trigger text.
|
1664 |
+
*
|
1665 |
+
* @param {Object} options
|
1666 |
+
* @param {number} options.popupId The popup ID.
|
1667 |
+
* @param {boolean} options.doDefault Whether this trigger will act normally when clicked.
|
1668 |
+
*
|
1669 |
+
* @return {Object} The final format object.
|
1670 |
+
*/
|
1671 |
+
|
1672 |
+
function createTriggerFormat(_ref) {
|
1673 |
+
var _ref$popupId = _ref.popupId,
|
1674 |
+
popupId = _ref$popupId === void 0 ? 0 : _ref$popupId,
|
1675 |
+
_ref$doDefault = _ref.doDefault,
|
1676 |
+
doDefault = _ref$doDefault === void 0 ? false : _ref$doDefault;
|
1677 |
+
var doDefaultClass = doDefault ? 'pum-do-default' : '';
|
1678 |
+
return {
|
1679 |
+
type: _index__WEBPACK_IMPORTED_MODULE_0__["name"],
|
1680 |
+
attributes: {
|
1681 |
+
class: "popmake-".concat(popupId, " ").concat(doDefaultClass),
|
1682 |
+
popupId: "".concat(popupId),
|
1683 |
+
doDefault: doDefault ? '1' : '0'
|
1684 |
+
}
|
1685 |
+
};
|
1686 |
+
}
|
1687 |
+
|
1688 |
+
/***/ }),
|
1689 |
+
|
1690 |
+
/***/ "./src/block-editor/icons/gears.js":
|
1691 |
+
/*!*****************************************!*\
|
1692 |
+
!*** ./src/block-editor/icons/gears.js ***!
|
1693 |
+
\*****************************************/
|
1694 |
+
/*! exports provided: default */
|
1695 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1696 |
+
|
1697 |
+
"use strict";
|
1698 |
+
__webpack_require__.r(__webpack_exports__);
|
1699 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
|
1700 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
|
1701 |
+
|
1702 |
+
var GearsIcon = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])('svg', {
|
1703 |
+
viewBox: '0 0 512 512',
|
1704 |
+
width: 20,
|
1705 |
+
height: 20
|
1706 |
+
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])('path', {
|
1707 |
+
d: 'M348,327.195v-35.741l-32.436-11.912c-2.825-10.911-6.615-21.215-12.216-30.687l0.325-0.042l15.438-32.153l-25.2-25.269 l-32.118,15.299l-0.031,0.045c-9.472-5.601-19.758-9.156-30.671-11.978L219.186,162h-35.739l-11.913,32.759 c-10.913,2.821-21.213,6.774-30.685,12.379l-0.048-0.248l-32.149-15.399l-25.269,25.219l15.299,32.124l0.05,0.039 c-5.605,9.471-11.159,19.764-13.98,30.675L50,291.454v35.741l34.753,11.913c2.821,10.915,7.774,21.211,13.38,30.685l0.249,0.045 l-15.147,32.147l25.343,25.274l32.188-15.298l0.065-0.046c9.474,5.597,19.782,10.826,30.695,13.652L183.447,460h35.739 l11.915-34.432c10.913-2.826,21.209-7.614,30.681-13.215l0.05-0.175l32.151,15.192l25.267-25.326l-15.299-32.182l-0.046-0.061 c5.601-9.473,8.835-19.776,11.66-30.688L348,327.195z M201.318,368.891c-32.897,0-59.566-26.662-59.566-59.565 c0-32.896,26.669-59.568,59.566-59.568c32.901,0,59.566,26.672,59.566,59.568C260.884,342.229,234.219,368.891,201.318,368.891z'
|
1708 |
+
}), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])('path', {
|
1709 |
+
d: 'M462.238,111.24l-7.815-18.866l-20.23,1.012c-3.873-5.146-8.385-9.644-13.417-13.42l0.038-0.043l1.06-20.318l-18.859-7.822 L389.385,66.89l-0.008,0.031c-6.229-0.883-12.619-0.933-18.988-0.025L356.76,51.774l-18.867,7.815l1.055,20.32 c-5.152,3.873-9.627,8.422-13.403,13.46l-0.038-0.021l-20.317-1.045l-7.799,18.853l15.103,13.616l0.038,0.021 c-0.731,5.835-1.035,12.658-0.133,19.038l-15.208,13.662l7.812,18.87l20.414-1.086c3.868,5.144,8.472,9.613,13.495,13.385 l0.013,0.025l-1.03,20.312l20.668,7.815L374,201.703v-0.033c4,0.731,10.818,0.935,17.193,0.04l12.729,15.114l18.42-7.813 l-1.286-20.324c5.144-3.875,9.521-8.424,13.297-13.456l-0.023,0.011l20.287,1.047l7.802-18.864l-15.121-13.624l-0.033-0.019 c0.877-6.222,0.852-12.58-0.05-18.953L462.238,111.24z M392.912,165.741c-17.359,7.19-37.27-1.053-44.462-18.421 c-7.196-17.364,1.047-37.272,18.415-44.465c17.371-7.192,37.274,1.053,44.471,18.417 C418.523,138.643,410.276,158.547,392.912,165.741z'
|
1710 |
+
}));
|
1711 |
+
/* harmony default export */ __webpack_exports__["default"] = (GearsIcon);
|
1712 |
+
|
1713 |
+
/***/ }),
|
1714 |
+
|
1715 |
+
/***/ "./src/block-editor/icons/logo.js":
|
1716 |
+
/*!****************************************!*\
|
1717 |
+
!*** ./src/block-editor/icons/logo.js ***!
|
1718 |
+
\****************************************/
|
1719 |
+
/*! exports provided: default */
|
1720 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1721 |
+
|
1722 |
+
"use strict";
|
1723 |
+
__webpack_require__.r(__webpack_exports__);
|
1724 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element");
|
1725 |
+
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__);
|
1726 |
+
|
1727 |
+
var LogoIcon = Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])('svg', {
|
1728 |
+
viewBox: '0 0 106 84',
|
1729 |
+
width: 24,
|
1730 |
+
height: 24,
|
1731 |
+
className: 'popup-trigger-button-svg'
|
1732 |
+
}, Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])('path', {
|
1733 |
+
d: 'M 74.98 0.00 L 80.18 0.00 C 86.85 0.96 93.11 3.19 97.92 8.09 C 102.82 12.91 105.07 19.19 106.00 25.89 L 106.00 29.25 C 105.01 36.93 101.84 43.76 95.96 48.90 C 85.62 57.23 75.10 65.38 64.88 73.86 C 58.14 79.85 49.63 82.94 40.76 84.00 L 36.17 84.00 C 27.56 83.00 19.39 80.03 12.89 74.16 C 5.17 67.38 1.08 57.89 0.00 47.78 L 0.00 43.19 C 1.06 33.34 4.97 24.08 12.35 17.32 C 19.55 10.62 29.39 7.33 38.98 6.07 C 50.98 4.07 63.06 2.41 74.98 0.00 Z',
|
1734 |
+
fill: '#98b729'
|
1735 |
+
}), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])('path', {
|
1736 |
+
d: 'M 73.27 3.38 C 78.51 2.46 83.84 3.16 88.72 5.25 C 99.12 9.98 105.12 21.94 102.29 33.09 C 100.93 39.34 97.06 44.25 92.19 48.20 C 84.32 54.30 76.63 60.62 68.82 66.78 C 65.27 69.54 61.99 72.75 58.21 75.17 C 53.04 78.31 47.09 80.42 41.04 80.90 C 26.64 81.98 12.34 73.74 6.37 60.53 C 0.78 48.69 2.33 34.56 10.17 24.12 C 16.07 16.10 25.11 11.68 34.69 9.75 C 47.55 7.61 60.45 5.72 73.27 3.38 Z',
|
1737 |
+
fill: '#262d2b'
|
1738 |
+
}), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])('path', {
|
1739 |
+
d: 'M 73.39 7.40 C 79.51 6.31 85.83 7.34 90.84 11.17 C 97.78 16.34 100.76 25.75 97.94 33.97 C 96.07 39.49 92.17 43.26 87.63 46.67 C 80.70 52.04 73.92 57.62 67.04 63.05 C 61.52 67.32 57.24 72.00 50.55 74.56 C 39.66 79.19 26.67 77.04 17.82 69.21 C 10.09 62.55 6.01 52.13 7.21 41.99 C 8.21 32.78 13.46 24.27 21.21 19.22 C 29.30 14.01 37.69 13.29 46.90 11.83 C 55.73 10.34 64.58 9.05 73.39 7.40 Z',
|
1740 |
+
fill: '#98b729'
|
1741 |
+
}), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])('path', {
|
1742 |
+
d: 'M 79.33 11.15 C 80.91 11.34 82.49 11.77 84.05 12.13 C 83.96 13.78 83.90 15.42 83.83 17.07 C 85.21 18.44 86.59 19.81 87.96 21.19 C 89.56 21.12 91.16 21.05 92.76 20.97 C 93.19 22.58 93.62 24.19 94.07 25.79 C 92.62 26.56 91.18 27.34 89.74 28.11 C 89.27 30.00 88.80 31.89 88.29 33.77 C 89.17 35.11 90.05 36.46 90.93 37.80 C 89.75 38.99 88.56 40.18 87.37 41.36 C 86.03 40.50 84.69 39.65 83.36 38.79 C 81.43 39.31 79.50 39.83 77.57 40.33 C 76.86 41.76 76.14 43.18 75.44 44.61 C 73.84 44.14 72.22 43.70 70.60 43.30 C 70.70 41.70 70.79 40.09 70.89 38.49 C 69.46 37.08 68.05 35.65 66.64 34.22 C 65.07 34.33 63.50 34.41 61.94 34.52 C 61.54 32.88 61.09 31.25 60.61 29.63 C 62.04 28.92 63.45 28.20 64.87 27.48 C 65.38 25.56 65.93 23.65 66.45 21.74 C 65.57 20.37 64.69 19.01 63.80 17.65 C 64.99 16.46 66.17 15.27 67.36 14.08 C 68.70 14.97 70.04 15.86 71.38 16.75 C 73.20 16.26 75.02 15.78 76.84 15.32 C 77.62 13.91 78.39 12.46 79.33 11.15 Z',
|
1743 |
+
fill: '#262d2b'
|
1744 |
+
}), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])('path', {
|
1745 |
+
d: 'M 31.46 18.53 C 35.73 17.41 39.75 17.90 44.06 18.38 C 43.69 20.25 43.38 22.13 43.00 23.99 C 46.30 25.32 49.40 26.46 52.10 28.89 C 56.07 32.21 58.00 36.65 59.46 41.49 C 61.32 41.26 63.19 41.04 65.06 40.81 C 65.30 45.35 65.55 49.64 64.02 54.02 C 62.82 57.89 60.52 60.95 58.09 64.10 C 56.66 62.88 55.24 61.65 53.81 60.43 C 50.80 62.88 47.90 65.17 44.07 66.21 C 39.50 67.65 35.11 67.00 30.55 65.99 C 29.84 67.72 29.12 69.46 28.40 71.19 C 24.48 69.34 20.78 67.44 17.87 64.12 C 14.90 61.08 13.34 57.40 11.80 53.51 C 13.55 52.89 15.31 52.27 17.06 51.65 C 16.43 47.16 15.95 42.88 17.48 38.49 C 18.70 34.52 21.22 31.56 23.95 28.54 C 22.80 27.05 21.69 25.54 20.55 24.05 C 23.99 21.67 27.30 19.46 31.46 18.53 Z',
|
1746 |
+
fill: '#262d2b'
|
1747 |
+
}), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])('path', {
|
1748 |
+
d: 'M 76.34 24.32 C 79.21 23.52 81.89 26.79 80.48 29.46 C 79.35 31.71 76.40 32.21 74.62 30.38 C 72.72 28.34 73.67 25.06 76.34 24.32 Z',
|
1749 |
+
fill: '#98b729'
|
1750 |
+
}), Object(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__["createElement"])('path', {
|
1751 |
+
d: 'M 33.46 26.53 C 40.08 24.87 47.25 27.17 51.85 32.16 C 57.28 37.94 58.59 46.87 54.94 53.94 C 51.18 61.61 42.36 65.97 33.97 64.14 C 25.47 62.43 18.97 54.70 18.77 46.02 C 18.32 36.96 24.64 28.60 33.46 26.53 Z',
|
1752 |
+
fill: '#98b729'
|
1753 |
+
}));
|
1754 |
+
/* harmony default export */ __webpack_exports__["default"] = (LogoIcon);
|
1755 |
+
|
1756 |
+
/***/ }),
|
1757 |
+
|
1758 |
+
/***/ "./src/block-editor/index.js":
|
1759 |
+
/*!***********************************!*\
|
1760 |
+
!*** ./src/block-editor/index.js ***!
|
1761 |
+
\***********************************/
|
1762 |
+
/*! no exports provided */
|
1763 |
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
1764 |
+
|
1765 |
+
"use strict";
|
1766 |
+
__webpack_require__.r(__webpack_exports__);
|
1767 |
+
/* harmony import */ var _formats__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./formats */ "./src/block-editor/formats/index.js");
|
1768 |
+
/* harmony import */ var _block_extensions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./block-extensions */ "./src/block-editor/block-extensions/index.js");
|
1769 |
+
/*******************************************************************************
|
1770 |
+
* Copyright (c) 2020, Code Atlantic LLC.
|
1771 |
+
******************************************************************************/
|
1772 |
+
|
1773 |
+
|
1774 |
+
|
1775 |
+
/***/ }),
|
1776 |
+
|
1777 |
+
/***/ "@wordpress/block-editor":
|
1778 |
+
/*!**********************************************!*\
|
1779 |
+
!*** external {"this":["wp","blockEditor"]} ***!
|
1780 |
+
\**********************************************/
|
1781 |
+
/*! no static exports found */
|
1782 |
+
/***/ (function(module, exports) {
|
1783 |
+
|
1784 |
+
(function() { module.exports = this["wp"]["blockEditor"]; }());
|
1785 |
+
|
1786 |
+
/***/ }),
|
1787 |
+
|
1788 |
+
/***/ "@wordpress/components":
|
1789 |
+
/*!*********************************************!*\
|
1790 |
+
!*** external {"this":["wp","components"]} ***!
|
1791 |
+
\*********************************************/
|
1792 |
+
/*! no static exports found */
|
1793 |
+
/***/ (function(module, exports) {
|
1794 |
+
|
1795 |
+
(function() { module.exports = this["wp"]["components"]; }());
|
1796 |
+
|
1797 |
+
/***/ }),
|
1798 |
+
|
1799 |
+
/***/ "@wordpress/compose":
|
1800 |
+
/*!******************************************!*\
|
1801 |
+
!*** external {"this":["wp","compose"]} ***!
|
1802 |
+
\******************************************/
|
1803 |
+
/*! no static exports found */
|
1804 |
+
/***/ (function(module, exports) {
|
1805 |
+
|
1806 |
+
(function() { module.exports = this["wp"]["compose"]; }());
|
1807 |
+
|
1808 |
+
/***/ }),
|
1809 |
+
|
1810 |
+
/***/ "@wordpress/dom":
|
1811 |
+
/*!**************************************!*\
|
1812 |
+
!*** external {"this":["wp","dom"]} ***!
|
1813 |
+
\**************************************/
|
1814 |
+
/*! no static exports found */
|
1815 |
+
/***/ (function(module, exports) {
|
1816 |
+
|
1817 |
+
(function() { module.exports = this["wp"]["dom"]; }());
|
1818 |
+
|
1819 |
+
/***/ }),
|
1820 |
+
|
1821 |
+
/***/ "@wordpress/element":
|
1822 |
+
/*!******************************************!*\
|
1823 |
+
!*** external {"this":["wp","element"]} ***!
|
1824 |
+
\******************************************/
|
1825 |
+
/*! no static exports found */
|
1826 |
+
/***/ (function(module, exports) {
|
1827 |
+
|
1828 |
+
(function() { module.exports = this["wp"]["element"]; }());
|
1829 |
+
|
1830 |
+
/***/ }),
|
1831 |
+
|
1832 |
+
/***/ "@wordpress/hooks":
|
1833 |
+
/*!****************************************!*\
|
1834 |
+
!*** external {"this":["wp","hooks"]} ***!
|
1835 |
+
\****************************************/
|
1836 |
+
/*! no static exports found */
|
1837 |
+
/***/ (function(module, exports) {
|
1838 |
+
|
1839 |
+
(function() { module.exports = this["wp"]["hooks"]; }());
|
1840 |
+
|
1841 |
+
/***/ }),
|
1842 |
+
|
1843 |
+
/***/ "@wordpress/i18n":
|
1844 |
+
/*!***************************************!*\
|
1845 |
+
!*** external {"this":["wp","i18n"]} ***!
|
1846 |
+
\***************************************/
|
1847 |
+
/*! no static exports found */
|
1848 |
+
/***/ (function(module, exports) {
|
1849 |
+
|
1850 |
+
(function() { module.exports = this["wp"]["i18n"]; }());
|
1851 |
+
|
1852 |
+
/***/ }),
|
1853 |
+
|
1854 |
+
/***/ "@wordpress/keycodes":
|
1855 |
+
/*!*******************************************!*\
|
1856 |
+
!*** external {"this":["wp","keycodes"]} ***!
|
1857 |
+
\*******************************************/
|
1858 |
+
/*! no static exports found */
|
1859 |
+
/***/ (function(module, exports) {
|
1860 |
+
|
1861 |
+
(function() { module.exports = this["wp"]["keycodes"]; }());
|
1862 |
+
|
1863 |
+
/***/ }),
|
1864 |
+
|
1865 |
+
/***/ "@wordpress/rich-text":
|
1866 |
+
/*!*******************************************!*\
|
1867 |
+
!*** external {"this":["wp","richText"]} ***!
|
1868 |
+
\*******************************************/
|
1869 |
+
/*! no static exports found */
|
1870 |
+
/***/ (function(module, exports) {
|
1871 |
+
|
1872 |
+
(function() { module.exports = this["wp"]["richText"]; }());
|
1873 |
+
|
1874 |
+
/***/ })
|
1875 |
+
|
1876 |
+
/******/ });
|
1877 |
+
//# sourceMappingURL=block-editor.js.map
|
dist/block-editor/block-editor.js.map
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./node_modules/@babel/runtime/helpers/arrayLikeToArray.js","webpack:///./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js","webpack:///./node_modules/@babel/runtime/helpers/assertThisInitialized.js","webpack:///./node_modules/@babel/runtime/helpers/classCallCheck.js","webpack:///./node_modules/@babel/runtime/helpers/createClass.js","webpack:///./node_modules/@babel/runtime/helpers/extends.js","webpack:///./node_modules/@babel/runtime/helpers/getPrototypeOf.js","webpack:///./node_modules/@babel/runtime/helpers/inherits.js","webpack:///./node_modules/@babel/runtime/helpers/iterableToArray.js","webpack:///./node_modules/@babel/runtime/helpers/nonIterableSpread.js","webpack:///./node_modules/@babel/runtime/helpers/objectWithoutProperties.js","webpack:///./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js","webpack:///./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js","webpack:///./node_modules/@babel/runtime/helpers/setPrototypeOf.js","webpack:///./node_modules/@babel/runtime/helpers/toConsumableArray.js","webpack:///./node_modules/@babel/runtime/helpers/typeof.js","webpack:///./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js","webpack:///./node_modules/classnames/index.js","webpack:///./src/block-editor/block-extensions/index.js","webpack:///./src/block-editor/block-extensions/popup-trigger/index.js","webpack:///./src/block-editor/components/popup-select-control/index.js","webpack:///./src/block-editor/components/trigger-popover/index.js","webpack:///./src/block-editor/components/trigger-popover/popup-trigger-editor.js","webpack:///./src/block-editor/components/trigger-popover/popup-trigger-viewer.js","webpack:///./src/block-editor/formats/index.js","webpack:///./src/block-editor/formats/popup-trigger/index.js","webpack:///./src/block-editor/formats/popup-trigger/inline.js","webpack:///./src/block-editor/formats/popup-trigger/utils.js","webpack:///./src/block-editor/icons/gears.js","webpack:///./src/block-editor/icons/logo.js","webpack:///./src/block-editor/index.js","webpack:///external {\"this\":[\"wp\",\"blockEditor\"]}","webpack:///external {\"this\":[\"wp\",\"components\"]}","webpack:///external {\"this\":[\"wp\",\"compose\"]}","webpack:///external {\"this\":[\"wp\",\"dom\"]}","webpack:///external {\"this\":[\"wp\",\"element\"]}","webpack:///external {\"this\":[\"wp\",\"hooks\"]}","webpack:///external {\"this\":[\"wp\",\"i18n\"]}","webpack:///external {\"this\":[\"wp\",\"keycodes\"]}","webpack:///external {\"this\":[\"wp\",\"richText\"]}"],"names":["allowedBlocks","excludedBlocks","isAllowedForBlockType","name","length","includes","addAttributes","settings","attributes","Object","assign","openPopupId","type","default","withAdvancedControls","createHigherOrderComponent","BlockEdit","props","setAttributes","isSelected","__","GearIcon","verticalAlign","popupId","applyTriggerClass","extraProps","blockType","className","classnames","addFilter","popups","window","pum_block_editor_vars","PopupSelectControl","onChangeInputValue","value","label","emptyValueLabel","hideLabelFromVision","options","map","popup","ID","post_title","Component","TriggerPopover","arguments","toggleSettingsVisibility","bind","state","isSettingsExpanded","setState","additionalControls","children","renderSettings","position","focusOnMount","noticeUI","popoverProps","showSettings","PopupTriggerEditor","getPopupById","parseInt","filter","PopupView","spanClassName","sprintf","PopupTriggerViewer","onEditLinkClick","trigger","forEach","registerFormatType","title","tagName","doDefault","edit","withSpokenMessages","addTrigger","stopAddingTrigger","onRemoveFormat","addingTrigger","onChange","speak","removeFormat","isActive","activeAttributes","LogoIcon","stopKeyPropagation","event","stopPropagation","isShowingInput","editTrigger","TriggerPopoverAtText","anchorRect","useMemo","selection","getSelection","range","rangeCount","getRangeAt","getRectangleFromRange","element","startContainer","nextElementSibling","nodeType","Node","ELEMENT_NODE","parentNode","closest","getBoundingClientRect","start","end","InlinePopupTriggerUI","setPopupID","setDoDefault","onFocusOutside","submitTrigger","resetState","LEFT","DOWN","RIGHT","UP","BACKSPACE","ENTER","indexOf","keyCode","noticeOperations","removeNotice","createNotice","id","status","content","applyFormat","createTriggerFormat","preventDefault","format","isCollapsed","toInsert","create","text","insert","showInput","onKeyDown","_","isString","update","keys","withNotices","doDefaultClass","class","GearsIcon","createElement","viewBox","width","height","d","fill"],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;AClFA;AACA;;AAEA,wCAAwC,SAAS;AACjD;AACA;;AAEA;AACA;;AAEA,mC;;;;;;;;;;;ACVA,uBAAuB,mBAAO,CAAC,qFAAoB;;AAEnD;AACA;AACA;;AAEA,oC;;;;;;;;;;;ACNA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,wC;;;;;;;;;;;ACRA;AACA;AACA;AACA;AACA;;AAEA,iC;;;;;;;;;;;ACNA;AACA,iBAAiB,kBAAkB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,8B;;;;;;;;;;;AChBA;AACA;AACA,mBAAmB,sBAAsB;AACzC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA,0B;;;;;;;;;;;AClBA;AACA;AACA;AACA;AACA;AACA;;AAEA,iC;;;;;;;;;;;ACPA,qBAAqB,mBAAO,CAAC,iFAAkB;;AAE/C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA,2B;;;;;;;;;;;ACjBA;AACA;AACA;;AAEA,kC;;;;;;;;;;;ACJA;AACA;AACA;;AAEA,oC;;;;;;;;;;;ACJA,mCAAmC,mBAAO,CAAC,6GAAgC;;AAE3E;AACA;AACA;AACA;;AAEA;AACA;;AAEA,eAAe,6BAA6B;AAC5C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,0C;;;;;;;;;;;ACrBA;AACA;AACA;AACA;AACA;;AAEA,aAAa,uBAAuB;AACpC;AACA;AACA;AACA;;AAEA;AACA;;AAEA,+C;;;;;;;;;;;ACfA,cAAc,mBAAO,CAAC,0EAAmB;;AAEzC,4BAA4B,mBAAO,CAAC,+FAAyB;;AAE7D;AACA;AACA;AACA;;AAEA;AACA;;AAEA,4C;;;;;;;;;;;ACZA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,iC;;;;;;;;;;;ACTA,wBAAwB,mBAAO,CAAC,uFAAqB;;AAErD,sBAAsB,mBAAO,CAAC,mFAAmB;;AAEjD,iCAAiC,mBAAO,CAAC,yGAA8B;;AAEvE,wBAAwB,mBAAO,CAAC,uFAAqB;;AAErD;AACA;AACA;;AAEA,oC;;;;;;;;;;;ACZA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;;AAEA,yB;;;;;;;;;;;AChBA,uBAAuB,mBAAO,CAAC,qFAAoB;;AAEnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,6C;;;;;;;;;;;ACXA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,gBAAgB;;AAEhB;AACA;;AAEA,iBAAiB,sBAAsB;AACvC;AACA;;AAEA;;AAEA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,KAAK,KAA6B;AAClC;AACA;AACA,EAAE,UAAU,IAA4E;AACxF;AACA,EAAE,iCAAqB,EAAE,mCAAE;AAC3B;AACA,GAAG;AAAA,oGAAC;AACJ,EAAE,MAAM,EAEN;AACF,CAAC;;;;;;;;;;;;;ACnDD;AAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAA;;;AAGA;AAEA;;;;AAGA;AACA;AACA;AACA;AACA;AAEA;;;;AAGA;AACA;AAEA;;;;;;AAKA,IAAMA,aAAa,GAAG,EAAtB;AACA,IAAMC,cAAc,GAAG,CACtB,eADsB,CAAvB;;AAIA,SAASC,qBAAT,CAAgCC,IAAhC,EAAuC;AACtC,MAAK,CAAEH,aAAa,CAACI,MAAhB,IAA0B,CAAEH,cAAc,CAACG,MAAhD,EAAyD;AACxD,WAAO,IAAP;AACA;;AAED,MAAKJ,aAAa,CAACI,MAAnB,EAA4B;AAC3B,WAAOJ,aAAa,CAACK,QAAd,CAAwBF,IAAxB,CAAP;AACA;;AAED,MAAKF,cAAc,CAACG,MAApB,EAA6B;AAC5B,WAAO,CAAEH,cAAc,CAACI,QAAf,CAAyBF,IAAzB,CAAT;AACA;;AAED,SAAO,IAAP;AACA;AAED;;;;;;;;;AAOA,SAASG,aAAT,CAAwBC,QAAxB,EAAmC;AAClC;AACA;AACA,MAAK,OAAOA,QAAQ,CAACC,UAAhB,KAA+B,WAA/B,IAA8CN,qBAAqB,CAAEK,QAAQ,CAACJ,IAAX,CAAxE,EAA4F;AAC3FI,YAAQ,CAACC,UAAT,GAAsBC,MAAM,CAACC,MAAP,CAAeH,QAAQ,CAACC,UAAxB,EAAoC;AACzDG,iBAAW,EAAE;AACZC,YAAI,EAAE,QADM;AAEZC,eAAO,EAAE;AAFG;AAD4C,KAApC,CAAtB;AAMA;;AAED,SAAON,QAAP;AACA;AAED;;;;;;;;;AAOA,IAAMO,oBAAoB,GAAGC,qFAA0B,CAAE,UAAEC,SAAF,EAAiB;AACzE,SAAO,UAAEC,KAAF,EAAa;AAAA,QACXd,IADW,GACqCc,KADrC,CACXd,IADW;AAAA,QACLK,UADK,GACqCS,KADrC,CACLT,UADK;AAAA,QACOU,aADP,GACqCD,KADrC,CACOC,aADP;AAAA,QACsBC,UADtB,GACqCF,KADrC,CACsBE,UADtB;AAAA,QAEXR,WAFW,GAEKH,UAFL,CAEXG,WAFW;AAInB,WACC,4IACC,yEAAC,SAAD,EAAgBM,KAAhB,CADD,EAEGE,UAAU,IAAIjB,qBAAqB,CAAEC,IAAF,CAAnC,IACD,yEAAC,yEAAD,QACC,yEAAC,2DAAD,QACC,yEAAC,+DAAD;AACC,WAAK,EAAGiB,0DAAE,CAAE,gBAAF,EAAoB,aAApB,CADX;AAEC,UAAI,EAAGC,oDAFR;AAGC,iBAAW,EAAG;AAHf,OAKC,yEAAC,8DAAD,QACGD,0DAAE,CAAE,6DAAF,EAAiE,aAAjE,CADL,CALD,EAQC,yEAAC,8DAAD,QACC,yEAAC,wEAAD;AACC,WAAK,EAAG,4IACLA,0DAAE,CAAE,YAAF,EAAgB,aAAhB,CADG,EAEP,yEAAC,6DAAD;AACC,gBAAQ,EAAC,KADV;AAEC,YAAI,EAAGA,0DAAE,CAAE,sDAAF,EAA0D,aAA1D;AAFV,SAIC;AAAG,YAAI,EAAC,+EAAR;AAAwF,cAAM,EAAC,QAA/F;AAAwG,WAAG,EAAC;AAA5G,SACC,yEAAC,0DAAD;AACC,YAAI,EAAC,IADN;AAEC,YAAI,EAAC,aAFN;AAGC,aAAK,EAAGA,0DAAE,CAAE,oBAAF,EAAwB,aAAxB,CAHX;AAIC,aAAK,EAAG;AACPE,uBAAa,EAAE;AADR;AAJT,QADD,CAJD,CAFO,CADT;AAmBC,WAAK,EAAGX,WAnBT;AAoBC,cAAQ,EAAG,kBAAEY,OAAF;AAAA,eAAeL,aAAa,CAAE;AAAEP,qBAAW,EAAEY;AAAf,SAAF,CAA5B;AAAA,OApBZ;AAqBC,UAAI,EAAGH,0DAAE,CAAE,uCAAF,EAA2C,aAA3C;AArBV,MADD,CARD,CADD,CADD,CAHF,CADD;AA8CA,GAlDD;AAmDA,CApDsD,EAoDpD,sBApDoD,CAAvD;AAsDA;;;;;;;;;;AASA,SAASI,iBAAT,CAA4BC,UAA5B,EAAwCC,SAAxC,EAAmDlB,UAAnD,EAAgE;AAAA,MACvDG,WADuD,GACvCH,UADuC,CACvDG,WADuD,EAG/D;AACA;AACA;;AACA,MAAK,OAAOA,WAAP,KAAuB,WAAvB,IAAsCA,WAAW,GAAG,CAApD,IAAyDT,qBAAqB,CAAEwB,SAAS,CAACvB,IAAZ,CAAnF,EAAwG;AACvGsB,cAAU,CAACE,SAAX,GAAuBC,iDAAU,CAAEH,UAAU,CAACE,SAAb,EAAwB,aAAahB,WAArC,CAAjC;AACA;;AAED,SAAOc,UAAP;AACA,C,CAED;;;AAEAI,kEAAS,CACR,0BADQ,EAER,sCAFQ,EAGRvB,aAHQ,CAAT;AAMAuB,kEAAS,CACR,kBADQ,EAER,4CAFQ,EAGRf,oBAHQ,CAAT;AAMAe,kEAAS,CACR,kCADQ,EAER,+BAFQ,EAGRL,iBAHQ,CAAT,C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACrKA;;AACA;;;AAGA;AACA;AACA;AAEA;;;;IAGQM,M,GAAWC,MAAM,CAACC,qB,CAAlBF,M;;IAEaG,kB;;;;;;;;;;;;;6BACX;AAAA,wBAQJ,KAAKhB,KARD;AAAA,UAEPiB,kBAFO,eAEPA,kBAFO;AAAA,UAGPC,KAHO,eAGPA,KAHO;AAAA,0CAIPC,KAJO;AAAA,UAIPA,KAJO,kCAIChB,2DAAE,CAAE,cAAF,EAAkB,aAAlB,CAJH;AAAA,8CAKPiB,eALO;AAAA,UAKPA,eALO,sCAKWjB,2DAAE,CAAE,gBAAF,EAAoB,aAApB,CALb;AAAA,8CAMPkB,mBANO;AAAA,UAMPA,mBANO,sCAMe,KANf;AAAA,UAOJrB,KAPI;;AAUR,UAAMsB,OAAO,IACZ;AACCJ,aAAK,EAAE,EADR;AAECC,aAAK,EAAEC;AAFR,OADY,yFAKTP,MAAM,CAACU,GAAP,CAAY,UAAEC,KAAF,EAAa;AAC3B,eAAO;AACNN,eAAK,YAAMM,KAAK,CAACC,EAAZ,CADC;AAENN,eAAK,EAAEK,KAAK,CAACE,UAFP,CAGN;;AAHM,SAAP;AAKA,OANE,CALS,EAAb;AAcA,aACC;AAAK,iBAAS,EAAC;AAAf,SACC,yEAAC,mEAAD;AACC,aAAK,EAAGP,KADT;AAEC,2BAAmB,EAAGE,mBAFvB;AAGC,aAAK,EAAGH,KAHT;AAIC,gBAAQ,EAAGD,kBAJZ;AAKC,eAAO,EAAGK;AALX,SAMMtB,KANN,EADD,CADD;AAYA;;;;EArC8C2B,4D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACbhD;;;AAGA;AACA;AACA;AAEA;;;;;IAIqBC,c;;;;;AACpB,4BAAc;AAAA;;AAAA;;AACb,+BAAUC,SAAV;AAEA,UAAKC,wBAAL,GAAgC,MAAKA,wBAAL,CAA8BC,IAA9B,4FAAhC;AAEA,UAAKC,KAAL,GAAa;AACZC,wBAAkB,EAAE;AADR,KAAb;AALa;AAQb;;;;+CAE0B;AAC1B,WAAKC,QAAL,CAAe;AACdD,0BAAkB,EAAE,CAAE,KAAKD,KAAL,CAAWC;AADnB,OAAf;AAGA;;;6BAEQ;AAAA,wBASJ,KAAKjC,KATD;AAAA,UAEPmC,kBAFO,eAEPA,kBAFO;AAAA,UAGPC,QAHO,eAGPA,QAHO;AAAA,UAIPC,cAJO,eAIPA,cAJO;AAAA,6CAKPC,QALO;AAAA,UAKPA,QALO,qCAKI,eALJ;AAAA,8CAMPC,YANO;AAAA,UAMPA,YANO,sCAMQ,cANR;AAAA,UAOPC,QAPO,eAOPA,QAPO;AAAA,UAQJC,YARI;;AAAA,UAYPR,kBAZO,GAaJ,KAAKD,KAbD,CAYPC,kBAZO;AAeR,UAAMS,YAAY,GAAG,CAAC,CAAEL,cAAH,IAAqBJ,kBAA1C;AAEA,aACC,yEAAC,8DAAD;AACC,iBAAS,EAAC,iEADX;AAEC,oBAAY,EAAGM,YAFhB;AAGC,gBAAQ,EAAGD;AAHZ,SAIMG,YAJN,GAMC;AAAK,iBAAS,EAAC;AAAf,SACGD,QADH,EAEC;AAAK,iBAAS,EAAC;AAAf,SACGJ,QADH,EAEG,CAAC,CAAEC,cAAH,IACD,yEAAC,iEAAD;AACC,iBAAS,EAAC,mGADX;AAEC,YAAI,EAAC,iBAFN;AAGC,aAAK,EAAGlC,0DAAE,CAAE,kBAAF,EAAsB,aAAtB,CAHX;AAIC,eAAO,EAAG,KAAK2B,wBAJhB;AAKC,yBAAgBG;AALjB,QAHF,CAFD,EAcGS,YAAY,IACb;AAAK,iBAAS,EAAC;AAAf,SACGL,cAAc,EADjB,CAfF,CAND,EA0BGF,kBAAkB,IAAI,CAAEO,YAAxB,IACD;AACC,iBAAS,EAAC;AADX,SAGGP,kBAHH,CA3BF,CADD;AAoCA;;;;EAtE0CR,4D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACX5C;;;AAGA;AACA;;;;AAGA;AACA;AACA;;;;AAGA;AAEe,SAASgB,kBAAT,OAKX;AAAA,MAJHjC,SAIG,QAJHA,SAIG;AAAA,MAHHO,kBAGG,QAHHA,kBAGG;AAAA,MAFHC,KAEG,QAFHA,KAEG;AAAA,MADAlB,KACA;;AACH,SACC;AACC,aAAS,EAAGW,iDAAU,CACrB,kDADqB,EAErBD,SAFqB;AADvB,KAKMV,KALN,GAOC,yEAAC,6DAAD;AACC,mBAAe,EAAGG,0DAAE,CAAE,0BAAF,EAA8B,aAA9B,CADrB;AAEC,uBAAmB,EAAG,IAFvB;AAGC,SAAK,EAAGe,KAHT;AAIC,YAAQ,EAAGD,kBAJZ;AAKC,YAAQ,EAAG,IALZ,CAMC;;AAND,IAPD,EAeC,yEAAC,gEAAD;AAAY,QAAI,EAAC,cAAjB;AAAgC,SAAK,EAAGd,0DAAE,CAAE,OAAF,EAAW,aAAX,CAA1C;AAAuE,QAAI,EAAC;AAA5E,IAfD,CADD;AAmBA,C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACvCD;;;AAGA;AACA;;;;AAGA;AACA;;WAEmBW,MAAM,CAACC,qBAAP,IAAgC,E;IAA3CF,M,QAAAA,M;;AAER,SAAS+B,YAAT,GAAqC;AAAA,MAAdtC,OAAc,uEAAJ,CAAI;AACpCA,SAAO,GAAGuC,QAAQ,CAAEvC,OAAF,CAAR,IAAuB,CAAjC;AACA,MAAMkB,KAAK,GAAGX,MAAM,CAACiC,MAAP,CAAe;AAAA,QAAIrB,EAAJ,SAAIA,EAAJ;AAAA,WAAcnB,OAAO,KAAKmB,EAA1B;AAAA,GAAf,CAAd;AAEA,SAAOD,KAAK,CAACrC,MAAN,KAAiB,CAAjB,GAAqBqC,KAAK,CAAE,CAAF,CAA1B,GAAkC,KAAzC;AACA;;AAED,SAASuB,SAAT,QAA6C;AAAA,MAAvBzC,OAAuB,SAAvBA,OAAuB;AAAA,MAAdI,SAAc,SAAdA,SAAc;AAC5C,MAAMsC,aAAa,GAAGrC,iDAAU,CAC/BD,SAD+B,EAE/B,uDAF+B,CAAhC;AAKA,MAAMc,KAAK,GAAGoB,YAAY,CAAEtC,OAAF,CAA1B;AACA,MAAMa,KAAK,GAAG,CAAC,CAAEK,KAAH,GAAWyB,+DAAO,CAAE9C,0DAAE,CAAE,iBAAF,EAAqB,aAArB,CAAJ,EAA0CqB,KAAK,CAACE,UAAhD,CAAlB,GAAiF,EAA/F;AAEA,SAAS;AAAM,aAAS,EAAGsB;AAAlB,KAAoC7B,KAApC,CAAT;AACA;;AAEc,SAAS+B,kBAAT,QAMX;AAAA,MALHxC,SAKG,SALHA,SAKG;AAAA,MAJHsC,aAIG,SAJHA,aAIG;AAAA,MAHHG,eAGG,SAHHA,eAGG;AAAA,MAFH7C,OAEG,SAFHA,OAEG;AAAA,MADAN,KACA;;AACH,SACC;AACC,aAAS,EAAGW,iDAAU,CACrB,kDADqB,EAErBD,SAFqB;AADvB,KAKMV,KALN,GAOC,yEAAC,SAAD;AAAW,WAAO,EAAGM,OAArB;AAA+B,aAAS,EAAG0C;AAA3C,IAPD,EAQGG,eAAe,IAAI,yEAAC,gEAAD;AACpB,QAAI,EAAC,MADe;AAEpB,SAAK,EAAGhD,0DAAE,CAAE,MAAF,EAAU,aAAV,CAFU;AAGpB,WAAO,EAAGgD;AAHU,IARtB,CADD;AAgBA,C;;;;;;;;;;;;ACtDD;AAAA;AAAA;AAAA;AAAA;;;AAGA;AACA;;;;AAGA;AAEA,CACCC,2CADD,EAEEC,OAFF,CAEW;AAAA,MAAInE,IAAJ,QAAIA,IAAJ;AAAA,MAAUI,QAAV,QAAUA,QAAV;AAAA,SAA0BgE,+EAAkB,CAAEpE,IAAF,EAAQI,QAAR,CAA5C;AAAA,CAFX,E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACTA;;;AAGA;AACA;AACA;AACA;AACA;AACA;;;;AAGA;AACA;;AAEA,IAAMiE,KAAK,GAAGpD,0DAAE,CAAE,eAAF,EAAmB,aAAnB,CAAhB;;AAEO,IAAMjB,IAAI,8BAAV;AACA,IAAMI,QAAQ,GAAG;AACvBJ,MAAI,EAAJA,IADuB;AAEvBqE,OAAK,EAALA,KAFuB;AAGvBC,SAAO,EAAE,MAHc;AAIvB9C,WAAS,EAAE,eAJY;AAKvBnB,YAAU,EAAE;AACXe,WAAO,EAAE,eADE;AAEXmD,aAAS,EAAE;AAFA,GALW;AASvBC,MAAI,EAAEC,gFAAkB;AAAA;;AAAA;;AACvB,2BAAc;AAAA;;AAAA;;AACb,iCAAU9B,SAAV;AAEA,YAAK+B,UAAL,GAAkB,MAAKA,UAAL,CAAgB7B,IAAhB,4FAAlB;AACA,YAAK8B,iBAAL,GAAyB,MAAKA,iBAAL,CAAuB9B,IAAvB,4FAAzB;AACA,YAAK+B,cAAL,GAAsB,MAAKA,cAAL,CAAoB/B,IAApB,4FAAtB;AACA,YAAKC,KAAL,GAAa;AACZ+B,qBAAa,EAAE;AADH,OAAb;AANa;AASb;;AAVsB;AAAA;AAAA,mCAYV;AACZ,aAAK7B,QAAL,CAAe;AAAE6B,uBAAa,EAAE;AAAjB,SAAf;AACA;AAdsB;AAAA;AAAA,0CAgBH;AACnB,aAAK7B,QAAL,CAAe;AAAE6B,uBAAa,EAAE;AAAjB,SAAf;AACA;AAlBsB;AAAA;AAAA,uCAoBN;AAAA,0BACmB,KAAK/D,KADxB;AAAA,YACRkB,KADQ,eACRA,KADQ;AAAA,YACD8C,QADC,eACDA,QADC;AAAA,YACSC,KADT,eACSA,KADT;AAGhBD,gBAAQ,CAAEE,yEAAY,CAAEhD,KAAF,EAAShC,IAAT,CAAd,CAAR;AACA+E,aAAK,CAAE9D,0DAAE,CAAE,kBAAF,EAAsB,aAAtB,CAAJ,EAA2C,WAA3C,CAAL;AACA;AAzBsB;AAAA;AAAA,+BA2Bd;AAAA,2BACgD,KAAKH,KADrD;AAAA,YACAmE,QADA,gBACAA,QADA;AAAA,YACUC,gBADV,gBACUA,gBADV;AAAA,YAC4BlD,KAD5B,gBAC4BA,KAD5B;AAAA,YACmC8C,QADnC,gBACmCA,QADnC;AAGR,eACC,4IACC,yEAAC,yEAAD;AACC,cAAI,EAAC,SADN;AAEC,mBAAS,EAAC,GAFX;AAGC,eAAK,EAAG,KAAKJ;AAHd,UADD,EAMC,yEAAC,yEAAD;AACC,cAAI,EAAC,cADN;AAEC,mBAAS,EAAC,GAFX;AAGC,eAAK,EAAG,KAAKE;AAHd,UAND,EAWGK,QAAQ,IAAI,yEAAC,8EAAD;AACb,cAAI,EAAGE,oDADM;AAEb,eAAK,EAAGlE,0DAAE,CAAE,gBAAF,EAAoB,aAApB,CAFG;AAGb,iBAAO,EAAG,KAAK2D,cAHF;AAIb,kBAAQ,EAAGK,QAJE;AAKb,sBAAY,EAAC,cALA;AAMb,2BAAiB,EAAC;AANL,UAXf,EAmBG,CAAEA,QAAF,IAAc,yEAAC,8EAAD;AACf,cAAI,EAAGE,oDADQ;AAEf,eAAK,EAAGd,KAFO;AAGf,iBAAO,EAAG,KAAKK,UAHA;AAIf,kBAAQ,EAAGO,QAJI;AAKf,sBAAY,EAAC,SALE;AAMf,2BAAiB,EAAC;AANH,UAnBjB,EA2BC,yEAAC,gDAAD;AACC,uBAAa,EAAG,KAAKnC,KAAL,CAAW+B,aAD5B;AAEC,2BAAiB,EAAG,KAAKF,iBAF1B;AAGC,kBAAQ,EAAGM,QAHZ;AAIC,0BAAgB,EAAGC,gBAJpB;AAKC,eAAK,EAAGlD,KALT;AAMC,kBAAQ,EAAG8C;AANZ,UA3BD,CADD;AAsCA;AApEsB;;AAAA;AAAA,IAA4BrC,4DAA5B;AATD,CAAjB,C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACjBP;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;;;;AAGA;AACA;AACA;AACA;;AAEA,IAAM2C,kBAAkB,GAAG,SAArBA,kBAAqB,CAAEC,KAAF;AAAA,SAAaA,KAAK,CAACC,eAAN,EAAb;AAAA,CAA3B;;AAEA,SAASC,cAAT,CAAyBzE,KAAzB,EAAgCgC,KAAhC,EAAwC;AACvC,SAAOhC,KAAK,CAAC+D,aAAN,IAAuB/B,KAAK,CAAC0C,WAApC;AACA;;AAED,IAAMC,oBAAoB,GAAG,SAAvBA,oBAAuB,OAAoD;AAAA,MAAhDR,QAAgD,QAAhDA,QAAgD;AAAA,MAAtCJ,aAAsC,QAAtCA,aAAsC;AAAA,MAAvB7C,KAAuB,QAAvBA,KAAuB;AAAA,MAAblB,KAAa;;AAChF,MAAM4E,UAAU,GAAGC,kEAAO,CAAE,YAAM;AACjC,QAAMC,SAAS,GAAGhE,MAAM,CAACiE,YAAP,EAAlB;AACA,QAAMC,KAAK,GAAGF,SAAS,CAACG,UAAV,GAAuB,CAAvB,GAA2BH,SAAS,CAACI,UAAV,CAAsB,CAAtB,CAA3B,GAAuD,IAArE;;AACA,QAAK,CAAEF,KAAP,EAAe;AACd;AACA;;AAED,QAAKjB,aAAL,EAAqB;AACpB,aAAOoB,6EAAqB,CAAEH,KAAF,CAA5B;AACA;;AAED,QAAII,OAAO,GAAGJ,KAAK,CAACK,cAApB,CAXiC,CAajC;;AACAD,WAAO,GAAGA,OAAO,CAACE,kBAAR,IAA8BF,OAAxC;;AAEA,WAAQA,OAAO,CAACG,QAAR,KAAqBzE,MAAM,CAAC0E,IAAP,CAAYC,YAAzC,EAAwD;AACvDL,aAAO,GAAGA,OAAO,CAACM,UAAlB;AACA;;AAED,QAAMC,OAAO,GAAGP,OAAO,CAACO,OAAR,CAAiB,oBAAjB,CAAhB;;AACA,QAAKA,OAAL,EAAe;AACd,aAAOA,OAAO,CAACC,qBAAR,EAAP;AACA;AACD,GAxByB,EAwBvB,CAAEzB,QAAF,EAAYJ,aAAZ,EAA2B7C,KAAK,CAAC2E,KAAjC,EAAwC3E,KAAK,CAAC4E,GAA9C,CAxBuB,CAA1B;;AA0BA,MAAK,CAAElB,UAAP,EAAoB;AACnB,WAAO,IAAP;AACA;;AAED,SAAO,yEAAC,oEAAD;AAAgB,cAAU,EAAGA;AAA7B,KAA+C5E,KAA/C,EAAP;AACA,CAhCD;AAkCA;;;;;IAGM+F,oB;;;;;AACL,kCAAc;AAAA;;AAAA;;AACb,+BAAUlE,SAAV;AAEA,UAAK6C,WAAL,GAAmB,MAAKA,WAAL,CAAiB3C,IAAjB,4FAAnB;AACA,UAAKiE,UAAL,GAAkB,MAAKA,UAAL,CAAgBjE,IAAhB,4FAAlB;AACA,UAAKkE,YAAL,GAAoB,MAAKA,YAAL,CAAkBlE,IAAlB,4FAApB;AACA,UAAKmE,cAAL,GAAsB,MAAKA,cAAL,CAAoBnE,IAApB,4FAAtB;AACA,UAAKoE,aAAL,GAAqB,MAAKA,aAAL,CAAmBpE,IAAnB,4FAArB;AACA,UAAKqE,UAAL,GAAkB,MAAKA,UAAL,CAAgBrE,IAAhB,4FAAlB;AAEA,UAAKC,KAAL,GAAa;AACZyB,eAAS,EAAE,KADC;AAEZnD,aAAO,EAAE;AAFG,KAAb;AAVa;AAcb;;;;8BA2BUiE,K,EAAQ;AAClB,UAAK,CAAE8B,yDAAF,EAAQC,yDAAR,EAAcC,0DAAd,EAAqBC,uDAArB,EAAyBC,8DAAzB,EAAoCC,0DAApC,EAA4CC,OAA5C,CAAqDpC,KAAK,CAACqC,OAA3D,IAAuE,CAAC,CAA7E,EAAiF;AAChF;AACArC,aAAK,CAACC,eAAN;AACA;AACD;;;+BAEWlE,O,EAAU;AAAA,UACbuG,gBADa,GACQ,KAAK7G,KADb,CACb6G,gBADa;AAGrBA,sBAAgB,CAACC,YAAjB,CAA+B,gBAA/B;;AAEA,UAAK,OAAOxG,OAAZ,EAAsB;AACrBuG,wBAAgB,CAACE,YAAjB,CAA+B;AAC9BC,YAAE,EAAE,gBAD0B;AAE9BC,gBAAM,EAAE,OAFsB;AAG9BC,iBAAO,EAAE/G,0DAAE,CAAE,gDAAF,EAAoD,aAApD;AAHmB,SAA/B;AAKA;;AAED,WAAK+B,QAAL,CAAe;AAAE5B,eAAO,EAAPA;AAAF,OAAf;AACA;;;iCAEamD,S,EAAY;AAAA,wBACsC,KAAKzD,KAD3C;AAAA,8CACjBoE,gBADiB,CACG9D,OADH;AAAA,UACGA,OADH,sCACa,CADb;AAAA,UACkBY,KADlB,eACkBA,KADlB;AAAA,UACyB8C,QADzB,eACyBA,QADzB;AAGzB,WAAK9B,QAAL,CAAe;AAAEuB,iBAAS,EAATA;AAAF,OAAf,EAHyB,CAKzB;;AACA,UAAK,CAAEgB,cAAc,CAAE,KAAKzE,KAAP,EAAc,KAAKgC,KAAnB,CAArB,EAAkD;AACjDgC,gBAAQ,CAAEmD,yEAAW,CAAEjG,KAAF,EAASkG,mEAAmB,CAAE;AAClD9G,iBAAO,EAAPA,OADkD;AAElDmD,mBAAS,EAATA;AAFkD,SAAF,CAA5B,CAAb,CAAR;AAIA;AACD;;;gCAEYc,K,EAAQ;AACpB,WAAKrC,QAAL,CAAe;AAAEwC,mBAAW,EAAE;AAAf,OAAf;AACAH,WAAK,CAAC8C,cAAN;AACA;;;kCAEc9C,K,EAAQ;AAAA,yBACuB,KAAKvE,KAD5B;AAAA,UACdmE,QADc,gBACdA,QADc;AAAA,UACJjD,KADI,gBACJA,KADI;AAAA,UACG8C,QADH,gBACGA,QADH;AAAA,UACaC,KADb,gBACaA,KADb;AAAA,wBAES,KAAKjC,KAFd;AAAA,UAEd1B,OAFc,eAEdA,OAFc;AAAA,UAELmD,SAFK,eAELA,SAFK;AAGtB,UAAM6D,MAAM,GAAGF,mEAAmB,CAAE;AACnC9G,eAAO,EAAPA,OADmC;AAEnCmD,iBAAS,EAATA;AAFmC,OAAF,CAAlC;AAKAc,WAAK,CAAC8C,cAAN;;AAEA,UAAKE,yEAAW,CAAErG,KAAF,CAAX,IAAwB,CAAEiD,QAA/B,EAA0C;AACzC,YAAMqD,QAAQ,GAAGL,yEAAW,CAAEM,oEAAM,CAAE;AAAEC,cAAI,EAAEvH,0DAAE,CAAE,YAAF,EAAgB,aAAhB;AAAV,SAAF,CAAR,EAAyDmH,MAAzD,EAAiE,CAAjE,EAAoEnH,0DAAE,CAAE,YAAF,EAAgB,aAAhB,CAAF,CAAkChB,MAAtG,CAA5B;AACA6E,gBAAQ,CAAE2D,oEAAM,CAAEzG,KAAF,EAASsG,QAAT,CAAR,CAAR;AACA,OAHD,MAGO;AACNxD,gBAAQ,CAAEmD,yEAAW,CAAEjG,KAAF,EAASoG,MAAT,CAAb,CAAR;AACA;;AAED,WAAKlB,UAAL;;AAEA,UAAKjC,QAAL,EAAgB;AACfF,aAAK,CAAE9D,0DAAE,CAAE,iBAAF,EAAqB,aAArB,CAAJ,EAA0C,WAA1C,CAAL;AACA,OAFD,MAEO;AACN8D,aAAK,CAAE9D,0DAAE,CAAE,mBAAF,EAAuB,aAAvB,CAAJ,EAA4C,WAA5C,CAAL;AACA;AACD;;;qCAEgB;AAChB,WAAKiG,UAAL;AACA;;;iCAEY;AACZ,WAAKpG,KAAL,CAAW6D,iBAAX;AACA,WAAK3B,QAAL,CAAe;AAAEwC,mBAAW,EAAE;AAAf,OAAf;AACA;;;6BAEQ;AAAA;;AACR;;;;;;;;;;;AADQ,yBAYqE,KAAK1E,KAZ1E;AAAA,UAYAmE,QAZA,gBAYAA,QAZA;AAAA,UAYkCJ,aAZlC,gBAYkCA,aAZlC;AAAA,UAYiD7C,KAZjD,gBAYiDA,KAZjD;AAAA,UAYwDsB,QAZxD,gBAYwDA,QAZxD,EAcR;;AACA,UAAK,CAAE2B,QAAF,IAAc,CAAEJ,aAArB,EAAqC;AACpC,eAAO,IAAP;AACA;;AAjBO,yBAmBuB,KAAK/B,KAnB5B;AAAA,UAmBA1B,OAnBA,gBAmBAA,OAnBA;AAAA,UAmBSmD,SAnBT,gBAmBSA,SAnBT;AAoBR,UAAMmE,SAAS,GAAGnD,cAAc,CAAE,KAAKzE,KAAP,EAAc,KAAKgC,KAAnB,CAAhC;AAEA,aACC,yEAAC,oBAAD;AACC,aAAK,EAAGd,KADT;AAEC,gBAAQ,EAAGiD,QAFZ;AAGC,qBAAa,EAAGJ,aAHjB;AAIC,sBAAc,EAAG,KAAKmC,cAJvB;AAKC,eAAO,EAAG,KAAKE,UALhB;AAMC,gBAAQ,EAAG5D,QANZ;AAOC,oBAAY,EAAGoF,SAAS,GAAG,cAAH,GAAoB,KAP7C;AAQC,sBAAc,EAAG;AAAA,iBAChB,yEAAC,oEAAD;AACC,iBAAK,EAAGzH,0DAAE,CAAE,4BAAF,EAAgC,aAAhC,CADX;AAEC,mBAAO,EAAGsD,SAFX;AAGC,oBAAQ,EAAG,MAAI,CAACwC;AAHjB,YADgB;AAAA;AARlB,SAgBG2B,SAAS,GACV,yEAAC,yFAAD;AACC,iBAAS,EAAC,mGADX;AAEC,aAAK,EAAGtH,OAFT;AAGC,0BAAkB,EAAG,KAAK0F,UAH3B;AAIC,iBAAS,EAAG,KAAK6B,SAJlB;AAKC,kBAAU,EAAGvD,kBALd;AAMC,gBAAQ,EAAG,KAAK6B;AANjB,QADU,GAUV,yEAAC,yFAAD;AACC,iBAAS,EAAC,mGADX;AAEC,kBAAU,EAAG7B,kBAFd;AAGC,eAAO,EAAGhE,OAHX;AAIC,uBAAe,EAAG,KAAKoE,WAJxB,CAKC;;AALD,QA1BF,CADD;AAqCA;;;6CAjKgC1E,K,EAAOgC,K,EAAQ;AAAA,UACvCoC,gBADuC,GAClBpE,KADkB,CACvCoE,gBADuC;AAAA,kCAEtBA,gBAFsB,CAEvC9D,OAFuC;AAAA,UAEvCA,OAFuC,sCAE7B,EAF6B;AAAA,kCAGnB8D,gBAHmB,CAGzCX,SAHyC;AAAA,UAGzCA,SAHyC,sCAG7B,KAH6B,0BAK/C;;AACA,UAAK3C,MAAM,CAACgH,CAAP,CAASC,QAAT,CAAmBtE,SAAnB,CAAL,EAAsC;AACrCA,iBAAS,GAAG,QAAQA,SAApB;AACA;;AAED,UAAK,CAAEgB,cAAc,CAAEzE,KAAF,EAASgC,KAAT,CAArB,EAAwC;AACvC,YAAMgG,MAAM,GAAG,EAAf;;AACA,YAAK1H,OAAO,KAAK0B,KAAK,CAAC1B,OAAvB,EAAiC;AAChC0H,gBAAM,CAAC1H,OAAP,GAAiBA,OAAjB;AACA;;AAED,YAAKmD,SAAS,KAAKzB,KAAK,CAACyB,SAAzB,EAAqC;AACpCuE,gBAAM,CAACvE,SAAP,GAAmBA,SAAnB;AACA;;AACD,eAAOjE,MAAM,CAACyI,IAAP,CAAaD,MAAb,EAAsB7I,MAAtB,GAA+B6I,MAA/B,GAAwC,IAA/C;AACA;;AAED,aAAO,IAAP;AACA;;;;EAxCiCrG,4D;;AAqLpBgC,gJAAkB,CAAEuE,0EAAW,CAAEnC,oBAAF,CAAb,CAAjC,E;;;;;;;;;;;;ACjPA;AAAA;AAAA;AAAA;;;AAGA;AAEA;;;;;;;;;;AASO,SAASqB,mBAAT,OAAmE;AAAA,0BAAnC9G,OAAmC;AAAA,MAAnCA,OAAmC,6BAAzB,CAAyB;AAAA,4BAAtBmD,SAAsB;AAAA,MAAtBA,SAAsB,+BAAV,KAAU;AACzE,MAAM0E,cAAc,GAAG1E,SAAS,GAAG,gBAAH,GAAsB,EAAtD;AAEA,SAAO;AACN9D,QAAI,EAAET,2CADA;AAENK,cAAU,EAAE;AACX6I,WAAK,oBAAc9H,OAAd,cAA2B6H,cAA3B,CADM;AAEX7H,aAAO,YAAMA,OAAN,CAFI;AAGXmD,eAAS,EAAEA,SAAS,GAAG,GAAH,GAAS;AAHlB;AAFN,GAAP;AAQA,C;;;;;;;;;;;;ACzBD;AAAA;AAAA;AAAA;AAEA,IAAM4E,SAAS,GAAGC,wEAAa,CAAE,KAAF,EAC9B;AACCC,SAAO,EAAE,aADV;AAECC,OAAK,EAAE,EAFR;AAGCC,QAAM,EAAE;AAHT,CAD8B,EAM9BH,wEAAa,CAAE,MAAF,EACZ;AAAEI,GAAC,EAAE;AAAL,CADY,CANiB,EAQ9BJ,wEAAa,CAAE,MAAF,EACZ;AAAEI,GAAC,EAAE;AAAL,CADY,CARiB,CAA/B;AAYeL,wEAAf,E;;;;;;;;;;;;ACdA;AAAA;AAAA;AAAA;AAEA,IAAMhE,QAAQ,GAAGiE,wEAAa,CAAE,KAAF,EAC7B;AACCC,SAAO,EAAE,YADV;AACwBC,OAAK,EAAE,EAD/B;AACmCC,QAAM,EAAE,EAD3C;AAC+C/H,WAAS,EAAE;AAD1D,CAD6B,EAI7B4H,wEAAa,CAAE,MAAF,EAAU;AACtBI,GAAC,EAAE,2bADmB;AAEtBC,MAAI,EAAE;AAFgB,CAAV,CAJgB,EAQ7BL,wEAAa,CAAE,MAAF,EAAU;AACtBI,GAAC,EAAE,oYADmB;AAEtBC,MAAI,EAAE;AAFgB,CAAV,CARgB,EAY7BL,wEAAa,CAAE,MAAF,EAAU;AACtBI,GAAC,EAAE,sYADmB;AAEtBC,MAAI,EAAE;AAFgB,CAAV,CAZgB,EAgB7BL,wEAAa,CAAE,MAAF,EAAU;AACtBI,GAAC,EAAE,i6BADmB;AAEtBC,MAAI,EAAE;AAFgB,CAAV,CAhBgB,EAoB7BL,wEAAa,CAAE,MAAF,EAAU;AACtBI,GAAC,EAAE,6rBADmB;AAEtBC,MAAI,EAAE;AAFgB,CAAV,CApBgB,EAwB7BL,wEAAa,CAAE,MAAF,EAAU;AACtBI,GAAC,EAAE,mIADmB;AAEtBC,MAAI,EAAE;AAFgB,CAAV,CAxBgB,EA4B7BL,wEAAa,CAAE,MAAF,EAAU;AACtBI,GAAC,EAAE,+MADmB;AAEtBC,MAAI,EAAE;AAFgB,CAAV,CA5BgB,CAA9B;AAkCetE,uEAAf,E;;;;;;;;;;;;ACpCA;AAAA;AAAA;AAAA;;;AAIA;;;;;;;;;;;;ACJA,aAAa,4CAA4C,EAAE,I;;;;;;;;;;;ACA3D,aAAa,2CAA2C,EAAE,I;;;;;;;;;;;ACA1D,aAAa,wCAAwC,EAAE,I;;;;;;;;;;;ACAvD,aAAa,oCAAoC,EAAE,I;;;;;;;;;;;ACAnD,aAAa,wCAAwC,EAAE,I;;;;;;;;;;;ACAvD,aAAa,sCAAsC,EAAE,I;;;;;;;;;;;ACArD,aAAa,qCAAqC,EAAE,I;;;;;;;;;;;ACApD,aAAa,yCAAyC,EAAE,I;;;;;;;;;;;ACAxD,aAAa,yCAAyC,EAAE,I","file":"block-editor/block-editor.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./src/block-editor/index.js\");\n","function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nmodule.exports = _arrayLikeToArray;","var arrayLikeToArray = require(\"./arrayLikeToArray\");\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}\n\nmodule.exports = _arrayWithoutHoles;","function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nmodule.exports = _assertThisInitialized;","function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nmodule.exports = _classCallCheck;","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nmodule.exports = _createClass;","function _extends() {\n module.exports = _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nmodule.exports = _extends;","function _getPrototypeOf(o) {\n module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nmodule.exports = _getPrototypeOf;","var setPrototypeOf = require(\"./setPrototypeOf\");\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}\n\nmodule.exports = _inherits;","function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nmodule.exports = _iterableToArray;","function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nmodule.exports = _nonIterableSpread;","var objectWithoutPropertiesLoose = require(\"./objectWithoutPropertiesLoose\");\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nmodule.exports = _objectWithoutProperties;","function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nmodule.exports = _objectWithoutPropertiesLoose;","var _typeof = require(\"../helpers/typeof\");\n\nvar assertThisInitialized = require(\"./assertThisInitialized\");\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return assertThisInitialized(self);\n}\n\nmodule.exports = _possibleConstructorReturn;","function _setPrototypeOf(o, p) {\n module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nmodule.exports = _setPrototypeOf;","var arrayWithoutHoles = require(\"./arrayWithoutHoles\");\n\nvar iterableToArray = require(\"./iterableToArray\");\n\nvar unsupportedIterableToArray = require(\"./unsupportedIterableToArray\");\n\nvar nonIterableSpread = require(\"./nonIterableSpread\");\n\nfunction _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}\n\nmodule.exports = _toConsumableArray;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nmodule.exports = _typeof;","var arrayLikeToArray = require(\"./arrayLikeToArray\");\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(n);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}\n\nmodule.exports = _unsupportedIterableToArray;","/*!\n Copyright (c) 2017 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg) && arg.length) {\n\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\tif (inner) {\n\t\t\t\t\tclasses.push(inner);\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","/**\n * Internal dependencies\n */\nimport './popup-trigger';\n","/**\n * External Dependencies\n */\nimport classnames from 'classnames';\n\n/**\n * WordPress Dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { addFilter } from '@wordpress/hooks';\nimport { InspectorControls } from '@wordpress/block-editor';\nimport { Icon, Panel, PanelBody, PanelRow, Tooltip } from '@wordpress/components';\nimport { createHigherOrderComponent } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport PopupSelectControl from '../../components/popup-select-control';\nimport GearIcon from '../../icons/gears';\n\n/**\n * Either allowedBlocks or excludedBlocks should be used, not both.\n *\n * @type {Array}\n */\nconst allowedBlocks = [];\nconst excludedBlocks = [\n\t'core/nextpage',\n];\n\nfunction isAllowedForBlockType( name ) {\n\tif ( ! allowedBlocks.length && ! excludedBlocks.length ) {\n\t\treturn true;\n\t}\n\n\tif ( allowedBlocks.length ) {\n\t\treturn allowedBlocks.includes( name );\n\t}\n\n\tif ( excludedBlocks.length ) {\n\t\treturn ! excludedBlocks.includes( name );\n\t}\n\n\treturn true;\n}\n\n/**\n * Add custom attribute for mobile visibility.\n *\n * @param {Object} settings Settings for the block.\n *\n * @return {Object} settings Modified settings.\n */\nfunction addAttributes( settings ) {\n\t//check if object exists for old Gutenberg version compatibility\n\t//add allowedBlocks restriction\n\tif ( typeof settings.attributes !== 'undefined' && isAllowedForBlockType( settings.name ) ) {\n\t\tsettings.attributes = Object.assign( settings.attributes, {\n\t\t\topenPopupId: {\n\t\t\t\ttype: 'string',\n\t\t\t\tdefault: '',\n\t\t\t},\n\t\t} );\n\t}\n\n\treturn settings;\n}\n\n/**\n * Add mobile visibility controls on Advanced Block Panel.\n *\n * @param {Function} BlockEdit Block edit component.\n *\n * @return {Function} BlockEdit Modified block edit component.\n */\nconst withAdvancedControls = createHigherOrderComponent( ( BlockEdit ) => {\n\treturn ( props ) => {\n\t\tconst { name, attributes, setAttributes, isSelected } = props;\n\t\tconst { openPopupId } = attributes;\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<BlockEdit { ...props } />\n\t\t\t\t{ isSelected && isAllowedForBlockType( name ) && (\n\t\t\t\t\t<InspectorControls>\n\t\t\t\t\t\t<Panel>\n\t\t\t\t\t\t\t<PanelBody\n\t\t\t\t\t\t\t\ttitle={ __( 'Popup Controls', 'popup-maker' ) }\n\t\t\t\t\t\t\t\ticon={ GearIcon }\n\t\t\t\t\t\t\t\tinitialOpen={ false }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<PanelRow>\n\t\t\t\t\t\t\t\t\t{ __( 'These settings allow you to control popups with this block.', 'popup-maker' ) }\n\t\t\t\t\t\t\t\t</PanelRow>\n\t\t\t\t\t\t\t\t<PanelRow>\n\t\t\t\t\t\t\t\t\t<PopupSelectControl\n\t\t\t\t\t\t\t\t\t\tlabel={ <>\n\t\t\t\t\t\t\t\t\t\t\t{ __( 'Open Popup', 'popup-maker' ) }\n\t\t\t\t\t\t\t\t\t\t\t<Tooltip\n\t\t\t\t\t\t\t\t\t\t\t\tposition=\"top\"\n\t\t\t\t\t\t\t\t\t\t\t\ttext={ __( 'This method does not work well with all block types.', 'popup-maker' ) }\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"https://docs.wppopupmaker.com/article/395-trigger-click-open-overview-methods\" target=\"_blank\" rel=\"noopener noreferrer\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tsize=\"16\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ticon=\"editor-help\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitle={ __( 'Open documentation', 'popup-maker' ) }\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tstyle={ {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tverticalAlign: 'middle',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t\t\t\t\t</> }\n\t\t\t\t\t\t\t\t\t\tvalue={ openPopupId }\n\t\t\t\t\t\t\t\t\t\tonChange={ ( popupId ) => setAttributes( { openPopupId: popupId } ) }\n\t\t\t\t\t\t\t\t\t\thelp={ __( 'Open a popup when clicking this block', 'popup-maker' ) }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</PanelRow>\n\t\t\t\t\t\t\t</PanelBody>\n\t\t\t\t\t\t</Panel>\n\n\t\t\t\t\t</InspectorControls>\n\t\t\t\t) }\n\t\t\t</>\n\t\t);\n\t};\n}, 'withAdvancedControls' );\n\n/**\n * Add custom element class in save element.\n *\n * @param {Object} extraProps Block element.\n * @param {Object} blockType Blocks object.\n * @param {Object} attributes Blocks attributes.\n *\n * @return {Object} extraProps Modified block element.\n */\nfunction applyTriggerClass( extraProps, blockType, attributes ) {\n\tconst { openPopupId } = attributes;\n\n\t//check if attribute exists for old Gutenberg version compatibility\n\t//add class only when visibleOnMobile = false\n\t//add allowedBlocks restriction\n\tif ( typeof openPopupId !== 'undefined' && openPopupId > 0 && isAllowedForBlockType( blockType.name ) ) {\n\t\textraProps.className = classnames( extraProps.className, 'popmake-' + openPopupId );\n\t}\n\n\treturn extraProps;\n}\n\n//add filters\n\naddFilter(\n\t'blocks.registerBlockType',\n\t'popup-maker/popup-trigger-attributes',\n\taddAttributes,\n);\n\naddFilter(\n\t'editor.BlockEdit',\n\t'popup-maker/popup-trigger-advanced-control',\n\twithAdvancedControls,\n);\n\naddFilter(\n\t'blocks.getSaveContent.extraProps',\n\t'popup-maker/applyTriggerClass',\n\tapplyTriggerClass,\n);\n","//import Select from 'react-select/src/Select';\n/**\n * WordPress dependencies\n */\nimport { SelectControl } from '@wordpress/components';\nimport { Component } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal vars.\n */\nconst { popups } = window.pum_block_editor_vars;\n\nexport default class PopupSelectControl extends Component {\n\trender() {\n\t\tconst {\n\t\t\tonChangeInputValue,\n\t\t\tvalue,\n\t\t\tlabel = __( 'Select Popup', 'popup-maker' ),\n\t\t\temptyValueLabel = __( 'Choose a popup', 'popup-maker' ),\n\t\t\thideLabelFromVision = false,\n\t\t\t...props\n\t\t} = this.props;\n\n\t\tconst options = [\n\t\t\t{\n\t\t\t\tvalue: '',\n\t\t\t\tlabel: emptyValueLabel,\n\t\t\t},\n\t\t\t...popups.map( ( popup ) => {\n\t\t\t\treturn {\n\t\t\t\t\tvalue: `${ popup.ID }`,\n\t\t\t\t\tlabel: popup.post_title,\n\t\t\t\t\t//disabled: true\n\t\t\t\t};\n\t\t\t} ),\n\t\t];\n\n\t\treturn (\n\t\t\t<div className=\"block-editor-popup-select-input\">\n\t\t\t\t<SelectControl\n\t\t\t\t\tlabel={ label }\n\t\t\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\t\t\tvalue={ value }\n\t\t\t\t\tonChange={ onChangeInputValue }\n\t\t\t\t\toptions={ options }\n\t\t\t\t\t{ ...props }\n\t\t\t\t/>\n\t\t\t</div>\n\t\t);\n\t}\n}\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Component } from '@wordpress/element';\nimport { IconButton, Popover } from '@wordpress/components';\n\n/**\n * Style Dependencies.\n * import './editor.scss';\n */\nexport default class TriggerPopover extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.toggleSettingsVisibility = this.toggleSettingsVisibility.bind( this );\n\n\t\tthis.state = {\n\t\t\tisSettingsExpanded: false,\n\t\t};\n\t}\n\n\ttoggleSettingsVisibility() {\n\t\tthis.setState( {\n\t\t\tisSettingsExpanded: ! this.state.isSettingsExpanded,\n\t\t} );\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\tadditionalControls,\n\t\t\tchildren,\n\t\t\trenderSettings,\n\t\t\tposition = 'bottom center',\n\t\t\tfocusOnMount = 'firstElement',\n\t\t\tnoticeUI,\n\t\t\t...popoverProps\n\t\t} = this.props;\n\n\t\tconst {\n\t\t\tisSettingsExpanded,\n\t\t} = this.state;\n\n\t\tconst showSettings = !! renderSettings && isSettingsExpanded;\n\n\t\treturn (\n\t\t\t<Popover\n\t\t\t\tclassName=\"editor-popup-trigger-popover block-editor-popup-trigger-popover\"\n\t\t\t\tfocusOnMount={ focusOnMount }\n\t\t\t\tposition={ position }\n\t\t\t\t{ ...popoverProps }\n\t\t\t>\n\t\t\t\t<div className=\"block-editor-popup-trigger-popover__input-container\">\n\t\t\t\t\t{ noticeUI }\n\t\t\t\t\t<div className=\"editor-popup-trigger-popover__row block-editor-popup-trigger-popover__row\">\n\t\t\t\t\t\t{ children }\n\t\t\t\t\t\t{ !! renderSettings && (\n\t\t\t\t\t\t\t<IconButton\n\t\t\t\t\t\t\t\tclassName=\"editor-popup-trigger-popover__settings-toggle block-editor-popup-trigger-popover__settings-toggle\"\n\t\t\t\t\t\t\t\ticon=\"arrow-down-alt2\"\n\t\t\t\t\t\t\t\tlabel={ __( 'Trigger settings', 'popup-maker' ) }\n\t\t\t\t\t\t\t\tonClick={ this.toggleSettingsVisibility }\n\t\t\t\t\t\t\t\taria-expanded={ isSettingsExpanded }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</div>\n\t\t\t\t\t{ showSettings && (\n\t\t\t\t\t\t<div className=\"editor-popup-trigger-popover__row block-editor-popup-trigger-popover__row editor-popup-trigger-popover__settings block-editor-popup-trigger-popover__settings\">\n\t\t\t\t\t\t\t{ renderSettings() }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t\t{ additionalControls && ! showSettings && (\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName=\"block-editor-popup-trigger-popover__additional-controls\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{ additionalControls }\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t</Popover>\n\t\t);\n\t}\n}\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { IconButton } from '@wordpress/components';\n/**\n * Internal dependencies\n */\nimport PopupSelectControl from '../popup-select-control';\n\nexport default function PopupTriggerEditor( {\n\tclassName,\n\tonChangeInputValue,\n\tvalue,\n\t...props\n} ) {\n\treturn (\n\t\t<form\n\t\t\tclassName={ classnames(\n\t\t\t\t'block-editor-popup-trigger-popover__popup-editor',\n\t\t\t\tclassName,\n\t\t\t) }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t<PopupSelectControl\n\t\t\t\temptyValueLabel={ __( 'Which popup should open?', 'popup-maker' ) }\n\t\t\t\thideLabelFromVision={ true }\n\t\t\t\tvalue={ value }\n\t\t\t\tonChange={ onChangeInputValue }\n\t\t\t\trequired={ true }\n\t\t\t\t// postType=\"popup\"\n\t\t\t/>\n\t\t\t<IconButton icon=\"editor-break\" label={ __( 'Apply', 'popup-maker' ) } type=\"submit\" />\n\t\t</form>\n\t);\n}\n","/**\n * External dependencies\n */\nimport classnames from 'classnames';\n/**\n * WordPress dependencies\n */\nimport { __, sprintf } from '@wordpress/i18n';\nimport { IconButton } from '@wordpress/components';\n\nconst { popups } = window.pum_block_editor_vars || [];\n\nfunction getPopupById( popupId = 0 ) {\n\tpopupId = parseInt( popupId ) || 0;\n\tconst popup = popups.filter( ( { ID } ) => popupId === ID );\n\n\treturn popup.length === 1 ? popup[ 0 ] : false;\n}\n\nfunction PopupView( { popupId, className } ) {\n\tconst spanClassName = classnames(\n\t\tclassName,\n\t\t'block-editor-popup-trigger-popover__popup-viewer-text',\n\t);\n\n\tconst popup = getPopupById( popupId );\n\tconst label = !! popup ? sprintf( __( 'Open \"%s\" popup', 'popup-maker' ), popup.post_title ) : '';\n\n\treturn ( <span className={ spanClassName }>{ label }</span> );\n}\n\nexport default function PopupTriggerViewer( {\n\tclassName,\n\tspanClassName,\n\tonEditLinkClick,\n\tpopupId,\n\t...props\n} ) {\n\treturn (\n\t\t<div\n\t\t\tclassName={ classnames(\n\t\t\t\t'block-editor-popup-trigger-popover__popup-viewer',\n\t\t\t\tclassName,\n\t\t\t) }\n\t\t\t{ ...props }\n\t\t>\n\t\t\t<PopupView popupId={ popupId } className={ spanClassName } />\n\t\t\t{ onEditLinkClick && <IconButton\n\t\t\t\ticon=\"edit\"\n\t\t\t\tlabel={ __( 'Edit', 'popup-maker' ) }\n\t\t\t\tonClick={ onEditLinkClick }\n\t\t\t/> }\n\t\t</div>\n\t);\n}\n","/**\n * WordPress dependencies\n */\nimport { registerFormatType } from '@wordpress/rich-text';\n/**\n * Internal dependencies\n */\nimport * as trigger from './popup-trigger';\n\n[\n\ttrigger,\n].forEach( ( { name, settings } ) => registerFormatType( name, settings ) );\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { removeFormat } from '@wordpress/rich-text';\nimport { Component } from '@wordpress/element';\nimport { withSpokenMessages } from '@wordpress/components';\nimport { RichTextShortcut, RichTextToolbarButton } from '@wordpress/block-editor';\n/**\n * Internal dependencies\n */\nimport LogoIcon from '../../icons/logo';\nimport InlinePopupTriggerUI from './inline';\n\nconst title = __( 'Popup Trigger', 'popup-maker' );\n\nexport const name = `popup-maker/popup-trigger`;\nexport const settings = {\n\tname,\n\ttitle,\n\ttagName: 'span',\n\tclassName: 'popup-trigger',\n\tattributes: {\n\t\tpopupId: 'data-popup-id',\n\t\tdoDefault: 'data-do-default',\n\t},\n\tedit: withSpokenMessages( class TriggerEdit extends Component {\n\t\tconstructor() {\n\t\t\tsuper( ...arguments );\n\n\t\t\tthis.addTrigger = this.addTrigger.bind( this );\n\t\t\tthis.stopAddingTrigger = this.stopAddingTrigger.bind( this );\n\t\t\tthis.onRemoveFormat = this.onRemoveFormat.bind( this );\n\t\t\tthis.state = {\n\t\t\t\taddingTrigger: false,\n\t\t\t};\n\t\t}\n\n\t\taddTrigger() {\n\t\t\tthis.setState( { addingTrigger: true } );\n\t\t}\n\n\t\tstopAddingTrigger() {\n\t\t\tthis.setState( { addingTrigger: false } );\n\t\t}\n\n\t\tonRemoveFormat() {\n\t\t\tconst { value, onChange, speak } = this.props;\n\n\t\t\tonChange( removeFormat( value, name ) );\n\t\t\tspeak( __( 'Trigger removed.', 'popup-maker' ), 'assertive' );\n\t\t}\n\n\t\trender() {\n\t\t\tconst { isActive, activeAttributes, value, onChange } = this.props;\n\n\t\t\treturn (\n\t\t\t\t<>\n\t\t\t\t\t<RichTextShortcut\n\t\t\t\t\t\ttype=\"primary\"\n\t\t\t\t\t\tcharacter=\"[\"\n\t\t\t\t\t\tonUse={ this.addTrigger }\n\t\t\t\t\t/>\n\t\t\t\t\t<RichTextShortcut\n\t\t\t\t\t\ttype=\"primaryShift\"\n\t\t\t\t\t\tcharacter=\"[\"\n\t\t\t\t\t\tonUse={ this.onRemoveFormat }\n\t\t\t\t\t/>\n\t\t\t\t\t{ isActive && <RichTextToolbarButton\n\t\t\t\t\t\ticon={ LogoIcon }\n\t\t\t\t\t\ttitle={ __( 'Remove Trigger', 'popup-maker' ) }\n\t\t\t\t\t\tonClick={ this.onRemoveFormat }\n\t\t\t\t\t\tisActive={ isActive }\n\t\t\t\t\t\tshortcutType=\"primaryShift\"\n\t\t\t\t\t\tshortcutCharacter=\"[\"\n\t\t\t\t\t/> }\n\t\t\t\t\t{ ! isActive && <RichTextToolbarButton\n\t\t\t\t\t\ticon={ LogoIcon }\n\t\t\t\t\t\ttitle={ title }\n\t\t\t\t\t\tonClick={ this.addTrigger }\n\t\t\t\t\t\tisActive={ isActive }\n\t\t\t\t\t\tshortcutType=\"primary\"\n\t\t\t\t\t\tshortcutCharacter=\"[\"\n\t\t\t\t\t/> }\n\t\t\t\t\t<InlinePopupTriggerUI\n\t\t\t\t\t\taddingTrigger={ this.state.addingTrigger }\n\t\t\t\t\t\tstopAddingTrigger={ this.stopAddingTrigger }\n\t\t\t\t\t\tisActive={ isActive }\n\t\t\t\t\t\tactiveAttributes={ activeAttributes }\n\t\t\t\t\t\tvalue={ value }\n\t\t\t\t\t\tonChange={ onChange }\n\t\t\t\t\t/>\n\t\t\t\t</>\n\t\t\t);\n\t\t}\n\t} ),\n};\n","/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\nimport { Component, createRef, useMemo } from '@wordpress/element';\nimport { ToggleControl, withNotices, withSpokenMessages } from '@wordpress/components';\nimport { BACKSPACE, DOWN, ENTER, LEFT, RIGHT, UP } from '@wordpress/keycodes';\nimport { getRectangleFromRange } from '@wordpress/dom';\nimport { applyFormat, create, insert, isCollapsed } from '@wordpress/rich-text';\n/**\n * Internal dependencies\n */\nimport { createTriggerFormat } from './utils';\nimport TriggerPopover from '../../components/trigger-popover';\nimport PopupTriggerEditor from '../../components/trigger-popover/popup-trigger-editor';\nimport PopupTriggerViewer from '../../components/trigger-popover/popup-trigger-viewer';\n\nconst stopKeyPropagation = ( event ) => event.stopPropagation();\n\nfunction isShowingInput( props, state ) {\n\treturn props.addingTrigger || state.editTrigger;\n}\n\nconst TriggerPopoverAtText = ( { isActive, addingTrigger, value, ...props } ) => {\n\tconst anchorRect = useMemo( () => {\n\t\tconst selection = window.getSelection();\n\t\tconst range = selection.rangeCount > 0 ? selection.getRangeAt( 0 ) : null;\n\t\tif ( ! range ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( addingTrigger ) {\n\t\t\treturn getRectangleFromRange( range );\n\t\t}\n\n\t\tlet element = range.startContainer;\n\n\t\t// If the caret is right before the element, select the next element.\n\t\telement = element.nextElementSibling || element;\n\n\t\twhile ( element.nodeType !== window.Node.ELEMENT_NODE ) {\n\t\t\telement = element.parentNode;\n\t\t}\n\n\t\tconst closest = element.closest( 'span.popup-trigger' );\n\t\tif ( closest ) {\n\t\t\treturn closest.getBoundingClientRect();\n\t\t}\n\t}, [ isActive, addingTrigger, value.start, value.end ] );\n\n\tif ( ! anchorRect ) {\n\t\treturn null;\n\t}\n\n\treturn <TriggerPopover anchorRect={ anchorRect } { ...props } />;\n};\n\n/**\n * Generates a Popover with a select field to choose a popup, inline with the Rich Text editors.\n */\nclass InlinePopupTriggerUI extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.editTrigger = this.editTrigger.bind( this );\n\t\tthis.setPopupID = this.setPopupID.bind( this );\n\t\tthis.setDoDefault = this.setDoDefault.bind( this );\n\t\tthis.onFocusOutside = this.onFocusOutside.bind( this );\n\t\tthis.submitTrigger = this.submitTrigger.bind( this );\n\t\tthis.resetState = this.resetState.bind( this );\n\n\t\tthis.state = {\n\t\t\tdoDefault: false,\n\t\t\tpopupId: '',\n\t\t};\n\t}\n\n\tstatic getDerivedStateFromProps( props, state ) {\n\t\tconst { activeAttributes } = props;\n\t\tconst { popupId = '' } = activeAttributes;\n\t\tlet { doDefault = false } = activeAttributes;\n\n\t\t// Convert string value to boolean for comparison.\n\t\tif ( window._.isString( doDefault ) ) {\n\t\t\tdoDefault = '1' === doDefault;\n\t\t}\n\n\t\tif ( ! isShowingInput( props, state ) ) {\n\t\t\tconst update = {};\n\t\t\tif ( popupId !== state.popupId ) {\n\t\t\t\tupdate.popupId = popupId;\n\t\t\t}\n\n\t\t\tif ( doDefault !== state.doDefault ) {\n\t\t\t\tupdate.doDefault = doDefault;\n\t\t\t}\n\t\t\treturn Object.keys( update ).length ? update : null;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tonKeyDown( event ) {\n\t\tif ( [ LEFT, DOWN, RIGHT, UP, BACKSPACE, ENTER ].indexOf( event.keyCode ) > -1 ) {\n\t\t\t// Stop the key event from propagating up to ObserveTyping.startTypingInTextField.\n\t\t\tevent.stopPropagation();\n\t\t}\n\t}\n\n\tsetPopupID( popupId ) {\n\t\tconst { noticeOperations } = this.props;\n\n\t\tnoticeOperations.removeNotice( 'missingPopupId' );\n\n\t\tif ( '' === popupId ) {\n\t\t\tnoticeOperations.createNotice( {\n\t\t\t\tid: 'missingPopupId',\n\t\t\t\tstatus: 'error',\n\t\t\t\tcontent: __( 'Choose a popup or the trigger won\\'t function.', 'popup-maker' ),\n\t\t\t} );\n\t\t}\n\n\t\tthis.setState( { popupId } );\n\t}\n\n\tsetDoDefault( doDefault ) {\n\t\tconst { activeAttributes: { popupId = 0 }, value, onChange } = this.props;\n\n\t\tthis.setState( { doDefault } );\n\n\t\t// Apply now if URL is not being edited.\n\t\tif ( ! isShowingInput( this.props, this.state ) ) {\n\t\t\tonChange( applyFormat( value, createTriggerFormat( {\n\t\t\t\tpopupId,\n\t\t\t\tdoDefault,\n\t\t\t} ) ) );\n\t\t}\n\t}\n\n\teditTrigger( event ) {\n\t\tthis.setState( { editTrigger: true } );\n\t\tevent.preventDefault();\n\t}\n\n\tsubmitTrigger( event ) {\n\t\tconst { isActive, value, onChange, speak } = this.props;\n\t\tconst { popupId, doDefault } = this.state;\n\t\tconst format = createTriggerFormat( {\n\t\t\tpopupId,\n\t\t\tdoDefault,\n\t\t} );\n\n\t\tevent.preventDefault();\n\n\t\tif ( isCollapsed( value ) && ! isActive ) {\n\t\t\tconst toInsert = applyFormat( create( { text: __( 'Open Popup', 'popup-maker' ) } ), format, 0, __( 'Open Popup', 'popup-maker' ).length );\n\t\t\tonChange( insert( value, toInsert ) );\n\t\t} else {\n\t\t\tonChange( applyFormat( value, format ) );\n\t\t}\n\n\t\tthis.resetState();\n\n\t\tif ( isActive ) {\n\t\t\tspeak( __( 'Trigger edited.', 'popup-maker' ), 'assertive' );\n\t\t} else {\n\t\t\tspeak( __( 'Trigger inserted.', 'popup-maker' ), 'assertive' );\n\t\t}\n\t}\n\n\tonFocusOutside() {\n\t\tthis.resetState();\n\t}\n\n\tresetState() {\n\t\tthis.props.stopAddingTrigger();\n\t\tthis.setState( { editTrigger: false } );\n\t}\n\n\trender() {\n\t\t/**\n\t\t * @constant {boolean} isActive True when the cursor is inside an existing trigger\n\t\t * @constant {boolean} addingTrigger True when the user has clicked the add trigger button\n\t\t * @constant {Object} activeAttributes Object containing the current attribute values for the selected text.\n\t\t * @constant {Object} value Object containing the current rich text selection object containing position & formats.\n\t\t * @constant {Object} value.activeFormats Array of registered & active WPFormat objects.\n\t\t * @constant {number} value.formats ?? Array of format history for the active text.\n\t\t * @constant {number} value.start Start offset of selected text\n\t\t * @constant {number} value.end End offset of selected text.\n\t\t * @constant {string} value.text Selected text.\n\t\t */\n\t\tconst { isActive, /* activeAttributes, */ addingTrigger, value, noticeUI } = this.props;\n\n\t\t// If the user is not adding a trigger from the toolbar or actively inside render nothing.\n\t\tif ( ! isActive && ! addingTrigger ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tconst { popupId, doDefault } = this.state;\n\t\tconst showInput = isShowingInput( this.props, this.state );\n\n\t\treturn (\n\t\t\t<TriggerPopoverAtText\n\t\t\t\tvalue={ value }\n\t\t\t\tisActive={ isActive }\n\t\t\t\taddingTrigger={ addingTrigger }\n\t\t\t\tonFocusOutside={ this.onFocusOutside }\n\t\t\t\tonClose={ this.resetState }\n\t\t\t\tnoticeUI={ noticeUI }\n\t\t\t\tfocusOnMount={ showInput ? 'firstElement' : false }\n\t\t\t\trenderSettings={ () => (\n\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\tlabel={ __( 'Do default browser action?', 'popup-maker' ) }\n\t\t\t\t\t\tchecked={ doDefault }\n\t\t\t\t\t\tonChange={ this.setDoDefault }\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t>\n\t\t\t\t{ showInput ? (\n\t\t\t\t\t<PopupTriggerEditor\n\t\t\t\t\t\tclassName=\"editor-format-toolbar__link-container-content block-editor-format-toolbar__link-container-content\"\n\t\t\t\t\t\tvalue={ popupId }\n\t\t\t\t\t\tonChangeInputValue={ this.setPopupID }\n\t\t\t\t\t\tonKeyDown={ this.onKeyDown }\n\t\t\t\t\t\tonKeyPress={ stopKeyPropagation }\n\t\t\t\t\t\tonSubmit={ this.submitTrigger }\n\t\t\t\t\t/>\n\t\t\t\t) : (\n\t\t\t\t\t<PopupTriggerViewer\n\t\t\t\t\t\tclassName=\"editor-format-toolbar__link-container-content block-editor-format-toolbar__link-container-content\"\n\t\t\t\t\t\tonKeyPress={ stopKeyPropagation }\n\t\t\t\t\t\tpopupId={ popupId }\n\t\t\t\t\t\tonEditLinkClick={ this.editTrigger }\n\t\t\t\t\t\t// linkClassName=\"\"\n\t\t\t\t\t/>\n\t\t\t\t) }\n\t\t\t</TriggerPopoverAtText>\n\t\t);\n\t}\n}\n\nexport default withSpokenMessages( withNotices( InlinePopupTriggerUI ) );\n","/**\n * Internal dependencies\n */\nimport { name } from './index';\n\n/**\n * Generates the format object that will be applied to the trigger text.\n *\n * @param {Object} options\n * @param {number} options.popupId The popup ID.\n * @param {boolean} options.doDefault Whether this trigger will act normally when clicked.\n *\n * @return {Object} The final format object.\n */\nexport function createTriggerFormat( { popupId = 0, doDefault = false } ) {\n\tconst doDefaultClass = doDefault ? 'pum-do-default' : '';\n\n\treturn {\n\t\ttype: name,\n\t\tattributes: {\n\t\t\tclass: `popmake-${ popupId } ${ doDefaultClass }`,\n\t\t\tpopupId: `${ popupId }`,\n\t\t\tdoDefault: doDefault ? '1' : '0',\n\t\t},\n\t};\n}\n","import { createElement } from '@wordpress/element';\n\nconst GearsIcon = createElement( 'svg',\n\t{\n\t\tviewBox: '0 0 512 512',\n\t\twidth: 20,\n\t\theight: 20,\n\t},\n\tcreateElement( 'path',\n\t\t{ d: 'M348,327.195v-35.741l-32.436-11.912c-2.825-10.911-6.615-21.215-12.216-30.687l0.325-0.042l15.438-32.153l-25.2-25.269 l-32.118,15.299l-0.031,0.045c-9.472-5.601-19.758-9.156-30.671-11.978L219.186,162h-35.739l-11.913,32.759 c-10.913,2.821-21.213,6.774-30.685,12.379l-0.048-0.248l-32.149-15.399l-25.269,25.219l15.299,32.124l0.05,0.039 c-5.605,9.471-11.159,19.764-13.98,30.675L50,291.454v35.741l34.753,11.913c2.821,10.915,7.774,21.211,13.38,30.685l0.249,0.045 l-15.147,32.147l25.343,25.274l32.188-15.298l0.065-0.046c9.474,5.597,19.782,10.826,30.695,13.652L183.447,460h35.739 l11.915-34.432c10.913-2.826,21.209-7.614,30.681-13.215l0.05-0.175l32.151,15.192l25.267-25.326l-15.299-32.182l-0.046-0.061 c5.601-9.473,8.835-19.776,11.66-30.688L348,327.195z M201.318,368.891c-32.897,0-59.566-26.662-59.566-59.565 c0-32.896,26.669-59.568,59.566-59.568c32.901,0,59.566,26.672,59.566,59.568C260.884,342.229,234.219,368.891,201.318,368.891z' } ),\n\tcreateElement( 'path',\n\t\t{ d: 'M462.238,111.24l-7.815-18.866l-20.23,1.012c-3.873-5.146-8.385-9.644-13.417-13.42l0.038-0.043l1.06-20.318l-18.859-7.822 L389.385,66.89l-0.008,0.031c-6.229-0.883-12.619-0.933-18.988-0.025L356.76,51.774l-18.867,7.815l1.055,20.32 c-5.152,3.873-9.627,8.422-13.403,13.46l-0.038-0.021l-20.317-1.045l-7.799,18.853l15.103,13.616l0.038,0.021 c-0.731,5.835-1.035,12.658-0.133,19.038l-15.208,13.662l7.812,18.87l20.414-1.086c3.868,5.144,8.472,9.613,13.495,13.385 l0.013,0.025l-1.03,20.312l20.668,7.815L374,201.703v-0.033c4,0.731,10.818,0.935,17.193,0.04l12.729,15.114l18.42-7.813 l-1.286-20.324c5.144-3.875,9.521-8.424,13.297-13.456l-0.023,0.011l20.287,1.047l7.802-18.864l-15.121-13.624l-0.033-0.019 c0.877-6.222,0.852-12.58-0.05-18.953L462.238,111.24z M392.912,165.741c-17.359,7.19-37.27-1.053-44.462-18.421 c-7.196-17.364,1.047-37.272,18.415-44.465c17.371-7.192,37.274,1.053,44.471,18.417 C418.523,138.643,410.276,158.547,392.912,165.741z' } ),\n);\n\nexport default GearsIcon;\n","import { createElement } from '@wordpress/element';\n\nconst LogoIcon = createElement( 'svg',\n\t{\n\t\tviewBox: '0 0 106 84', width: 24, height: 24, className: 'popup-trigger-button-svg',\n\t},\n\tcreateElement( 'path', {\n\t\td: 'M 74.98 0.00 L 80.18 0.00 C 86.85 0.96 93.11 3.19 97.92 8.09 C 102.82 12.91 105.07 19.19 106.00 25.89 L 106.00 29.25 C 105.01 36.93 101.84 43.76 95.96 48.90 C 85.62 57.23 75.10 65.38 64.88 73.86 C 58.14 79.85 49.63 82.94 40.76 84.00 L 36.17 84.00 C 27.56 83.00 19.39 80.03 12.89 74.16 C 5.17 67.38 1.08 57.89 0.00 47.78 L 0.00 43.19 C 1.06 33.34 4.97 24.08 12.35 17.32 C 19.55 10.62 29.39 7.33 38.98 6.07 C 50.98 4.07 63.06 2.41 74.98 0.00 Z',\n\t\tfill: '#98b729',\n\t} ),\n\tcreateElement( 'path', {\n\t\td: 'M 73.27 3.38 C 78.51 2.46 83.84 3.16 88.72 5.25 C 99.12 9.98 105.12 21.94 102.29 33.09 C 100.93 39.34 97.06 44.25 92.19 48.20 C 84.32 54.30 76.63 60.62 68.82 66.78 C 65.27 69.54 61.99 72.75 58.21 75.17 C 53.04 78.31 47.09 80.42 41.04 80.90 C 26.64 81.98 12.34 73.74 6.37 60.53 C 0.78 48.69 2.33 34.56 10.17 24.12 C 16.07 16.10 25.11 11.68 34.69 9.75 C 47.55 7.61 60.45 5.72 73.27 3.38 Z',\n\t\tfill: '#262d2b',\n\t} ),\n\tcreateElement( 'path', {\n\t\td: 'M 73.39 7.40 C 79.51 6.31 85.83 7.34 90.84 11.17 C 97.78 16.34 100.76 25.75 97.94 33.97 C 96.07 39.49 92.17 43.26 87.63 46.67 C 80.70 52.04 73.92 57.62 67.04 63.05 C 61.52 67.32 57.24 72.00 50.55 74.56 C 39.66 79.19 26.67 77.04 17.82 69.21 C 10.09 62.55 6.01 52.13 7.21 41.99 C 8.21 32.78 13.46 24.27 21.21 19.22 C 29.30 14.01 37.69 13.29 46.90 11.83 C 55.73 10.34 64.58 9.05 73.39 7.40 Z',\n\t\tfill: '#98b729',\n\t} ),\n\tcreateElement( 'path', {\n\t\td: 'M 79.33 11.15 C 80.91 11.34 82.49 11.77 84.05 12.13 C 83.96 13.78 83.90 15.42 83.83 17.07 C 85.21 18.44 86.59 19.81 87.96 21.19 C 89.56 21.12 91.16 21.05 92.76 20.97 C 93.19 22.58 93.62 24.19 94.07 25.79 C 92.62 26.56 91.18 27.34 89.74 28.11 C 89.27 30.00 88.80 31.89 88.29 33.77 C 89.17 35.11 90.05 36.46 90.93 37.80 C 89.75 38.99 88.56 40.18 87.37 41.36 C 86.03 40.50 84.69 39.65 83.36 38.79 C 81.43 39.31 79.50 39.83 77.57 40.33 C 76.86 41.76 76.14 43.18 75.44 44.61 C 73.84 44.14 72.22 43.70 70.60 43.30 C 70.70 41.70 70.79 40.09 70.89 38.49 C 69.46 37.08 68.05 35.65 66.64 34.22 C 65.07 34.33 63.50 34.41 61.94 34.52 C 61.54 32.88 61.09 31.25 60.61 29.63 C 62.04 28.92 63.45 28.20 64.87 27.48 C 65.38 25.56 65.93 23.65 66.45 21.74 C 65.57 20.37 64.69 19.01 63.80 17.65 C 64.99 16.46 66.17 15.27 67.36 14.08 C 68.70 14.97 70.04 15.86 71.38 16.75 C 73.20 16.26 75.02 15.78 76.84 15.32 C 77.62 13.91 78.39 12.46 79.33 11.15 Z',\n\t\tfill: '#262d2b',\n\t} ),\n\tcreateElement( 'path', {\n\t\td: 'M 31.46 18.53 C 35.73 17.41 39.75 17.90 44.06 18.38 C 43.69 20.25 43.38 22.13 43.00 23.99 C 46.30 25.32 49.40 26.46 52.10 28.89 C 56.07 32.21 58.00 36.65 59.46 41.49 C 61.32 41.26 63.19 41.04 65.06 40.81 C 65.30 45.35 65.55 49.64 64.02 54.02 C 62.82 57.89 60.52 60.95 58.09 64.10 C 56.66 62.88 55.24 61.65 53.81 60.43 C 50.80 62.88 47.90 65.17 44.07 66.21 C 39.50 67.65 35.11 67.00 30.55 65.99 C 29.84 67.72 29.12 69.46 28.40 71.19 C 24.48 69.34 20.78 67.44 17.87 64.12 C 14.90 61.08 13.34 57.40 11.80 53.51 C 13.55 52.89 15.31 52.27 17.06 51.65 C 16.43 47.16 15.95 42.88 17.48 38.49 C 18.70 34.52 21.22 31.56 23.95 28.54 C 22.80 27.05 21.69 25.54 20.55 24.05 C 23.99 21.67 27.30 19.46 31.46 18.53 Z',\n\t\tfill: '#262d2b',\n\t} ),\n\tcreateElement( 'path', {\n\t\td: 'M 76.34 24.32 C 79.21 23.52 81.89 26.79 80.48 29.46 C 79.35 31.71 76.40 32.21 74.62 30.38 C 72.72 28.34 73.67 25.06 76.34 24.32 Z',\n\t\tfill: '#98b729',\n\t} ),\n\tcreateElement( 'path', {\n\t\td: 'M 33.46 26.53 C 40.08 24.87 47.25 27.17 51.85 32.16 C 57.28 37.94 58.59 46.87 54.94 53.94 C 51.18 61.61 42.36 65.97 33.97 64.14 C 25.47 62.43 18.97 54.70 18.77 46.02 C 18.32 36.96 24.64 28.60 33.46 26.53 Z',\n\t\tfill: '#98b729',\n\t} ),\n);\n\nexport default LogoIcon;\n","/*******************************************************************************\n * Copyright (c) 2020, Code Atlantic LLC.\n ******************************************************************************/\n\nimport './formats';\nimport './block-extensions';","(function() { module.exports = this[\"wp\"][\"blockEditor\"]; }());","(function() { module.exports = this[\"wp\"][\"components\"]; }());","(function() { module.exports = this[\"wp\"][\"compose\"]; }());","(function() { module.exports = this[\"wp\"][\"dom\"]; }());","(function() { module.exports = this[\"wp\"][\"element\"]; }());","(function() { module.exports = this[\"wp\"][\"hooks\"]; }());","(function() { module.exports = this[\"wp\"][\"i18n\"]; }());","(function() { module.exports = this[\"wp\"][\"keycodes\"]; }());","(function() { module.exports = this[\"wp\"][\"richText\"]; }());"],"sourceRoot":""}
|
includes/admin/upgrades/class-pum-admin-upgrade-routine.php
CHANGED
@@ -92,8 +92,6 @@ class PUM_Admin_Upgrade_Routine {
|
|
92 |
'next' => $upgrades->get_args(),
|
93 |
) );
|
94 |
exit;
|
95 |
-
} else {
|
96 |
-
|
97 |
}
|
98 |
}
|
99 |
|
92 |
'next' => $upgrades->get_args(),
|
93 |
) );
|
94 |
exit;
|
|
|
|
|
95 |
}
|
96 |
}
|
97 |
|
includes/extension-list.json
CHANGED
@@ -1,4 +1,15 @@
|
|
1 |
[
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
{
|
3 |
"new_version": "1.1.0",
|
4 |
"name": "Exit Intent Popups",
|
@@ -164,4 +175,4 @@
|
|
164 |
"image": "https:\/\/wppopupmaker.com\/wp-content\/uploads\/edd\/2017\/03\/video-popups.jpg",
|
165 |
"excerpt": "Create the ultimate WordPress Video Popup for your marketing videos in minutes - customize your player, control video play\/pause commands, and much more."
|
166 |
}
|
167 |
-
]
|
1 |
[
|
2 |
+
{
|
3 |
+
"new_version": "1.0.0",
|
4 |
+
"name": "WooCommerce Pro",
|
5 |
+
"slug": "woocommerce-pro",
|
6 |
+
"url": "https:\/\/wppopupmaker.com\/extensions\/woocommerce-pro\/?changelog=1",
|
7 |
+
"homepage": "https:\/\/wppopupmaker.com\/extensions\/woocommerce-pro\/",
|
8 |
+
"package": "",
|
9 |
+
"download_link": "",
|
10 |
+
"image": "https:\/\/wppopupmaker.com\/wp-content\/uploads\/2017\/03\/core-bundle.jpg",
|
11 |
+
"excerpt": "Take your WooCommerce store's performance to the next level by creating upsell and cross-sell popups and more with our advanced conditions and triggers."
|
12 |
+
},
|
13 |
{
|
14 |
"new_version": "1.1.0",
|
15 |
"name": "Exit Intent Popups",
|
175 |
"image": "https:\/\/wppopupmaker.com\/wp-content\/uploads\/edd\/2017\/03\/video-popups.jpg",
|
176 |
"excerpt": "Create the ultimate WordPress Video Popup for your marketing videos in minutes - customize your player, control video play\/pause commands, and much more."
|
177 |
}
|
178 |
+
]
|
includes/functions/popups/template.php
CHANGED
@@ -86,5 +86,12 @@ function pum_popup_close_text( $popup_id = null ) {
|
|
86 |
return;
|
87 |
}
|
88 |
|
89 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
}
|
86 |
return;
|
87 |
}
|
88 |
|
89 |
+
$close_text = $popup->close_text();
|
90 |
+
|
91 |
+
// If the close text is a font awesome icon (E.g. "fas fa-camera"), add the icon instead of the text.
|
92 |
+
if ( preg_match( "/^fa[srldb]\s.+/i", $close_text ) ) {
|
93 |
+
echo '<i class="' . esc_attr( $close_text ) . '"></i>';
|
94 |
+
} else {
|
95 |
+
echo esc_html( $close_text );
|
96 |
+
}
|
97 |
}
|
includes/pum-sdk/freemius/LICENSE.txt
DELETED
@@ -1,674 +0,0 @@
|
|
1 |
-
GNU GENERAL PUBLIC LICENSE
|
2 |
-
Version 3, 29 June 2007
|
3 |
-
|
4 |
-
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
5 |
-
Everyone is permitted to copy and distribute verbatim copies
|
6 |
-
of this license document, but changing it is not allowed.
|
7 |
-
|
8 |
-
Preamble
|
9 |
-
|
10 |
-
The GNU General Public License is a free, copyleft license for
|
11 |
-
software and other kinds of works.
|
12 |
-
|
13 |
-
The licenses for most software and other practical works are designed
|
14 |
-
to take away your freedom to share and change the works. By contrast,
|
15 |
-
the GNU General Public License is intended to guarantee your freedom to
|
16 |
-
share and change all versions of a program--to make sure it remains free
|
17 |
-
software for all its users. We, the Free Software Foundation, use the
|
18 |
-
GNU General Public License for most of our software; it applies also to
|
19 |
-
any other work released this way by its authors. You can apply it to
|
20 |
-
your programs, too.
|
21 |
-
|
22 |
-
When we speak of free software, we are referring to freedom, not
|
23 |
-
price. Our General Public Licenses are designed to make sure that you
|
24 |
-
have the freedom to distribute copies of free software (and charge for
|
25 |
-
them if you wish), that you receive source code or can get it if you
|
26 |
-
want it, that you can change the software or use pieces of it in new
|
27 |
-
free programs, and that you know you can do these things.
|
28 |
-
|
29 |
-
To protect your rights, we need to prevent others from denying you
|
30 |
-
these rights or asking you to surrender the rights. Therefore, you have
|
31 |
-
certain responsibilities if you distribute copies of the software, or if
|
32 |
-
you modify it: responsibilities to respect the freedom of others.
|
33 |
-
|
34 |
-
For example, if you distribute copies of such a program, whether
|
35 |
-
gratis or for a fee, you must pass on to the recipients the same
|
36 |
-
freedoms that you received. You must make sure that they, too, receive
|
37 |
-
or can get the source code. And you must show them these terms so they
|
38 |
-
know their rights.
|
39 |
-
|
40 |
-
Developers that use the GNU GPL protect your rights with two steps:
|
41 |
-
(1) assert copyright on the software, and (2) offer you this License
|
42 |
-
giving you legal permission to copy, distribute and/or modify it.
|
43 |
-
|
44 |
-
For the developers' and authors' protection, the GPL clearly explains
|
45 |
-
that there is no warranty for this free software. For both users' and
|
46 |
-
authors' sake, the GPL requires that modified versions be marked as
|
47 |
-
changed, so that their problems will not be attributed erroneously to
|
48 |
-
authors of previous versions.
|
49 |
-
|
50 |
-
Some devices are designed to deny users access to install or run
|
51 |
-
modified versions of the software inside them, although the manufacturer
|
52 |
-
can do so. This is fundamentally incompatible with the aim of
|
53 |
-
protecting users' freedom to change the software. The systematic
|
54 |
-
pattern of such abuse occurs in the area of products for individuals to
|
55 |
-
use, which is precisely where it is most unacceptable. Therefore, we
|
56 |
-
have designed this version of the GPL to prohibit the practice for those
|
57 |
-
products. If such problems arise substantially in other domains, we
|
58 |
-
stand ready to extend this provision to those domains in future versions
|
59 |
-
of the GPL, as needed to protect the freedom of users.
|
60 |
-
|
61 |
-
Finally, every program is threatened constantly by software patents.
|
62 |
-
States should not allow patents to restrict development and use of
|
63 |
-
software on general-purpose computers, but in those that do, we wish to
|
64 |
-
avoid the special danger that patents applied to a free program could
|
65 |
-
make it effectively proprietary. To prevent this, the GPL assures that
|
66 |
-
patents cannot be used to render the program non-free.
|
67 |
-
|
68 |
-
The precise terms and conditions for copying, distribution and
|
69 |
-
modification follow.
|
70 |
-
|
71 |
-
TERMS AND CONDITIONS
|
72 |
-
|
73 |
-
0. Definitions.
|
74 |
-
|
75 |
-
"This License" refers to version 3 of the GNU General Public License.
|
76 |
-
|
77 |
-
"Copyright" also means copyright-like laws that apply to other kinds of
|
78 |
-
works, such as semiconductor masks.
|
79 |
-
|
80 |
-
"The Program" refers to any copyrightable work licensed under this
|
81 |
-
License. Each licensee is addressed as "you". "Licensees" and
|
82 |
-
"recipients" may be individuals or organizations.
|
83 |
-
|
84 |
-
To "modify" a work means to copy from or adapt all or part of the work
|
85 |
-
in a fashion requiring copyright permission, other than the making of an
|
86 |
-
exact copy. The resulting work is called a "modified version" of the
|
87 |
-
earlier work or a work "based on" the earlier work.
|
88 |
-
|
89 |
-
A "covered work" means either the unmodified Program or a work based
|
90 |
-
on the Program.
|
91 |
-
|
92 |
-
To "propagate" a work means to do anything with it that, without
|
93 |
-
permission, would make you directly or secondarily liable for
|
94 |
-
infringement under applicable copyright law, except executing it on a
|
95 |
-
computer or modifying a private copy. Propagation includes copying,
|
96 |
-
distribution (with or without modification), making available to the
|
97 |
-
public, and in some countries other activities as well.
|
98 |
-
|
99 |
-
To "convey" a work means any kind of propagation that enables other
|
100 |
-
parties to make or receive copies. Mere interaction with a user through
|
101 |
-
a computer network, with no transfer of a copy, is not conveying.
|
102 |
-
|
103 |
-
An interactive user interface displays "Appropriate Legal Notices"
|
104 |
-
to the extent that it includes a convenient and prominently visible
|
105 |
-
feature that (1) displays an appropriate copyright notice, and (2)
|
106 |
-
tells the user that there is no warranty for the work (except to the
|
107 |
-
extent that warranties are provided), that licensees may convey the
|
108 |
-
work under this License, and how to view a copy of this License. If
|
109 |
-
the interface presents a list of user commands or options, such as a
|
110 |
-
menu, a prominent item in the list meets this criterion.
|
111 |
-
|
112 |
-
1. Source Code.
|
113 |
-
|
114 |
-
The "source code" for a work means the preferred form of the work
|
115 |
-
for making modifications to it. "Object code" means any non-source
|
116 |
-
form of a work.
|
117 |
-
|
118 |
-
A "Standard Interface" means an interface that either is an official
|
119 |
-
standard defined by a recognized standards body, or, in the case of
|
120 |
-
interfaces specified for a particular programming language, one that
|
121 |
-
is widely used among developers working in that language.
|
122 |
-
|
123 |
-
The "System Libraries" of an executable work include anything, other
|
124 |
-
than the work as a whole, that (a) is included in the normal form of
|
125 |
-
packaging a Major Component, but which is not part of that Major
|
126 |
-
Component, and (b) serves only to enable use of the work with that
|
127 |
-
Major Component, or to implement a Standard Interface for which an
|
128 |
-
implementation is available to the public in source code form. A
|
129 |
-
"Major Component", in this context, means a major essential component
|
130 |
-
(kernel, window system, and so on) of the specific operating system
|
131 |
-
(if any) on which the executable work runs, or a compiler used to
|
132 |
-
produce the work, or an object code interpreter used to run it.
|
133 |
-
|
134 |
-
The "Corresponding Source" for a work in object code form means all
|
135 |
-
the source code needed to generate, install, and (for an executable
|
136 |
-
work) run the object code and to modify the work, including scripts to
|
137 |
-
control those activities. However, it does not include the work's
|
138 |
-
System Libraries, or general-purpose tools or generally available free
|
139 |
-
programs which are used unmodified in performing those activities but
|
140 |
-
which are not part of the work. For example, Corresponding Source
|
141 |
-
includes interface definition files associated with source files for
|
142 |
-
the work, and the source code for shared libraries and dynamically
|
143 |
-
linked subprograms that the work is specifically designed to require,
|
144 |
-
such as by intimate data communication or control flow between those
|
145 |
-
subprograms and other parts of the work.
|
146 |
-
|
147 |
-
The Corresponding Source need not include anything that users
|
148 |
-
can regenerate automatically from other parts of the Corresponding
|
149 |
-
Source.
|
150 |
-
|
151 |
-
The Corresponding Source for a work in source code form is that
|
152 |
-
same work.
|
153 |
-
|
154 |
-
2. Basic Permissions.
|
155 |
-
|
156 |
-
All rights granted under this License are granted for the term of
|
157 |
-
copyright on the Program, and are irrevocable provided the stated
|
158 |
-
conditions are met. This License explicitly affirms your unlimited
|
159 |
-
permission to run the unmodified Program. The output from running a
|
160 |
-
covered work is covered by this License only if the output, given its
|
161 |
-
content, constitutes a covered work. This License acknowledges your
|
162 |
-
rights of fair use or other equivalent, as provided by copyright law.
|
163 |
-
|
164 |
-
You may make, run and propagate covered works that you do not
|
165 |
-
convey, without conditions so long as your license otherwise remains
|
166 |
-
in force. You may convey covered works to others for the sole purpose
|
167 |
-
of having them make modifications exclusively for you, or provide you
|
168 |
-
with facilities for running those works, provided that you comply with
|
169 |
-
the terms of this License in conveying all material for which you do
|
170 |
-
not control copyright. Those thus making or running the covered works
|
171 |
-
for you must do so exclusively on your behalf, under your direction
|
172 |
-
and control, on terms that prohibit them from making any copies of
|
173 |
-
your copyrighted material outside their relationship with you.
|
174 |
-
|
175 |
-
Conveying under any other circumstances is permitted solely under
|
176 |
-
the conditions stated below. Sublicensing is not allowed; section 10
|
177 |
-
makes it unnecessary.
|
178 |
-
|
179 |
-
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
180 |
-
|
181 |
-
No covered work shall be deemed part of an effective technological
|
182 |
-
measure under any applicable law fulfilling obligations under article
|
183 |
-
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
184 |
-
similar laws prohibiting or restricting circumvention of such
|
185 |
-
measures.
|
186 |
-
|
187 |
-
When you convey a covered work, you waive any legal power to forbid
|
188 |
-
circumvention of technological measures to the extent such circumvention
|
189 |
-
is effected by exercising rights under this License with respect to
|
190 |
-
the covered work, and you disclaim any intention to limit operation or
|
191 |
-
modification of the work as a means of enforcing, against the work's
|
192 |
-
users, your or third parties' legal rights to forbid circumvention of
|
193 |
-
technological measures.
|
194 |
-
|
195 |
-
4. Conveying Verbatim Copies.
|
196 |
-
|
197 |
-
You may convey verbatim copies of the Program's source code as you
|
198 |
-
receive it, in any medium, provided that you conspicuously and
|
199 |
-
appropriately publish on each copy an appropriate copyright notice;
|
200 |
-
keep intact all notices stating that this License and any
|
201 |
-
non-permissive terms added in accord with section 7 apply to the code;
|
202 |
-
keep intact all notices of the absence of any warranty; and give all
|
203 |
-
recipients a copy of this License along with the Program.
|
204 |
-
|
205 |
-
You may charge any price or no price for each copy that you convey,
|
206 |
-
and you may offer support or warranty protection for a fee.
|
207 |
-
|
208 |
-
5. Conveying Modified Source Versions.
|
209 |
-
|
210 |
-
You may convey a work based on the Program, or the modifications to
|
211 |
-
produce it from the Program, in the form of source code under the
|
212 |
-
terms of section 4, provided that you also meet all of these conditions:
|
213 |
-
|
214 |
-
a) The work must carry prominent notices stating that you modified
|
215 |
-
it, and giving a relevant date.
|
216 |
-
|
217 |
-
b) The work must carry prominent notices stating that it is
|
218 |
-
released under this License and any conditions added under section
|
219 |
-
7. This requirement modifies the requirement in section 4 to
|
220 |
-
"keep intact all notices".
|
221 |
-
|
222 |
-
c) You must license the entire work, as a whole, under this
|
223 |
-
License to anyone who comes into possession of a copy. This
|
224 |
-
License will therefore apply, along with any applicable section 7
|
225 |
-
additional terms, to the whole of the work, and all its parts,
|
226 |
-
regardless of how they are packaged. This License gives no
|
227 |
-
permission to license the work in any other way, but it does not
|
228 |
-
invalidate such permission if you have separately received it.
|
229 |
-
|
230 |
-
d) If the work has interactive user interfaces, each must display
|
231 |
-
Appropriate Legal Notices; however, if the Program has interactive
|
232 |
-
interfaces that do not display Appropriate Legal Notices, your
|
233 |
-
work need not make them do so.
|
234 |
-
|
235 |
-
A compilation of a covered work with other separate and independent
|
236 |
-
works, which are not by their nature extensions of the covered work,
|
237 |
-
and which are not combined with it such as to form a larger program,
|
238 |
-
in or on a volume of a storage or distribution medium, is called an
|
239 |
-
"aggregate" if the compilation and its resulting copyright are not
|
240 |
-
used to limit the access or legal rights of the compilation's users
|
241 |
-
beyond what the individual works permit. Inclusion of a covered work
|
242 |
-
in an aggregate does not cause this License to apply to the other
|
243 |
-
parts of the aggregate.
|
244 |
-
|
245 |
-
6. Conveying Non-Source Forms.
|
246 |
-
|
247 |
-
You may convey a covered work in object code form under the terms
|
248 |
-
of sections 4 and 5, provided that you also convey the
|
249 |
-
machine-readable Corresponding Source under the terms of this License,
|
250 |
-
in one of these ways:
|
251 |
-
|
252 |
-
a) Convey the object code in, or embodied in, a physical product
|
253 |
-
(including a physical distribution medium), accompanied by the
|
254 |
-
Corresponding Source fixed on a durable physical medium
|
255 |
-
customarily used for software interchange.
|
256 |
-
|
257 |
-
b) Convey the object code in, or embodied in, a physical product
|
258 |
-
(including a physical distribution medium), accompanied by a
|
259 |
-
written offer, valid for at least three years and valid for as
|
260 |
-
long as you offer spare parts or customer support for that product
|
261 |
-
model, to give anyone who possesses the object code either (1) a
|
262 |
-
copy of the Corresponding Source for all the software in the
|
263 |
-
product that is covered by this License, on a durable physical
|
264 |
-
medium customarily used for software interchange, for a price no
|
265 |
-
more than your reasonable cost of physically performing this
|
266 |
-
conveying of source, or (2) access to copy the
|
267 |
-
Corresponding Source from a network server at no charge.
|
268 |
-
|
269 |
-
c) Convey individual copies of the object code with a copy of the
|
270 |
-
written offer to provide the Corresponding Source. This
|
271 |
-
alternative is allowed only occasionally and noncommercially, and
|
272 |
-
only if you received the object code with such an offer, in accord
|
273 |
-
with subsection 6b.
|
274 |
-
|
275 |
-
d) Convey the object code by offering access from a designated
|
276 |
-
place (gratis or for a charge), and offer equivalent access to the
|
277 |
-
Corresponding Source in the same way through the same place at no
|
278 |
-
further charge. You need not require recipients to copy the
|
279 |
-
Corresponding Source along with the object code. If the place to
|
280 |
-
copy the object code is a network server, the Corresponding Source
|
281 |
-
may be on a different server (operated by you or a third party)
|
282 |
-
that supports equivalent copying facilities, provided you maintain
|
283 |
-
clear directions next to the object code saying where to find the
|
284 |
-
Corresponding Source. Regardless of what server hosts the
|
285 |
-
Corresponding Source, you remain obligated to ensure that it is
|
286 |
-
available for as long as needed to satisfy these requirements.
|
287 |
-
|
288 |
-
e) Convey the object code using peer-to-peer transmission, provided
|
289 |
-
you inform other peers where the object code and Corresponding
|
290 |
-
Source of the work are being offered to the general public at no
|
291 |
-
charge under subsection 6d.
|
292 |
-
|
293 |
-
A separable portion of the object code, whose source code is excluded
|
294 |
-
from the Corresponding Source as a System Library, need not be
|
295 |
-
included in conveying the object code work.
|
296 |
-
|
297 |
-
A "User Product" is either (1) a "consumer product", which means any
|
298 |
-
tangible personal property which is normally used for personal, family,
|
299 |
-
or household purposes, or (2) anything designed or sold for incorporation
|
300 |
-
into a dwelling. In determining whether a product is a consumer product,
|
301 |
-
doubtful cases shall be resolved in favor of coverage. For a particular
|
302 |
-
product received by a particular user, "normally used" refers to a
|
303 |
-
typical or common use of that class of product, regardless of the status
|
304 |
-
of the particular user or of the way in which the particular user
|
305 |
-
actually uses, or expects or is expected to use, the product. A product
|
306 |
-
is a consumer product regardless of whether the product has substantial
|
307 |
-
commercial, industrial or non-consumer uses, unless such uses represent
|
308 |
-
the only significant mode of use of the product.
|
309 |
-
|
310 |
-
"Installation Information" for a User Product means any methods,
|
311 |
-
procedures, authorization keys, or other information required to install
|
312 |
-
and execute modified versions of a covered work in that User Product from
|
313 |
-
a modified version of its Corresponding Source. The information must
|
314 |
-
suffice to ensure that the continued functioning of the modified object
|
315 |
-
code is in no case prevented or interfered with solely because
|
316 |
-
modification has been made.
|
317 |
-
|
318 |
-
If you convey an object code work under this section in, or with, or
|
319 |
-
specifically for use in, a User Product, and the conveying occurs as
|
320 |
-
part of a transaction in which the right of possession and use of the
|
321 |
-
User Product is transferred to the recipient in perpetuity or for a
|
322 |
-
fixed term (regardless of how the transaction is characterized), the
|
323 |
-
Corresponding Source conveyed under this section must be accompanied
|
324 |
-
by the Installation Information. But this requirement does not apply
|
325 |
-
if neither you nor any third party retains the ability to install
|
326 |
-
modified object code on the User Product (for example, the work has
|
327 |
-
been installed in ROM).
|
328 |
-
|
329 |
-
The requirement to provide Installation Information does not include a
|
330 |
-
requirement to continue to provide support service, warranty, or updates
|
331 |
-
for a work that has been modified or installed by the recipient, or for
|
332 |
-
the User Product in which it has been modified or installed. Access to a
|
333 |
-
network may be denied when the modification itself materially and
|
334 |
-
adversely affects the operation of the network or violates the rules and
|
335 |
-
protocols for communication across the network.
|
336 |
-
|
337 |
-
Corresponding Source conveyed, and Installation Information provided,
|
338 |
-
in accord with this section must be in a format that is publicly
|
339 |
-
documented (and with an implementation available to the public in
|
340 |
-
source code form), and must require no special password or key for
|
341 |
-
unpacking, reading or copying.
|
342 |
-
|
343 |
-
7. Additional Terms.
|
344 |
-
|
345 |
-
"Additional permissions" are terms that supplement the terms of this
|
346 |
-
License by making exceptions from one or more of its conditions.
|
347 |
-
Additional permissions that are applicable to the entire Program shall
|
348 |
-
be treated as though they were included in this License, to the extent
|
349 |
-
that they are valid under applicable law. If additional permissions
|
350 |
-
apply only to part of the Program, that part may be used separately
|
351 |
-
under those permissions, but the entire Program remains governed by
|
352 |
-
this License without regard to the additional permissions.
|
353 |
-
|
354 |
-
When you convey a copy of a covered work, you may at your option
|
355 |
-
remove any additional permissions from that copy, or from any part of
|
356 |
-
it. (Additional permissions may be written to require their own
|
357 |
-
removal in certain cases when you modify the work.) You may place
|
358 |
-
additional permissions on material, added by you to a covered work,
|
359 |
-
for which you have or can give appropriate copyright permission.
|
360 |
-
|
361 |
-
Notwithstanding any other provision of this License, for material you
|
362 |
-
add to a covered work, you may (if authorized by the copyright holders of
|
363 |
-
that material) supplement the terms of this License with terms:
|
364 |
-
|
365 |
-
a) Disclaiming warranty or limiting liability differently from the
|
366 |
-
terms of sections 15 and 16 of this License; or
|
367 |
-
|
368 |
-
b) Requiring preservation of specified reasonable legal notices or
|
369 |
-
author attributions in that material or in the Appropriate Legal
|
370 |
-
Notices displayed by works containing it; or
|
371 |
-
|
372 |
-
c) Prohibiting misrepresentation of the origin of that material, or
|
373 |
-
requiring that modified versions of such material be marked in
|
374 |
-
reasonable ways as different from the original version; or
|
375 |
-
|
376 |
-
d) Limiting the use for publicity purposes of names of licensors or
|
377 |
-
authors of the material; or
|
378 |
-
|
379 |
-
e) Declining to grant rights under trademark law for use of some
|
380 |
-
trade names, trademarks, or service marks; or
|
381 |
-
|
382 |
-
f) Requiring indemnification of licensors and authors of that
|
383 |
-
material by anyone who conveys the material (or modified versions of
|
384 |
-
it) with contractual assumptions of liability to the recipient, for
|
385 |
-
any liability that these contractual assumptions directly impose on
|
386 |
-
those licensors and authors.
|
387 |
-
|
388 |
-
All other non-permissive additional terms are considered "further
|
389 |
-
restrictions" within the meaning of section 10. If the Program as you
|
390 |
-
received it, or any part of it, contains a notice stating that it is
|
391 |
-
governed by this License along with a term that is a further
|
392 |
-
restriction, you may remove that term. If a license document contains
|
393 |
-
a further restriction but permits relicensing or conveying under this
|
394 |
-
License, you may add to a covered work material governed by the terms
|
395 |
-
of that license document, provided that the further restriction does
|
396 |
-
not survive such relicensing or conveying.
|
397 |
-
|
398 |
-
If you add terms to a covered work in accord with this section, you
|
399 |
-
must place, in the relevant source files, a statement of the
|
400 |
-
additional terms that apply to those files, or a notice indicating
|
401 |
-
where to find the applicable terms.
|
402 |
-
|
403 |
-
Additional terms, permissive or non-permissive, may be stated in the
|
404 |
-
form of a separately written license, or stated as exceptions;
|
405 |
-
the above requirements apply either way.
|
406 |
-
|
407 |
-
8. Termination.
|
408 |
-
|
409 |
-
You may not propagate or modify a covered work except as expressly
|
410 |
-
provided under this License. Any attempt otherwise to propagate or
|
411 |
-
modify it is void, and will automatically terminate your rights under
|
412 |
-
this License (including any patent licenses granted under the third
|
413 |
-
paragraph of section 11).
|
414 |
-
|
415 |
-
However, if you cease all violation of this License, then your
|
416 |
-
license from a particular copyright holder is reinstated (a)
|
417 |
-
provisionally, unless and until the copyright holder explicitly and
|
418 |
-
finally terminates your license, and (b) permanently, if the copyright
|
419 |
-
holder fails to notify you of the violation by some reasonable means
|
420 |
-
prior to 60 days after the cessation.
|
421 |
-
|
422 |
-
Moreover, your license from a particular copyright holder is
|
423 |
-
reinstated permanently if the copyright holder notifies you of the
|
424 |
-
violation by some reasonable means, this is the first time you have
|
425 |
-
received notice of violation of this License (for any work) from that
|
426 |
-
copyright holder, and you cure the violation prior to 30 days after
|
427 |
-
your receipt of the notice.
|
428 |
-
|
429 |
-
Termination of your rights under this section does not terminate the
|
430 |
-
licenses of parties who have received copies or rights from you under
|
431 |
-
this License. If your rights have been terminated and not permanently
|
432 |
-
reinstated, you do not qualify to receive new licenses for the same
|
433 |
-
material under section 10.
|
434 |
-
|
435 |
-
9. Acceptance Not Required for Having Copies.
|
436 |
-
|
437 |
-
You are not required to accept this License in order to receive or
|
438 |
-
run a copy of the Program. Ancillary propagation of a covered work
|
439 |
-
occurring solely as a consequence of using peer-to-peer transmission
|
440 |
-
to receive a copy likewise does not require acceptance. However,
|
441 |
-
nothing other than this License grants you permission to propagate or
|
442 |
-
modify any covered work. These actions infringe copyright if you do
|
443 |
-
not accept this License. Therefore, by modifying or propagating a
|
444 |
-
covered work, you indicate your acceptance of this License to do so.
|
445 |
-
|
446 |
-
10. Automatic Licensing of Downstream Recipients.
|
447 |
-
|
448 |
-
Each time you convey a covered work, the recipient automatically
|
449 |
-
receives a license from the original licensors, to run, modify and
|
450 |
-
propagate that work, subject to this License. You are not responsible
|
451 |
-
for enforcing compliance by third parties with this License.
|
452 |
-
|
453 |
-
An "entity transaction" is a transaction transferring control of an
|
454 |
-
organization, or substantially all assets of one, or subdividing an
|
455 |
-
organization, or merging organizations. If propagation of a covered
|
456 |
-
work results from an entity transaction, each party to that
|
457 |
-
transaction who receives a copy of the work also receives whatever
|
458 |
-
licenses to the work the party's predecessor in interest had or could
|
459 |
-
give under the previous paragraph, plus a right to possession of the
|
460 |
-
Corresponding Source of the work from the predecessor in interest, if
|
461 |
-
the predecessor has it or can get it with reasonable efforts.
|
462 |
-
|
463 |
-
You may not impose any further restrictions on the exercise of the
|
464 |
-
rights granted or affirmed under this License. For example, you may
|
465 |
-
not impose a license fee, royalty, or other charge for exercise of
|
466 |
-
rights granted under this License, and you may not initiate litigation
|
467 |
-
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
468 |
-
any patent claim is infringed by making, using, selling, offering for
|
469 |
-
sale, or importing the Program or any portion of it.
|
470 |
-
|
471 |
-
11. Patents.
|
472 |
-
|
473 |
-
A "contributor" is a copyright holder who authorizes use under this
|
474 |
-
License of the Program or a work on which the Program is based. The
|
475 |
-
work thus licensed is called the contributor's "contributor version".
|
476 |
-
|
477 |
-
A contributor's "essential patent claims" are all patent claims
|
478 |
-
owned or controlled by the contributor, whether already acquired or
|
479 |
-
hereafter acquired, that would be infringed by some manner, permitted
|
480 |
-
by this License, of making, using, or selling its contributor version,
|
481 |
-
but do not include claims that would be infringed only as a
|
482 |
-
consequence of further modification of the contributor version. For
|
483 |
-
purposes of this definition, "control" includes the right to grant
|
484 |
-
patent sublicenses in a manner consistent with the requirements of
|
485 |
-
this License.
|
486 |
-
|
487 |
-
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
488 |
-
patent license under the contributor's essential patent claims, to
|
489 |
-
make, use, sell, offer for sale, import and otherwise run, modify and
|
490 |
-
propagate the contents of its contributor version.
|
491 |
-
|
492 |
-
In the following three paragraphs, a "patent license" is any express
|
493 |
-
agreement or commitment, however denominated, not to enforce a patent
|
494 |
-
(such as an express permission to practice a patent or covenant not to
|
495 |
-
sue for patent infringement). To "grant" such a patent license to a
|
496 |
-
party means to make such an agreement or commitment not to enforce a
|
497 |
-
patent against the party.
|
498 |
-
|
499 |
-
If you convey a covered work, knowingly relying on a patent license,
|
500 |
-
and the Corresponding Source of the work is not available for anyone
|
501 |
-
to copy, free of charge and under the terms of this License, through a
|
502 |
-
publicly available network server or other readily accessible means,
|
503 |
-
then you must either (1) cause the Corresponding Source to be so
|
504 |
-
available, or (2) arrange to deprive yourself of the benefit of the
|
505 |
-
patent license for this particular work, or (3) arrange, in a manner
|
506 |
-
consistent with the requirements of this License, to extend the patent
|
507 |
-
license to downstream recipients. "Knowingly relying" means you have
|
508 |
-
actual knowledge that, but for the patent license, your conveying the
|
509 |
-
covered work in a country, or your recipient's use of the covered work
|
510 |
-
in a country, would infringe one or more identifiable patents in that
|
511 |
-
country that you have reason to believe are valid.
|
512 |
-
|
513 |
-
If, pursuant to or in connection with a single transaction or
|
514 |
-
arrangement, you convey, or propagate by procuring conveyance of, a
|
515 |
-
covered work, and grant a patent license to some of the parties
|
516 |
-
receiving the covered work authorizing them to use, propagate, modify
|
517 |
-
or convey a specific copy of the covered work, then the patent license
|
518 |
-
you grant is automatically extended to all recipients of the covered
|
519 |
-
work and works based on it.
|
520 |
-
|
521 |
-
A patent license is "discriminatory" if it does not include within
|
522 |
-
the scope of its coverage, prohibits the exercise of, or is
|
523 |
-
conditioned on the non-exercise of one or more of the rights that are
|
524 |
-
specifically granted under this License. You may not convey a covered
|
525 |
-
work if you are a party to an arrangement with a third party that is
|
526 |
-
in the business of distributing software, under which you make payment
|
527 |
-
to the third party based on the extent of your activity of conveying
|
528 |
-
the work, and under which the third party grants, to any of the
|
529 |
-
parties who would receive the covered work from you, a discriminatory
|
530 |
-
patent license (a) in connection with copies of the covered work
|
531 |
-
conveyed by you (or copies made from those copies), or (b) primarily
|
532 |
-
for and in connection with specific products or compilations that
|
533 |
-
contain the covered work, unless you entered into that arrangement,
|
534 |
-
or that patent license was granted, prior to 28 March 2007.
|
535 |
-
|
536 |
-
Nothing in this License shall be construed as excluding or limiting
|
537 |
-
any implied license or other defenses to infringement that may
|
538 |
-
otherwise be available to you under applicable patent law.
|
539 |
-
|
540 |
-
12. No Surrender of Others' Freedom.
|
541 |
-
|
542 |
-
If conditions are imposed on you (whether by court order, agreement or
|
543 |
-
otherwise) that contradict the conditions of this License, they do not
|
544 |
-
excuse you from the conditions of this License. If you cannot convey a
|
545 |
-
covered work so as to satisfy simultaneously your obligations under this
|
546 |
-
License and any other pertinent obligations, then as a consequence you may
|
547 |
-
not convey it at all. For example, if you agree to terms that obligate you
|
548 |
-
to collect a royalty for further conveying from those to whom you convey
|
549 |
-
the Program, the only way you could satisfy both those terms and this
|
550 |
-
License would be to refrain entirely from conveying the Program.
|
551 |
-
|
552 |
-
13. Use with the GNU Affero General Public License.
|
553 |
-
|
554 |
-
Notwithstanding any other provision of this License, you have
|
555 |
-
permission to link or combine any covered work with a work licensed
|
556 |
-
under version 3 of the GNU Affero General Public License into a single
|
557 |
-
combined work, and to convey the resulting work. The terms of this
|
558 |
-
License will continue to apply to the part which is the covered work,
|
559 |
-
but the special requirements of the GNU Affero General Public License,
|
560 |
-
section 13, concerning interaction through a network will apply to the
|
561 |
-
combination as such.
|
562 |
-
|
563 |
-
14. Revised Versions of this License.
|
564 |
-
|
565 |
-
The Free Software Foundation may publish revised and/or new versions of
|
566 |
-
the GNU General Public License from time to time. Such new versions will
|
567 |
-
be similar in spirit to the present version, but may differ in detail to
|
568 |
-
address new problems or concerns.
|
569 |
-
|
570 |
-
Each version is given a distinguishing version number. If the
|
571 |
-
Program specifies that a certain numbered version of the GNU General
|
572 |
-
Public License "or any later version" applies to it, you have the
|
573 |
-
option of following the terms and conditions either of that numbered
|
574 |
-
version or of any later version published by the Free Software
|
575 |
-
Foundation. If the Program does not specify a version number of the
|
576 |
-
GNU General Public License, you may choose any version ever published
|
577 |
-
by the Free Software Foundation.
|
578 |
-
|
579 |
-
If the Program specifies that a proxy can decide which future
|
580 |
-
versions of the GNU General Public License can be used, that proxy's
|
581 |
-
public statement of acceptance of a version permanently authorizes you
|
582 |
-
to choose that version for the Program.
|
583 |
-
|
584 |
-
Later license versions may give you additional or different
|
585 |
-
permissions. However, no additional obligations are imposed on any
|
586 |
-
author or copyright holder as a result of your choosing to follow a
|
587 |
-
later version.
|
588 |
-
|
589 |
-
15. Disclaimer of Warranty.
|
590 |
-
|
591 |
-
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
592 |
-
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
593 |
-
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
594 |
-
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
595 |
-
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
596 |
-
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
597 |
-
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
598 |
-
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
599 |
-
|
600 |
-
16. Limitation of Liability.
|
601 |
-
|
602 |
-
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
603 |
-
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
604 |
-
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
605 |
-
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
606 |
-
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
607 |
-
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
608 |
-
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
609 |
-
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
610 |
-
SUCH DAMAGES.
|
611 |
-
|
612 |
-
17. Interpretation of Sections 15 and 16.
|
613 |
-
|
614 |
-
If the disclaimer of warranty and limitation of liability provided
|
615 |
-
above cannot be given local legal effect according to their terms,
|
616 |
-
reviewing courts shall apply local law that most closely approximates
|
617 |
-
an absolute waiver of all civil liability in connection with the
|
618 |
-
Program, unless a warranty or assumption of liability accompanies a
|
619 |
-
copy of the Program in return for a fee.
|
620 |
-
|
621 |
-
END OF TERMS AND CONDITIONS
|
622 |
-
|
623 |
-
How to Apply These Terms to Your New Programs
|
624 |
-
|
625 |
-
If you develop a new program, and you want it to be of the greatest
|
626 |
-
possible use to the public, the best way to achieve this is to make it
|
627 |
-
free software which everyone can redistribute and change under these terms.
|
628 |
-
|
629 |
-
To do so, attach the following notices to the program. It is safest
|
630 |
-
to attach them to the start of each source file to most effectively
|
631 |
-
state the exclusion of warranty; and each file should have at least
|
632 |
-
the "copyright" line and a pointer to where the full notice is found.
|
633 |
-
|
634 |
-
{one line to give the program's name and a brief idea of what it does.}
|
635 |
-
Copyright (C) {year} {name of author}
|
636 |
-
|
637 |
-
This program is free software: you can redistribute it and/or modify
|
638 |
-
it under the terms of the GNU General Public License as published by
|
639 |
-
the Free Software Foundation, either version 3 of the License, or
|
640 |
-
(at your option) any later version.
|
641 |
-
|
642 |
-
This program is distributed in the hope that it will be useful,
|
643 |
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
644 |
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
645 |
-
GNU General Public License for more details.
|
646 |
-
|
647 |
-
You should have received a copy of the GNU General Public License
|
648 |
-
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
649 |
-
|
650 |
-
Also add information on how to contact you by electronic and paper mail.
|
651 |
-
|
652 |
-
If the program does terminal interaction, make it output a short
|
653 |
-
notice like this when it starts in an interactive mode:
|
654 |
-
|
655 |
-
{project} Copyright (C) {year} {fullname}
|
656 |
-
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
657 |
-
This is free software, and you are welcome to redistribute it
|
658 |
-
under certain conditions; type `show c' for details.
|
659 |
-
|
660 |
-
The hypothetical commands `show w' and `show c' should show the appropriate
|
661 |
-
parts of the General Public License. Of course, your program's commands
|
662 |
-
might be different; for a GUI interface, you would use an "about box".
|
663 |
-
|
664 |
-
You should also get your employer (if you work as a programmer) or school,
|
665 |
-
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
666 |
-
For more information on this, and how to apply and follow the GNU GPL, see
|
667 |
-
<http://www.gnu.org/licenses/>.
|
668 |
-
|
669 |
-
The GNU General Public License does not permit incorporating your program
|
670 |
-
into proprietary programs. If your program is a subroutine library, you
|
671 |
-
may consider it more useful to permit linking proprietary applications with
|
672 |
-
the library. If this is what you want to do, use the GNU Lesser General
|
673 |
-
Public License instead of this License. But first, please read
|
674 |
-
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/pum-sdk/freemius/README.md
DELETED
@@ -1,253 +0,0 @@
|
|
1 |
-
Freemius WordPress SDK
|
2 |
-
======================
|
3 |
-
|
4 |
-
[Monetization](https://freemius.com/wordpress/), [analytics](https://freemius.com/wordpress/insights/), and marketing automation platform for plugin & theme developers. Freemius empower developers to create prosperous subscription based businesses.
|
5 |
-
|
6 |
-
You can see some of the WordPress.org plugins & themes that are utilizing the power of Freemius here:
|
7 |
-
|
8 |
-
https://includewp.com/freemius/#focus
|
9 |
-
|
10 |
-
If you are a WordPress plugin or theme developer and you are interested to monetize with Freemius you can [sign-up here for free](https://dashboard.freemius.com/register/):
|
11 |
-
|
12 |
-
https://dashboard.freemius.com/register/
|
13 |
-
|
14 |
-
**Below you'll find the integration instructions for our WordPress SDK.**
|
15 |
-
|
16 |
-
## Code Documentation
|
17 |
-
|
18 |
-
You can find the SDK's PHP-Doc documentation here:
|
19 |
-
https://codedoc.pub/freemius/wordpress-sdk/master/
|
20 |
-
|
21 |
-
## Initializing the SDK
|
22 |
-
|
23 |
-
Copy the code below and paste it into the top of your main plugin's PHP file, right after the plugin's header comment:
|
24 |
-
|
25 |
-
```php
|
26 |
-
<?php
|
27 |
-
// Create a helper function for easy SDK access.
|
28 |
-
function my_prefix_fs() {
|
29 |
-
global $my_prefix_fs;
|
30 |
-
if ( ! isset( $my_prefix_fs ) ) {
|
31 |
-
// Include Freemius SDK.
|
32 |
-
require_once dirname(__FILE__) . '/freemius/start.php';
|
33 |
-
|
34 |
-
$my_prefix_fs = fs_dynamic_init( array(
|
35 |
-
'id' => '1234',
|
36 |
-
'slug' => 'my-plugin-slug',
|
37 |
-
'menu_slug' => 'my_menu_slug', // You can also use __FILE__
|
38 |
-
'public_key' => 'pk_MY_PUBLIC_KEY',
|
39 |
-
'is_live' => true,
|
40 |
-
'is_premium' => true,
|
41 |
-
'has_addons' => false,
|
42 |
-
'has_paid_plans' => false,
|
43 |
-
// Set the SDK to work in a sandbox mode (for development & testing).
|
44 |
-
// IMPORTANT: MAKE SURE TO REMOVE SECRET KEY BEFORE DEPLOYMENT.
|
45 |
-
'secret_key' => 'sk_MY_SECRET_KEY',
|
46 |
-
) );
|
47 |
-
}
|
48 |
-
|
49 |
-
return $my_prefix_fs;
|
50 |
-
}
|
51 |
-
|
52 |
-
// Init Freemius.
|
53 |
-
my_prefix_fs();
|
54 |
-
?>
|
55 |
-
```
|
56 |
-
|
57 |
-
- **1234** - Replace with your plugin's ID.
|
58 |
-
- **pk_MY_PUBLIC_KEY** - Replace with your plugin's public key.
|
59 |
-
- **sk_MY_SECRET_KEY** - Replace with your plugin's secret key.
|
60 |
-
- **my-plugin-slug** - Replace with your plugin's WordPress.org slug.
|
61 |
-
- **my_menu_slug** - Replace with your admin dashboard settings menu slug.
|
62 |
-
|
63 |
-
|
64 |
-
## Usage example
|
65 |
-
|
66 |
-
You can call the SDK by using the shortcode function:
|
67 |
-
|
68 |
-
```php
|
69 |
-
<?php my_prefix_fs()->get_upgrade_url(); ?>
|
70 |
-
```
|
71 |
-
|
72 |
-
Or when calling Freemius multiple times in a scope, it's recommended to use it with the global variable:
|
73 |
-
|
74 |
-
```php
|
75 |
-
<?php
|
76 |
-
global $my_prefix_fs;
|
77 |
-
$my_prefix_fs->get_account_url();
|
78 |
-
?>
|
79 |
-
```
|
80 |
-
|
81 |
-
## Adding license based logic examples
|
82 |
-
|
83 |
-
Add marketing content to encourage your users to upgrade for your paid version:
|
84 |
-
|
85 |
-
```php
|
86 |
-
<?php
|
87 |
-
if ( my_prefix_fs()->is_not_paying() ) {
|
88 |
-
echo '<section><h1>' . esc_html__('Awesome Premium Features', 'my-plugin-slug') . '</h1>';
|
89 |
-
echo '<a href="' . my_prefix_fs()->get_upgrade_url() . '">' .
|
90 |
-
esc_html__('Upgrade Now!', 'my-plugin-slug') .
|
91 |
-
'</a>';
|
92 |
-
echo '</section>';
|
93 |
-
}
|
94 |
-
?>
|
95 |
-
```
|
96 |
-
|
97 |
-
Add logic which will only be available in your premium plugin version:
|
98 |
-
|
99 |
-
```php
|
100 |
-
<?php
|
101 |
-
// This "if" block will be auto removed from the Free version.
|
102 |
-
if ( my_prefix_fs()->is__premium_only() ) {
|
103 |
-
|
104 |
-
// ... premium only logic ...
|
105 |
-
|
106 |
-
}
|
107 |
-
?>
|
108 |
-
```
|
109 |
-
|
110 |
-
To add a function which will only be available in your premium plugin version, simply add __premium_only as the suffix of the function name. Just make sure that all lines that call that method directly or by hooks, are also wrapped in premium only logic:
|
111 |
-
|
112 |
-
```php
|
113 |
-
<?php
|
114 |
-
class My_Plugin {
|
115 |
-
function init() {
|
116 |
-
...
|
117 |
-
|
118 |
-
// This "if" block will be auto removed from the free version.
|
119 |
-
if ( my_prefix_fs()->is__premium_only() ) {
|
120 |
-
// Init premium version.
|
121 |
-
$this->admin_init__premium_only();
|
122 |
-
|
123 |
-
add_action( 'admin_init', array( &$this, 'admin_init_hook__premium_only' );
|
124 |
-
}
|
125 |
-
|
126 |
-
...
|
127 |
-
}
|
128 |
-
|
129 |
-
// This method will be only included in the premium version.
|
130 |
-
function admin_init__premium_only() {
|
131 |
-
...
|
132 |
-
}
|
133 |
-
|
134 |
-
// This method will be only included in the premium version.
|
135 |
-
function admin_init_hook__premium_only() {
|
136 |
-
...
|
137 |
-
}
|
138 |
-
}
|
139 |
-
?>
|
140 |
-
```
|
141 |
-
|
142 |
-
Add logic which will only be executed for customers in your 'professional' plan:
|
143 |
-
|
144 |
-
```php
|
145 |
-
<?php
|
146 |
-
if ( my_prefix_fs()->is_plan('professional', true) ) {
|
147 |
-
// .. logic related to Professional plan only ...
|
148 |
-
}
|
149 |
-
?>
|
150 |
-
```
|
151 |
-
|
152 |
-
Add logic which will only be executed for customers in your 'professional' plan or higher plans:
|
153 |
-
|
154 |
-
```php
|
155 |
-
<?php
|
156 |
-
if ( my_prefix_fs()->is_plan('professional') ) {
|
157 |
-
// ... logic related to Professional plan and higher plans ...
|
158 |
-
}
|
159 |
-
?>
|
160 |
-
```
|
161 |
-
|
162 |
-
Add logic which will only be available in your premium plugin version AND will only be executed for customers in your 'professional' plan (and higher plans):
|
163 |
-
|
164 |
-
```php
|
165 |
-
<?php
|
166 |
-
// This "if" block will be auto removed from the Free version.
|
167 |
-
if ( my_prefix_fs()->is_plan__premium_only('professional') ) {
|
168 |
-
// ... logic related to Professional plan and higher plans ...
|
169 |
-
}
|
170 |
-
?>
|
171 |
-
```
|
172 |
-
|
173 |
-
Add logic only for users in trial:
|
174 |
-
|
175 |
-
```php
|
176 |
-
<?php
|
177 |
-
if ( my_prefix_fs()->is_trial() ) {
|
178 |
-
// ... logic for users in trial ...
|
179 |
-
}
|
180 |
-
?>
|
181 |
-
```
|
182 |
-
|
183 |
-
Add logic for specified paid plan:
|
184 |
-
|
185 |
-
```php
|
186 |
-
<?php
|
187 |
-
// This "if" block will be auto removed from the Free version.
|
188 |
-
if ( my_prefix_fs()->is__premium_only() ) {
|
189 |
-
if ( my_prefix_fs()->is_plan( 'professional', true ) ) {
|
190 |
-
|
191 |
-
// ... logic related to Professional plan only ...
|
192 |
-
|
193 |
-
} else if ( my_prefix_fs()->is_plan( 'business' ) ) {
|
194 |
-
|
195 |
-
// ... logic related to Business plan and higher plans ...
|
196 |
-
|
197 |
-
}
|
198 |
-
}
|
199 |
-
?>
|
200 |
-
```
|
201 |
-
|
202 |
-
## Excluding files and folders from the free plugin version
|
203 |
-
There are two ways to exclude files from your free version.
|
204 |
-
|
205 |
-
1. Add `__premium_only` just before the file extension. For example, functions__premium_only.php will be only included in the premium plugin version. This works for all type of files, not only PHP.
|
206 |
-
2. Add `@fs_premium_only` a sepcial meta tag to the plugin's main PHP file header. Example:
|
207 |
-
```php
|
208 |
-
<?php
|
209 |
-
/**
|
210 |
-
* Plugin Name: My Very Awesome Plugin
|
211 |
-
* Plugin URI: http://my-awesome-plugin.com
|
212 |
-
* Description: Create and manage Awesomeness right in WordPress.
|
213 |
-
* Version: 1.0.0
|
214 |
-
* Author: Awesomattic
|
215 |
-
* Author URI: http://my-awesome-plugin.com/me/
|
216 |
-
* License: GPLv2
|
217 |
-
* Text Domain: myplugin
|
218 |
-
* Domain Path: /langs
|
219 |
-
*
|
220 |
-
* @fs_premium_only /lib/functions.php, /premium-files/
|
221 |
-
*/
|
222 |
-
|
223 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
224 |
-
exit;
|
225 |
-
}
|
226 |
-
|
227 |
-
// ... my code ...
|
228 |
-
?>
|
229 |
-
```
|
230 |
-
The file `/lib/functions.php` and the directory `/premium-files/` will be removed from the free plugin version.
|
231 |
-
|
232 |
-
# WordPress.org Compliance
|
233 |
-
Based on [WordPress.org Guidelines](https://wordpress.org/plugins/about/guidelines/) you are not allowed to submit a plugin that has premium code in it:
|
234 |
-
> All code hosted by WordPress.org servers must be free and fully-functional. If you want to sell advanced features for a plugin (such as a "pro" version), then you must sell and serve that code from your own site, we will not host it on our servers.
|
235 |
-
|
236 |
-
Therefore, if you want to deploy your free plugin's version to WordPress.org, make sure you wrap all your premium code with `if ( my_prefix_fs()->{{ method }}__premium_only() )` or the other methods provided to exclude premium features & files from the free version.
|
237 |
-
|
238 |
-
## Deployment
|
239 |
-
Zip your plugin's root folder and upload it in the Deployment section in the *Freemius Developer's Dashboard*.
|
240 |
-
The plugin will be scanned and processed by a custom developed *PHP Processor* which will auto-generate two versions of your plugin:
|
241 |
-
|
242 |
-
1. **Premium version**: Identical to your uploaded version, including all code (except your `secret_key`). Will be enabled for download ONLY for your paying or in trial customers.
|
243 |
-
2. **Free version**: The code stripped from all your paid features (based on the logic added wrapped in `{ method }__premium_only()`).
|
244 |
-
|
245 |
-
The free version is the one that you should give your users to download. Therefore, download the free generated version and upload to your site. Or, if your plugin was WordPress.org complaint and you made sure to exclude all your premium code with the different provided techniques, you can deploy the downloaded free version to the .org repo.
|
246 |
-
|
247 |
-
## Reporting Bugs
|
248 |
-
Email dev [at] freemius [dot] com
|
249 |
-
|
250 |
-
## FAQ
|
251 |
-
|
252 |
-
## Copyright
|
253 |
-
Freemius, Inc.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/pum-sdk/freemius/assets/css/admin/account.css
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
#fs_account .postbox,#fs_account .widefat{max-width:700px}#fs_account h3{font-size:1.3em;padding:12px 15px;margin:0 0 12px 0;line-height:1.4;border-bottom:1px solid #F1F1F1}#fs_account h3 .dashicons{width:26px;height:26px;font-size:1.3em}#fs_account i.dashicons{font-size:1.2em;height:1.2em;width:1.2em}#fs_account .dashicons{vertical-align:middle}#fs_account .fs-header-actions{position:absolute;top:17px;right:15px;font-size:0.9em}#fs_account .fs-header-actions ul{margin:0}#fs_account .fs-header-actions li{float:left}#fs_account .fs-header-actions li form{display:inline-block}#fs_account .fs-header-actions li a{text-decoration:none}#fs_account_details .button-group{float:right}.rtl #fs_account .fs-header-actions{left:15px;right:auto}.fs-key-value-table{width:100%}.fs-key-value-table form{display:inline-block}.fs-key-value-table tr td:first-child{text-align:right}.fs-key-value-table tr td:first-child nobr{font-weight:bold}.fs-key-value-table tr td:first-child form{display:block}.fs-key-value-table tr td.fs-right{text-align:right}.fs-key-value-table tr.fs-odd{background:#ebebeb}.fs-key-value-table td,.fs-key-value-table th{padding:10px}.fs-key-value-table code{line-height:28px}.fs-key-value-table var,.fs-key-value-table code,.fs-key-value-table input[type="text"]{color:#0073AA;font-size:16px;background:none}.fs-key-value-table input[type="text"]{width:100%;font-weight:bold}label.fs-tag{background:#ffba00;color:#fff;display:inline-block;border-radius:3px;padding:5px;font-size:11px;line-height:11px;vertical-align:baseline}label.fs-tag.fs-warn{background:#ffba00}label.fs-tag.fs-success{background:#46b450}label.fs-tag.fs-error{background:#dc3232}#fs_sites .fs-scrollable-table .fs-table-body{max-height:200px;overflow:auto;border:1px solid #e5e5e5}#fs_sites .fs-scrollable-table .fs-table-body>table.widefat{border:none !important}#fs_sites .fs-scrollable-table .fs-main-column{width:100%}#fs_sites .fs-scrollable-table .fs-site-details td:first-of-type{text-align:right;color:grey;width:1px}#fs_sites .fs-scrollable-table .fs-site-details td:last-of-type{text-align:right}#fs_sites .fs-scrollable-table .fs-install-details table tr td{width:1px;white-space:nowrap}#fs_sites .fs-scrollable-table .fs-install-details table tr td:last-of-type{width:auto}#fs_addons h3{border:none;margin-bottom:0;padding:4px 5px}#fs_addons td{vertical-align:middle}#fs_addons thead{white-space:nowrap}#fs_addons td:first-child,#fs_addons th:first-child{text-align:left;font-weight:bold}#fs_addons td:last-child,#fs_addons th:last-child{text-align:right}#fs_addons th{font-weight:bold}#fs_billing_address{width:100%}#fs_billing_address tr td{width:50%;padding:5px}#fs_billing_address tr:first-of-type td{padding-top:0}#fs_billing_address span{font-weight:bold}#fs_billing_address input,#fs_billing_address select{display:block;width:100%;margin-top:5px}#fs_billing_address input::-moz-placeholder,#fs_billing_address select::-moz-placeholder{color:transparent;opacity:1}#fs_billing_address input:-ms-input-placeholder,#fs_billing_address select:-ms-input-placeholder{color:transparent}#fs_billing_address input::-webkit-input-placeholder,#fs_billing_address select::-webkit-input-placeholder{color:transparent}#fs_billing_address input.fs-read-mode,#fs_billing_address select.fs-read-mode{border-color:transparent;color:#777;border-bottom:1px dashed #ccc;padding-left:0;background:none}#fs_billing_address.fs-read-mode td span{display:none}#fs_billing_address.fs-read-mode input,#fs_billing_address.fs-read-mode select{border-color:transparent;color:#777;border-bottom:1px dashed #ccc;padding-left:0;background:none}#fs_billing_address.fs-read-mode input::-moz-placeholder,#fs_billing_address.fs-read-mode select::-moz-placeholder{color:#ccc;opacity:1}#fs_billing_address.fs-read-mode input:-ms-input-placeholder,#fs_billing_address.fs-read-mode select:-ms-input-placeholder{color:#ccc}#fs_billing_address.fs-read-mode input::-webkit-input-placeholder,#fs_billing_address.fs-read-mode select::-webkit-input-placeholder{color:#ccc}#fs_billing_address button{display:block;width:100%}
|
|
includes/pum-sdk/freemius/assets/css/admin/add-ons.css
DELETED
@@ -1,2 +0,0 @@
|
|
1 |
-
#fs_addons .fs-cards-list{list-style:none}#fs_addons .fs-cards-list .fs-card{float:left;height:152px;width:310px;padding:0;margin:0 0 30px 30px;font-size:14px;list-style:none;border:1px solid #ddd;cursor:pointer;position:relative}#fs_addons .fs-cards-list .fs-card .fs-overlay{position:absolute;left:0;right:0;bottom:0;top:0;z-index:9}#fs_addons .fs-cards-list .fs-card .fs-inner{background-color:#fff;overflow:hidden;height:100%;position:relative}#fs_addons .fs-cards-list .fs-card .fs-inner ul{-moz-transition:all,0.15s;-o-transition:all,0.15s;-ms-transition:all,0.15s;-webkit-transition:all,0.15s;transition:all,0.15s;left:0;right:0;top:0;position:absolute}#fs_addons .fs-cards-list .fs-card .fs-inner li{list-style:none;line-height:18px;padding:0 15px;width:100%;display:block;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-card-banner{padding:0;margin:0;line-height:0;display:block;height:100px;background-repeat:repeat-x;background-size:100% 100%;-moz-transition:all,0.15s;-o-transition:all,0.15s;-ms-transition:all,0.15s;-webkit-transition:all,0.15s;transition:all,0.15s}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-title{margin:10px 0 0 0;height:18px;overflow:hidden;color:#000;white-space:nowrap;text-overflow:ellipsis;font-weight:bold}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-offer{font-size:0.9em}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-description{background-color:#f9f9f9;padding:10px 15px 100px 15px;border-top:1px solid #eee;margin:0 0 10px 0;color:#777}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-tag{position:absolute;top:10px;right:0px;background:greenyellow;display:block;padding:2px 10px;-moz-box-shadow:1px 1px 1px rgba(0,0,0,0.3);-webkit-box-shadow:1px 1px 1px rgba(0,0,0,0.3);box-shadow:1px 1px 1px rgba(0,0,0,0.3);text-transform:uppercase;font-size:0.9em;font-weight:bold}#fs_addons .fs-cards-list .fs-card .fs-inner .fs-cta .button{position:absolute;top:112px;right:10px}@media screen and (min-width: 960px){#fs_addons .fs-cards-list .fs-card:hover .fs-overlay{border:2px solid #29abe1;margin-left:-1px;margin-top:-1px}#fs_addons .fs-cards-list .fs-card:hover .fs-inner ul{top:-100px}#fs_addons .fs-cards-list .fs-card:hover .fs-inner .fs-title,#fs_addons .fs-cards-list .fs-card:hover .fs-inner .fs-offer{color:#29abe1}}
|
2 |
-
#TB_window,#TB_window iframe{width:772px !important}#plugin-information #section-description h2,#plugin-information #section-description h3,#plugin-information #section-description p,#plugin-information #section-description b,#plugin-information #section-description i,#plugin-information #section-description blockquote,#plugin-information #section-description li,#plugin-information #section-description ul,#plugin-information #section-description ol{clear:none}#plugin-information #section-description .fs-selling-points{padding-bottom:10px;border-bottom:1px solid #ddd}#plugin-information #section-description .fs-selling-points ul{margin:0}#plugin-information #section-description .fs-selling-points ul li{padding:0;list-style:none outside none}#plugin-information #section-description .fs-selling-points ul li i.dashicons{color:#71ae00;font-size:3em;vertical-align:middle;line-height:30px;float:left;margin:0 0 0 -15px}#plugin-information #section-description .fs-selling-points ul li h3{margin:1em 30px !important}#plugin-information #section-description .fs-screenshots:after{content:"";display:table;clear:both}#plugin-information #section-description .fs-screenshots ul{list-style:none;margin:0}#plugin-information #section-description .fs-screenshots ul li{width:225px;height:225px;float:left;margin-bottom:20px;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}#plugin-information #section-description .fs-screenshots ul li a{display:block;width:100%;height:100%;border:1px solid;-moz-box-shadow:1px 1px 1px rgba(0,0,0,0.2);-webkit-box-shadow:1px 1px 1px rgba(0,0,0,0.2);box-shadow:1px 1px 1px rgba(0,0,0,0.2);background-size:cover}#plugin-information #section-description .fs-screenshots ul li.odd{margin-right:20px}#plugin-information .plugin-information-pricing{margin:-16px;border-bottom:1px solid #ddd}#plugin-information .plugin-information-pricing .fs-plan h3{margin-top:0;padding:20px;font-size:16px}#plugin-information .plugin-information-pricing .fs-plan .nav-tab-wrapper{border-bottom:1px solid #ddd}#plugin-information .plugin-information-pricing .fs-plan .nav-tab-wrapper .nav-tab{cursor:pointer;position:relative;padding:0 10px;font-size:0.9em}#plugin-information .plugin-information-pricing .fs-plan .nav-tab-wrapper .nav-tab label{text-transform:uppercase;color:green;background:greenyellow;position:absolute;left:-1px;right:-1px;bottom:100%;border:1px solid darkgreen;padding:2px;text-align:center;font-size:0.9em;line-height:1em}#plugin-information .plugin-information-pricing .fs-plan .nav-tab-wrapper .nav-tab.nav-tab-active{cursor:default;background:#fffeec;border-bottom-color:#fffeec}#plugin-information .plugin-information-pricing .fs-plan.fs-single-cycle h3{background:#fffeec;margin:0;padding-bottom:0;color:#0073aa}#plugin-information .plugin-information-pricing .fs-plan.fs-single-cycle .nav-tab-wrapper,#plugin-information .plugin-information-pricing .fs-plan.fs-single-cycle .fs-billing-frequency{display:none}#plugin-information .plugin-information-pricing .fs-plan .fs-pricing-body{background:#fffeec;padding:20px}#plugin-information .plugin-information-pricing .fs-plan .button{width:100%;text-align:center;font-weight:bold;text-transform:uppercase;font-size:1.1em}#plugin-information .plugin-information-pricing .fs-plan label{white-space:nowrap}#plugin-information .plugin-information-pricing .fs-plan var{font-style:normal}#plugin-information .plugin-information-pricing .fs-plan .fs-billing-frequency,#plugin-information .plugin-information-pricing .fs-plan .fs-annual-discount{text-align:center;display:block;font-weight:bold;margin-bottom:10px;text-transform:uppercase;background:#F3F3F3;padding:2px;border:1px solid #ccc}#plugin-information .plugin-information-pricing .fs-plan .fs-annual-discount{text-transform:none;color:green;background:greenyellow}#plugin-information .plugin-information-pricing .fs-plan ul.fs-trial-terms{font-size:0.9em}#plugin-information .plugin-information-pricing .fs-plan ul.fs-trial-terms i{float:left;margin:0 0 0 -15px}#plugin-information .plugin-information-pricing .fs-plan ul.fs-trial-terms li{margin:10px 0 0 0}#plugin-information #section-features .fs-features{margin:-20px -26px}#plugin-information #section-features table{width:100%;border-spacing:0;border-collapse:separate}#plugin-information #section-features table thead th{padding:10px 0}#plugin-information #section-features table thead .fs-price{color:#71ae00;font-weight:normal;display:block;text-align:center}#plugin-information #section-features table tbody td{border-top:1px solid #ccc;padding:10px 0;text-align:center;width:100px;color:#71ae00}#plugin-information #section-features table tbody td:first-child{text-align:left;width:auto;color:inherit;padding-left:26px}#plugin-information #section-features table tbody tr.fs-odd td{background:#fefefe}#plugin-information #section-features .dashicons-yes{width:30px;height:30px;font-size:30px}@media screen and (max-width: 961px){#fs_addons .fs-cards-list .fs-card{height:265px}}
|
|
|
|
includes/pum-sdk/freemius/assets/css/admin/affiliation.css
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
@charset "UTF-8";#fs_affiliation_content_wrapper #messages{margin-top:25px}#fs_affiliation_content_wrapper h3{font-size:24px;padding:0;margin-left:0}#fs_affiliation_content_wrapper ul li{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;list-style-type:none}#fs_affiliation_content_wrapper ul li:before{content:'✓';margin-right:10px;font-weight:bold}#fs_affiliation_content_wrapper p:not(.description),#fs_affiliation_content_wrapper li,#fs_affiliation_content_wrapper label{font-size:16px !important;line-height:26px !important}#fs_affiliation_content_wrapper .button{margin-top:20px;margin-bottom:7px;line-height:35px;height:40px;font-size:16px}#fs_affiliation_content_wrapper .button#cancel_button{margin-right:5px}#fs_affiliation_content_wrapper form .input-container{margin-bottom:15px}#fs_affiliation_content_wrapper form .input-container .input-label{font-weight:bold;display:block;width:100%}#fs_affiliation_content_wrapper form .input-container.input-container-text label,#fs_affiliation_content_wrapper form .input-container.input-container-text input,#fs_affiliation_content_wrapper form .input-container.input-container-text textarea{display:block}#fs_affiliation_content_wrapper form .input-container #add_domain,#fs_affiliation_content_wrapper form .input-container .remove-domain{text-decoration:none;display:inline-block;margin-top:3px}#fs_affiliation_content_wrapper form .input-container #add_domain:focus,#fs_affiliation_content_wrapper form .input-container .remove-domain:focus{box-shadow:none}#fs_affiliation_content_wrapper form .input-container #add_domain.disabled,#fs_affiliation_content_wrapper form .input-container .remove-domain.disabled{color:#aaa;cursor:default}#fs_affiliation_content_wrapper form #extra_domains_container .description{margin-top:0;position:relative;top:-4px}#fs_affiliation_content_wrapper form #extra_domains_container .extra-domain-input-container{margin-bottom:15px}#fs_affiliation_content_wrapper form #extra_domains_container .extra-domain-input-container .domain{display:inline-block;margin-right:5px}#fs_affiliation_content_wrapper form #extra_domains_container .extra-domain-input-container .domain:last-of-type{margin-bottom:0}
|
|
includes/pum-sdk/freemius/assets/css/admin/checkout.css
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
@media screen and (max-width: 782px){#wpbody-content{padding-bottom:0 !important}}
|
|
includes/pum-sdk/freemius/assets/css/admin/common.css
DELETED
@@ -1,2 +0,0 @@
|
|
1 |
-
.theme-browser .theme .fs-premium-theme-badge{position:absolute;top:10px;right:0;background:#71ae00;color:#fff;text-transform:uppercase;padding:5px 10px;-moz-border-radius:3px 0 0 3px;-webkit-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;font-weight:bold;border-right:0;-moz-box-shadow:0 2px 1px -1px rgba(0,0,0,0.3);-webkit-box-shadow:0 2px 1px -1px rgba(0,0,0,0.3);box-shadow:0 2px 1px -1px rgba(0,0,0,0.3);font-size:1.1em}#fs_frame{line-height:0;font-size:0}.fs-full-size-wrapper{margin:40px 0 -65px -20px}@media (max-width: 600px){.fs-full-size-wrapper{margin:0 0 -65px -10px}}
|
2 |
-
.fs-notice{position:relative}.fs-notice.fs-has-title{margin-bottom:30px !important}.fs-notice.success{color:green}.fs-notice.promotion{border-color:#00a0d2 !important;background-color:#f2fcff !important}.fs-notice .fs-notice-body{margin:.5em 0;padding:2px}.fs-notice .fs-close{cursor:pointer;color:#aaa;float:right}.fs-notice .fs-close:hover{color:#666}.fs-notice .fs-close>*{margin-top:7px;display:inline-block}.fs-notice label.fs-plugin-title{background:rgba(0,0,0,0.3);color:#fff;padding:2px 10px;position:absolute;top:100%;bottom:auto;right:auto;-moz-border-radius:0 0 3px 3px;-webkit-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;left:10px;font-size:12px;font-weight:bold;cursor:auto}div.fs-notice.updated,div.fs-notice.success,div.fs-notice.promotion{display:block !important}.rtl .fs-notice .fs-close{float:left}.fs-secure-notice{position:fixed;top:32px;left:160px;right:0;background:#ebfdeb;padding:10px 20px;color:green;z-index:9999;-moz-box-shadow:0 2px 2px rgba(6,113,6,0.3);-webkit-box-shadow:0 2px 2px rgba(6,113,6,0.3);box-shadow:0 2px 2px rgba(6,113,6,0.3);opacity:0.95;filter:alpha(opacity=95)}.fs-secure-notice:hover{opacity:1;filter:alpha(opacity=100)}.fs-secure-notice a.fs-security-proof{color:green;text-decoration:none}@media screen and (max-width: 960px){.fs-secure-notice{left:36px}}@media screen and (max-width: 600px){.fs-secure-notice{display:none}}@media screen and (max-width: 500px){#fs_promo_tab{display:none}}@media screen and (max-width: 782px){.fs-secure-notice{left:0;top:46px;text-align:center}}span.fs-submenu-item.fs-sub:before{content:'\21B3';padding:0 5px}.rtl span.fs-submenu-item.fs-sub:before{content:'\21B2'}.fs-submenu-item.pricing.upgrade-mode{color:greenyellow}.fs-submenu-item.pricing.trial-mode{color:#83e2ff}#adminmenu .update-plugins.fs-trial{background-color:#00b9eb}.fs-ajax-spinner{border:0;width:20px;height:20px;margin-right:5px;vertical-align:sub;display:inline-block;background:url("/wp-admin/images/wpspin_light-2x.gif");background-size:contain}.wrap.fs-section h2{text-align:left}.plugins p.fs-upgrade-notice{border:0;background-color:#d54e21;padding:10px;color:#f9f9f9;margin-top:10px}
|
|
|
|
includes/pum-sdk/freemius/assets/css/admin/connect.css
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
#fs_connect{width:480px;-moz-box-shadow:0px 1px 2px rgba(0,0,0,0.3);-webkit-box-shadow:0px 1px 2px rgba(0,0,0,0.3);box-shadow:0px 1px 2px rgba(0,0,0,0.3);margin:20px 0}@media screen and (max-width: 479px){#fs_connect{-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none;width:auto;margin:0 0 0 -10px}}#fs_connect .fs-content{background:#fff;padding:15px 20px}#fs_connect .fs-content .fs-error{background:snow;color:#d3135a;border:1px solid #d3135a;-moz-box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);-webkit-box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);box-shadow:0 1px 1px 0 rgba(0,0,0,0.1);text-align:center;padding:5px;margin-bottom:10px}#fs_connect .fs-content p{margin:0;padding:0;font-size:1.2em}#fs_connect .fs-license-key-container{position:relative;width:280px;margin:10px auto 0 auto}#fs_connect .fs-license-key-container input{width:100%}#fs_connect .fs-license-key-container .dashicons{position:absolute;top:5px;right:5px}#fs_connect.require-license-key #sites_list_container td{cursor:pointer}#fs_connect #delegate_to_site_admins{margin-right:15px;float:right;height:26px;vertical-align:middle;line-height:37px;font-weight:bold;border-bottom:1px dashed;text-decoration:none}#fs_connect #delegate_to_site_admins.rtl{margin-left:15px;margin-right:0}#fs_connect .fs-actions{padding:10px 20px;background:#C0C7CA}#fs_connect .fs-actions .button{padding:0 10px 1px;line-height:35px;height:37px;font-size:16px;margin-bottom:0}#fs_connect .fs-actions .button .dashicons{font-size:37px;margin-left:-8px;margin-right:12px}#fs_connect .fs-actions .button.button-primary{padding-right:15px;padding-left:15px}#fs_connect .fs-actions .button.button-primary:after{content:' \279C'}#fs_connect .fs-actions .button.button-primary.fs-loading:after{content:''}#fs_connect .fs-actions .button.button-secondary{float:right}#fs_connect.fs-anonymous-disabled .fs-actions .button.button-primary{width:100%}#fs_connect .fs-permissions{padding:10px 20px;background:#FEFEFE;-moz-transition:background 0.5s ease;-o-transition:background 0.5s ease;-ms-transition:background 0.5s ease;-webkit-transition:background 0.5s ease;transition:background 0.5s ease}#fs_connect .fs-permissions .fs-license-sync-disclaimer{text-align:center;margin-top:0}#fs_connect .fs-permissions .fs-trigger{font-size:0.9em;text-decoration:none;text-align:center;display:block}#fs_connect .fs-permissions ul{height:0;overflow:hidden;margin:0}#fs_connect .fs-permissions ul li{margin-bottom:12px}#fs_connect .fs-permissions ul li:last-child{margin-bottom:0}#fs_connect .fs-permissions ul li i.dashicons{float:left;font-size:40px;width:40px;height:40px}#fs_connect .fs-permissions ul li div{margin-left:55px}#fs_connect .fs-permissions ul li div span{font-weight:bold;text-transform:uppercase;color:#23282d}#fs_connect .fs-permissions ul li div p{margin:2px 0 0 0}#fs_connect .fs-permissions.fs-open{background:#fff}#fs_connect .fs-permissions.fs-open ul{height:auto;margin:20px 20px 10px 20px}@media screen and (max-width: 479px){#fs_connect .fs-permissions{background:#fff}#fs_connect .fs-permissions .fs-trigger{display:none}#fs_connect .fs-permissions ul{height:auto;margin:20px}}#fs_connect .fs-freemium-licensing{padding:8px;background:#777;color:#fff}#fs_connect .fs-freemium-licensing p{text-align:center;display:block;margin:0;padding:0}#fs_connect .fs-freemium-licensing a{color:#C2EEFF;text-decoration:underline}#fs_connect .fs-visual{padding:12px;line-height:0;background:#fafafa;height:80px;position:relative}#fs_connect .fs-visual .fs-site-icon{position:absolute;left:20px;top:10px}#fs_connect .fs-visual .fs-connect-logo{position:absolute;right:20px;top:10px}#fs_connect .fs-visual .fs-plugin-icon{position:absolute;top:10px;left:50%;margin-left:-40px}#fs_connect .fs-visual .fs-plugin-icon,#fs_connect .fs-visual .fs-site-icon,#fs_connect .fs-visual img,#fs_connect .fs-visual object{width:80px;height:80px}#fs_connect .fs-visual .dashicons-wordpress{font-size:64px;background:#01749a;color:#fff;width:64px;height:64px;padding:8px}#fs_connect .fs-visual .dashicons-plus{position:absolute;top:50%;font-size:30px;margin-top:-10px;color:#bbb}#fs_connect .fs-visual .dashicons-plus.fs-first{left:28%}#fs_connect .fs-visual .dashicons-plus.fs-second{left:65%}#fs_connect .fs-visual .fs-plugin-icon,#fs_connect .fs-visual .fs-connect-logo,#fs_connect .fs-visual .fs-site-icon{border:1px solid #ccc;padding:1px;background:#fff}#fs_connect .fs-terms{text-align:center;font-size:0.85em;padding:5px;background:rgba(0,0,0,0.05)}#fs_connect .fs-terms,#fs_connect .fs-terms a{color:#999}#fs_connect .fs-terms a{text-decoration:none}#multisite_options_container{margin-top:10px;border:1px solid #ccc;padding:5px}#multisite_options_container a{text-decoration:none}#multisite_options_container a:focus{box-shadow:none}#multisite_options_container a.selected{font-weight:bold}#multisite_options_container.apply-on-all-sites{border:0 none;padding:0}#multisite_options_container.apply-on-all-sites #all_sites_options{border-spacing:0}#multisite_options_container.apply-on-all-sites #all_sites_options td:not(:first-child){display:none}#multisite_options_container #sites_list_container{display:none;overflow:auto}#multisite_options_container #sites_list_container table td{border-top:1px solid #ccc;padding:4px 2px}.fs-tooltip-trigger{position:relative}.fs-tooltip-trigger:not(a){cursor:help}.fs-tooltip-trigger .fs-tooltip{opacity:0;visibility:hidden;-moz-transition:opacity 0.3s ease-in-out;-o-transition:opacity 0.3s ease-in-out;-ms-transition:opacity 0.3s ease-in-out;-webkit-transition:opacity 0.3s ease-in-out;transition:opacity 0.3s ease-in-out;position:absolute;background:rgba(0,0,0,0.8);color:#fff;font-family:'arial', serif;font-size:12px;padding:10px;z-index:999999;bottom:100%;margin-bottom:5px;left:0;right:0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;-moz-box-shadow:1px 1px 1px rgba(0,0,0,0.2);-webkit-box-shadow:1px 1px 1px rgba(0,0,0,0.2);box-shadow:1px 1px 1px rgba(0,0,0,0.2);line-height:1.3em;font-weight:bold;text-align:left}.rtl .fs-tooltip-trigger .fs-tooltip{text-align:right}.fs-tooltip-trigger .fs-tooltip::after{content:' ';display:block;width:0;height:0;border-style:solid;border-width:5px 5px 0 5px;border-color:rgba(0,0,0,0.8) transparent transparent transparent;position:absolute;top:100%;left:21px}.rtl .fs-tooltip-trigger .fs-tooltip::after{right:21px;left:auto}.fs-tooltip-trigger:hover .fs-tooltip{visibility:visible;opacity:1}#fs_marketing_optin{display:none;margin-top:10px;border:1px solid #ccc;padding:10px;line-height:1.5em}#fs_marketing_optin .fs-message{display:block;margin-bottom:5px;font-size:1.05em;font-weight:600}#fs_marketing_optin.error{border:1px solid #d3135a;background:#fee}#fs_marketing_optin.error .fs-message{color:#d3135a}#fs_marketing_optin .fs-input-container{margin-top:5px}#fs_marketing_optin .fs-input-container label{margin-top:5px;display:block}#fs_marketing_optin .fs-input-container label input{float:left;margin:1px 0 0 0}#fs_marketing_optin .fs-input-container label:first-child{display:block;margin-bottom:2px}#fs_marketing_optin .fs-input-label{display:block;margin-left:20px}#fs_marketing_optin .fs-input-label .underlined{text-decoration:underline}.rtl #fs_marketing_optin .fs-input-container label input{float:right}.rtl #fs_marketing_optin .fs-input-label{margin-left:0;margin-right:20px}.rtl #fs_connect .fs-actions{padding:10px 20px;background:#C0C7CA}.rtl #fs_connect .fs-actions .button .dashicons{font-size:37px;margin-left:-8px;margin-right:12px}.rtl #fs_connect .fs-actions .button.button-primary:after{content:' \000bb'}.rtl #fs_connect .fs-actions .button.button-primary.fs-loading:after{content:''}.rtl #fs_connect .fs-actions .button.button-secondary{float:left}.rtl #fs_connect .fs-permissions ul li div{margin-right:55px;margin-left:0}.rtl #fs_connect .fs-permissions ul li i.dashicons{float:right}.rtl #fs_connect .fs-visual .fs-site-icon{right:20px;left:auto}.rtl #fs_connect .fs-visual .fs-connect-logo{right:auto;left:20px}#fs_theme_connect_wrapper{position:fixed;top:0;height:100%;width:100%;z-index:99990;background:rgba(0,0,0,0.75);text-align:center;overflow-y:auto}#fs_theme_connect_wrapper:before{content:"";display:inline-block;vertical-align:middle;height:100%}#fs_theme_connect_wrapper>button.close{color:white;cursor:pointer;height:40px;width:40px;position:absolute;right:0;border:0;background-color:transparent;top:32px}#fs_theme_connect_wrapper #fs_connect{top:0;text-align:left;display:inline-block;vertical-align:middle;margin-top:52px;margin-bottom:20px}#fs_theme_connect_wrapper #fs_connect .fs-terms{background:rgba(140,140,140,0.64)}#fs_theme_connect_wrapper #fs_connect .fs-terms,#fs_theme_connect_wrapper #fs_connect .fs-terms a{color:#c5c5c5}.wp-pointer-content #fs_connect{margin:0;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.fs-opt-in-pointer .wp-pointer-content{padding:0}.fs-opt-in-pointer.wp-pointer-top .wp-pointer-arrow{border-bottom-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-top .wp-pointer-arrow-inner{border-bottom-color:#fafafa}.fs-opt-in-pointer.wp-pointer-bottom .wp-pointer-arrow{border-top-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-bottom .wp-pointer-arrow-inner{border-top-color:#fafafa}.fs-opt-in-pointer.wp-pointer-left .wp-pointer-arrow{border-right-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-left .wp-pointer-arrow-inner{border-right-color:#fafafa}.fs-opt-in-pointer.wp-pointer-right .wp-pointer-arrow{border-left-color:#dfdfdf}.fs-opt-in-pointer.wp-pointer-right .wp-pointer-arrow-inner{border-left-color:#fafafa}
|
|
includes/pum-sdk/freemius/assets/css/admin/debug.css
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
.switch{position:relative;display:inline-block;font-size:1.6em;font-weight:bold;color:#ccc;text-shadow:0px 1px 1px rgba(255,255,255,0.8);height:18px;padding:6px 6px 5px 6px;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);border-radius:4px;background:#ececec;box-shadow:0px 0px 4px rgba(0,0,0,0.1),inset 0px 1px 3px 0px rgba(0,0,0,0.1);cursor:pointer}.switch span{display:inline-block;width:35px;text-transform:uppercase}.switch span.on{color:#6bc406}.switch .toggle{position:absolute;top:1px;width:37px;height:25px;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.3);border-radius:4px;background:#fff;background:-moz-linear-gradient(top, #ececec 0%, #fff 100%);background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #ececec), color-stop(100%, #fff));background:-webkit-linear-gradient(top, #ececec 0%, #fff 100%);background:-o-linear-gradient(top, #ececec 0%, #fff 100%);background:-ms-linear-gradient(top, #ececec 0%, #fff 100%);background:linear-gradient(top, #ececec 0%, #fff 100%);box-shadow:inset 0px 1px 0px 0px rgba(255,255,255,0.5);z-index:999;-moz-transition:all 0.15s ease-in-out;-o-transition:all 0.15s ease-in-out;-ms-transition:all 0.15s ease-in-out;-webkit-transition:all 0.15s ease-in-out;transition:all 0.15s ease-in-out}.switch.on .toggle{left:2%}.switch.off .toggle{left:54%}.switch.round{padding:0px 20px;border-radius:40px}.switch.round .toggle{border-radius:40px;width:14px;height:14px}.switch.round.on .toggle{left:3%;background:#6bc406}.switch.round.off .toggle{left:58%}.switch-label{font-size:20px;line-height:31px;margin:0 5px}#fs_log_book table{font-family:Consolas,Monaco,monospace;font-size:12px}#fs_log_book table th{color:#ccc}#fs_log_book table tr{background:#232525}#fs_log_book table tr.alternate{background:#2b2b2b}#fs_log_book table tr td.fs-col--logger{color:#5a7435}#fs_log_book table tr td.fs-col--type{color:#ffc861}#fs_log_book table tr td.fs-col--function{color:#a7b7b1;font-weight:bold}#fs_log_book table tr td.fs-col--message,#fs_log_book table tr td.fs-col--message a{color:#9a73ac !important}#fs_log_book table tr td.fs-col--file{color:#d07922}#fs_log_book table tr td.fs-col--timestamp{color:#6596be}
|
|
includes/pum-sdk/freemius/assets/css/admin/dialog-boxes.css
DELETED
@@ -1,2 +0,0 @@
|
|
1 |
-
.fs-modal{position:fixed;overflow:auto;height:100%;width:100%;top:0;z-index:100000;display:none;background:rgba(0,0,0,0.6)}.fs-modal .fs-modal-dialog{background:transparent;position:absolute;left:50%;margin-left:-298px;padding-bottom:30px;top:-100%;z-index:100001;width:596px}@media (max-width: 650px){.fs-modal .fs-modal-dialog{margin-left:-50%;box-sizing:border-box;padding-left:10px;padding-right:10px;width:100%}.fs-modal .fs-modal-dialog .fs-modal-panel>h3>strong{font-size:1.3em}}.fs-modal.active{display:block}.fs-modal.active:before{display:block}.fs-modal.active .fs-modal-dialog{top:10%}.fs-modal.fs-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.license_key{width:100%}#license_options_container table,#license_options_container table select,#license_options_container table #available_license_key{width:100%}#license_options_container table td:first-child{width:1%}#license_options_container table #other_license_key_container label{position:relative;top:6px;float:left;margin-right:5px}#license_options_container table #other_license_key_container div{overflow:hidden;width:auto;height:30px;display:block;top:2px;position:relative}#license_options_container table #other_license_key_container div input{margin:0}#sites_list_container td{cursor:pointer}#multisite_options_container{margin-top:10px;border:1px solid #ccc;padding:5px}#multisite_options_container a{text-decoration:none}#multisite_options_container a:focus{box-shadow:none}#multisite_options_container a.selected{font-weight:bold}#multisite_options_container.apply-on-all-sites{border:0 none;padding:0}#multisite_options_container.apply-on-all-sites #all_sites_options{border-spacing:0}#multisite_options_container.apply-on-all-sites #all_sites_options td:not(:first-child){display:none}#multisite_options_container #sites_list_container{display:none;overflow:auto}#multisite_options_container #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}
|
|
|
|
includes/pum-sdk/freemius/assets/css/admin/gdpr-optin-notice.css
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
.fs-notice[data-id^="gdpr_optin_actions"] .underlined{text-decoration:underline}.fs-notice[data-id^="gdpr_optin_actions"] ul .button,.fs-notice[data-id^="gdpr_optin_actions"] ul .action-description{vertical-align:middle}.fs-notice[data-id^="gdpr_optin_actions"] ul .action-description{display:inline-block;margin-left:3px}
|
|
includes/pum-sdk/freemius/assets/css/admin/index.php
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
// Silence is golden.
|
3 |
-
// Hide file structure from users on unprotected servers.
|
|
|
|
|
|
includes/pum-sdk/freemius/assets/css/customizer.css
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
#fs_customizer_upsell .fs-customizer-plan{padding:10px 20px 20px 20px;border-radius:3px;background:#fff}#fs_customizer_upsell .fs-customizer-plan h2{position:relative;margin:0;line-height:2em;text-transform:uppercase}#fs_customizer_upsell .fs-customizer-plan h2 .button-link{top:-2px}#fs_customizer_upsell .fs-feature{position:relative}#fs_customizer_upsell .dashicons-yes{color:#0085ba;font-size:2em;vertical-align:bottom;margin-left:-7px;margin-right:10px}.rtl #fs_customizer_upsell .dashicons-yes{margin-left:10px;margin-right:-7px}#fs_customizer_upsell .dashicons-editor-help{color:#bbb;cursor:help}#fs_customizer_upsell .dashicons-editor-help .fs-feature-desc{opacity:0;visibility:hidden;-moz-transition:opacity 0.3s ease-in-out;-o-transition:opacity 0.3s ease-in-out;-ms-transition:opacity 0.3s ease-in-out;-webkit-transition:opacity 0.3s ease-in-out;transition:opacity 0.3s ease-in-out;position:absolute;background:#000;color:#fff;font-family:'arial', serif;font-size:12px;padding:10px;z-index:999999;bottom:100%;margin-bottom:5px;left:0;right:0;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;-moz-box-shadow:1px 1px 1px rgba(0,0,0,0.2);-webkit-box-shadow:1px 1px 1px rgba(0,0,0,0.2);box-shadow:1px 1px 1px rgba(0,0,0,0.2);line-height:1.3em;font-weight:bold;text-align:left}.rtl #fs_customizer_upsell .dashicons-editor-help .fs-feature-desc{text-align:right}#fs_customizer_upsell .dashicons-editor-help .fs-feature-desc::after{content:' ';display:block;width:0;height:0;border-style:solid;border-width:5px 5px 0 5px;border-color:#000 transparent transparent transparent;position:absolute;top:100%;left:21px}.rtl #fs_customizer_upsell .dashicons-editor-help .fs-feature-desc::after{right:21px;left:auto}#fs_customizer_upsell .dashicons-editor-help:hover .fs-feature-desc{visibility:visible;opacity:1}#fs_customizer_upsell .button-primary{display:block;text-align:center;margin-top:10px}#fs_customizer_support{display:block !important}#fs_customizer_support .button{float:right}#fs_customizer_support .button-group{width:100%;display:block;margin-top:10px}#fs_customizer_support .button-group .button{float:none;width:50%;text-align:center}
|
|
includes/pum-sdk/freemius/assets/css/index.php
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
// Silence is golden.
|
3 |
-
// Hide file structure from users on unprotected servers.
|
|
|
|
|
|
includes/pum-sdk/freemius/assets/img/index.php
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
// Silence is golden.
|
3 |
-
// Hide file structure from users on unprotected servers.
|
|
|
|
|
|
includes/pum-sdk/freemius/assets/img/plugin-icon.png
DELETED
Binary file
|
includes/pum-sdk/freemius/assets/img/theme-icon.png
DELETED
Binary file
|
includes/pum-sdk/freemius/assets/index.php
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
// Silence is golden.
|
3 |
-
// Hide file structure from users on unprotected servers.
|
|
|
|
|
|
includes/pum-sdk/freemius/assets/js/index.php
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
// Silence is golden.
|
3 |
-
// Hide file structure from users on unprotected servers.
|
|
|
|
|
|
includes/pum-sdk/freemius/assets/js/nojquery.ba-postmessage.js
DELETED
@@ -1,140 +0,0 @@
|
|
1 |
-
/*!
|
2 |
-
* jQuery postMessage - v0.5 - 9/11/2009
|
3 |
-
* http://benalman.com/projects/jquery-postmessage-plugin/
|
4 |
-
*
|
5 |
-
* Copyright (c) 2009 "Cowboy" Ben Alman
|
6 |
-
* Dual licensed under the MIT and GPL licenses.
|
7 |
-
* http://benalman.com/about/license/
|
8 |
-
*
|
9 |
-
* Non-jQuery fork by Jeff Lee
|
10 |
-
*
|
11 |
-
* This fork consists of the following changes:
|
12 |
-
* 1. Basic code cleanup and restructuring, for legibility.
|
13 |
-
* 2. The `postMessage` and `receiveMessage` functions can be bound arbitrarily,
|
14 |
-
* in terms of both function names and object scope. Scope is specified by
|
15 |
-
* the the "this" context of NoJQueryPostMessageMixin();
|
16 |
-
* 3. I've removed the check for Opera 9.64, which used `$.browser`. There were
|
17 |
-
* at least three different GitHub users requesting the removal of this
|
18 |
-
* "Opera sniff" on the original project's Issues page, so I figured this
|
19 |
-
* would be a relatively safe change.
|
20 |
-
* 4. `postMessage` no longer uses `$.param` to serialize messages that are not
|
21 |
-
* strings. I actually prefer this structure anyway. `receiveMessage` does
|
22 |
-
* not implement a corresponding deserialization step, and as such it seems
|
23 |
-
* cleaner and more symmetric to leave both data serialization and
|
24 |
-
* deserialization to the client.
|
25 |
-
* 5. The use of `$.isFunction` is replaced by a functionally-identical check.
|
26 |
-
* 6. The `$:nomunge` YUI option is no longer necessary.
|
27 |
-
*/
|
28 |
-
|
29 |
-
function NoJQueryPostMessageMixin(postBinding, receiveBinding) {
|
30 |
-
|
31 |
-
var setMessageCallback, unsetMessageCallback, currentMsgCallback,
|
32 |
-
intervalId, lastHash, cacheBust = 1;
|
33 |
-
|
34 |
-
if (window.postMessage) {
|
35 |
-
|
36 |
-
if (window.addEventListener) {
|
37 |
-
setMessageCallback = function(callback) {
|
38 |
-
window.addEventListener('message', callback, false);
|
39 |
-
}
|
40 |
-
|
41 |
-
unsetMessageCallback = function(callback) {
|
42 |
-
window.removeEventListener('message', callback, false);
|
43 |
-
}
|
44 |
-
} else {
|
45 |
-
setMessageCallback = function(callback) {
|
46 |
-
window.attachEvent('onmessage', callback);
|
47 |
-
}
|
48 |
-
|
49 |
-
unsetMessageCallback = function(callback) {
|
50 |
-
window.detachEvent('onmessage', callback);
|
51 |
-
}
|
52 |
-
}
|
53 |
-
|
54 |
-
this[postBinding] = function(message, targetUrl, target) {
|
55 |
-
if (!targetUrl) {
|
56 |
-
return;
|
57 |
-
}
|
58 |
-
|
59 |
-
// The browser supports window.postMessage, so call it with a targetOrigin
|
60 |
-
// set appropriately, based on the targetUrl parameter.
|
61 |
-
target.postMessage( message, targetUrl.replace( /([^:]+:\/\/[^\/]+).*/, '$1' ) );
|
62 |
-
}
|
63 |
-
|
64 |
-
// Since the browser supports window.postMessage, the callback will be
|
65 |
-
// bound to the actual event associated with window.postMessage.
|
66 |
-
this[receiveBinding] = function(callback, sourceOrigin, delay) {
|
67 |
-
// Unbind an existing callback if it exists.
|
68 |
-
if (currentMsgCallback) {
|
69 |
-
unsetMessageCallback(currentMsgCallback);
|
70 |
-
currentMsgCallback = null;
|
71 |
-
}
|
72 |
-
|
73 |
-
if (!callback) {
|
74 |
-
return false;
|
75 |
-
}
|
76 |
-
|
77 |
-
// Bind the callback. A reference to the callback is stored for ease of
|
78 |
-
// unbinding.
|
79 |
-
currentMsgCallback = setMessageCallback(function(e) {
|
80 |
-
switch(Object.prototype.toString.call(sourceOrigin)) {
|
81 |
-
case '[object String]':
|
82 |
-
if (sourceOrigin !== e.origin) {
|
83 |
-
return false;
|
84 |
-
}
|
85 |
-
break;
|
86 |
-
case '[object Function]':
|
87 |
-
if (sourceOrigin(e.origin)) {
|
88 |
-
return false;
|
89 |
-
}
|
90 |
-
break;
|
91 |
-
}
|
92 |
-
|
93 |
-
callback(e);
|
94 |
-
});
|
95 |
-
};
|
96 |
-
|
97 |
-
} else {
|
98 |
-
|
99 |
-
this[postBinding] = function(message, targetUrl, target) {
|
100 |
-
if (!targetUrl) {
|
101 |
-
return;
|
102 |
-
}
|
103 |
-
|
104 |
-
// The browser does not support window.postMessage, so set the location
|
105 |
-
// of the target to targetUrl#message. A bit ugly, but it works! A cache
|
106 |
-
// bust parameter is added to ensure that repeat messages trigger the
|
107 |
-
// callback.
|
108 |
-
target.location = targetUrl.replace( /#.*$/, '' ) + '#' + (+new Date) + (cacheBust++) + '&' + message;
|
109 |
-
}
|
110 |
-
|
111 |
-
// Since the browser sucks, a polling loop will be started, and the
|
112 |
-
// callback will be called whenever the location.hash changes.
|
113 |
-
this[receiveBinding] = function(callback, sourceOrigin, delay) {
|
114 |
-
if (intervalId) {
|
115 |
-
clearInterval(intervalId);
|
116 |
-
intervalId = null;
|
117 |
-
}
|
118 |
-
|
119 |
-
if (callback) {
|
120 |
-
delay = typeof sourceOrigin === 'number'
|
121 |
-
? sourceOrigin
|
122 |
-
: typeof delay === 'number'
|
123 |
-
? delay
|
124 |
-
: 100;
|
125 |
-
|
126 |
-
intervalId = setInterval(function(){
|
127 |
-
var hash = document.location.hash,
|
128 |
-
re = /^#?\d+&/;
|
129 |
-
if ( hash !== lastHash && re.test( hash ) ) {
|
130 |
-
lastHash = hash;
|
131 |
-
callback({ data: hash.replace( re, '' ) });
|
132 |
-
}
|
133 |
-
}, delay );
|
134 |
-
}
|
135 |
-
};
|
136 |
-
|
137 |
-
}
|
138 |
-
|
139 |
-
return this;
|
140 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/pum-sdk/freemius/assets/js/nojquery.ba-postmessage.min.js
DELETED
@@ -1,12 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
* nojquery-postmessage by Jeff Lee
|
3 |
-
* a non-jQuery fork of:
|
4 |
-
*
|
5 |
-
* jQuery postMessage - v0.5 - 9/11/2009
|
6 |
-
* http://benalman.com/projects/jquery-postmessage-plugin/
|
7 |
-
*
|
8 |
-
* Copyright (c) 2009 "Cowboy" Ben Alman
|
9 |
-
* Dual licensed under the MIT and GPL licenses.
|
10 |
-
* http://benalman.com/about/license/
|
11 |
-
*/
|
12 |
-
function NoJQueryPostMessageMixin(g,a){var b,h,e,d,f,c=1;if(window.postMessage){if(window.addEventListener){b=function(i){window.addEventListener("message",i,false)};h=function(i){window.removeEventListener("message",i,false)}}else{b=function(i){window.attachEvent("onmessage",i)};h=function(i){window.detachEvent("onmessage",i)}}this[g]=function(i,k,j){if(!k){return}j.postMessage(i,k.replace(/([^:]+:\/\/[^\/]+).*/,"$1"))};this[a]=function(k,j,i){if(e){h(e);e=null}if(!k){return false}e=b(function(l){switch(Object.prototype.toString.call(j)){case"[object String]":if(j!==l.origin){return false}break;case"[object Function]":if(j(l.origin)){return false}break}k(l)})}}else{this[g]=function(i,k,j){if(!k){return}j.location=k.replace(/#.*$/,"")+"#"+(+new Date)+(c++)+"&"+i};this[a]=function(k,j,i){if(d){clearInterval(d);d=null}if(k){i=typeof j==="number"?j:typeof i==="number"?i:100;d=setInterval(function(){var m=document.location.hash,l=/^#?\d+&/;if(m!==f&&l.test(m)){f=m;k({data:m.replace(l,"")})}},i)}}}return this};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/pum-sdk/freemius/assets/js/postmessage.js
DELETED
@@ -1,135 +0,0 @@
|
|
1 |
-
(function ($, undef) {
|
2 |
-
var global = this;
|
3 |
-
|
4 |
-
// Namespace.
|
5 |
-
global.FS = global.FS || {};
|
6 |
-
|
7 |
-
global.FS.PostMessage = function ()
|
8 |
-
{
|
9 |
-
var
|
10 |
-
_is_child = false,
|
11 |
-
_postman = new NoJQueryPostMessageMixin('postMessage', 'receiveMessage'),
|
12 |
-
_callbacks = {},
|
13 |
-
_base_url,
|
14 |
-
_parent_url = decodeURIComponent(document.location.hash.replace(/^#/, '')),
|
15 |
-
_parent_subdomain = _parent_url.substring(0, _parent_url.indexOf('/', ('https://' === _parent_url.substring(0, ('https://').length)) ? 8 : 7)),
|
16 |
-
_init = function () {
|
17 |
-
_postman.receiveMessage(function (e) {
|
18 |
-
var data = JSON.parse(e.data);
|
19 |
-
|
20 |
-
if (_callbacks[data.type]) {
|
21 |
-
for (var i = 0; i < _callbacks[data.type].length; i++) {
|
22 |
-
// Execute type callbacks.
|
23 |
-
_callbacks[data.type][i](data.data);
|
24 |
-
}
|
25 |
-
}
|
26 |
-
}, _base_url);
|
27 |
-
},
|
28 |
-
_hasParent = ('' !== _parent_url),
|
29 |
-
$window = $(window),
|
30 |
-
$html = $('html');
|
31 |
-
|
32 |
-
return {
|
33 |
-
init : function (url, iframes)
|
34 |
-
{
|
35 |
-
_base_url = url;
|
36 |
-
_init();
|
37 |
-
|
38 |
-
// Automatically receive forward messages.
|
39 |
-
FS.PostMessage.receiveOnce('forward', function (data){
|
40 |
-
window.location = data.url;
|
41 |
-
});
|
42 |
-
|
43 |
-
iframes = iframes || [];
|
44 |
-
|
45 |
-
if (iframes.length > 0) {
|
46 |
-
$window.on('scroll', function () {
|
47 |
-
for (var i = 0; i < iframes.length; i++) {
|
48 |
-
FS.PostMessage.postScroll(iframes[i]);
|
49 |
-
}
|
50 |
-
});
|
51 |
-
}
|
52 |
-
},
|
53 |
-
init_child : function ()
|
54 |
-
{
|
55 |
-
this.init(_parent_subdomain);
|
56 |
-
|
57 |
-
_is_child = true;
|
58 |
-
|
59 |
-
// Post height of a child right after window is loaded.
|
60 |
-
$(window).bind('load', function () {
|
61 |
-
FS.PostMessage.postHeight();
|
62 |
-
|
63 |
-
// Post message that window was loaded.
|
64 |
-
FS.PostMessage.post('loaded');
|
65 |
-
});
|
66 |
-
},
|
67 |
-
hasParent : function ()
|
68 |
-
{
|
69 |
-
return _hasParent;
|
70 |
-
},
|
71 |
-
postHeight : function (diff, wrapper) {
|
72 |
-
diff = diff || 0;
|
73 |
-
wrapper = wrapper || '#wrap_section';
|
74 |
-
this.post('height', {
|
75 |
-
height: diff + $(wrapper).outerHeight(true)
|
76 |
-
});
|
77 |
-
},
|
78 |
-
postScroll : function (iframe) {
|
79 |
-
this.post('scroll', {
|
80 |
-
top: $window.scrollTop(),
|
81 |
-
height: ($window.height() - parseFloat($html.css('paddingTop')) - parseFloat($html.css('marginTop')))
|
82 |
-
}, iframe);
|
83 |
-
},
|
84 |
-
post : function (type, data, iframe)
|
85 |
-
{
|
86 |
-
console.debug('PostMessage.post', type);
|
87 |
-
|
88 |
-
if (iframe)
|
89 |
-
{
|
90 |
-
// Post to iframe.
|
91 |
-
_postman.postMessage(JSON.stringify({
|
92 |
-
type: type,
|
93 |
-
data: data
|
94 |
-
}), iframe.src, iframe.contentWindow);
|
95 |
-
}
|
96 |
-
else {
|
97 |
-
// Post to parent.
|
98 |
-
_postman.postMessage(JSON.stringify({
|
99 |
-
type: type,
|
100 |
-
data: data
|
101 |
-
}), _parent_url, window.parent);
|
102 |
-
}
|
103 |
-
},
|
104 |
-
receive: function (type, callback)
|
105 |
-
{
|
106 |
-
console.debug('PostMessage.receive', type);
|
107 |
-
|
108 |
-
if (undef === _callbacks[type])
|
109 |
-
_callbacks[type] = [];
|
110 |
-
|
111 |
-
_callbacks[type].push(callback);
|
112 |
-
},
|
113 |
-
receiveOnce: function (type, callback)
|
114 |
-
{
|
115 |
-
if (this.is_set(type))
|
116 |
-
return;
|
117 |
-
|
118 |
-
this.receive(type, callback);
|
119 |
-
},
|
120 |
-
// Check if any callbacks assigned to a specified message type.
|
121 |
-
is_set: function (type)
|
122 |
-
{
|
123 |
-
return (undef != _callbacks[type]);
|
124 |
-
},
|
125 |
-
parent_url: function ()
|
126 |
-
{
|
127 |
-
return _parent_url;
|
128 |
-
},
|
129 |
-
parent_subdomain: function ()
|
130 |
-
{
|
131 |
-
return _parent_subdomain;
|
132 |
-
}
|
133 |
-
};
|
134 |
-
}();
|
135 |
-
})(jQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/pum-sdk/freemius/assets/scss/_colors.scss
DELETED
@@ -1,79 +0,0 @@
|
|
1 |
-
$menu-hover-color: #333;
|
2 |
-
$darkest-color: #000;
|
3 |
-
$fms-live-color: #71ae00;
|
4 |
-
$fms-test-color: #f7941d;
|
5 |
-
$fms-link-color: #29abe1;
|
6 |
-
$fms-link-hover-color: darken(#29abe1, 10%);
|
7 |
-
$body-bkg: #111;
|
8 |
-
$special-color: #d3135a;
|
9 |
-
$body-color: #f1f1f1;
|
10 |
-
$fms-white: #f1f1f1;
|
11 |
-
$container-bkg: #222;
|
12 |
-
$container-bkg-odd: #262626;
|
13 |
-
$container-border-color: #333;
|
14 |
-
$table-head-bkg: #333;
|
15 |
-
$table-head-color: #999;
|
16 |
-
$info-color: #999;
|
17 |
-
$error-color: #ff0000;
|
18 |
-
|
19 |
-
$fs-logo-blue-color: #29abe1;
|
20 |
-
$fs-logo-green-color: #71ae00;
|
21 |
-
$fs-logo-magenta-color: #d3135a;
|
22 |
-
|
23 |
-
// WordPress colors.
|
24 |
-
$page-header-bkg: #333;
|
25 |
-
$page-header-color: $fms-white;
|
26 |
-
$text-dark-color: #333;
|
27 |
-
$text-light-color: #666;
|
28 |
-
$text-lightest-color: #999;
|
29 |
-
|
30 |
-
// Notices.
|
31 |
-
$wp-notice-success-color: #f7fff7;
|
32 |
-
$wp-notice-success-dark-color: #46b450;
|
33 |
-
$wp-notice-error-color: #ffeaea;
|
34 |
-
$wp-notice-error-dark-color: #dc3232;
|
35 |
-
$wp-notice-warn-color: #fff8e5;
|
36 |
-
$wp-notice-warn-dark-color: #ffb900;
|
37 |
-
$fs-notice-promotion-border-color: #00a0d2;
|
38 |
-
$fs-notice-promotion-bkg: #f2fcff;
|
39 |
-
|
40 |
-
// WP Buttons.
|
41 |
-
$button-primary-bkg: #6bc406;
|
42 |
-
$button-primary-color: $fms-white;
|
43 |
-
$button-secondary-bkg: #333;
|
44 |
-
$button-secondary-color: $fms-white;
|
45 |
-
$featured-color: #6bc406;
|
46 |
-
$wp-selected-color: #0074a3;
|
47 |
-
$wp-button-alert-border-color: #d2593c;
|
48 |
-
$wp-button-alert-border-top-color: #ec6544;
|
49 |
-
$wp-button-alert-shadow-color: #d2593c;
|
50 |
-
$wp-button-alert-focused-shadow1-color: #dd6041;
|
51 |
-
$wp-button-alert-focused-shadow2-color: #e4a796;
|
52 |
-
$wp-button-alert-background-color: #f56a48;
|
53 |
-
$wp-button-alert-hovered-background-color: #fd6d4a;
|
54 |
-
$wp-button-alert-active-background-color: #dd6041;
|
55 |
-
$wp-button-alert-disabled-color: #f5b3a1;
|
56 |
-
$wp-button-alert-disabled-background-color: #e76444;
|
57 |
-
$wp-button-alert-disabled-border-color: #d85e40;
|
58 |
-
|
59 |
-
$wordpress_color: #01749A;
|
60 |
-
$blogger_color: #ff8100;
|
61 |
-
$wix_color: #fac102;
|
62 |
-
$shopify_color: #80d100;
|
63 |
-
$addthis_color: #fe6d4e;
|
64 |
-
$tumblr_color: #34506b;
|
65 |
-
$zepo_color: #00baf2;
|
66 |
-
$jquery_color: #000919;
|
67 |
-
$javascript_color: #00baf2;
|
68 |
-
$squarespace_color: #000;
|
69 |
-
|
70 |
-
$blog_color: #ff6600;
|
71 |
-
$facebook_color: #3b5998;
|
72 |
-
$twitter_color: #4099ff;
|
73 |
-
$linkedin_color: #4875b4;
|
74 |
-
$youtube_color: #ff3333;
|
75 |
-
$gplus_color: #c63d2d;
|
76 |
-
|
77 |
-
// Tooltip
|
78 |
-
$tooltip-color: #fff;
|
79 |
-
$tooltip-bkg-color: rgba(0,0,0,0.8);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/pum-sdk/freemius/assets/scss/_functions.scss
DELETED
File without changes
|
includes/pum-sdk/freemius/assets/scss/_load.scss
DELETED
@@ -1,4 +0,0 @@
|
|
1 |
-
@import 'mixins';
|
2 |
-
@import "vars";
|
3 |
-
@import "functions";
|
4 |
-
@import "colors";
|
|
|
|
|
|
|
|
includes/pum-sdk/freemius/assets/scss/_mixins.scss
DELETED
@@ -1,270 +0,0 @@
|
|
1 |
-
// ---- CSS3 SASS MIXINS ----
|
2 |
-
// https://github.com/madr/css3-sass-mixins
|
3 |
-
//
|
4 |
-
// Copyright (C) 2011 by Anders Ytterström
|
5 |
-
//
|
6 |
-
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
7 |
-
// of this software and associated documentation files (the "Software"), to deal
|
8 |
-
// in the Software without restriction, including without limitation the rights
|
9 |
-
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
10 |
-
// copies of the Software, and to permit persons to whom the Software is
|
11 |
-
// furnished to do so, subject to the following conditions:
|
12 |
-
//
|
13 |
-
// The above copyright notice and this permission notice shall be included in
|
14 |
-
// all copies or substantial portions of the Software.
|
15 |
-
//
|
16 |
-
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17 |
-
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18 |
-
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
19 |
-
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20 |
-
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
21 |
-
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
22 |
-
// THE SOFTWARE.
|
23 |
-
//
|
24 |
-
|
25 |
-
// ---- LEGACY IE SUPPORT USING FILTERS ----
|
26 |
-
// Should IE filters be used or not?
|
27 |
-
// PROS: gradients, drop shadows etc will be handled by css.
|
28 |
-
// CONS: will harm the site performance badly,
|
29 |
-
// especially on sites with heavy rendering and scripting.
|
30 |
-
$useIEFilters: 0;
|
31 |
-
// might be 0 or 1. disabled by default.
|
32 |
-
// ---- /LEGACY IE SUPPORT USING FILTERS ----
|
33 |
-
|
34 |
-
|
35 |
-
@mixin background-size ($value) {
|
36 |
-
-webkit-background-size: $value;
|
37 |
-
background-size: $value;
|
38 |
-
}
|
39 |
-
|
40 |
-
@mixin border-image ($path, $offsets, $repeats) {
|
41 |
-
-moz-border-image: $path $offsets $repeats;
|
42 |
-
-o-border-image: $path $offsets $repeats;
|
43 |
-
-webkit-border-image: $path $offsets $repeats;
|
44 |
-
border-image: $path $offsets $repeats;
|
45 |
-
}
|
46 |
-
|
47 |
-
@mixin border-radius ($values...) {
|
48 |
-
-moz-border-radius: $values;
|
49 |
-
-webkit-border-radius: $values;
|
50 |
-
border-radius: $values;
|
51 |
-
/*-moz-background-clip: padding;
|
52 |
-
-webkit-background-clip: padding-box;
|
53 |
-
background-clip: padding-box;*/
|
54 |
-
}
|
55 |
-
|
56 |
-
@mixin box-shadow ($values...) {
|
57 |
-
-moz-box-shadow: $values;
|
58 |
-
-webkit-box-shadow: $values;
|
59 |
-
box-shadow: $values;
|
60 |
-
}
|
61 |
-
|
62 |
-
//@mixin box-shadow ($x, $y, $offset, $hex, $ie: $useIEFilters, $inset: null, $spread:null) {
|
63 |
-
// -moz-box-shadow: $x $y $offset $spread $hex $inset;
|
64 |
-
// -webkit-box-shadow: $x $y $offset $spread $hex $inset;
|
65 |
-
// box-shadow: $x $y $offset $spread $hex $inset;
|
66 |
-
//
|
67 |
-
// @if $ie == 1 {
|
68 |
-
// $iecolor: '#' + red($hex) + green($hex) + blue($hex);
|
69 |
-
// filter: progid:DXImageTransform.Microsoft.dropshadow(OffX=#{$x}, OffY=#{$y}, Color='#{$iecolor}');
|
70 |
-
// -ms-filter: quote(progid:DXImageTransform.Microsoft.dropshadow(OffX=#{$x}, OffY=#{$y}, Color='#{$iecolor}'));
|
71 |
-
// }
|
72 |
-
//}
|
73 |
-
|
74 |
-
@mixin box-sizing($value) {
|
75 |
-
-moz-box-sizing: $value;
|
76 |
-
-webkit-box-sizing: $value;
|
77 |
-
box-sizing: $value;
|
78 |
-
}
|
79 |
-
|
80 |
-
// requires sass 3.2
|
81 |
-
@mixin keyframes($name){
|
82 |
-
@-moz-keyframes #{$name} { @content; }
|
83 |
-
@-ms-keyframes #{$name} { @content; }
|
84 |
-
@-o-keyframes #{$name} { @content; }
|
85 |
-
@-webkit-keyframes #{$name} { @content; }
|
86 |
-
@keyframes #{$name} { @content; }
|
87 |
-
}
|
88 |
-
|
89 |
-
@mixin linear-gradient($from, $to, $ie: $useIEFilters) {
|
90 |
-
@if $ie != 1 { background-color: $to; }
|
91 |
-
|
92 |
-
background-image: -webkit-gradient(linear,left top,left bottom,color-stop(0, $from),color-stop(1, $to));
|
93 |
-
background-image: -webkit-linear-gradient(top, $from, $to);
|
94 |
-
background-image: -moz-linear-gradient(top, $from, $to);
|
95 |
-
background-image: -ms-linear-gradient(top, $from, $to);
|
96 |
-
background-image: -o-linear-gradient(top, $from, $to);
|
97 |
-
background-image: linear-gradient(top, bottom, $from, $to);
|
98 |
-
|
99 |
-
@if $ie == 1 {
|
100 |
-
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$from}', endColorstr='#{$to}');
|
101 |
-
}
|
102 |
-
}
|
103 |
-
|
104 |
-
@mixin horizontal-gradient($startColor: #555, $endColor: #333, $ie: $useIEFilters) {
|
105 |
-
@if $ie != 1 { background-color: $endColor; }
|
106 |
-
|
107 |
-
background-color: $endColor;
|
108 |
-
background-image: -webkit-gradient(linear, 0 0, 100% 0, from($startColor), to($endColor)); // Safari 4+, Chrome 2+
|
109 |
-
background-image: -webkit-linear-gradient(left, $startColor, $endColor); // Safari 5.1+, Chrome 10+
|
110 |
-
background-image: -moz-linear-gradient(left, $startColor, $endColor); // FF 3.6+
|
111 |
-
background-image: -o-linear-gradient(left, $startColor, $endColor); // Opera 11.10
|
112 |
-
background-image: linear-gradient(to right, $startColor, $endColor); // Standard, IE10
|
113 |
-
background-repeat: repeat-x;
|
114 |
-
@if $ie == 1 {
|
115 |
-
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$startColor}', endColorstr='#{$endColor}', GradientType=1);
|
116 |
-
}
|
117 |
-
}
|
118 |
-
|
119 |
-
@mixin radial-gradient($from, $to, $ie: $useIEFilters) {
|
120 |
-
@if $ie != 1 { background-color: $to; }
|
121 |
-
|
122 |
-
background: -moz-radial-gradient(center, circle cover, $from 0%, $to 100%);
|
123 |
-
background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%, $from), color-stop(100%, $to));
|
124 |
-
background: -webkit-radial-gradient(center, circle cover, $from 0%, $to 100%);
|
125 |
-
background: -o-radial-gradient(center, circle cover, $from 0%, $to 100%);
|
126 |
-
background: -ms-radial-gradient(center, circle cover, $from 0%, $to 100%);
|
127 |
-
background: radial-gradient(center, circle cover, $from 0%, $to 100%);
|
128 |
-
background-color: $from;
|
129 |
-
|
130 |
-
@if $ie == 1 {
|
131 |
-
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{$from}', endColorstr='#{$to}', GradientType=1); /* IE6-9 fallback on horizontal gradient */
|
132 |
-
}
|
133 |
-
}
|
134 |
-
|
135 |
-
@mixin perspective($perspective) {
|
136 |
-
-moz-perspective: $perspective;
|
137 |
-
-ms-perspective: $perspective;
|
138 |
-
-webkit-perspective: $perspective;
|
139 |
-
perspective: $perspective;
|
140 |
-
-moz-transform-style: preserve-3d;
|
141 |
-
-ms-transform-style: preserve-3d;
|
142 |
-
-webkit-transform-style: preserve-3d;
|
143 |
-
transform-style: preserve-3d;
|
144 |
-
}
|
145 |
-
|
146 |
-
@mixin transform ($transforms) {
|
147 |
-
-moz-transform: $transforms;
|
148 |
-
-o-transform: $transforms;
|
149 |
-
-ms-transform: $transforms;
|
150 |
-
-webkit-transform: $transforms;
|
151 |
-
transform: $transforms;
|
152 |
-
}
|
153 |
-
|
154 |
-
@mixin matrix ($a, $b, $c, $d, $e, $f) {
|
155 |
-
-moz-transform: matrix($a, $b, $c, $d, #{$e}px, #{$f}px);
|
156 |
-
-o-transform: matrix($a, $b, $c, $d, $e, $f);
|
157 |
-
-ms-transform: matrix($a, $b, $c, $d, $e, $f);
|
158 |
-
-webkit-transform: matrix($a, $b, $c, $d, $e, $f);
|
159 |
-
transform: matrix($a, $b, $c, $d, $e, $f);
|
160 |
-
}
|
161 |
-
|
162 |
-
@mixin rotate ($deg) {
|
163 |
-
@include transform(rotate(#{$deg}deg));
|
164 |
-
}
|
165 |
-
|
166 |
-
@mixin scale ($size) {
|
167 |
-
@include transform(scale(#{$size}));
|
168 |
-
}
|
169 |
-
|
170 |
-
@mixin translate ($x, $y) {
|
171 |
-
@include transform(translate($x, $y));
|
172 |
-
}
|
173 |
-
|
174 |
-
@mixin transition ($value...) {
|
175 |
-
-moz-transition: $value;
|
176 |
-
-o-transition: $value;
|
177 |
-
-ms-transition: $value;
|
178 |
-
-webkit-transition: $value;
|
179 |
-
transition: $value;
|
180 |
-
}
|
181 |
-
|
182 |
-
@mixin animation($str) {
|
183 |
-
-webkit-animation: #{$str};
|
184 |
-
-moz-animation: #{$str};
|
185 |
-
-ms-animation: #{$str};
|
186 |
-
-o-animation: #{$str};
|
187 |
-
animation: #{$str};
|
188 |
-
}
|
189 |
-
|
190 |
-
@mixin animation-name($str) {
|
191 |
-
-webkit-animation-name: #{$str};
|
192 |
-
-moz-animation-name: #{$str};
|
193 |
-
-ms-animation-name: #{$str};
|
194 |
-
-o-animation-name: #{$str};
|
195 |
-
animation-name: #{$str};
|
196 |
-
}
|
197 |
-
|
198 |
-
@mixin animation-duration($str) {
|
199 |
-
-webkit-animation-duration: #{$str};
|
200 |
-
-moz-animation-duration: #{$str};
|
201 |
-
-ms-animation-duration: #{$str};
|
202 |
-
-o-animation-duration: #{$str};
|
203 |
-
animation-duration: #{$str};
|
204 |
-
}
|
205 |
-
|
206 |
-
@mixin animation-direction($str) {
|
207 |
-
-webkit-animation-direction: #{$str};
|
208 |
-
-moz-animation-direction: #{$str};
|
209 |
-
-ms-animation-direction: #{$str};
|
210 |
-
-o-animation-direction: #{$str};
|
211 |
-
animation-direction: #{$str};
|
212 |
-
}
|
213 |
-
|
214 |
-
@mixin animation-delay($str) {
|
215 |
-
animation-delay:#{$str};
|
216 |
-
-o-animation-delay:#{$str};
|
217 |
-
-ms-animation-delay:#{$str};
|
218 |
-
-webkit-animation-delay:#{$str};
|
219 |
-
-moz-animation-delay:#{$str};
|
220 |
-
}
|
221 |
-
|
222 |
-
@mixin animation-iteration-count($str) {
|
223 |
-
animation-iteration-count:#{$str};
|
224 |
-
-o-animation-iteration-count:#{$str};
|
225 |
-
-ms-animation-iteration-count:#{$str};
|
226 |
-
-webkit-animation-iteration-count:#{$str};
|
227 |
-
-moz-animation-iteration-count:#{$str};
|
228 |
-
}
|
229 |
-
|
230 |
-
@mixin animation-timing-function($str) {
|
231 |
-
-webkit-animation-timing-function: #{$str};
|
232 |
-
-moz-animation-timing-function: #{$str};
|
233 |
-
-ms-animation-timing-function: #{$str};
|
234 |
-
-o-animation-timing-function: #{$str};
|
235 |
-
animation-timing-function: #{$str};
|
236 |
-
}
|
237 |
-
|
238 |
-
// ==== /CSS3 SASS MIXINS ====
|
239 |
-
|
240 |
-
@mixin opacity($opacity) {
|
241 |
-
opacity: $opacity;
|
242 |
-
$opacity-ie: $opacity * 100;
|
243 |
-
filter: alpha(opacity=$opacity-ie); //IE8
|
244 |
-
}
|
245 |
-
|
246 |
-
@mixin size($width, $height: $width)
|
247 |
-
{
|
248 |
-
width: $width;
|
249 |
-
height: $height;
|
250 |
-
}
|
251 |
-
|
252 |
-
@mixin clearfix
|
253 |
-
{
|
254 |
-
&:after {
|
255 |
-
content: "";
|
256 |
-
display: table;
|
257 |
-
clear: both;
|
258 |
-
}
|
259 |
-
}
|
260 |
-
|
261 |
-
// Placeholder text
|
262 |
-
@mixin placeholder($color: $input-color-placeholder) {
|
263 |
-
// Firefox
|
264 |
-
&::-moz-placeholder {
|
265 |
-
color: $color;
|
266 |
-
opacity: 1; // Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526
|
267 |
-
}
|
268 |
-
&:-ms-input-placeholder { color: $color; } // Internet Explorer 10+
|
269 |
-
&::-webkit-input-placeholder { color: $color; } // Safari and Chrome
|
270 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/pum-sdk/freemius/assets/scss/_start.scss
DELETED
@@ -1,4 +0,0 @@
|
|
1 |
-
@import "vars";
|
2 |
-
@import "colors";
|
3 |
-
@import "mixins";
|
4 |
-
@import "functions";
|
|
|
|
|
|
|
|
includes/pum-sdk/freemius/assets/scss/_vars.scss
DELETED
@@ -1,6 +0,0 @@
|
|
1 |
-
$is_production: true;
|
2 |
-
|
3 |
-
$img_common: if($is_production == true, '//img.freemius.com', 'http://img.freemius:8080');
|
4 |
-
|
5 |
-
$layout_width: 960px;
|
6 |
-
$admin_mobile_max_width: 782px;
|
|
|
|
|
|
|
|
|
|
|
|
includes/pum-sdk/freemius/assets/scss/admin/_ajax-loader.scss
DELETED
@@ -1,49 +0,0 @@
|
|
1 |
-
$color: $wp-selected-color;
|
2 |
-
$bkg-color: #fff;
|
3 |
-
$size: 20;
|
4 |
-
|
5 |
-
.fs-ajax-loader
|
6 |
-
{
|
7 |
-
position: relative;
|
8 |
-
width: #{8*$size + 10}px;
|
9 |
-
height: #{$size}px;
|
10 |
-
margin: auto;
|
11 |
-
|
12 |
-
.fs-ajax-loader-bar
|
13 |
-
{
|
14 |
-
position: absolute;
|
15 |
-
top: 0;
|
16 |
-
background-color: $color;
|
17 |
-
width: #{$size}px;
|
18 |
-
height: #{$size}px;
|
19 |
-
@include animation-name(bounce_ajaxLoader);
|
20 |
-
@include animation-duration(1.5s);
|
21 |
-
@include animation-iteration-count(infinite);
|
22 |
-
@include animation-direction(normal);
|
23 |
-
@include transform(.3);
|
24 |
-
}
|
25 |
-
|
26 |
-
@for $i from 0 through 7
|
27 |
-
{
|
28 |
-
.fs-ajax-loader-bar-#{$i + 1}
|
29 |
-
{
|
30 |
-
left: #{$i*($size - 1)}px;
|
31 |
-
@include animation-delay(#{0.6 + $i*0.15}s);
|
32 |
-
}
|
33 |
-
}
|
34 |
-
}
|
35 |
-
|
36 |
-
@include keyframes(bounce_ajaxLoader)
|
37 |
-
{
|
38 |
-
0%
|
39 |
-
{
|
40 |
-
@include transform(scale(1));
|
41 |
-
background-color: $color;
|
42 |
-
}
|
43 |
-
|
44 |
-
100%
|
45 |
-
{
|
46 |
-
@include transform(scale(.3));
|
47 |
-
background-color: $bkg-color;
|
48 |
-
}
|
49 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/pum-sdk/freemius/assets/scss/admin/_auto-install.scss
DELETED
@@ -1,33 +0,0 @@
|
|
1 |
-
.fs-modal-auto-install
|
2 |
-
{
|
3 |
-
$max-width: 300px;
|
4 |
-
|
5 |
-
#request-filesystem-credentials-form
|
6 |
-
{
|
7 |
-
h2,
|
8 |
-
.request-filesystem-credentials-action-buttons
|
9 |
-
{
|
10 |
-
display: none;
|
11 |
-
}
|
12 |
-
|
13 |
-
input[type=password],
|
14 |
-
input[type=email],
|
15 |
-
input[type=text]
|
16 |
-
{
|
17 |
-
-webkit-appearance: none;
|
18 |
-
padding: 10px 10px 5px 10px;
|
19 |
-
width: $max-width;
|
20 |
-
max-width: 100%;
|
21 |
-
}
|
22 |
-
|
23 |
-
> div,
|
24 |
-
label,
|
25 |
-
fieldset
|
26 |
-
{
|
27 |
-
width: $max-width;
|
28 |
-
max-width: 100%;
|
29 |
-
margin: 0 auto;
|
30 |
-
display: block;
|
31 |
-
}
|
32 |
-
}
|
33 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/pum-sdk/freemius/assets/scss/admin/_buttons.scss
DELETED
@@ -1,28 +0,0 @@
|
|
1 |
-
.button-primary.warn {
|
2 |
-
box-shadow: 0 1px 0 $wp-button-alert-shadow-color;
|
3 |
-
text-shadow: 0 -1px 1px $wp-button-alert-shadow-color, 1px 0 1px $wp-button-alert-shadow-color, 0 1px 1px $wp-button-alert-shadow-color, -1px 0 1px $wp-button-alert-shadow-color;
|
4 |
-
background: $wp-button-alert-background-color;
|
5 |
-
border-color: $wp-button-alert-border-top-color $wp-button-alert-border-color $wp-button-alert-border-color;
|
6 |
-
|
7 |
-
&:hover {
|
8 |
-
background: $wp-button-alert-hovered-background-color;
|
9 |
-
border-color: $wp-button-alert-border-color;
|
10 |
-
}
|
11 |
-
|
12 |
-
&:focus {
|
13 |
-
box-shadow: 0 1px 0 $wp-button-alert-focused-shadow1-color, 0 0 2px 1px $wp-button-alert-focused-shadow2-color;
|
14 |
-
}
|
15 |
-
|
16 |
-
&:active {
|
17 |
-
background: $wp-button-alert-active-background-color;
|
18 |
-
border-color: $wp-button-alert-border-color;
|
19 |
-
box-shadow: inset 0 2px 0 $wp-button-alert-shadow-color;
|
20 |
-
}
|
21 |
-
|
22 |
-
&.disabled {
|
23 |
-
color: $wp-button-alert-disabled-color !important;
|
24 |
-
background: $wp-button-alert-disabled-background-color !important;
|
25 |
-
border-color: $wp-button-alert-disabled-border-color !important;
|
26 |
-
text-shadow: 0 -1px 0 rgba(0,0,0,.1) !important;
|
27 |
-
}
|
28 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/pum-sdk/freemius/assets/scss/admin/_deactivation-feedback.scss
DELETED
@@ -1,55 +0,0 @@
|
|
1 |
-
@import "../colors";
|
2 |
-
|
3 |
-
.fs-modal.fs-modal-deactivation-feedback {
|
4 |
-
.reason-input, .internal-message {
|
5 |
-
margin: 3px 0 3px 22px;
|
6 |
-
|
7 |
-
input, textarea {
|
8 |
-
width: 100%;
|
9 |
-
}
|
10 |
-
}
|
11 |
-
|
12 |
-
li.reason {
|
13 |
-
&.has-internal-message .internal-message {
|
14 |
-
border: 1px solid lighten($darkest-color, 80%);
|
15 |
-
padding: 7px;
|
16 |
-
display: none;
|
17 |
-
}
|
18 |
-
|
19 |
-
@media (max-width: 650px) {
|
20 |
-
li.reason {
|
21 |
-
margin-bottom: 10px;
|
22 |
-
|
23 |
-
.reason-input, .internal-message {
|
24 |
-
margin-left: 29px;
|
25 |
-
}
|
26 |
-
|
27 |
-
label {
|
28 |
-
display: table;
|
29 |
-
|
30 |
-
> span {
|
31 |
-
display: table-cell;
|
32 |
-
font-size: 1.3em;
|
33 |
-
}
|
34 |
-
}
|
35 |
-
}
|
36 |
-
}
|
37 |
-
}
|
38 |
-
|
39 |
-
.anonymous-feedback-label {
|
40 |
-
float: left;
|
41 |
-
}
|
42 |
-
|
43 |
-
.fs-modal-panel {
|
44 |
-
margin-top: 0 !important;
|
45 |
-
|
46 |
-
h3 {
|
47 |
-
margin-top: 0;
|
48 |
-
line-height: 1.5em;
|
49 |
-
}
|
50 |
-
}
|
51 |
-
}
|
52 |
-
|
53 |
-
#the-list .deactivate > .fs-slug {
|
54 |
-
display: none;
|
55 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/pum-sdk/freemius/assets/scss/admin/_gdpr-consent.scss
DELETED
@@ -1,81 +0,0 @@
|
|
1 |
-
#fs_marketing_optin
|
2 |
-
{
|
3 |
-
display: none;
|
4 |
-
margin-top: 10px;
|
5 |
-
border: 1px solid #ccc;
|
6 |
-
padding: 10px;
|
7 |
-
line-height: 1.5em;
|
8 |
-
|
9 |
-
.fs-message
|
10 |
-
{
|
11 |
-
display: block;
|
12 |
-
margin-bottom: 5px;
|
13 |
-
font-size: 1.05em;
|
14 |
-
font-weight: 600;
|
15 |
-
}
|
16 |
-
|
17 |
-
&.error
|
18 |
-
{
|
19 |
-
border: 1px solid $fs-logo-magenta-color;
|
20 |
-
background: #fee;
|
21 |
-
|
22 |
-
.fs-message
|
23 |
-
{
|
24 |
-
color: $fs-logo-magenta-color;
|
25 |
-
}
|
26 |
-
}
|
27 |
-
|
28 |
-
.fs-input-container
|
29 |
-
{
|
30 |
-
margin-top: 5px;
|
31 |
-
|
32 |
-
label
|
33 |
-
{
|
34 |
-
margin-top: 5px;
|
35 |
-
display: block;
|
36 |
-
|
37 |
-
input
|
38 |
-
{
|
39 |
-
float: left;
|
40 |
-
margin: 1px 0 0 0;
|
41 |
-
}
|
42 |
-
|
43 |
-
&:first-child
|
44 |
-
{
|
45 |
-
display: block;
|
46 |
-
margin-bottom: 2px;
|
47 |
-
}
|
48 |
-
}
|
49 |
-
}
|
50 |
-
|
51 |
-
.fs-input-label
|
52 |
-
{
|
53 |
-
display: block;
|
54 |
-
margin-left: 20px;
|
55 |
-
|
56 |
-
.underlined
|
57 |
-
{
|
58 |
-
text-decoration: underline;
|
59 |
-
}
|
60 |
-
}
|
61 |
-
}
|
62 |
-
|
63 |
-
.rtl
|
64 |
-
{
|
65 |
-
#fs_marketing_optin
|
66 |
-
{
|
67 |
-
.fs-input-container
|
68 |
-
{
|
69 |
-
label input
|
70 |
-
{
|
71 |
-
float: right;
|
72 |
-
}
|
73 |
-
}
|
74 |
-
|
75 |
-
.fs-input-label
|
76 |
-
{
|
77 |
-
margin-left: 0;
|
78 |
-
margin-right: 20px;
|
79 |
-
}
|
80 |
-
}
|
81 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/pum-sdk/freemius/assets/scss/admin/_license-activation.scss
DELETED
@@ -1,47 +0,0 @@
|
|
1 |
-
.fs-modal.fs-modal-license-activation {
|
2 |
-
.fs-modal-body {
|
3 |
-
input.license_key {
|
4 |
-
width: 100%;
|
5 |
-
}
|
6 |
-
}
|
7 |
-
}
|
8 |
-
|
9 |
-
#license_options_container {
|
10 |
-
table {
|
11 |
-
&, select, #available_license_key {
|
12 |
-
width: 100%;
|
13 |
-
}
|
14 |
-
|
15 |
-
td:first-child {
|
16 |
-
width: 1%;
|
17 |
-
}
|
18 |
-
|
19 |
-
#other_license_key_container {
|
20 |
-
label {
|
21 |
-
position: relative;
|
22 |
-
top: 6px;
|
23 |
-
float: left;
|
24 |
-
margin-right: 5px;
|
25 |
-
}
|
26 |
-
|
27 |
-
div {
|
28 |
-
overflow: hidden;
|
29 |
-
width: auto;
|
30 |
-
height: 30px;
|
31 |
-
display: block;
|
32 |
-
top: 2px;
|
33 |
-
position: relative;
|
34 |
-
|
35 |
-
input {
|
36 |
-
margin: 0;
|
37 |
-
}
|
38 |
-
}
|
39 |
-
}
|
40 |
-
}
|
41 |
-
}
|
42 |
-
|
43 |
-
#sites_list_container {
|
44 |
-
td {
|
45 |
-
cursor: pointer;
|
46 |
-
}
|
47 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/pum-sdk/freemius/assets/scss/admin/_license-key-resend.scss
DELETED
@@ -1,68 +0,0 @@
|
|
1 |
-
.fs-modal.fs-modal-license-key-resend
|
2 |
-
{
|
3 |
-
.email-address-container
|
4 |
-
{
|
5 |
-
overflow: hidden;
|
6 |
-
padding-right: 2px;
|
7 |
-
}
|
8 |
-
|
9 |
-
&.fs-freemium
|
10 |
-
{
|
11 |
-
input.email-address
|
12 |
-
{
|
13 |
-
width: 300px;
|
14 |
-
}
|
15 |
-
|
16 |
-
label
|
17 |
-
{
|
18 |
-
display: block;
|
19 |
-
margin-bottom: 10px;
|
20 |
-
}
|
21 |
-
}
|
22 |
-
|
23 |
-
&.fs-premium
|
24 |
-
{
|
25 |
-
input.email-address
|
26 |
-
{
|
27 |
-
width: 100%;
|
28 |
-
}
|
29 |
-
|
30 |
-
.button-container
|
31 |
-
{
|
32 |
-
float: right;
|
33 |
-
margin-left: 7px;
|
34 |
-
|
35 |
-
@media (max-width: 650px) {
|
36 |
-
margin-top: 2px;
|
37 |
-
}
|
38 |
-
}
|
39 |
-
}
|
40 |
-
}
|
41 |
-
|
42 |
-
.rtl
|
43 |
-
{
|
44 |
-
.fs-modal.fs-modal-license-key-resend
|
45 |
-
{
|
46 |
-
.fs-modal-body
|
47 |
-
{
|
48 |
-
.input-container > .email-address-container
|
49 |
-
{
|
50 |
-
padding-left: 2px;
|
51 |
-
padding-right: 0;
|
52 |
-
}
|
53 |
-
|
54 |
-
.button-container
|
55 |
-
{
|
56 |
-
float: left;
|
57 |
-
margin-right: 7px;
|
58 |
-
margin-left: 0;
|
59 |
-
}
|
60 |
-
}
|
61 |
-
}
|
62 |
-
}
|
63 |
-
|
64 |
-
a.show-license-resend-modal
|
65 |
-
{
|
66 |
-
margin-top: 4px;
|
67 |
-
display: inline-block;
|
68 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/pum-sdk/freemius/assets/scss/admin/_modal-common.scss
DELETED
@@ -1,194 +0,0 @@
|
|
1 |
-
@import "../colors";
|
2 |
-
@import "../mixins";
|
3 |
-
|
4 |
-
.fs-modal {
|
5 |
-
position: fixed;
|
6 |
-
overflow: auto;
|
7 |
-
height: 100%;
|
8 |
-
width: 100%;
|
9 |
-
top: 0;
|
10 |
-
z-index: 100000;
|
11 |
-
display: none;
|
12 |
-
background: rgba(0, 0, 0, 0.6);
|
13 |
-
|
14 |
-
.fs-modal-dialog {
|
15 |
-
background: transparent;
|
16 |
-
position: absolute;
|
17 |
-
left: 50%;
|
18 |
-
margin-left: -298px;
|
19 |
-
padding-bottom: 30px;
|
20 |
-
top: -100%;
|
21 |
-
z-index: 100001;
|
22 |
-
width: 596px;
|
23 |
-
|
24 |
-
@media (max-width: 650px) {
|
25 |
-
margin-left: -50%;
|
26 |
-
box-sizing: border-box;
|
27 |
-
padding-left: 10px;
|
28 |
-
padding-right: 10px;
|
29 |
-
width: 100%;
|
30 |
-
|
31 |
-
.fs-modal-panel > h3 > strong {
|
32 |
-
font-size: 1.3em;
|
33 |
-
}
|
34 |
-
}
|
35 |
-
}
|
36 |
-
|
37 |
-
&.active {
|
38 |
-
display: block;
|
39 |
-
|
40 |
-
&:before {
|
41 |
-
display: block;
|
42 |
-
}
|
43 |
-
|
44 |
-
.fs-modal-dialog {
|
45 |
-
top: 10%;
|
46 |
-
}
|
47 |
-
}
|
48 |
-
|
49 |
-
&.fs-success {
|
50 |
-
.fs-modal-header {
|
51 |
-
border-bottom-color: $wp-notice-success-dark-color;
|
52 |
-
}
|
53 |
-
|
54 |
-
.fs-modal-body {
|
55 |
-
background-color: $wp-notice-success-color;
|
56 |
-
}
|
57 |
-
}
|
58 |
-
|
59 |
-
&.fs-warn {
|
60 |
-
.fs-modal-header {
|
61 |
-
border-bottom-color: $wp-notice-warn-dark-color;
|
62 |
-
}
|
63 |
-
|
64 |
-
.fs-modal-body {
|
65 |
-
background-color: $wp-notice-warn-color;
|
66 |
-
}
|
67 |
-
}
|
68 |
-
|
69 |
-
&.fs-error {
|
70 |
-
.fs-modal-header {
|
71 |
-
border-bottom-color: $wp-notice-error-dark-color;
|
72 |
-
}
|
73 |
-
|
74 |
-
.fs-modal-body {
|
75 |
-
background-color: $wp-notice-error-color;
|
76 |
-
}
|
77 |
-
}
|
78 |
-
|
79 |
-
|
80 |
-
.fs-modal-body,
|
81 |
-
.fs-modal-footer {
|
82 |
-
border: 0;
|
83 |
-
background: #fefefe;
|
84 |
-
padding: 20px;
|
85 |
-
}
|
86 |
-
|
87 |
-
.fs-modal-header {
|
88 |
-
border-bottom: #eeeeee solid 1px;
|
89 |
-
background: #fbfbfb;
|
90 |
-
padding: 15px 20px;
|
91 |
-
position: relative;
|
92 |
-
margin-bottom: -10px;
|
93 |
-
// z-index: 2;
|
94 |
-
|
95 |
-
h4 {
|
96 |
-
margin: 0;
|
97 |
-
padding: 0;
|
98 |
-
text-transform: uppercase;
|
99 |
-
font-size: 1.2em;
|
100 |
-
font-weight: bold;
|
101 |
-
color: #cacaca;
|
102 |
-
text-shadow: 1px 1px 1px #fff;
|
103 |
-
letter-spacing: 0.6px;
|
104 |
-
-webkit-font-smoothing: antialiased;
|
105 |
-
}
|
106 |
-
|
107 |
-
.fs-close {
|
108 |
-
position: absolute;
|
109 |
-
right: 10px;
|
110 |
-
top: 12px;
|
111 |
-
cursor: pointer;
|
112 |
-
color: #bbb;
|
113 |
-
@include border-radius(20px);
|
114 |
-
padding: 3px;
|
115 |
-
@include transition(all 0.2s ease-in-out);
|
116 |
-
|
117 |
-
&:hover {
|
118 |
-
color: #fff;
|
119 |
-
background: #aaa;
|
120 |
-
}
|
121 |
-
|
122 |
-
&, &:hover
|
123 |
-
{
|
124 |
-
.dashicons
|
125 |
-
{
|
126 |
-
text-decoration: none;
|
127 |
-
}
|
128 |
-
}
|
129 |
-
}
|
130 |
-
}
|
131 |
-
|
132 |
-
.fs-modal-body {
|
133 |
-
border-bottom: 0;
|
134 |
-
|
135 |
-
p {
|
136 |
-
font-size: 14px;
|
137 |
-
}
|
138 |
-
|
139 |
-
h2 {
|
140 |
-
font-size: 20px;
|
141 |
-
line-height: 1.5em;
|
142 |
-
}
|
143 |
-
|
144 |
-
> div {
|
145 |
-
margin-top: 10px;
|
146 |
-
|
147 |
-
h2 {
|
148 |
-
font-weight: bold;
|
149 |
-
font-size: 20px;
|
150 |
-
margin-top: 0;
|
151 |
-
}
|
152 |
-
}
|
153 |
-
}
|
154 |
-
|
155 |
-
.fs-modal-footer {
|
156 |
-
border-top: #eeeeee solid 1px;
|
157 |
-
text-align: right;
|
158 |
-
|
159 |
-
> .button {
|
160 |
-
margin: 0 7px;
|
161 |
-
|
162 |
-
&:first-child {
|
163 |
-
margin: 0;
|
164 |
-
}
|
165 |
-
}
|
166 |
-
}
|
167 |
-
|
168 |
-
.fs-modal-panel {
|
169 |
-
> .notice.inline {
|
170 |
-
margin: 0;
|
171 |
-
display: none;
|
172 |
-
}
|
173 |
-
|
174 |
-
&:not(.active) {
|
175 |
-
display: none;
|
176 |
-
}
|
177 |
-
}
|
178 |
-
}
|
179 |
-
|
180 |
-
.rtl
|
181 |
-
{
|
182 |
-
.fs-modal {
|
183 |
-
.fs-modal-header {
|
184 |
-
.fs-close {
|
185 |
-
right: auto;
|
186 |
-
left: 20px;
|
187 |
-
}
|
188 |
-
}
|
189 |
-
}
|
190 |
-
}
|
191 |
-
|
192 |
-
body.has-fs-modal {
|
193 |
-
overflow: hidden;
|
194 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/pum-sdk/freemius/assets/scss/admin/_multisite-options.scss
DELETED
@@ -1,40 +0,0 @@
|
|
1 |
-
#multisite_options_container {
|
2 |
-
margin-top: 10px;
|
3 |
-
border: 1px solid #ccc;
|
4 |
-
padding: 5px;
|
5 |
-
|
6 |
-
a {
|
7 |
-
text-decoration: none;
|
8 |
-
|
9 |
-
&:focus {
|
10 |
-
box-shadow: none;
|
11 |
-
}
|
12 |
-
|
13 |
-
&.selected {
|
14 |
-
font-weight: bold;
|
15 |
-
}
|
16 |
-
}
|
17 |
-
|
18 |
-
&.apply-on-all-sites {
|
19 |
-
border: 0 none;
|
20 |
-
padding: 0;
|
21 |
-
|
22 |
-
#all_sites_options {
|
23 |
-
border-spacing: 0;
|
24 |
-
|
25 |
-
td:not(:first-child) {
|
26 |
-
display: none;
|
27 |
-
}
|
28 |
-
}
|
29 |
-
}
|
30 |
-
|
31 |
-
#sites_list_container {
|
32 |
-
display: none;
|
33 |
-
overflow: auto;
|
34 |
-
|
35 |
-
table td {
|
36 |
-
border-top: 1px solid #ccc;
|
37 |
-
padding: 4px 2px;
|
38 |
-
}
|
39 |
-
}
|
40 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/pum-sdk/freemius/assets/scss/admin/_plugin-upgrade-notice.scss
DELETED
@@ -1,8 +0,0 @@
|
|
1 |
-
.plugins p.fs-upgrade-notice
|
2 |
-
{
|
3 |
-
border: 0;
|
4 |
-
background-color: #d54e21;
|
5 |
-
padding: 10px;
|
6 |
-
color: #f9f9f9;
|
7 |
-
margin-top: 10px;
|
8 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/pum-sdk/freemius/assets/scss/admin/_subscription-cancellation.scss
DELETED
@@ -1,30 +0,0 @@
|
|
1 |
-
.fs-modal.fs-modal-subscription-cancellation {
|
2 |
-
.fs-price-increase-warning {
|
3 |
-
color: red;
|
4 |
-
font-weight: bold;
|
5 |
-
padding: 0 25px;
|
6 |
-
margin-bottom: 0;
|
7 |
-
}
|
8 |
-
|
9 |
-
ul.subscription-actions label {
|
10 |
-
input {
|
11 |
-
float: left;
|
12 |
-
top: 5px;
|
13 |
-
position: relative;
|
14 |
-
|
15 |
-
.rtl & {
|
16 |
-
float: right;
|
17 |
-
}
|
18 |
-
}
|
19 |
-
|
20 |
-
span {
|
21 |
-
display: block;
|
22 |
-
margin-left: 24px;
|
23 |
-
|
24 |
-
.rtl & {
|
25 |
-
margin-left: 0;
|
26 |
-
margin-right: 24px;
|
27 |
-
}
|
28 |
-
}
|
29 |
-
}
|
30 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/pum-sdk/freemius/assets/scss/admin/_themes.scss
DELETED
@@ -1,21 +0,0 @@
|
|
1 |
-
.theme-browser
|
2 |
-
{
|
3 |
-
.theme
|
4 |
-
{
|
5 |
-
.fs-premium-theme-badge
|
6 |
-
{
|
7 |
-
position: absolute;
|
8 |
-
top: 10px;
|
9 |
-
right: 0;
|
10 |
-
background: $fs-logo-green-color;
|
11 |
-
color: #fff;
|
12 |
-
text-transform: uppercase;
|
13 |
-
padding: 5px 10px;
|
14 |
-
@include border-radius(3px 0 0 3px);
|
15 |
-
font-weight: bold;
|
16 |
-
border-right: 0;
|
17 |
-
@include box-shadow(0 2px 1px -1px rgba(0, 0, 0, .3));
|
18 |
-
font-size: 1.1em;
|
19 |
-
}
|
20 |
-
}
|
21 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/pum-sdk/freemius/assets/scss/admin/_tooltip.scss
DELETED
@@ -1,66 +0,0 @@
|
|
1 |
-
.fs-tooltip-trigger
|
2 |
-
{
|
3 |
-
&:not(a)
|
4 |
-
{
|
5 |
-
cursor: help;
|
6 |
-
}
|
7 |
-
|
8 |
-
position: relative;
|
9 |
-
|
10 |
-
.fs-tooltip
|
11 |
-
{
|
12 |
-
opacity: 0;
|
13 |
-
visibility: hidden;
|
14 |
-
@include transition(opacity 0.3s ease-in-out);
|
15 |
-
position: absolute;
|
16 |
-
background: $tooltip-bkg-color;
|
17 |
-
color: $tooltip-color;
|
18 |
-
font-family: 'arial', serif;
|
19 |
-
font-size: 12px;
|
20 |
-
padding: 10px;
|
21 |
-
z-index: 999999;
|
22 |
-
bottom: 100%;
|
23 |
-
margin-bottom: 5px;
|
24 |
-
left: 0;
|
25 |
-
right: 0;
|
26 |
-
@include border-radius(5px);
|
27 |
-
@include box-shadow(1px 1px 1px rgba(0, 0, 0, 0.2));
|
28 |
-
line-height: 1.3em;
|
29 |
-
font-weight: bold;
|
30 |
-
text-align: left;
|
31 |
-
|
32 |
-
.rtl &
|
33 |
-
{
|
34 |
-
text-align: right;
|
35 |
-
}
|
36 |
-
|
37 |
-
&::after
|
38 |
-
{
|
39 |
-
content: ' ';
|
40 |
-
display: block;
|
41 |
-
width: 0;
|
42 |
-
height: 0;
|
43 |
-
border-style: solid;
|
44 |
-
border-width: 5px 5px 0 5px;
|
45 |
-
border-color: $tooltip-bkg-color transparent transparent transparent;
|
46 |
-
position: absolute;
|
47 |
-
top: 100%;
|
48 |
-
left: 21px;
|
49 |
-
|
50 |
-
.rtl &
|
51 |
-
{
|
52 |
-
right: 21px;
|
53 |
-
left: auto;
|
54 |
-
}
|
55 |
-
}
|
56 |
-
}
|
57 |
-
|
58 |
-
&:hover
|
59 |
-
{
|
60 |
-
.fs-tooltip
|
61 |
-
{
|
62 |
-
visibility: visible;
|
63 |
-
opacity: 1;
|
64 |
-
}
|
65 |
-
}
|
66 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/pum-sdk/freemius/assets/scss/admin/account.scss
DELETED
@@ -1,302 +0,0 @@
|
|
1 |
-
@import "../start";
|
2 |
-
|
3 |
-
#fs_account
|
4 |
-
{
|
5 |
-
.postbox,
|
6 |
-
.widefat
|
7 |
-
{
|
8 |
-
max-width: 700px;
|
9 |
-
}
|
10 |
-
|
11 |
-
h3
|
12 |
-
{
|
13 |
-
font-size: 1.3em;
|
14 |
-
padding: 12px 15px;
|
15 |
-
margin: 0 0 12px 0;
|
16 |
-
line-height: 1.4;
|
17 |
-
border-bottom: 1px solid #F1F1F1;
|
18 |
-
|
19 |
-
.dashicons {
|
20 |
-
width: 26px;
|
21 |
-
height: 26px;
|
22 |
-
font-size: 1.3em;
|
23 |
-
}
|
24 |
-
}
|
25 |
-
|
26 |
-
i.dashicons
|
27 |
-
{
|
28 |
-
font-size: 1.2em;
|
29 |
-
height: 1.2em;
|
30 |
-
width: 1.2em;
|
31 |
-
}
|
32 |
-
|
33 |
-
.dashicons
|
34 |
-
{
|
35 |
-
vertical-align: middle;
|
36 |
-
}
|
37 |
-
|
38 |
-
.fs-header-actions
|
39 |
-
{
|
40 |
-
position: absolute;
|
41 |
-
top: 17px;
|
42 |
-
right: 15px;
|
43 |
-
font-size: 0.9em;
|
44 |
-
|
45 |
-
ul
|
46 |
-
{
|
47 |
-
margin: 0;
|
48 |
-
}
|
49 |
-
|
50 |
-
li
|
51 |
-
{
|
52 |
-
form
|
53 |
-
{
|
54 |
-
display: inline-block;
|
55 |
-
}
|
56 |
-
|
57 |
-
float: left;
|
58 |
-
a
|
59 |
-
{
|
60 |
-
text-decoration: none;
|
61 |
-
}
|
62 |
-
}
|
63 |
-
}
|
64 |
-
}
|
65 |
-
|
66 |
-
#fs_account_details .button-group {
|
67 |
-
float: right;
|
68 |
-
}
|
69 |
-
|
70 |
-
.rtl #fs_account .fs-header-actions
|
71 |
-
{
|
72 |
-
left: 15px;
|
73 |
-
right: auto;
|
74 |
-
}
|
75 |
-
|
76 |
-
.fs-key-value-table
|
77 |
-
{
|
78 |
-
width: 100%;
|
79 |
-
|
80 |
-
form
|
81 |
-
{
|
82 |
-
display: inline-block;
|
83 |
-
}
|
84 |
-
|
85 |
-
tr
|
86 |
-
{
|
87 |
-
td:first-child
|
88 |
-
{
|
89 |
-
nobr
|
90 |
-
{
|
91 |
-
font-weight: bold;
|
92 |
-
}
|
93 |
-
|
94 |
-
text-align: right;
|
95 |
-
|
96 |
-
form
|
97 |
-
{
|
98 |
-
display: block;
|
99 |
-
}
|
100 |
-
}
|
101 |
-
|
102 |
-
td.fs-right
|
103 |
-
{
|
104 |
-
text-align: right;
|
105 |
-
}
|
106 |
-
|
107 |
-
&.fs-odd
|
108 |
-
{
|
109 |
-
background: #ebebeb;
|
110 |
-
}
|
111 |
-
}
|
112 |
-
|
113 |
-
td, th
|
114 |
-
{
|
115 |
-
padding: 10px;
|
116 |
-
}
|
117 |
-
|
118 |
-
code {
|
119 |
-
line-height: 28px;
|
120 |
-
}
|
121 |
-
|
122 |
-
var, code, input[type="text"]
|
123 |
-
{
|
124 |
-
color: #0073AA;
|
125 |
-
font-size: 16px;
|
126 |
-
background: none;
|
127 |
-
}
|
128 |
-
|
129 |
-
input[type="text"] {
|
130 |
-
width: 100%;
|
131 |
-
font-weight: bold;
|
132 |
-
}
|
133 |
-
}
|
134 |
-
|
135 |
-
label.fs-tag
|
136 |
-
{
|
137 |
-
background: #ffba00;
|
138 |
-
color: #fff;
|
139 |
-
display: inline-block;
|
140 |
-
border-radius: 3px;
|
141 |
-
padding: 5px;
|
142 |
-
font-size: 11px;
|
143 |
-
line-height: 11px;
|
144 |
-
vertical-align: baseline;
|
145 |
-
|
146 |
-
&.fs-warn
|
147 |
-
{
|
148 |
-
background: #ffba00;
|
149 |
-
}
|
150 |
-
&.fs-success
|
151 |
-
{
|
152 |
-
background: #46b450;
|
153 |
-
}
|
154 |
-
&.fs-error
|
155 |
-
{
|
156 |
-
background: #dc3232;
|
157 |
-
}
|
158 |
-
}
|
159 |
-
|
160 |
-
#fs_sites
|
161 |
-
{
|
162 |
-
.fs-scrollable-table
|
163 |
-
{
|
164 |
-
.fs-table-body {
|
165 |
-
max-height: 200px;
|
166 |
-
overflow: auto;
|
167 |
-
border: 1px solid #e5e5e5;
|
168 |
-
|
169 |
-
& > table.widefat {
|
170 |
-
border: none !important;
|
171 |
-
}
|
172 |
-
}
|
173 |
-
|
174 |
-
.fs-main-column {
|
175 |
-
width: 100%;
|
176 |
-
}
|
177 |
-
|
178 |
-
.fs-site-details
|
179 |
-
{
|
180 |
-
td:first-of-type
|
181 |
-
{
|
182 |
-
text-align: right;
|
183 |
-
color: grey;
|
184 |
-
width: 1px;
|
185 |
-
}
|
186 |
-
|
187 |
-
td:last-of-type
|
188 |
-
{
|
189 |
-
text-align: right;
|
190 |
-
}
|
191 |
-
}
|
192 |
-
|
193 |
-
.fs-install-details table
|
194 |
-
{
|
195 |
-
tr td
|
196 |
-
{
|
197 |
-
width: 1px;
|
198 |
-
white-space: nowrap;
|
199 |
-
|
200 |
-
&:last-of-type
|
201 |
-
{
|
202 |
-
width: auto;
|
203 |
-
}
|
204 |
-
}
|
205 |
-
}
|
206 |
-
}
|
207 |
-
}
|
208 |
-
|
209 |
-
#fs_addons
|
210 |
-
{
|
211 |
-
h3
|
212 |
-
{
|
213 |
-
border: none;
|
214 |
-
margin-bottom: 0;
|
215 |
-
padding: 4px 5px;
|
216 |
-
}
|
217 |
-
|
218 |
-
td
|
219 |
-
{
|
220 |
-
vertical-align: middle;
|
221 |
-
}
|
222 |
-
|
223 |
-
thead {
|
224 |
-
white-space: nowrap;
|
225 |
-
}
|
226 |
-
|
227 |
-
td:first-child,
|
228 |
-
th:first-child
|
229 |
-
{
|
230 |
-
text-align: left;
|
231 |
-
font-weight: bold;
|
232 |
-
}
|
233 |
-
td:last-child,
|
234 |
-
th:last-child
|
235 |
-
{
|
236 |
-
text-align: right;
|
237 |
-
}
|
238 |
-
th
|
239 |
-
{
|
240 |
-
font-weight: bold;
|
241 |
-
}
|
242 |
-
}
|
243 |
-
|
244 |
-
#fs_billing_address {
|
245 |
-
width: 100%;
|
246 |
-
|
247 |
-
tr {
|
248 |
-
td {
|
249 |
-
width: 50%;
|
250 |
-
padding: 5px;
|
251 |
-
}
|
252 |
-
|
253 |
-
&:first-of-type {
|
254 |
-
td {
|
255 |
-
padding-top: 0;
|
256 |
-
}
|
257 |
-
}
|
258 |
-
}
|
259 |
-
|
260 |
-
@mixin read-mode {
|
261 |
-
border-color: transparent;
|
262 |
-
color: #777;
|
263 |
-
border-bottom: 1px dashed #ccc;
|
264 |
-
padding-left: 0;
|
265 |
-
background: none;
|
266 |
-
}
|
267 |
-
|
268 |
-
span {
|
269 |
-
font-weight: bold;
|
270 |
-
}
|
271 |
-
|
272 |
-
input, select {
|
273 |
-
@include placeholder(transparent);
|
274 |
-
|
275 |
-
display: block;
|
276 |
-
width: 100%;
|
277 |
-
margin-top: 5px;
|
278 |
-
|
279 |
-
&.fs-read-mode {
|
280 |
-
@include read-mode();
|
281 |
-
}
|
282 |
-
}
|
283 |
-
|
284 |
-
|
285 |
-
&.fs-read-mode {
|
286 |
-
td span {
|
287 |
-
display: none;
|
288 |
-
}
|
289 |
-
|
290 |
-
input, select
|
291 |
-
{
|
292 |
-
@include read-mode();
|
293 |
-
@include placeholder(#ccc);
|
294 |
-
}
|
295 |
-
}
|
296 |
-
|
297 |
-
|
298 |
-
button {
|
299 |
-
display: block;
|
300 |
-
width: 100%;
|
301 |
-
}
|
302 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/pum-sdk/freemius/assets/scss/admin/add-ons.scss
DELETED
@@ -1,449 +0,0 @@
|
|
1 |
-
@import "../start";
|
2 |
-
|
3 |
-
#fs_addons
|
4 |
-
{
|
5 |
-
.fs-cards-list
|
6 |
-
{
|
7 |
-
list-style: none;
|
8 |
-
|
9 |
-
.fs-card
|
10 |
-
{
|
11 |
-
float: left;
|
12 |
-
// height: 185px; // With reviews/ratings
|
13 |
-
height: 152px;
|
14 |
-
width: 310px;
|
15 |
-
padding: 0;
|
16 |
-
margin: 0 0 30px 30px;
|
17 |
-
font-size: 14px;
|
18 |
-
list-style: none;
|
19 |
-
border: 1px solid #ddd;
|
20 |
-
cursor: pointer;
|
21 |
-
position: relative;
|
22 |
-
|
23 |
-
.fs-overlay
|
24 |
-
{
|
25 |
-
position: absolute;
|
26 |
-
left: 0;
|
27 |
-
right: 0;
|
28 |
-
bottom: 0;
|
29 |
-
top: 0;
|
30 |
-
z-index: 9;
|
31 |
-
}
|
32 |
-
|
33 |
-
.fs-inner
|
34 |
-
{
|
35 |
-
background-color: #fff;
|
36 |
-
overflow: hidden;
|
37 |
-
height: 100%;
|
38 |
-
position: relative;
|
39 |
-
|
40 |
-
ul
|
41 |
-
{
|
42 |
-
@include transition(all, 0.15s);
|
43 |
-
left: 0;
|
44 |
-
right: 0;
|
45 |
-
top: 0;
|
46 |
-
position: absolute;
|
47 |
-
}
|
48 |
-
|
49 |
-
li
|
50 |
-
{
|
51 |
-
list-style: none;
|
52 |
-
line-height: 18px;
|
53 |
-
padding: 0 15px;
|
54 |
-
width: 100%;
|
55 |
-
display: block;
|
56 |
-
@include box-sizing(border-box);
|
57 |
-
}
|
58 |
-
|
59 |
-
.fs-card-banner
|
60 |
-
{
|
61 |
-
padding: 0;
|
62 |
-
margin: 0;
|
63 |
-
line-height: 0;
|
64 |
-
display: block;
|
65 |
-
height: 100px;
|
66 |
-
background-repeat: repeat-x;
|
67 |
-
background-size: 100% 100%;
|
68 |
-
@include transition(all, 0.15s);
|
69 |
-
}
|
70 |
-
|
71 |
-
.fs-title
|
72 |
-
{
|
73 |
-
margin: 10px 0 0 0;
|
74 |
-
height: 18px;
|
75 |
-
overflow: hidden;
|
76 |
-
color: #000;
|
77 |
-
white-space: nowrap;
|
78 |
-
text-overflow: ellipsis;
|
79 |
-
font-weight: bold;
|
80 |
-
}
|
81 |
-
|
82 |
-
.fs-offer
|
83 |
-
{
|
84 |
-
font-size: 0.9em;
|
85 |
-
}
|
86 |
-
|
87 |
-
.fs-description
|
88 |
-
{
|
89 |
-
background-color: #f9f9f9;
|
90 |
-
padding: 10px 15px 100px 15px;
|
91 |
-
border-top: 1px solid #eee;
|
92 |
-
margin: 0 0 10px 0;
|
93 |
-
color: #777;
|
94 |
-
}
|
95 |
-
|
96 |
-
.fs-tag
|
97 |
-
{
|
98 |
-
position: absolute;
|
99 |
-
top: 10px;
|
100 |
-
right: 0px;
|
101 |
-
background: greenyellow;
|
102 |
-
display: block;
|
103 |
-
padding: 2px 10px;
|
104 |
-
@include box-shadow(1px 1px 1px rgba(0,0,0,0.3));
|
105 |
-
text-transform: uppercase;
|
106 |
-
font-size: 0.9em;
|
107 |
-
font-weight: bold;
|
108 |
-
}
|
109 |
-
|
110 |
-
.fs-cta
|
111 |
-
{
|
112 |
-
.button
|
113 |
-
{
|
114 |
-
position: absolute;
|
115 |
-
top: 112px;
|
116 |
-
right: 10px;
|
117 |
-
}
|
118 |
-
}
|
119 |
-
}
|
120 |
-
|
121 |
-
@media screen and (min-width: 960px) {
|
122 |
-
&:hover
|
123 |
-
{
|
124 |
-
.fs-overlay
|
125 |
-
{
|
126 |
-
border: 2px solid $fms-link-color;
|
127 |
-
margin-left: -1px;
|
128 |
-
margin-top: -1px;
|
129 |
-
}
|
130 |
-
|
131 |
-
.fs-inner
|
132 |
-
{
|
133 |
-
ul
|
134 |
-
{
|
135 |
-
top: -100px;
|
136 |
-
}
|
137 |
-
|
138 |
-
.fs-card-banner
|
139 |
-
{
|
140 |
-
// background-position: 50% -100px;
|
141 |
-
}
|
142 |
-
|
143 |
-
.fs-title,
|
144 |
-
.fs-offer
|
145 |
-
{
|
146 |
-
color: $fms-link-color;
|
147 |
-
}
|
148 |
-
}
|
149 |
-
}
|
150 |
-
}
|
151 |
-
}
|
152 |
-
}
|
153 |
-
}
|
154 |
-
|
155 |
-
#TB_window
|
156 |
-
{
|
157 |
-
&, iframe
|
158 |
-
{
|
159 |
-
width: 772px !important;
|
160 |
-
}
|
161 |
-
}
|
162 |
-
|
163 |
-
#plugin-information
|
164 |
-
{
|
165 |
-
#section-description
|
166 |
-
{
|
167 |
-
h2, h3, p, b, i, blockquote, li, ul, ol
|
168 |
-
{
|
169 |
-
clear: none;
|
170 |
-
}
|
171 |
-
|
172 |
-
.fs-selling-points
|
173 |
-
{
|
174 |
-
padding-bottom: 10px;
|
175 |
-
border-bottom: 1px solid #ddd;
|
176 |
-
|
177 |
-
ul
|
178 |
-
{
|
179 |
-
margin: 0;
|
180 |
-
|
181 |
-
li
|
182 |
-
{
|
183 |
-
padding: 0;
|
184 |
-
list-style: none outside none;
|
185 |
-
|
186 |
-
i.dashicons
|
187 |
-
{
|
188 |
-
color: $fs-logo-green-color;
|
189 |
-
font-size: 3em;
|
190 |
-
vertical-align: middle;
|
191 |
-
line-height: 30px;
|
192 |
-
float: left;
|
193 |
-
margin: 0 0 0 -15px;
|
194 |
-
}
|
195 |
-
|
196 |
-
h3
|
197 |
-
{
|
198 |
-
margin: 1em 30px !important;
|
199 |
-
}
|
200 |
-
}
|
201 |
-
}
|
202 |
-
}
|
203 |
-
|
204 |
-
.fs-screenshots
|
205 |
-
{
|
206 |
-
@include clearfix();
|
207 |
-
ul
|
208 |
-
{
|
209 |
-
list-style: none;
|
210 |
-
margin: 0;
|
211 |
-
|
212 |
-
li
|
213 |
-
{
|
214 |
-
width: 225px;
|
215 |
-
height: 225px;
|
216 |
-
float: left;
|
217 |
-
margin-bottom: 20px;
|
218 |
-
@include box-sizing(content-box);
|
219 |
-
|
220 |
-
a
|
221 |
-
{
|
222 |
-
display: block;
|
223 |
-
width: 100%;
|
224 |
-
height: 100%;
|
225 |
-
border: 1px solid;
|
226 |
-
@include box-shadow(1px 1px 1px rgba(0, 0, 0, 0.2));
|
227 |
-
background-size: cover;
|
228 |
-
}
|
229 |
-
|
230 |
-
&.odd
|
231 |
-
{
|
232 |
-
margin-right: 20px;
|
233 |
-
}
|
234 |
-
}
|
235 |
-
}
|
236 |
-
}
|
237 |
-
}
|
238 |
-
|
239 |
-
.plugin-information-pricing
|
240 |
-
{
|
241 |
-
$pricing_color: #FFFEEC;
|
242 |
-
$borders_color: #DDD;
|
243 |
-
margin: -16px;
|
244 |
-
// padding: 20px;
|
245 |
-
border-bottom: 1px solid $borders_color;
|
246 |
-
|
247 |
-
.fs-plan
|
248 |
-
{
|
249 |
-
|
250 |
-
h3
|
251 |
-
{
|
252 |
-
margin-top: 0;
|
253 |
-
padding: 20px;
|
254 |
-
font-size: 16px;
|
255 |
-
}
|
256 |
-
|
257 |
-
.nav-tab-wrapper
|
258 |
-
{
|
259 |
-
border-bottom: 1px solid $borders_color;
|
260 |
-
|
261 |
-
.nav-tab
|
262 |
-
{
|
263 |
-
cursor: pointer;
|
264 |
-
position: relative;
|
265 |
-
padding: 0 10px;
|
266 |
-
font-size: 0.9em;
|
267 |
-
|
268 |
-
label
|
269 |
-
{
|
270 |
-
text-transform: uppercase;
|
271 |
-
color: green;
|
272 |
-
background: greenyellow;
|
273 |
-
position: absolute;
|
274 |
-
left: -1px;
|
275 |
-
right: -1px;
|
276 |
-
bottom: 100%;
|
277 |
-
border: 1px solid darkgreen;
|
278 |
-
padding: 2px;
|
279 |
-
text-align: center;
|
280 |
-
font-size: 0.9em;
|
281 |
-
line-height: 1em;
|
282 |
-
}
|
283 |
-
|
284 |
-
&.nav-tab-active
|
285 |
-
{
|
286 |
-
cursor: default;
|
287 |
-
background: $pricing_color;
|
288 |
-
border-bottom-color: $pricing_color;
|
289 |
-
}
|
290 |
-
}
|
291 |
-
}
|
292 |
-
|
293 |
-
&.fs-single-cycle
|
294 |
-
{
|
295 |
-
h3
|
296 |
-
{
|
297 |
-
background: $pricing_color;
|
298 |
-
margin: 0;
|
299 |
-
padding-bottom: 0;
|
300 |
-
color: #0073aa;
|
301 |
-
}
|
302 |
-
|
303 |
-
.nav-tab-wrapper,
|
304 |
-
.fs-billing-frequency
|
305 |
-
{
|
306 |
-
display: none;
|
307 |
-
}
|
308 |
-
}
|
309 |
-
|
310 |
-
.fs-pricing-body
|
311 |
-
{
|
312 |
-
background: $pricing_color;
|
313 |
-
padding: 20px;
|
314 |
-
}
|
315 |
-
|
316 |
-
.button
|
317 |
-
{
|
318 |
-
width: 100%;
|
319 |
-
text-align: center;
|
320 |
-
font-weight: bold;
|
321 |
-
text-transform: uppercase;
|
322 |
-
font-size: 1.1em;
|
323 |
-
}
|
324 |
-
|
325 |
-
label
|
326 |
-
{
|
327 |
-
white-space: nowrap;
|
328 |
-
}
|
329 |
-
|
330 |
-
var {
|
331 |
-
font-style: normal;
|
332 |
-
}
|
333 |
-
|
334 |
-
.fs-billing-frequency,
|
335 |
-
.fs-annual-discount
|
336 |
-
{
|
337 |
-
text-align: center;
|
338 |
-
display: block;
|
339 |
-
font-weight: bold;
|
340 |
-
margin-bottom: 10px;
|
341 |
-
text-transform: uppercase;
|
342 |
-
background: #F3F3F3;
|
343 |
-
padding: 2px;
|
344 |
-
border: 1px solid #ccc;
|
345 |
-
}
|
346 |
-
|
347 |
-
.fs-annual-discount
|
348 |
-
{
|
349 |
-
text-transform: none;
|
350 |
-
color: green;
|
351 |
-
background: greenyellow;
|
352 |
-
}
|
353 |
-
|
354 |
-
ul.fs-trial-terms
|
355 |
-
{
|
356 |
-
font-size: 0.9em;
|
357 |
-
|
358 |
-
i
|
359 |
-
{
|
360 |
-
float: left;
|
361 |
-
margin: 0 0 0 -15px;
|
362 |
-
}
|
363 |
-
|
364 |
-
li
|
365 |
-
{
|
366 |
-
margin: 10px 0 0 0;
|
367 |
-
}
|
368 |
-
}
|
369 |
-
}
|
370 |
-
}
|
371 |
-
|
372 |
-
#section-features
|
373 |
-
{
|
374 |
-
.fs-features
|
375 |
-
{
|
376 |
-
margin: -20px -26px;
|
377 |
-
}
|
378 |
-
|
379 |
-
table
|
380 |
-
{
|
381 |
-
width: 100%;
|
382 |
-
border-spacing: 0;
|
383 |
-
border-collapse: separate;
|
384 |
-
|
385 |
-
thead
|
386 |
-
{
|
387 |
-
th
|
388 |
-
{
|
389 |
-
padding: 10px 0;
|
390 |
-
}
|
391 |
-
|
392 |
-
.fs-price
|
393 |
-
{
|
394 |
-
color: $fs-logo-green-color;
|
395 |
-
font-weight: normal;
|
396 |
-
display: block;
|
397 |
-
text-align: center;
|
398 |
-
}
|
399 |
-
}
|
400 |
-
|
401 |
-
tbody
|
402 |
-
{
|
403 |
-
td
|
404 |
-
{
|
405 |
-
border-top: 1px solid #ccc;
|
406 |
-
padding: 10px 0;
|
407 |
-
text-align: center;
|
408 |
-
width: 100px;
|
409 |
-
color: $fs-logo-green-color;
|
410 |
-
|
411 |
-
&:first-child
|
412 |
-
{
|
413 |
-
text-align: left;
|
414 |
-
width: auto;
|
415 |
-
color: inherit;
|
416 |
-
padding-left: 26px;
|
417 |
-
}
|
418 |
-
}
|
419 |
-
tr.fs-odd
|
420 |
-
{
|
421 |
-
td
|
422 |
-
{
|
423 |
-
background: #fefefe;
|
424 |
-
}
|
425 |
-
}
|
426 |
-
}
|
427 |
-
}
|
428 |
-
|
429 |
-
.dashicons-yes
|
430 |
-
{
|
431 |
-
width: 30px;
|
432 |
-
height: 30px;
|
433 |
-
font-size: 30px;
|
434 |
-
}
|
435 |
-
}
|
436 |
-
}
|
437 |
-
|
438 |
-
@media screen and (max-width: 961px) {
|
439 |
-
#fs_addons
|
440 |
-
{
|
441 |
-
.fs-cards-list
|
442 |
-
{
|
443 |
-
.fs-card
|
444 |
-
{
|
445 |
-
height: 265px;
|
446 |
-
}
|
447 |
-
}
|
448 |
-
}
|
449 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/pum-sdk/freemius/assets/scss/admin/affiliation.scss
DELETED
@@ -1,97 +0,0 @@
|
|
1 |
-
@import "../start";
|
2 |
-
|
3 |
-
#fs_affiliation_content_wrapper {
|
4 |
-
#messages {
|
5 |
-
margin-top: 25px;
|
6 |
-
}
|
7 |
-
|
8 |
-
h3 {
|
9 |
-
font-size: 24px;
|
10 |
-
padding: 0;
|
11 |
-
margin-left: 0;
|
12 |
-
}
|
13 |
-
|
14 |
-
ul {
|
15 |
-
li {
|
16 |
-
@include box-sizing(border-box);
|
17 |
-
list-style-type: none;
|
18 |
-
|
19 |
-
&:before {
|
20 |
-
content: '✓';
|
21 |
-
margin-right: 10px;
|
22 |
-
font-weight: bold;
|
23 |
-
}
|
24 |
-
}
|
25 |
-
}
|
26 |
-
|
27 |
-
p:not(.description), li, label {
|
28 |
-
font-size: 16px !important;
|
29 |
-
line-height: 26px !important;
|
30 |
-
}
|
31 |
-
|
32 |
-
.button {
|
33 |
-
margin-top: 20px;
|
34 |
-
margin-bottom: 7px;
|
35 |
-
line-height: 35px;
|
36 |
-
height: 40px;
|
37 |
-
font-size: 16px;
|
38 |
-
|
39 |
-
&#cancel_button {
|
40 |
-
margin-right: 5px;
|
41 |
-
}
|
42 |
-
}
|
43 |
-
|
44 |
-
form {
|
45 |
-
.input-container {
|
46 |
-
.input-label {
|
47 |
-
font-weight: bold;
|
48 |
-
display: block;
|
49 |
-
width: 100%;
|
50 |
-
}
|
51 |
-
|
52 |
-
&.input-container-text {
|
53 |
-
label, input, textarea {
|
54 |
-
display: block;
|
55 |
-
}
|
56 |
-
}
|
57 |
-
|
58 |
-
margin-bottom: 15px;
|
59 |
-
|
60 |
-
#add_domain, .remove-domain {
|
61 |
-
text-decoration: none;
|
62 |
-
display: inline-block;
|
63 |
-
margin-top: 3px;
|
64 |
-
|
65 |
-
&:focus {
|
66 |
-
box-shadow: none;
|
67 |
-
}
|
68 |
-
|
69 |
-
&.disabled {
|
70 |
-
color: #aaa;
|
71 |
-
cursor: default;
|
72 |
-
}
|
73 |
-
}
|
74 |
-
}
|
75 |
-
|
76 |
-
#extra_domains_container {
|
77 |
-
.description {
|
78 |
-
margin-top: 0;
|
79 |
-
position: relative;
|
80 |
-
top: -4px;
|
81 |
-
}
|
82 |
-
|
83 |
-
.extra-domain-input-container {
|
84 |
-
margin-bottom: 15px;
|
85 |
-
|
86 |
-
.domain {
|
87 |
-
display: inline-block;
|
88 |
-
margin-right: 5px;
|
89 |
-
|
90 |
-
&:last-of-type {
|
91 |
-
margin-bottom: 0;
|
92 |
-
}
|
93 |
-
}
|
94 |
-
}
|
95 |
-
}
|
96 |
-
}
|
97 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/pum-sdk/freemius/assets/scss/admin/checkout.scss
DELETED
@@ -1,5 +0,0 @@
|
|
1 |
-
@media screen and (max-width: 782px) {
|
2 |
-
#wpbody-content {
|
3 |
-
padding-bottom: 0 !important;
|
4 |
-
}
|
5 |
-
}
|
|
|
|
|
|
|
|
|
|
includes/pum-sdk/freemius/assets/scss/admin/common.scss
DELETED
@@ -1,220 +0,0 @@
|
|
1 |
-
@import "../start";
|
2 |
-
@import "themes";
|
3 |
-
|
4 |
-
#fs_frame
|
5 |
-
{
|
6 |
-
line-height: 0;
|
7 |
-
font-size: 0;
|
8 |
-
}
|
9 |
-
|
10 |
-
.fs-full-size-wrapper
|
11 |
-
{
|
12 |
-
margin: 40px 0 -65px -20px;
|
13 |
-
|
14 |
-
@media (max-width: 600px) {
|
15 |
-
margin: 0 0 -65px -10px;
|
16 |
-
}
|
17 |
-
}
|
18 |
-
|
19 |
-
.fs-notice
|
20 |
-
{
|
21 |
-
position: relative;
|
22 |
-
|
23 |
-
&.fs-has-title
|
24 |
-
{
|
25 |
-
margin-bottom: 30px !important;
|
26 |
-
}
|
27 |
-
|
28 |
-
&.success
|
29 |
-
{
|
30 |
-
color: green;
|
31 |
-
// font-weight: normal;
|
32 |
-
}
|
33 |
-
|
34 |
-
&.promotion
|
35 |
-
{
|
36 |
-
border-color: $fs-notice-promotion-border-color !important;
|
37 |
-
background-color: $fs-notice-promotion-bkg !important;
|
38 |
-
}
|
39 |
-
|
40 |
-
.fs-notice-body
|
41 |
-
{
|
42 |
-
margin: .5em 0;
|
43 |
-
padding: 2px;
|
44 |
-
}
|
45 |
-
|
46 |
-
.fs-close
|
47 |
-
{
|
48 |
-
// position: absolute;
|
49 |
-
// top: 2px;
|
50 |
-
// bottom: 2px;
|
51 |
-
// right: 2px;
|
52 |
-
// min-width: 100px;
|
53 |
-
// text-align: center;
|
54 |
-
// padding-right: 2px;
|
55 |
-
cursor: pointer;
|
56 |
-
color: #aaa;
|
57 |
-
float: right;
|
58 |
-
|
59 |
-
&:hover
|
60 |
-
{
|
61 |
-
color: #666;
|
62 |
-
// background: #A9A9A9;
|
63 |
-
}
|
64 |
-
|
65 |
-
> *
|
66 |
-
{
|
67 |
-
margin-top: 7px;
|
68 |
-
display: inline-block;
|
69 |
-
}
|
70 |
-
}
|
71 |
-
|
72 |
-
label.fs-plugin-title
|
73 |
-
{
|
74 |
-
background: rgba(0, 0, 0, 0.3);
|
75 |
-
color: #fff;
|
76 |
-
padding: 2px 10px;
|
77 |
-
position: absolute;
|
78 |
-
top: 100%;
|
79 |
-
bottom: auto;
|
80 |
-
right: auto;
|
81 |
-
@include border-radius(0 0 3px 3px);
|
82 |
-
left: 10px;
|
83 |
-
font-size: 12px;
|
84 |
-
font-weight: bold;
|
85 |
-
cursor: auto;
|
86 |
-
}
|
87 |
-
}
|
88 |
-
|
89 |
-
div.fs-notice
|
90 |
-
{
|
91 |
-
&.updated,
|
92 |
-
&.success,
|
93 |
-
&.promotion
|
94 |
-
{
|
95 |
-
display: block !important;
|
96 |
-
}
|
97 |
-
}
|
98 |
-
|
99 |
-
.rtl .fs-notice
|
100 |
-
{
|
101 |
-
.fs-close
|
102 |
-
{
|
103 |
-
// left: 2px;
|
104 |
-
// right: auto;
|
105 |
-
// padding-right: 0;
|
106 |
-
// padding-left: 2px;
|
107 |
-
float: left;
|
108 |
-
}
|
109 |
-
}
|
110 |
-
|
111 |
-
.fs-secure-notice
|
112 |
-
{
|
113 |
-
position: fixed;
|
114 |
-
top: 32px;
|
115 |
-
left: 160px;
|
116 |
-
right: 0;
|
117 |
-
background: rgb(235, 253, 235);
|
118 |
-
padding: 10px 20px;
|
119 |
-
color: green;
|
120 |
-
z-index: 9999;
|
121 |
-
@include box-shadow(0 2px 2px rgba(6, 113, 6, 0.3));
|
122 |
-
@include opacity(0.95);
|
123 |
-
|
124 |
-
&:hover
|
125 |
-
{
|
126 |
-
@include opacity(1);
|
127 |
-
}
|
128 |
-
|
129 |
-
a.fs-security-proof
|
130 |
-
{
|
131 |
-
color: green;
|
132 |
-
text-decoration: none;
|
133 |
-
}
|
134 |
-
}
|
135 |
-
|
136 |
-
@media screen and (max-width: 960px) {
|
137 |
-
.fs-secure-notice
|
138 |
-
{
|
139 |
-
left: 36px;
|
140 |
-
}
|
141 |
-
}
|
142 |
-
|
143 |
-
@media screen and (max-width: 600px) {
|
144 |
-
.fs-secure-notice
|
145 |
-
{
|
146 |
-
display: none;
|
147 |
-
}
|
148 |
-
}
|
149 |
-
|
150 |
-
@media screen and (max-width: 500px) {
|
151 |
-
#fs_promo_tab
|
152 |
-
{
|
153 |
-
display: none;
|
154 |
-
}
|
155 |
-
}
|
156 |
-
|
157 |
-
@media screen and (max-width: 782px) {
|
158 |
-
.fs-secure-notice
|
159 |
-
{
|
160 |
-
left: 0;
|
161 |
-
top: 46px;
|
162 |
-
text-align: center;
|
163 |
-
}
|
164 |
-
}
|
165 |
-
|
166 |
-
span.fs-submenu-item.fs-sub:before
|
167 |
-
{
|
168 |
-
// Add small arrow.
|
169 |
-
content: '\21B3';
|
170 |
-
padding: 0 5px;
|
171 |
-
}
|
172 |
-
|
173 |
-
.rtl
|
174 |
-
{
|
175 |
-
span.fs-submenu-item.fs-sub:before
|
176 |
-
{
|
177 |
-
// Add small RTL arrow.
|
178 |
-
content: '\21B2';
|
179 |
-
}
|
180 |
-
}
|
181 |
-
|
182 |
-
.fs-submenu-item
|
183 |
-
{
|
184 |
-
&.pricing
|
185 |
-
{
|
186 |
-
&.upgrade-mode
|
187 |
-
{
|
188 |
-
color: greenyellow;
|
189 |
-
}
|
190 |
-
|
191 |
-
&.trial-mode
|
192 |
-
{
|
193 |
-
color: #83e2ff;
|
194 |
-
}
|
195 |
-
}
|
196 |
-
}
|
197 |
-
|
198 |
-
#adminmenu .update-plugins.fs-trial
|
199 |
-
{
|
200 |
-
background-color: #00b9eb;
|
201 |
-
}
|
202 |
-
.fs-ajax-spinner
|
203 |
-
{
|
204 |
-
border: 0;
|
205 |
-
width: 20px;
|
206 |
-
height: 20px;
|
207 |
-
margin-right: 5px;
|
208 |
-
vertical-align: sub;
|
209 |
-
display: inline-block;
|
210 |
-
background: url('/wp-admin/images/wpspin_light-2x.gif');
|
211 |
-
background-size: contain;
|
212 |
-
}
|
213 |
-
|
214 |
-
.wrap.fs-section {
|
215 |
-
h2 {
|
216 |
-
text-align: left;
|
217 |
-
}
|
218 |
-
}
|
219 |
-
|
220 |
-
@import "plugin-upgrade-notice";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/pum-sdk/freemius/assets/scss/admin/connect.scss
DELETED
@@ -1,548 +0,0 @@
|
|
1 |
-
@import "../start";
|
2 |
-
|
3 |
-
$form_width: 480px;
|
4 |
-
|
5 |
-
#fs_connect
|
6 |
-
{
|
7 |
-
width: $form_width;
|
8 |
-
@include box-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));
|
9 |
-
margin: 20px 0;
|
10 |
-
|
11 |
-
@media screen and (max-width: ($form_width - 1)) {
|
12 |
-
@include box-shadow(none);
|
13 |
-
width: auto;
|
14 |
-
margin: 0 0 0 -10px;
|
15 |
-
}
|
16 |
-
|
17 |
-
.fs-content
|
18 |
-
{
|
19 |
-
background: #fff;
|
20 |
-
padding: 15px 20px;
|
21 |
-
|
22 |
-
.fs-error {
|
23 |
-
background: snow;
|
24 |
-
color: $fs-logo-magenta-color;
|
25 |
-
border: 1px solid $fs-logo-magenta-color;
|
26 |
-
@include box-shadow(0 1px 1px 0 rgba(0,0,0,.1));
|
27 |
-
text-align: center;
|
28 |
-
padding: 5px;
|
29 |
-
margin-bottom: 10px;
|
30 |
-
}
|
31 |
-
|
32 |
-
p
|
33 |
-
{
|
34 |
-
margin: 0;
|
35 |
-
padding: 0;
|
36 |
-
font-size: 1.2em;
|
37 |
-
}
|
38 |
-
}
|
39 |
-
|
40 |
-
.fs-license-key-container {
|
41 |
-
position: relative;
|
42 |
-
width: 280px;
|
43 |
-
margin: 10px auto 0 auto;
|
44 |
-
|
45 |
-
input {
|
46 |
-
width: 100%;
|
47 |
-
}
|
48 |
-
|
49 |
-
.dashicons {
|
50 |
-
position: absolute;
|
51 |
-
top: 5px;
|
52 |
-
right: 5px;
|
53 |
-
}
|
54 |
-
}
|
55 |
-
|
56 |
-
&.require-license-key {
|
57 |
-
#sites_list_container {
|
58 |
-
td {
|
59 |
-
cursor: pointer;
|
60 |
-
}
|
61 |
-
}
|
62 |
-
}
|
63 |
-
|
64 |
-
#delegate_to_site_admins {
|
65 |
-
margin-right: 15px;
|
66 |
-
float: right;
|
67 |
-
height: 26px;
|
68 |
-
vertical-align: middle;
|
69 |
-
line-height: 37px;
|
70 |
-
font-weight: bold;
|
71 |
-
border-bottom: 1px dashed;
|
72 |
-
text-decoration: none;
|
73 |
-
|
74 |
-
&.rtl {
|
75 |
-
margin-left: 15px;
|
76 |
-
margin-right: 0;
|
77 |
-
}
|
78 |
-
}
|
79 |
-
|
80 |
-
.fs-actions
|
81 |
-
{
|
82 |
-
padding: 10px 20px;
|
83 |
-
background: #C0C7CA;
|
84 |
-
|
85 |
-
.button
|
86 |
-
{
|
87 |
-
padding: 0 10px 1px;
|
88 |
-
line-height: 35px;
|
89 |
-
height: 37px;
|
90 |
-
font-size: 16px;
|
91 |
-
margin-bottom: 0;
|
92 |
-
|
93 |
-
.dashicons
|
94 |
-
{
|
95 |
-
font-size: 37px;
|
96 |
-
margin-left: -8px;
|
97 |
-
margin-right: 12px;
|
98 |
-
}
|
99 |
-
|
100 |
-
&.button-primary
|
101 |
-
{
|
102 |
-
padding-right: 15px;
|
103 |
-
padding-left: 15px;
|
104 |
-
|
105 |
-
&:after
|
106 |
-
{
|
107 |
-
content: ' \279C';
|
108 |
-
}
|
109 |
-
|
110 |
-
&.fs-loading
|
111 |
-
{
|
112 |
-
&:after
|
113 |
-
{
|
114 |
-
content: '';
|
115 |
-
}
|
116 |
-
}
|
117 |
-
}
|
118 |
-
|
119 |
-
&.button-secondary
|
120 |
-
{
|
121 |
-
float: right;
|
122 |
-
}
|
123 |
-
}
|
124 |
-
|
125 |
-
// .fs-skip
|
126 |
-
// {
|
127 |
-
// line-height: 38px;
|
128 |
-
// vertical-align: middle;
|
129 |
-
// text-decoration: none;
|
130 |
-
// margin-left: 10px;
|
131 |
-
// }
|
132 |
-
}
|
133 |
-
|
134 |
-
&.fs-anonymous-disabled
|
135 |
-
{
|
136 |
-
.fs-actions
|
137 |
-
{
|
138 |
-
.button.button-primary
|
139 |
-
{
|
140 |
-
width: 100%;
|
141 |
-
}
|
142 |
-
}
|
143 |
-
}
|
144 |
-
|
145 |
-
.fs-permissions
|
146 |
-
{
|
147 |
-
padding: 10px 20px;
|
148 |
-
background: #FEFEFE;
|
149 |
-
// background: #F1F1F1;
|
150 |
-
@include transition(background 0.5s ease);
|
151 |
-
|
152 |
-
.fs-license-sync-disclaimer {
|
153 |
-
text-align: center;
|
154 |
-
margin-top: 0;
|
155 |
-
}
|
156 |
-
|
157 |
-
.fs-trigger
|
158 |
-
{
|
159 |
-
font-size: 0.9em;
|
160 |
-
text-decoration: none;
|
161 |
-
text-align: center;
|
162 |
-
display: block;
|
163 |
-
}
|
164 |
-
|
165 |
-
ul
|
166 |
-
{
|
167 |
-
height: 0;
|
168 |
-
overflow: hidden;
|
169 |
-
margin: 0;
|
170 |
-
|
171 |
-
li
|
172 |
-
{
|
173 |
-
margin-bottom: 12px;
|
174 |
-
|
175 |
-
&:last-child
|
176 |
-
{
|
177 |
-
margin-bottom: 0;
|
178 |
-
}
|
179 |
-
|
180 |
-
i.dashicons
|
181 |
-
{
|
182 |
-
float: left;
|
183 |
-
font-size: 40px;
|
184 |
-
width: 40px;
|
185 |
-
height: 40px;
|
186 |
-
}
|
187 |
-
|
188 |
-
div
|
189 |
-
{
|
190 |
-
margin-left: 55px;
|
191 |
-
|
192 |
-
span
|
193 |
-
{
|
194 |
-
font-weight: bold;
|
195 |
-
text-transform: uppercase;
|
196 |
-
color: #23282d;
|
197 |
-
}
|
198 |
-
|
199 |
-
p
|
200 |
-
{
|
201 |
-
margin: 2px 0 0 0;
|
202 |
-
}
|
203 |
-
}
|
204 |
-
}
|
205 |
-
}
|
206 |
-
|
207 |
-
&.fs-open
|
208 |
-
{
|
209 |
-
background: #fff;
|
210 |
-
|
211 |
-
ul
|
212 |
-
{
|
213 |
-
height: auto;
|
214 |
-
margin: 20px 20px 10px 20px;
|
215 |
-
}
|
216 |
-
}
|
217 |
-
|
218 |
-
@media screen and (max-width: ($form_width - 1)) {
|
219 |
-
background: #fff;
|
220 |
-
|
221 |
-
.fs-trigger
|
222 |
-
{
|
223 |
-
display: none;
|
224 |
-
}
|
225 |
-
|
226 |
-
ul
|
227 |
-
{
|
228 |
-
height: auto;
|
229 |
-
margin: 20px;
|
230 |
-
}
|
231 |
-
}
|
232 |
-
}
|
233 |
-
|
234 |
-
.fs-freemium-licensing {
|
235 |
-
padding: 8px;
|
236 |
-
// background: #0085BA;
|
237 |
-
background: #777;
|
238 |
-
color: #fff;
|
239 |
-
|
240 |
-
p {
|
241 |
-
text-align: center;
|
242 |
-
display: block;
|
243 |
-
margin: 0;
|
244 |
-
padding: 0;
|
245 |
-
}
|
246 |
-
|
247 |
-
a {
|
248 |
-
color: #C2EEFF;
|
249 |
-
text-decoration: underline;
|
250 |
-
}
|
251 |
-
}
|
252 |
-
|
253 |
-
$icon_size: 80px;
|
254 |
-
$wp_logo_padding: $icon_size / 10;
|
255 |
-
$icons_top: 10px;
|
256 |
-
|
257 |
-
.fs-visual
|
258 |
-
{
|
259 |
-
padding: 12px;
|
260 |
-
line-height: 0;
|
261 |
-
background: #fafafa;
|
262 |
-
height: $icon_size;
|
263 |
-
position: relative;
|
264 |
-
|
265 |
-
.fs-site-icon
|
266 |
-
{
|
267 |
-
position: absolute;
|
268 |
-
left: 20px;
|
269 |
-
top: $icons_top;
|
270 |
-
}
|
271 |
-
|
272 |
-
.fs-connect-logo
|
273 |
-
{
|
274 |
-
position: absolute;
|
275 |
-
right: 20px;
|
276 |
-
top: $icons_top;
|
277 |
-
}
|
278 |
-
|
279 |
-
.fs-plugin-icon
|
280 |
-
{
|
281 |
-
position: absolute;
|
282 |
-
top: $icons_top;
|
283 |
-
left: 50%;
|
284 |
-
margin-left: - ($icon_size / 2);
|
285 |
-
}
|
286 |
-
|
287 |
-
.fs-plugin-icon,
|
288 |
-
.fs-site-icon,
|
289 |
-
img,
|
290 |
-
object
|
291 |
-
{
|
292 |
-
width: $icon_size;
|
293 |
-
height: $icon_size;
|
294 |
-
}
|
295 |
-
|
296 |
-
.dashicons-wordpress
|
297 |
-
{
|
298 |
-
font-size: $icon_size - ($wp_logo_padding * 2);
|
299 |
-
background: $wordpress_color;
|
300 |
-
color: #fff;
|
301 |
-
width: $icon_size - ($wp_logo_padding * 2);
|
302 |
-
height: $icon_size - ($wp_logo_padding * 2);
|
303 |
-
padding: $wp_logo_padding;
|
304 |
-
}
|
305 |
-
|
306 |
-
.dashicons-plus
|
307 |
-
{
|
308 |
-
position: absolute;
|
309 |
-
top: 50%;
|
310 |
-
font-size: 30px;
|
311 |
-
margin-top: -10px;
|
312 |
-
color: #bbb;
|
313 |
-
|
314 |
-
&.fs-first
|
315 |
-
{
|
316 |
-
left: 28%;
|
317 |
-
}
|
318 |
-
&.fs-second
|
319 |
-
{
|
320 |
-
left: 65%;
|
321 |
-
}
|
322 |
-
}
|
323 |
-
|
324 |
-
.fs-plugin-icon,
|
325 |
-
.fs-connect-logo,
|
326 |
-
.fs-site-icon
|
327 |
-
{
|
328 |
-
border: 1px solid #ccc;
|
329 |
-
padding: 1px;
|
330 |
-
background: #fff;
|
331 |
-
}
|
332 |
-
}
|
333 |
-
|
334 |
-
.fs-terms
|
335 |
-
{
|
336 |
-
text-align: center;
|
337 |
-
font-size: 0.85em;
|
338 |
-
padding: 5px;
|
339 |
-
background: rgba(0, 0, 0, 0.05);
|
340 |
-
|
341 |
-
&, a
|
342 |
-
{
|
343 |
-
color: #999;
|
344 |
-
}
|
345 |
-
|
346 |
-
a
|
347 |
-
{
|
348 |
-
text-decoration: none;
|
349 |
-
}
|
350 |
-
}
|
351 |
-
}
|
352 |
-
|
353 |
-
@import "multisite-options";
|
354 |
-
@import "tooltip";
|
355 |
-
@import "gdpr-consent";
|
356 |
-
|
357 |
-
.rtl
|
358 |
-
{
|
359 |
-
#fs_connect
|
360 |
-
{
|
361 |
-
.fs-actions
|
362 |
-
{
|
363 |
-
padding: 10px 20px;
|
364 |
-
background: #C0C7CA;
|
365 |
-
|
366 |
-
.button
|
367 |
-
{
|
368 |
-
.dashicons
|
369 |
-
{
|
370 |
-
font-size: 37px;
|
371 |
-
margin-left: -8px;
|
372 |
-
margin-right: 12px;
|
373 |
-
}
|
374 |
-
|
375 |
-
&.button-primary
|
376 |
-
{
|
377 |
-
&:after
|
378 |
-
{
|
379 |
-
content: ' \000bb';
|
380 |
-
}
|
381 |
-
|
382 |
-
&.fs-loading
|
383 |
-
{
|
384 |
-
&:after
|
385 |
-
{
|
386 |
-
content: '';
|
387 |
-
}
|
388 |
-
}
|
389 |
-
}
|
390 |
-
|
391 |
-
&.button-secondary
|
392 |
-
{
|
393 |
-
float: left;
|
394 |
-
}
|
395 |
-
}
|
396 |
-
}
|
397 |
-
|
398 |
-
.fs-permissions
|
399 |
-
{
|
400 |
-
ul
|
401 |
-
{
|
402 |
-
li
|
403 |
-
{
|
404 |
-
div
|
405 |
-
{
|
406 |
-
margin-right: 55px;
|
407 |
-
margin-left: 0;
|
408 |
-
}
|
409 |
-
|
410 |
-
i.dashicons
|
411 |
-
{
|
412 |
-
float: right;
|
413 |
-
}
|
414 |
-
|
415 |
-
}
|
416 |
-
}
|
417 |
-
}
|
418 |
-
|
419 |
-
.fs-visual
|
420 |
-
{
|
421 |
-
.fs-site-icon
|
422 |
-
{
|
423 |
-
right: 20px;
|
424 |
-
left: auto;
|
425 |
-
}
|
426 |
-
|
427 |
-
.fs-connect-logo
|
428 |
-
{
|
429 |
-
right: auto;
|
430 |
-
left: 20px;
|
431 |
-
}
|
432 |
-
}
|
433 |
-
}
|
434 |
-
}
|
435 |
-
|
436 |
-
#fs_theme_connect_wrapper {
|
437 |
-
position: fixed;
|
438 |
-
top: 0;
|
439 |
-
height: 100%;
|
440 |
-
width: 100%;
|
441 |
-
z-index: 99990;
|
442 |
-
background: rgba(0, 0, 0, 0.75);
|
443 |
-
text-align: center;
|
444 |
-
overflow-y: auto;
|
445 |
-
|
446 |
-
&:before {
|
447 |
-
content: "";
|
448 |
-
display: inline-block;
|
449 |
-
vertical-align: middle;
|
450 |
-
height: 100%;
|
451 |
-
}
|
452 |
-
|
453 |
-
> button.close {
|
454 |
-
color: white;
|
455 |
-
cursor: pointer;
|
456 |
-
height: 40px;
|
457 |
-
width: 40px;
|
458 |
-
position: absolute;
|
459 |
-
right: 0;
|
460 |
-
border: 0;
|
461 |
-
background-color: transparent;
|
462 |
-
top: 32px;
|
463 |
-
}
|
464 |
-
|
465 |
-
#fs_connect {
|
466 |
-
top: 0;
|
467 |
-
text-align: left;
|
468 |
-
display: inline-block;
|
469 |
-
vertical-align: middle;
|
470 |
-
margin-top: 52px;
|
471 |
-
margin-bottom: 20px;
|
472 |
-
|
473 |
-
.fs-terms
|
474 |
-
{
|
475 |
-
background: rgba(140, 140, 140, 0.64);
|
476 |
-
|
477 |
-
&, a
|
478 |
-
{
|
479 |
-
color: #c5c5c5;
|
480 |
-
}
|
481 |
-
}
|
482 |
-
}
|
483 |
-
}
|
484 |
-
|
485 |
-
.wp-pointer-content
|
486 |
-
{
|
487 |
-
#fs_connect
|
488 |
-
{
|
489 |
-
margin: 0;
|
490 |
-
@include box-shadow(none);
|
491 |
-
}
|
492 |
-
}
|
493 |
-
|
494 |
-
.fs-opt-in-pointer
|
495 |
-
{
|
496 |
-
.wp-pointer-content
|
497 |
-
{
|
498 |
-
padding: 0;
|
499 |
-
}
|
500 |
-
|
501 |
-
&.wp-pointer-top
|
502 |
-
{
|
503 |
-
.wp-pointer-arrow
|
504 |
-
{
|
505 |
-
border-bottom-color: #dfdfdf;
|
506 |
-
}
|
507 |
-
.wp-pointer-arrow-inner
|
508 |
-
{
|
509 |
-
border-bottom-color: #fafafa;
|
510 |
-
}
|
511 |
-
}
|
512 |
-
|
513 |
-
&.wp-pointer-bottom
|
514 |
-
{
|
515 |
-
.wp-pointer-arrow
|
516 |
-
{
|
517 |
-
border-top-color: #dfdfdf;
|
518 |
-
}
|
519 |
-
.wp-pointer-arrow-inner
|
520 |
-
{
|
521 |
-
border-top-color: #fafafa;
|
522 |
-
}
|
523 |
-
}
|
524 |
-
|
525 |
-
&.wp-pointer-left
|
526 |
-
{
|
527 |
-
.wp-pointer-arrow
|
528 |
-
{
|
529 |
-
border-right-color: #dfdfdf;
|
530 |
-
}
|
531 |
-
.wp-pointer-arrow-inner
|
532 |
-
{
|
533 |
-
border-right-color: #fafafa;
|
534 |
-
}
|
535 |
-
}
|
536 |
-
|
537 |
-
&.wp-pointer-right
|
538 |
-
{
|
539 |
-
.wp-pointer-arrow
|
540 |
-
{
|
541 |
-
border-left-color: #dfdfdf;
|
542 |
-
}
|
543 |
-
.wp-pointer-arrow-inner
|
544 |
-
{
|
545 |
-
border-left-color: #fafafa;
|
546 |
-
}
|
547 |
-
}
|
548 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/pum-sdk/freemius/assets/scss/admin/debug.scss
DELETED
@@ -1,135 +0,0 @@
|
|
1 |
-
@import "../start";
|
2 |
-
|
3 |
-
.switch
|
4 |
-
{
|
5 |
-
position: relative;
|
6 |
-
display: inline-block;
|
7 |
-
font-size: 1.6em;
|
8 |
-
font-weight: bold;
|
9 |
-
color: #ccc;
|
10 |
-
text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.8);
|
11 |
-
height: 18px;
|
12 |
-
padding: 6px 6px 5px 6px;
|
13 |
-
border: 1px solid #ccc;
|
14 |
-
border: 1px solid rgba(0, 0, 0, 0.2);
|
15 |
-
border-radius: 4px;
|
16 |
-
background: #ececec;
|
17 |
-
box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.1), inset 0px 1px 3px 0px rgba(0, 0, 0, 0.1);
|
18 |
-
cursor: pointer;
|
19 |
-
|
20 |
-
span
|
21 |
-
{
|
22 |
-
display: inline-block; width: 35px;
|
23 |
-
text-transform: uppercase;
|
24 |
-
|
25 |
-
&.on
|
26 |
-
{
|
27 |
-
color: $button-primary-bkg;
|
28 |
-
}
|
29 |
-
}
|
30 |
-
|
31 |
-
.toggle
|
32 |
-
{
|
33 |
-
position: absolute;
|
34 |
-
top: 1px;
|
35 |
-
width: 37px;
|
36 |
-
height: 25px;
|
37 |
-
border: 1px solid #ccc;
|
38 |
-
border: 1px solid rgba(0, 0, 0, 0.3);
|
39 |
-
border-radius: 4px;
|
40 |
-
background: #fff;
|
41 |
-
background: -moz-linear-gradient(top, #ececec 0%, #fff 100%);
|
42 |
-
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ececec), color-stop(100%, #fff));
|
43 |
-
background: -webkit-linear-gradient(top, #ececec 0%, #fff 100%);
|
44 |
-
background: -o-linear-gradient(top, #ececec 0%, #fff 100%);
|
45 |
-
background: -ms-linear-gradient(top, #ececec 0%, #fff 100%);
|
46 |
-
background: linear-gradient(top, #ececec 0%, #fff 100%);
|
47 |
-
box-shadow: inset 0px 1px 0px 0px rgba(255, 255, 255, 0.5);
|
48 |
-
z-index: 999;
|
49 |
-
@include transition(all 0.15s ease-in-out);
|
50 |
-
}
|
51 |
-
|
52 |
-
&.on .toggle
|
53 |
-
{
|
54 |
-
left: 2%;
|
55 |
-
}
|
56 |
-
&.off .toggle
|
57 |
-
{
|
58 |
-
left: 54%;
|
59 |
-
}
|
60 |
-
|
61 |
-
/* Round switch */
|
62 |
-
&.round
|
63 |
-
{
|
64 |
-
padding: 0px 20px;
|
65 |
-
border-radius: 40px;
|
66 |
-
|
67 |
-
.toggle
|
68 |
-
{
|
69 |
-
border-radius: 40px;
|
70 |
-
width: 14px;
|
71 |
-
height: 14px;
|
72 |
-
}
|
73 |
-
|
74 |
-
&.on .toggle
|
75 |
-
{
|
76 |
-
left: 3%;
|
77 |
-
background: $button-primary-bkg;
|
78 |
-
}
|
79 |
-
&.off .toggle
|
80 |
-
{
|
81 |
-
left: 58%;
|
82 |
-
}
|
83 |
-
}
|
84 |
-
}
|
85 |
-
|
86 |
-
.switch-label
|
87 |
-
{
|
88 |
-
font-size: 20px;
|
89 |
-
line-height: 31px;
|
90 |
-
margin: 0 5px;
|
91 |
-
}
|
92 |
-
|
93 |
-
#fs_log_book {
|
94 |
-
table {
|
95 |
-
font-family: Consolas,Monaco,monospace;
|
96 |
-
font-size: 12px;
|
97 |
-
|
98 |
-
th {
|
99 |
-
color: #ccc;
|
100 |
-
}
|
101 |
-
|
102 |
-
tr {
|
103 |
-
background: #232525;
|
104 |
-
|
105 |
-
&.alternate {
|
106 |
-
background: #2b2b2b;
|
107 |
-
}
|
108 |
-
|
109 |
-
td {
|
110 |
-
&.fs-col--logger {
|
111 |
-
color: #5a7435;
|
112 |
-
}
|
113 |
-
&.fs-col--type {
|
114 |
-
color: #ffc861;
|
115 |
-
}
|
116 |
-
&.fs-col--function {
|
117 |
-
color: #a7b7b1;
|
118 |
-
font-weight: bold;
|
119 |
-
}
|
120 |
-
&.fs-col--message {
|
121 |
-
&, a
|
122 |
-
{
|
123 |
-
color: #9a73ac !important;
|
124 |
-
}
|
125 |
-
}
|
126 |
-
&.fs-col--file {
|
127 |
-
color: #d07922;
|
128 |
-
}
|
129 |
-
&.fs-col--timestamp {
|
130 |
-
color: #6596be;
|
131 |
-
}
|
132 |
-
}
|
133 |
-
}
|
134 |
-
}
|
135 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/pum-sdk/freemius/assets/scss/admin/dialog-boxes.scss
DELETED
@@ -1,10 +0,0 @@
|
|
1 |
-
@import "../start";
|
2 |
-
@import "modal-common";
|
3 |
-
@import "deactivation-feedback";
|
4 |
-
@import "subscription-cancellation";
|
5 |
-
@import "license-activation";
|
6 |
-
@import "multisite-options";
|
7 |
-
@import "license-key-resend";
|
8 |
-
@import "ajax-loader";
|
9 |
-
@import "auto-install";
|
10 |
-
@import "buttons";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/pum-sdk/freemius/assets/scss/admin/gdpr-optin-notice.scss
DELETED
@@ -1,17 +0,0 @@
|
|
1 |
-
.fs-notice[data-id^="gdpr_optin_actions"]
|
2 |
-
{
|
3 |
-
.underlined {
|
4 |
-
text-decoration: underline;
|
5 |
-
}
|
6 |
-
|
7 |
-
ul {
|
8 |
-
.button, .action-description {
|
9 |
-
vertical-align: middle;
|
10 |
-
}
|
11 |
-
|
12 |
-
.action-description {
|
13 |
-
display: inline-block;
|
14 |
-
margin-left: 3px;
|
15 |
-
}
|
16 |
-
}
|
17 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/pum-sdk/freemius/assets/scss/admin/index.php
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
// Silence is golden.
|
3 |
-
// Hide file structure from users on unprotected servers.
|
|
|
|
|
|
includes/pum-sdk/freemius/assets/scss/customizer.scss
DELETED
@@ -1,125 +0,0 @@
|
|
1 |
-
@import "start";
|
2 |
-
|
3 |
-
#fs_customizer_upsell {
|
4 |
-
.fs-customizer-plan {
|
5 |
-
padding: 10px 20px 20px 20px;
|
6 |
-
border-radius: 3px;
|
7 |
-
background: #fff;
|
8 |
-
|
9 |
-
h2 {
|
10 |
-
position: relative;
|
11 |
-
margin: 0;
|
12 |
-
line-height: 2em;
|
13 |
-
text-transform: uppercase;
|
14 |
-
|
15 |
-
.button-link {
|
16 |
-
top: -2px;
|
17 |
-
}
|
18 |
-
}
|
19 |
-
}
|
20 |
-
|
21 |
-
.fs-feature {
|
22 |
-
position: relative;
|
23 |
-
}
|
24 |
-
|
25 |
-
.dashicons-yes {
|
26 |
-
color: #0085ba;
|
27 |
-
font-size: 2em;
|
28 |
-
vertical-align: bottom;
|
29 |
-
margin-left: -7px;
|
30 |
-
margin-right: 10px;
|
31 |
-
|
32 |
-
.rtl & {
|
33 |
-
margin-left: 10px;
|
34 |
-
margin-right: -7px;
|
35 |
-
}
|
36 |
-
}
|
37 |
-
|
38 |
-
.dashicons-editor-help
|
39 |
-
{
|
40 |
-
color: #bbb;
|
41 |
-
cursor: help;
|
42 |
-
|
43 |
-
$tooltip-color: #000;
|
44 |
-
|
45 |
-
.fs-feature-desc {
|
46 |
-
opacity: 0;
|
47 |
-
visibility: hidden;
|
48 |
-
@include transition(opacity 0.3s ease-in-out);
|
49 |
-
|
50 |
-
position: absolute;
|
51 |
-
background: $tooltip-color;
|
52 |
-
color: #fff;
|
53 |
-
font-family: 'arial', serif;
|
54 |
-
font-size: 12px;
|
55 |
-
padding: 10px;
|
56 |
-
z-index: 999999;
|
57 |
-
bottom: 100%;
|
58 |
-
margin-bottom: 5px;
|
59 |
-
left: 0;
|
60 |
-
right: 0;
|
61 |
-
@include border-radius(5px);
|
62 |
-
@include box-shadow(1px 1px 1px rgba(0,0,0,0.2));
|
63 |
-
line-height: 1.3em;
|
64 |
-
font-weight: bold;
|
65 |
-
text-align: left;
|
66 |
-
|
67 |
-
.rtl &
|
68 |
-
{
|
69 |
-
text-align: right;
|
70 |
-
}
|
71 |
-
|
72 |
-
&::after {
|
73 |
-
content: ' ';
|
74 |
-
display: block;
|
75 |
-
width: 0;
|
76 |
-
height: 0;
|
77 |
-
border-style: solid;
|
78 |
-
border-width: 5px 5px 0 5px;
|
79 |
-
border-color: $tooltip-color transparent transparent transparent;
|
80 |
-
position: absolute;
|
81 |
-
top: 100%;
|
82 |
-
left: 21px;
|
83 |
-
|
84 |
-
.rtl & {
|
85 |
-
right: 21px;
|
86 |
-
left: auto;
|
87 |
-
}
|
88 |
-
}
|
89 |
-
}
|
90 |
-
|
91 |
-
&:hover {
|
92 |
-
.fs-feature-desc {
|
93 |
-
visibility: visible;
|
94 |
-
opacity: 1;
|
95 |
-
}
|
96 |
-
}
|
97 |
-
}
|
98 |
-
|
99 |
-
.button-primary {
|
100 |
-
display: block;
|
101 |
-
text-align: center;
|
102 |
-
margin-top: 10px;
|
103 |
-
}
|
104 |
-
}
|
105 |
-
|
106 |
-
#fs_customizer_support
|
107 |
-
{
|
108 |
-
display: block !important;
|
109 |
-
|
110 |
-
.button {
|
111 |
-
float: right;
|
112 |
-
}
|
113 |
-
|
114 |
-
.button-group {
|
115 |
-
width: 100%;
|
116 |
-
display: block;
|
117 |
-
margin-top: 10px;
|
118 |
-
|
119 |
-
.button {
|
120 |
-
float: none;
|
121 |
-
width: 50%;
|
122 |
-
text-align: center;
|
123 |
-
}
|
124 |
-
}
|
125 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/pum-sdk/freemius/assets/scss/index.php
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
// Silence is golden.
|
3 |
-
// Hide file structure from users on unprotected servers.
|
|
|
|
|
|
includes/pum-sdk/freemius/composer.json
DELETED
@@ -1,10 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"name": "freemius/wordpress-sdk",
|
3 |
-
"description": "Freemius WordPress SDK",
|
4 |
-
"keywords": ["freemius", "wordpress", "plugin", "sdk"],
|
5 |
-
"homepage": "https://freemius.com",
|
6 |
-
"license": "GPL-3.0-only",
|
7 |
-
"require": {
|
8 |
-
"php": ">=5.2"
|
9 |
-
}
|
10 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/pum-sdk/freemius/config.php
DELETED
@@ -1,388 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* @package Freemius
|
4 |
-
* @copyright Copyright (c) 2015, Freemius, Inc.
|
5 |
-
* @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
|
6 |
-
* @since 1.0.4
|
7 |
-
*/
|
8 |
-
|
9 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
-
exit;
|
11 |
-
}
|
12 |
-
|
13 |
-
if ( ! defined( 'WP_FS__SLUG' ) ) {
|
14 |
-
define( 'WP_FS__SLUG', 'freemius' );
|
15 |
-
}
|
16 |
-
if ( ! defined( 'WP_FS__DEV_MODE' ) ) {
|
17 |
-
define( 'WP_FS__DEV_MODE', false );
|
18 |
-
}
|
19 |
-
|
20 |
-
#--------------------------------------------------------------------------------
|
21 |
-
#region API Connectivity Issues Simulation
|
22 |
-
#--------------------------------------------------------------------------------
|
23 |
-
|
24 |
-
if ( ! defined( 'WP_FS__SIMULATE_NO_API_CONNECTIVITY' ) ) {
|
25 |
-
define( 'WP_FS__SIMULATE_NO_API_CONNECTIVITY', false );
|
26 |
-
}
|
27 |
-
if ( ! defined( 'WP_FS__SIMULATE_NO_CURL' ) ) {
|
28 |
-
define( 'WP_FS__SIMULATE_NO_CURL', false );
|
29 |
-
}
|
30 |
-
if ( ! defined( 'WP_FS__SIMULATE_NO_API_CONNECTIVITY_CLOUDFLARE' ) ) {
|
31 |
-
define( 'WP_FS__SIMULATE_NO_API_CONNECTIVITY_CLOUDFLARE', false );
|
32 |
-
}
|
33 |
-
if ( ! defined( 'WP_FS__SIMULATE_NO_API_CONNECTIVITY_SQUID_ACL' ) ) {
|
34 |
-
define( 'WP_FS__SIMULATE_NO_API_CONNECTIVITY_SQUID_ACL', false );
|
35 |
-
}
|
36 |
-
if ( WP_FS__SIMULATE_NO_CURL ) {
|
37 |
-
define( 'FS_SDK__SIMULATE_NO_CURL', true );
|
38 |
-
}
|
39 |
-
if ( WP_FS__SIMULATE_NO_API_CONNECTIVITY_CLOUDFLARE ) {
|
40 |
-
define( 'FS_SDK__SIMULATE_NO_API_CONNECTIVITY_CLOUDFLARE', true );
|
41 |
-
}
|
42 |
-
if ( WP_FS__SIMULATE_NO_API_CONNECTIVITY_SQUID_ACL ) {
|
43 |
-
define( 'FS_SDK__SIMULATE_NO_API_CONNECTIVITY_SQUID_ACL', true );
|
44 |
-
}
|
45 |
-
|
46 |
-
#endregion
|
47 |
-
|
48 |
-
if ( ! defined( 'WP_FS__SIMULATE_FREEMIUS_OFF' ) ) {
|
49 |
-
define( 'WP_FS__SIMULATE_FREEMIUS_OFF', false );
|
50 |
-
}
|
51 |
-
|
52 |
-
if ( ! defined( 'WP_FS__PING_API_ON_IP_OR_HOST_CHANGES' ) ) {
|
53 |
-
/**
|
54 |
-
* @since 1.1.7.3
|
55 |
-
* @author Vova Feldman (@svovaf)
|
56 |
-
*
|
57 |
-
* I'm not sure if shared servers periodically change IP, or the subdomain of the
|
58 |
-
* admin dashboard. Also, I've seen sites that have strange loop of switching
|
59 |
-
* between domains on a daily basis. Therefore, to eliminate the risk of
|
60 |
-
* multiple unwanted connectivity test pings, temporary ignore domain or
|
61 |
-
* server IP changes.
|
62 |
-
*/
|
63 |
-
define( 'WP_FS__PING_API_ON_IP_OR_HOST_CHANGES', false );
|
64 |
-
}
|
65 |
-
|
66 |
-
/**
|
67 |
-
* If your dev environment supports custom public network IP setup
|
68 |
-
* like VVV, please update WP_FS__LOCALHOST_IP with your public IP
|
69 |
-
* and uncomment it during dev.
|
70 |
-
*/
|
71 |
-
if ( ! defined( 'WP_FS__LOCALHOST_IP' ) ) {
|
72 |
-
// VVV default public network IP.
|
73 |
-
define( 'WP_FS__VVV_DEFAULT_PUBLIC_IP', '192.168.50.4' );
|
74 |
-
|
75 |
-
// define( 'WP_FS__LOCALHOST_IP', WP_FS__VVV_DEFAULT_PUBLIC_IP );
|
76 |
-
}
|
77 |
-
|
78 |
-
/**
|
79 |
-
* If true and running with secret key, the opt-in process
|
80 |
-
* will skip the email activation process which is invoked
|
81 |
-
* when the email of the context user already exist in Freemius
|
82 |
-
* database (as a security precaution, to prevent sharing user
|
83 |
-
* secret with unauthorized entity).
|
84 |
-
*
|
85 |
-
* IMPORTANT:
|
86 |
-
* AS A SECURITY PRECAUTION, WE VALIDATE THE TIMESTAMP OF THE OPT-IN REQUEST.
|
87 |
-
* THEREFORE, MAKE SURE THAT WHEN USING THIS PARAMETER,YOUR TESTING ENVIRONMENT'S
|
88 |
-
* CLOCK IS SYNCED.
|
89 |
-
*/
|
90 |
-
if ( ! defined( 'WP_FS__SKIP_EMAIL_ACTIVATION' ) ) {
|
91 |
-
define( 'WP_FS__SKIP_EMAIL_ACTIVATION', false );
|
92 |
-
}
|
93 |
-
|
94 |
-
|
95 |
-
#--------------------------------------------------------------------------------
|
96 |
-
#region Directories
|
97 |
-
#--------------------------------------------------------------------------------
|
98 |
-
|
99 |
-
if ( ! defined( 'WP_FS__DIR' ) ) {
|
100 |
-
define( 'WP_FS__DIR', dirname( __FILE__ ) );
|
101 |
-
}
|
102 |
-
if ( ! defined( 'WP_FS__DIR_INCLUDES' ) ) {
|
103 |
-
define( 'WP_FS__DIR_INCLUDES', WP_FS__DIR . '/includes' );
|
104 |
-
}
|
105 |
-
if ( ! defined( 'WP_FS__DIR_TEMPLATES' ) ) {
|
106 |
-
define( 'WP_FS__DIR_TEMPLATES', WP_FS__DIR . '/templates' );
|
107 |
-
}
|
108 |
-
if ( ! defined( 'WP_FS__DIR_ASSETS' ) ) {
|
109 |
-
define( 'WP_FS__DIR_ASSETS', WP_FS__DIR . '/assets' );
|
110 |
-
}
|
111 |
-
if ( ! defined( 'WP_FS__DIR_CSS' ) ) {
|
112 |
-
define( 'WP_FS__DIR_CSS', WP_FS__DIR_ASSETS . '/css' );
|
113 |
-
}
|
114 |
-
if ( ! defined( 'WP_FS__DIR_JS' ) ) {
|
115 |
-
define( 'WP_FS__DIR_JS', WP_FS__DIR_ASSETS . '/js' );
|
116 |
-
}
|
117 |
-
if ( ! defined( 'WP_FS__DIR_IMG' ) ) {
|
118 |
-
define( 'WP_FS__DIR_IMG', WP_FS__DIR_ASSETS . '/img' );
|
119 |
-
}
|
120 |
-
if ( ! defined( 'WP_FS__DIR_SDK' ) ) {
|
121 |
-
define( 'WP_FS__DIR_SDK', WP_FS__DIR_INCLUDES . '/sdk' );
|
122 |
-
}
|
123 |
-
|
124 |
-
#endregion
|
125 |
-
|
126 |
-
/**
|
127 |
-
* Domain / URL / Address
|
128 |
-
*/
|
129 |
-
define( 'WP_FS__ROOT_DOMAIN_PRODUCTION', 'freemius.com' );
|
130 |
-
define( 'WP_FS__DOMAIN_PRODUCTION', 'wp.freemius.com' );
|
131 |
-
define( 'WP_FS__ADDRESS_PRODUCTION', 'https://' . WP_FS__DOMAIN_PRODUCTION );
|
132 |
-
|
133 |
-
if ( ! defined( 'WP_FS__DOMAIN_LOCALHOST' ) ) {
|
134 |
-
define( 'WP_FS__DOMAIN_LOCALHOST', 'wp.freemius' );
|
135 |
-
}
|
136 |
-
if ( ! defined( 'WP_FS__ADDRESS_LOCALHOST' ) ) {
|
137 |
-
define( 'WP_FS__ADDRESS_LOCALHOST', 'http://' . WP_FS__DOMAIN_LOCALHOST . ':8080' );
|
138 |
-
}
|
139 |
-
|
140 |
-
if ( ! defined( 'WP_FS__TESTING_DOMAIN' ) ) {
|
141 |
-
define( 'WP_FS__TESTING_DOMAIN', 'fswp' );
|
142 |
-
}
|
143 |
-
|
144 |
-
#--------------------------------------------------------------------------------
|
145 |
-
#region HTTP
|
146 |
-
#--------------------------------------------------------------------------------
|
147 |
-
|
148 |
-
if ( ! defined( 'WP_FS__IS_HTTP_REQUEST' ) ) {
|
149 |
-
define( 'WP_FS__IS_HTTP_REQUEST', isset( $_SERVER['HTTP_HOST'] ) );
|
150 |
-
}
|
151 |
-
|
152 |
-
if ( ! defined( 'WP_FS__IS_HTTPS' ) ) {
|
153 |
-
define( 'WP_FS__IS_HTTPS', ( WP_FS__IS_HTTP_REQUEST &&
|
154 |
-
// Checks if CloudFlare's HTTPS (Flexible SSL support).
|
155 |
-
isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) &&
|
156 |
-
'https' === strtolower( $_SERVER['HTTP_X_FORWARDED_PROTO'] )
|
157 |
-
) ||
|
158 |
-
// Check if HTTPS request.
|
159 |
-
( isset( $_SERVER['HTTPS'] ) && 'on' == $_SERVER['HTTPS'] ) ||
|
160 |
-
( isset( $_SERVER['SERVER_PORT'] ) && 443 == $_SERVER['SERVER_PORT'] )
|
161 |
-
);
|
162 |
-
}
|
163 |
-
|
164 |
-
if ( ! defined( 'WP_FS__IS_POST_REQUEST' ) ) {
|
165 |
-
define( 'WP_FS__IS_POST_REQUEST', ( WP_FS__IS_HTTP_REQUEST &&
|
166 |
-
strtoupper( $_SERVER['REQUEST_METHOD'] ) == 'POST' ) );
|
167 |
-
}
|
168 |
-
|
169 |
-
if ( ! defined( 'WP_FS__REMOTE_ADDR' ) ) {
|
170 |
-
define( 'WP_FS__REMOTE_ADDR', fs_get_ip() );
|
171 |
-
}
|
172 |
-
|
173 |
-
if ( ! defined( 'WP_FS__IS_LOCALHOST' ) ) {
|
174 |
-
if ( defined( 'WP_FS__LOCALHOST_IP' ) ) {
|
175 |
-
define( 'WP_FS__IS_LOCALHOST', ( WP_FS__LOCALHOST_IP === WP_FS__REMOTE_ADDR ) );
|
176 |
-
} else {
|
177 |
-
define( 'WP_FS__IS_LOCALHOST', WP_FS__IS_HTTP_REQUEST &&
|
178 |
-
is_string( WP_FS__REMOTE_ADDR ) &&
|
179 |
-
( substr( WP_FS__REMOTE_ADDR, 0, 4 ) === '127.' ||
|
180 |
-
WP_FS__REMOTE_ADDR === '::1' )
|
181 |
-
);
|
182 |
-
}
|
183 |
-
}
|
184 |
-
|
185 |
-
if ( ! defined( 'WP_FS__IS_LOCALHOST_FOR_SERVER' ) ) {
|
186 |
-
define( 'WP_FS__IS_LOCALHOST_FOR_SERVER', ( ! WP_FS__IS_HTTP_REQUEST ||
|
187 |
-
false !== strpos( $_SERVER['HTTP_HOST'], 'localhost' ) ) );
|
188 |
-
}
|
189 |
-
|
190 |
-
#endregion
|
191 |
-
|
192 |
-
if ( ! defined( 'WP_FS__IS_PRODUCTION_MODE' ) ) {
|
193 |
-
// By default, run with Freemius production servers.
|
194 |
-
define( 'WP_FS__IS_PRODUCTION_MODE', true );
|
195 |
-
}
|
196 |
-
|
197 |
-
if ( ! defined( 'WP_FS__ADDRESS' ) ) {
|
198 |
-
define( 'WP_FS__ADDRESS', ( WP_FS__IS_PRODUCTION_MODE ? WP_FS__ADDRESS_PRODUCTION : WP_FS__ADDRESS_LOCALHOST ) );
|
199 |
-
}
|
200 |
-
|
201 |
-
|
202 |
-
#--------------------------------------------------------------------------------
|
203 |
-
#region API
|
204 |
-
#--------------------------------------------------------------------------------
|
205 |
-
|
206 |
-
if ( ! defined( 'WP_FS__API_ADDRESS_LOCALHOST' ) ) {
|
207 |
-
define( 'WP_FS__API_ADDRESS_LOCALHOST', 'http://api.freemius:8080' );
|
208 |
-
}
|
209 |
-
if ( ! defined( 'WP_FS__API_SANDBOX_ADDRESS_LOCALHOST' ) ) {
|
210 |
-
define( 'WP_FS__API_SANDBOX_ADDRESS_LOCALHOST', 'http://sandbox-api.freemius:8080' );
|
211 |
-
}
|
212 |
-
|
213 |
-
// Set API address for local testing.
|
214 |
-
if ( ! WP_FS__IS_PRODUCTION_MODE ) {
|
215 |
-
if ( ! defined( 'FS_API__ADDRESS' ) ) {
|
216 |
-
define( 'FS_API__ADDRESS', WP_FS__API_ADDRESS_LOCALHOST );
|
217 |
-
}
|
218 |
-
if ( ! defined( 'FS_API__SANDBOX_ADDRESS' ) ) {
|
219 |
-
define( 'FS_API__SANDBOX_ADDRESS', WP_FS__API_SANDBOX_ADDRESS_LOCALHOST );
|
220 |
-
}
|
221 |
-
}
|
222 |
-
|
223 |
-
#endregion
|
224 |
-
|
225 |
-
#--------------------------------------------------------------------------------
|
226 |
-
#region Checkout
|
227 |
-
#--------------------------------------------------------------------------------
|
228 |
-
|
229 |
-
if ( ! defined( 'FS_CHECKOUT__ADDRESS_PRODUCTION' ) ) {
|
230 |
-
define( 'FS_CHECKOUT__ADDRESS_PRODUCTION', 'https://checkout.freemius.com' );
|
231 |
-
}
|
232 |
-
|
233 |
-
if ( ! defined( 'FS_CHECKOUT__ADDRESS_LOCALHOST' ) ) {
|
234 |
-
define( 'FS_CHECKOUT__ADDRESS_LOCALHOST', 'http://checkout.freemius-local.com:8080' );
|
235 |
-
}
|
236 |
-
|
237 |
-
if ( ! defined( 'FS_CHECKOUT__ADDRESS' ) ) {
|
238 |
-
define( 'FS_CHECKOUT__ADDRESS', ( WP_FS__IS_PRODUCTION_MODE ? FS_CHECKOUT__ADDRESS_PRODUCTION : FS_CHECKOUT__ADDRESS_LOCALHOST ) );
|
239 |
-
}
|
240 |
-
|
241 |
-
#endregion
|
242 |
-
|
243 |
-
define( 'WP_FS___OPTION_PREFIX', 'fs' . ( WP_FS__IS_PRODUCTION_MODE ? '' : '_dbg' ) . '_' );
|
244 |
-
|
245 |
-
if ( ! defined( 'WP_FS__ACCOUNTS_OPTION_NAME' ) ) {
|
246 |
-
define( 'WP_FS__ACCOUNTS_OPTION_NAME', WP_FS___OPTION_PREFIX . 'accounts' );
|
247 |
-
}
|
248 |
-
if ( ! defined( 'WP_FS__API_CACHE_OPTION_NAME' ) ) {
|
249 |
-
define( 'WP_FS__API_CACHE_OPTION_NAME', WP_FS___OPTION_PREFIX . 'api_cache' );
|
250 |
-
}
|
251 |
-
if ( ! defined( 'WP_FS__GDPR_OPTION_NAME' ) ) {
|
252 |
-
define( 'WP_FS__GDPR_OPTION_NAME', WP_FS___OPTION_PREFIX . 'gdpr' );
|
253 |
-
}
|
254 |
-
define( 'WP_FS__OPTIONS_OPTION_NAME', WP_FS___OPTION_PREFIX . 'options' );
|
255 |
-
|
256 |
-
/**
|
257 |
-
* Module types
|
258 |
-
*
|
259 |
-
* @since 1.2.2
|
260 |
-
*/
|
261 |
-
define( 'WP_FS__MODULE_TYPE_PLUGIN', 'plugin' );
|
262 |
-
define( 'WP_FS__MODULE_TYPE_THEME', 'theme' );
|
263 |
-
|
264 |
-
/**
|
265 |
-
* Billing Frequencies
|
266 |
-
*/
|
267 |
-
define( 'WP_FS__PERIOD_ANNUALLY', 'annual' );
|
268 |
-
define( 'WP_FS__PERIOD_MONTHLY', 'monthly' );
|
269 |
-
define( 'WP_FS__PERIOD_LIFETIME', 'lifetime' );
|
270 |
-
|
271 |
-
/**
|
272 |
-
* Plans
|
273 |
-
*/
|
274 |
-
define( 'WP_FS__PLAN_DEFAULT_PAID', false );
|
275 |
-
define( 'WP_FS__PLAN_FREE', 'free' );
|
276 |
-
define( 'WP_FS__PLAN_TRIAL', 'trial' );
|
277 |
-
|
278 |
-
/**
|
279 |
-
* Times in seconds
|
280 |
-
*/
|
281 |
-
if ( ! defined( 'WP_FS__TIME_5_MIN_IN_SEC' ) ) {
|
282 |
-
define( 'WP_FS__TIME_5_MIN_IN_SEC', 300 );
|
283 |
-
}
|
284 |
-
if ( ! defined( 'WP_FS__TIME_10_MIN_IN_SEC' ) ) {
|
285 |
-
define( 'WP_FS__TIME_10_MIN_IN_SEC', 600 );
|
286 |
-
}
|
287 |
-
// define( 'WP_FS__TIME_15_MIN_IN_SEC', 900 );
|
288 |
-
if ( ! defined( 'WP_FS__TIME_12_HOURS_IN_SEC' ) ) {
|
289 |
-
define( 'WP_FS__TIME_12_HOURS_IN_SEC', 43200 );
|
290 |
-
}
|
291 |
-
if ( ! defined( 'WP_FS__TIME_24_HOURS_IN_SEC' ) ) {
|
292 |
-
define( 'WP_FS__TIME_24_HOURS_IN_SEC', WP_FS__TIME_12_HOURS_IN_SEC * 2 );
|
293 |
-
}
|
294 |
-
if ( ! defined( 'WP_FS__TIME_WEEK_IN_SEC' ) ) {
|
295 |
-
define( 'WP_FS__TIME_WEEK_IN_SEC', 7 * WP_FS__TIME_24_HOURS_IN_SEC );
|
296 |
-
}
|
297 |
-
|
298 |
-
#--------------------------------------------------------------------------------
|
299 |
-
#region Debugging
|
300 |
-
#--------------------------------------------------------------------------------
|
301 |
-
|
302 |
-
if ( ! defined( 'WP_FS__DEBUG_SDK' ) ) {
|
303 |
-
$debug_mode = get_option( 'fs_debug_mode', null );
|
304 |
-
|
305 |
-
if ( $debug_mode === null ) {
|
306 |
-
$debug_mode = false;
|
307 |
-
add_option( 'fs_debug_mode', $debug_mode );
|
308 |
-
}
|
309 |
-
|
310 |
-
define( 'WP_FS__DEBUG_SDK', is_numeric( $debug_mode ) ? ( 0 < $debug_mode ) : WP_FS__DEV_MODE );
|
311 |
-
}
|
312 |
-
|
313 |
-
if ( ! defined( 'WP_FS__ECHO_DEBUG_SDK' ) ) {
|
314 |
-
define( 'WP_FS__ECHO_DEBUG_SDK', WP_FS__DEV_MODE && ! empty( $_GET['fs_dbg_echo'] ) );
|
315 |
-
}
|
316 |
-
if ( ! defined( 'WP_FS__LOG_DATETIME_FORMAT' ) ) {
|
317 |
-
define( 'WP_FS__LOG_DATETIME_FORMAT', 'Y-m-d H:i:s' );
|
318 |
-
}
|
319 |
-
if ( ! defined( 'FS_API__LOGGER_ON' ) ) {
|
320 |
-
define( 'FS_API__LOGGER_ON', WP_FS__DEBUG_SDK );
|
321 |
-
}
|
322 |
-
|
323 |
-
if ( WP_FS__ECHO_DEBUG_SDK ) {
|
324 |
-
error_reporting( E_ALL );
|
325 |
-
}
|
326 |
-
|
327 |
-
#endregion
|
328 |
-
|
329 |
-
if ( ! defined( 'WP_FS__SCRIPT_START_TIME' ) ) {
|
330 |
-
define( 'WP_FS__SCRIPT_START_TIME', time() );
|
331 |
-
}
|
332 |
-
if ( ! defined( 'WP_FS__DEFAULT_PRIORITY' ) ) {
|
333 |
-
define( 'WP_FS__DEFAULT_PRIORITY', 10 );
|
334 |
-
}
|
335 |
-
if ( ! defined( 'WP_FS__LOWEST_PRIORITY' ) ) {
|
336 |
-
define( 'WP_FS__LOWEST_PRIORITY', 999999999 );
|
337 |
-
}
|
338 |
-
|
339 |
-
#--------------------------------------------------------------------------------
|
340 |
-
#region Multisite Network
|
341 |
-
#--------------------------------------------------------------------------------
|
342 |
-
|
343 |
-
/**
|
344 |
-
* Do not use this define directly, it will have the wrong value
|
345 |
-
* during plugin uninstall/deletion when the inclusion of the plugin
|
346 |
-
* is triggered due to registration with register_uninstall_hook().
|
347 |
-
*
|
348 |
-
* Instead, use fs_is_network_admin().
|
349 |
-
*
|
350 |
-
* @author Vova Feldman (@svovaf)
|
351 |
-
*/
|
352 |
-
if ( ! defined( 'WP_FS__IS_NETWORK_ADMIN' ) ) {
|
353 |
-
define( 'WP_FS__IS_NETWORK_ADMIN',
|
354 |
-
is_network_admin() ||
|
355 |
-
( is_multisite() &&
|
356 |
-
( ( defined( 'DOING_AJAX' ) && DOING_AJAX &&
|
357 |
-
( isset( $_REQUEST['_fs_network_admin'] ) /*||
|
358 |
-
( ! empty( $_REQUEST['action'] ) && 'delete-plugin' === $_REQUEST['action'] )*/ )
|
359 |
-
) ||
|
360 |
-
// Plugin uninstall.
|
361 |
-
defined( 'WP_UNINSTALL_PLUGIN' ) )
|
362 |
-
)
|
363 |
-
);
|
364 |
-
}
|
365 |
-
|
366 |
-
/**
|
367 |
-
* Do not use this define directly, it will have the wrong value
|
368 |
-
* during plugin uninstall/deletion when the inclusion of the plugin
|
369 |
-
* is triggered due to registration with register_uninstall_hook().
|
370 |
-
*
|
371 |
-
* Instead, use fs_is_blog_admin().
|
372 |
-
*
|
373 |
-
* @author Vova Feldman (@svovaf)
|
374 |
-
*/
|
375 |
-
if ( ! defined( 'WP_FS__IS_BLOG_ADMIN' ) ) {
|
376 |
-
define( 'WP_FS__IS_BLOG_ADMIN', is_blog_admin() || ( defined( 'DOING_AJAX' ) && DOING_AJAX && isset( $_REQUEST['_fs_blog_admin'] ) ) );
|
377 |
-
}
|
378 |
-
|
379 |
-
if ( ! defined( 'WP_FS__SHOW_NETWORK_EVEN_WHEN_DELEGATED' ) ) {
|
380 |
-
// Set to true to show network level settings even if delegated to site admins.
|
381 |
-
define( 'WP_FS__SHOW_NETWORK_EVEN_WHEN_DELEGATED', false );
|
382 |
-
}
|
383 |
-
|
384 |
-
#endregion
|
385 |
-
|
386 |
-
if ( ! defined( 'WP_FS__DEMO_MODE' ) ) {
|
387 |
-
define( 'WP_FS__DEMO_MODE', false );
|
388 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/pum-sdk/freemius/includes/class-freemius-abstract.php
DELETED
@@ -1,597 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* @package Freemius
|
4 |
-
* @copyright Copyright (c) 2015, Freemius, Inc.
|
5 |
-
* @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
|
6 |
-
* @since 1.0.7
|
7 |
-
*/
|
8 |
-
|
9 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
-
exit;
|
11 |
-
}
|
12 |
-
|
13 |
-
|
14 |
-
/**
|
15 |
-
* - Each instance of Freemius class represents a single plugin
|
16 |
-
* install by a single user (the installer of the plugin).
|
17 |
-
*
|
18 |
-
* - Each website can only have one install of the same plugin.
|
19 |
-
*
|
20 |
-
* - Install entity is only created after a user connects his account with Freemius.
|
21 |
-
*
|
22 |
-
* Class Freemius_Abstract
|
23 |
-
*/
|
24 |
-
abstract class Freemius_Abstract {
|
25 |
-
|
26 |
-
#----------------------------------------------------------------------------------
|
27 |
-
#region Identity
|
28 |
-
#----------------------------------------------------------------------------------
|
29 |
-
|
30 |
-
/**
|
31 |
-
* Check if user has connected his account (opted-in).
|
32 |
-
*
|
33 |
-
* Note:
|
34 |
-
* If the user opted-in and opted-out on a later stage,
|
35 |
-
* this will still return true. If you want to check if the
|
36 |
-
* user is currently opted-in, use:
|
37 |
-
* `$fs->is_registered() && $fs->is_tracking_allowed()`
|
38 |
-
*
|
39 |
-
* @since 1.0.1
|
40 |
-
* @return bool
|
41 |
-
*/
|
42 |
-
abstract function is_registered();
|
43 |
-
|
44 |
-
/**
|
45 |
-
* Check if the user skipped connecting the account with Freemius.
|
46 |
-
*
|
47 |
-
* @since 1.0.7
|
48 |
-
*
|
49 |
-
* @return bool
|
50 |
-
*/
|
51 |
-
abstract function is_anonymous();
|
52 |
-
|
53 |
-
/**
|
54 |
-
* Check if the user currently in activation mode.
|
55 |
-
*
|
56 |
-
* @since 1.0.7
|
57 |
-
*
|
58 |
-
* @return bool
|
59 |
-
*/
|
60 |
-
abstract function is_activation_mode();
|
61 |
-
|
62 |
-
#endregion
|
63 |
-
|
64 |
-
#----------------------------------------------------------------------------------
|
65 |
-
#region Usage Tracking
|
66 |
-
#----------------------------------------------------------------------------------
|
67 |
-
|
68 |
-
/**
|
69 |
-
* Returns TRUE if the user opted-in and didn't disconnect (opt-out).
|
70 |
-
*
|
71 |
-
* @author Leo Fajardo (@leorw)
|
72 |
-
* @since 1.2.1.5
|
73 |
-
*
|
74 |
-
* @return bool
|
75 |
-
*/
|
76 |
-
abstract function is_tracking_allowed();
|
77 |
-
|
78 |
-
/**
|
79 |
-
* Returns TRUE if the user never opted-in or manually opted-out.
|
80 |
-
*
|
81 |
-
* @author Vova Feldman (@svovaf)
|
82 |
-
* @since 1.2.1.5
|
83 |
-
*
|
84 |
-
* @return bool
|
85 |
-
*/
|
86 |
-
function is_tracking_prohibited() {
|
87 |
-
return ! $this->is_registered() || ! $this->is_tracking_allowed();
|
88 |
-
}
|
89 |
-
|
90 |
-
/**
|
91 |
-
* Opt-out from usage tracking.
|
92 |
-
*
|
93 |
-
* Note: This will not delete the account information but will stop all tracking.
|
94 |
-
*
|
95 |
-
* Returns:
|
96 |
-
* 1. FALSE - If the user never opted-in.
|
97 |
-
* 2. TRUE - If successfully opted-out.
|
98 |
-
* 3. object - API Result on failure.
|
99 |
-
*
|
100 |
-
* @author Leo Fajardo (@leorw)
|
101 |
-
* @since 1.2.1.5
|
102 |
-
*
|
103 |
-
* @return bool|object
|
104 |
-
*/
|
105 |
-
abstract function stop_tracking();
|
106 |
-
|
107 |
-
/**
|
108 |
-
* Opt-in back into usage tracking.
|
109 |
-
*
|
110 |
-
* Note: This will only work if the user opted-in previously.
|
111 |
-
*
|
112 |
-
* Returns:
|
113 |
-
* 1. FALSE - If the user never opted-in.
|
114 |
-
* 2. TRUE - If successfully opted-in back to usage tracking.
|
115 |
-
* 3. object - API result on failure.
|
116 |
-
*
|
117 |
-
* @author Leo Fajardo (@leorw)
|
118 |
-
* @since 1.2.1.5
|
119 |
-
*
|
120 |
-
* @return bool|object
|
121 |
-
*/
|
122 |
-
abstract function allow_tracking();
|
123 |
-
|
124 |
-
#endregion
|
125 |
-
|
126 |
-
#----------------------------------------------------------------------------------
|
127 |
-
#region Module Type
|
128 |
-
#----------------------------------------------------------------------------------
|
129 |
-
|
130 |
-
/**
|
131 |
-
* Checks if the plugin's type is "plugin". The other type is "theme".
|
132 |
-
*
|
133 |
-
* @author Leo Fajardo (@leorw)
|
134 |
-
* @since 1.2.2
|
135 |
-
*
|
136 |
-
* @return bool
|
137 |
-
*/
|
138 |
-
abstract function is_plugin();
|
139 |
-
|
140 |
-
/**
|
141 |
-
* Checks if the module type is "theme". The other type is "plugin".
|
142 |
-
*
|
143 |
-
* @author Leo Fajardo (@leorw)
|
144 |
-
* @since 1.2.2
|
145 |
-
*
|
146 |
-
* @return bool
|
147 |
-
*/
|
148 |
-
function is_theme() {
|
149 |
-
return ( ! $this->is_plugin() );
|
150 |
-
}
|
151 |
-
|
152 |
-
#endregion
|
153 |
-
|
154 |
-
#----------------------------------------------------------------------------------
|
155 |
-
#region Permissions
|
156 |
-
#----------------------------------------------------------------------------------
|
157 |
-
|
158 |
-
/**
|
159 |
-
* Check if plugin must be WordPress.org compliant.
|
160 |
-
*
|
161 |
-
* @since 1.0.7
|
162 |
-
*
|
163 |
-
* @return bool
|
164 |
-
*/
|
165 |
-
abstract function is_org_repo_compliant();
|
166 |
-
|
167 |
-
/**
|
168 |
-
* Check if plugin is allowed to install executable files.
|
169 |
-
*
|
170 |
-
* @author Vova Feldman (@svovaf)
|
171 |
-
* @since 1.0.5
|
172 |
-
*
|
173 |
-
* @return bool
|
174 |
-
*/
|
175 |
-
function is_allowed_to_install() {
|
176 |
-
return ( $this->is_premium() || ! $this->is_org_repo_compliant() );
|
177 |
-
}
|
178 |
-
|
179 |
-
#endregion
|
180 |
-
|
181 |
-
/**
|
182 |
-
* Check if user in trial or in free plan (not paying).
|
183 |
-
*
|
184 |
-
* @author Vova Feldman (@svovaf)
|
185 |
-
* @since 1.0.4
|
186 |
-
*
|
187 |
-
* @return bool
|
188 |
-
*/
|
189 |
-
function is_not_paying() {
|
190 |
-
return ( $this->is_trial() || $this->is_free_plan() );
|
191 |
-
}
|
192 |
-
|
193 |
-
/**
|
194 |
-
* Check if the user has an activated and valid paid license on current plugin's install.
|
195 |
-
*
|
196 |
-
* @since 1.0.9
|
197 |
-
*
|
198 |
-
* @return bool
|
199 |
-
*/
|
200 |
-
abstract function is_paying();
|
201 |
-
|
202 |
-
/**
|
203 |
-
* Check if the user is paying or in trial.
|
204 |
-
*
|
205 |
-
* @since 1.0.9
|
206 |
-
*
|
207 |
-
* @return bool
|
208 |
-
*/
|
209 |
-
function is_paying_or_trial() {
|
210 |
-
return ( $this->is_paying() || $this->is_trial() );
|
211 |
-
}
|
212 |
-
|
213 |
-
/**
|
214 |
-
* Check if user in a trial or have feature enabled license.
|
215 |
-
*
|
216 |
-
* @author Vova Feldman (@svovaf)
|
217 |
-
* @since 1.1.7
|
218 |
-
*
|
219 |
-
* @return bool
|
220 |
-
*/
|
221 |
-
abstract function can_use_premium_code();
|
222 |
-
|
223 |
-
#----------------------------------------------------------------------------------
|
224 |
-
#region Premium Only
|
225 |
-
#----------------------------------------------------------------------------------
|
226 |
-
|
227 |
-
/**
|
228 |
-
* All logic wrapped in methods with "__premium_only()" suffix will be only
|
229 |
-
* included in the premium code.
|
230 |
-
*
|
231 |
-
* Example:
|
232 |
-
* if ( freemius()->is__premium_only() ) {
|
233 |
-
* ...
|
234 |
-
* }
|
235 |
-
*/
|
236 |
-
|
237 |
-
/**
|
238 |
-
* Returns true when running premium plugin code.
|
239 |
-
*
|
240 |
-
* @since 1.0.9
|
241 |
-
*
|
242 |
-
* @return bool
|
243 |
-
*/
|
244 |
-
function is__premium_only() {
|
245 |
-
return $this->is_premium();
|
246 |
-
}
|
247 |
-
|
248 |
-
/**
|
249 |
-
* Check if the user has an activated and valid paid license on current plugin's install.
|
250 |
-
*
|
251 |
-
* @since 1.0.9
|
252 |
-
*
|
253 |
-
* @return bool
|
254 |
-
*
|
255 |
-
*/
|
256 |
-
function is_paying__premium_only() {
|
257 |
-
return ( $this->is__premium_only() && $this->is_paying() );
|
258 |
-
}
|
259 |
-
|
260 |
-
/**
|
261 |
-
* All code wrapped in this statement will be only included in the premium code.
|
262 |
-
*
|
263 |
-
* @since 1.0.9
|
264 |
-
*
|
265 |
-
* @param string $plan Plan name.
|
266 |
-
* @param bool $exact If true, looks for exact plan. If false, also check "higher" plans.
|
267 |
-
*
|
268 |
-
* @return bool
|
269 |
-
*/
|
270 |
-
function is_plan__premium_only( $plan, $exact = false ) {
|
271 |
-
return ( $this->is_premium() && $this->is_plan( $plan, $exact ) );
|
272 |
-
}
|
273 |
-
|
274 |
-
/**
|
275 |
-
* Check if plan matches active license' plan or active trial license' plan.
|
276 |
-
*
|
277 |
-
* All code wrapped in this statement will be only included in the premium code.
|
278 |
-
*
|
279 |
-
* @since 1.0.9
|
280 |
-
*
|
281 |
-
* @param string $plan Plan name.
|
282 |
-
* @param bool $exact If true, looks for exact plan. If false, also check "higher" plans.
|
283 |
-
*
|
284 |
-
* @return bool
|
285 |
-
*/
|
286 |
-
function is_plan_or_trial__premium_only( $plan, $exact = false ) {
|
287 |
-
return ( $this->is_premium() && $this->is_plan_or_trial( $plan, $exact ) );
|
288 |
-
}
|
289 |
-
|
290 |
-
/**
|
291 |
-
* Check if the user is paying or in trial.
|
292 |
-
*
|
293 |
-
* All code wrapped in this statement will be only included in the premium code.
|
294 |
-
*
|
295 |
-
* @since 1.0.9
|
296 |
-
*
|
297 |
-
* @return bool
|
298 |
-
*/
|
299 |
-
function is_paying_or_trial__premium_only() {
|
300 |
-
return $this->is_premium() && $this->is_paying_or_trial();
|
301 |
-
}
|
302 |
-
|
303 |
-
/**
|
304 |
-
* Check if the user has an activated and valid paid license on current plugin's install.
|
305 |
-
*
|
306 |
-
* @since 1.0.4
|
307 |
-
*
|
308 |
-
* @return bool
|
309 |
-
*
|
310 |
-
* @deprecated Method name is confusing since it's not clear from the name the code will be removed.
|
311 |
-
* @using Alias to is_paying__premium_only()
|
312 |
-
*/
|
313 |
-
function is_paying__fs__() {
|
314 |
-
return $this->is_paying__premium_only();
|
315 |
-
}
|
316 |
-
|
317 |
-
/**
|
318 |
-
* Check if user in a trial or have feature enabled license.
|
319 |
-
*
|
320 |
-
* All code wrapped in this statement will be only included in the premium code.
|
321 |
-
*
|
322 |
-
* @author Vova Feldman (@svovaf)
|
323 |
-
* @since 1.1.9
|
324 |
-
*
|
325 |
-
* @return bool
|
326 |
-
*/
|
327 |
-
function can_use_premium_code__premium_only() {
|
328 |
-
return $this->is_premium() && $this->can_use_premium_code();
|
329 |
-
}
|
330 |
-
|
331 |
-
#endregion
|
332 |
-
|
333 |
-
#----------------------------------------------------------------------------------
|
334 |
-
#region Trial
|
335 |
-
#----------------------------------------------------------------------------------
|
336 |
-
|
337 |
-
/**
|
338 |
-
* Check if the user in a trial.
|
339 |
-
*
|
340 |
-
* @since 1.0.3
|
341 |
-
*
|
342 |
-
* @return bool
|
343 |
-
*/
|
344 |
-
abstract function is_trial();
|
345 |
-
|
346 |
-
/**
|
347 |
-
* Check if trial already utilized.
|
348 |
-
*
|
349 |
-
* @since 1.0.9
|
350 |
-
*
|
351 |
-
* @return bool
|
352 |
-
*/
|
353 |
-
abstract function is_trial_utilized();
|
354 |
-
|
355 |
-
#endregion
|
356 |
-
|
357 |
-
#----------------------------------------------------------------------------------
|
358 |
-
#region Plans
|
359 |
-
#----------------------------------------------------------------------------------
|
360 |
-
|
361 |
-
/**
|
362 |
-
* Check if the user is on the free plan of the product.
|
363 |
-
*
|
364 |
-
* @since 1.0.4
|
365 |
-
*
|
366 |
-
* @return bool
|
367 |
-
*/
|
368 |
-
abstract function is_free_plan();
|
369 |
-
|
370 |
-
/**
|
371 |
-
* @since 1.0.2
|
372 |
-
*
|
373 |
-
* @param string $plan Plan name.
|
374 |
-
* @param bool $exact If true, looks for exact plan. If false, also check "higher" plans.
|
375 |
-
*
|
376 |
-
* @return bool
|
377 |
-
*/
|
378 |
-
abstract function is_plan( $plan, $exact = false );
|
379 |
-
|
380 |
-
/**
|
381 |
-
* Check if plan based on trial. If not in trial mode, should return false.
|
382 |
-
*
|
383 |
-
* @since 1.0.9
|
384 |
-
*
|
385 |
-
* @param string $plan Plan name.
|
386 |
-
* @param bool $exact If true, looks for exact plan. If false, also check "higher" plans.
|
387 |
-
*
|
388 |
-
* @return bool
|
389 |
-
*/
|
390 |
-
abstract function is_trial_plan( $plan, $exact = false );
|
391 |
-
|
392 |
-
/**
|
393 |
-
* Check if plan matches active license' plan or active trial license' plan.
|
394 |
-
*
|
395 |
-
* @since 1.0.9
|
396 |
-
*
|
397 |
-
* @param string $plan Plan name.
|
398 |
-
* @param bool $exact If true, looks for exact plan. If false, also check "higher" plans.
|
399 |
-
*
|
400 |
-
* @return bool
|
401 |
-
*/
|
402 |
-
function is_plan_or_trial( $plan, $exact = false ) {
|
403 |
-
return $this->is_plan( $plan, $exact ) ||
|
404 |
-
$this->is_trial_plan( $plan, $exact );
|
405 |
-
}
|
406 |
-
|
407 |
-
/**
|
408 |
-
* Check if plugin has any paid plans.
|
409 |
-
*
|
410 |
-
* @author Vova Feldman (@svovaf)
|
411 |
-
* @since 1.0.7
|
412 |
-
*
|
413 |
-
* @return bool
|
414 |
-
*/
|
415 |
-
abstract function has_paid_plan();
|
416 |
-
|
417 |
-
/**
|
418 |
-
* Check if plugin has any free plan, or is it premium only.
|
419 |
-
*
|
420 |
-
* Note: If no plans configured, assume plugin is free.
|
421 |
-
*
|
422 |
-
* @author Vova Feldman (@svovaf)
|
423 |
-
* @since 1.0.7
|
424 |
-
*
|
425 |
-
* @return bool
|
426 |
-
*/
|
427 |
-
abstract function has_free_plan();
|
428 |
-
|
429 |
-
/**
|
430 |
-
* Check if plugin is premium only (no free plans).
|
431 |
-
*
|
432 |
-
* NOTE: is__premium_only() is very different method, don't get confused.
|
433 |
-
*
|
434 |
-
* @author Vova Feldman (@svovaf)
|
435 |
-
* @since 1.1.9
|
436 |
-
*
|
437 |
-
* @return bool
|
438 |
-
*/
|
439 |
-
abstract function is_only_premium();
|
440 |
-
|
441 |
-
/**
|
442 |
-
* Check if module has a premium code version.
|
443 |
-
*
|
444 |
-
* Serviceware module might be freemium without any
|
445 |
-
* premium code version, where the paid features
|
446 |
-
* are all part of the service.
|
447 |
-
*
|
448 |
-
* @author Vova Feldman (@svovaf)
|
449 |
-
* @since 1.2.1.6
|
450 |
-
*
|
451 |
-
* @return bool
|
452 |
-
*/
|
453 |
-
abstract function has_premium_version();
|
454 |
-
|
455 |
-
/**
|
456 |
-
* Check if module has any release on Freemius,
|
457 |
-
* or all plugin's code is on WordPress.org (Serviceware).
|
458 |
-
*
|
459 |
-
* @return bool
|
460 |
-
*/
|
461 |
-
function has_release_on_freemius() {
|
462 |
-
return ! $this->is_org_repo_compliant() ||
|
463 |
-
$this->has_premium_version();
|
464 |
-
}
|
465 |
-
|
466 |
-
/**
|
467 |
-
* Checks if it's a freemium plugin.
|
468 |
-
*
|
469 |
-
* @author Vova Feldman (@svovaf)
|
470 |
-
* @since 1.1.9
|
471 |
-
*
|
472 |
-
* @return bool
|
473 |
-
*/
|
474 |
-
function is_freemium() {
|
475 |
-
return $this->has_paid_plan() &&
|
476 |
-
$this->has_free_plan();
|
477 |
-
}
|
478 |
-
|
479 |
-
/**
|
480 |
-
* Check if module has only one plan.
|
481 |
-
*
|
482 |
-
* @author Vova Feldman (@svovaf)
|
483 |
-
* @since 1.2.1.7
|
484 |
-
*
|
485 |
-
* @return bool
|
486 |
-
*/
|
487 |
-
abstract function is_single_plan();
|
488 |
-
|
489 |
-
#endregion
|
490 |
-
|
491 |
-
/**
|
492 |
-
* Check if running payments in sandbox mode.
|
493 |
-
*
|
494 |
-
* @since 1.0.4
|
495 |
-
*
|
496 |
-
* @return bool
|
497 |
-
*/
|
498 |
-
abstract function is_payments_sandbox();
|
499 |
-
|
500 |
-
/**
|
501 |
-
* Check if running test vs. live plugin.
|
502 |
-
*
|
503 |
-
* @since 1.0.5
|
504 |
-
*
|
505 |
-
* @return bool
|
506 |
-
*/
|
507 |
-
abstract function is_live();
|
508 |
-
|
509 |
-
/**
|
510 |
-
* Check if running premium plugin code.
|
511 |
-
*
|
512 |
-
* @since 1.0.5
|
513 |
-
*
|
514 |
-
* @return bool
|
515 |
-
*/
|
516 |
-
abstract function is_premium();
|
517 |
-
|
518 |
-
/**
|
519 |
-
* Get upgrade URL.
|
520 |
-
*
|
521 |
-
* @author Vova Feldman (@svovaf)
|
522 |
-
* @since 1.0.2
|
523 |
-
*
|
524 |
-
* @param string $period Billing cycle.
|
525 |
-
*
|
526 |
-
* @return string
|
527 |
-
*/
|
528 |
-
abstract function get_upgrade_url( $period = WP_FS__PERIOD_ANNUALLY );
|
529 |
-
|
530 |
-
/**
|
531 |
-
* Check if Freemius was first added in a plugin update.
|
532 |
-
*
|
533 |
-
* @author Vova Feldman (@svovaf)
|
534 |
-
* @since 1.1.5
|
535 |
-
*
|
536 |
-
* @return bool
|
537 |
-
*/
|
538 |
-
function is_plugin_update() {
|
539 |
-
return ! $this->is_plugin_new_install();
|
540 |
-
}
|
541 |
-
|
542 |
-
/**
|
543 |
-
* Check if Freemius was part of the plugin when the user installed it first.
|
544 |
-
*
|
545 |
-
* @author Vova Feldman (@svovaf)
|
546 |
-
* @since 1.1.5
|
547 |
-
*
|
548 |
-
* @return bool
|
549 |
-
*/
|
550 |
-
abstract function is_plugin_new_install();
|
551 |
-
|
552 |
-
#----------------------------------------------------------------------------------
|
553 |
-
#region Marketing
|
554 |
-
#----------------------------------------------------------------------------------
|
555 |
-
|
556 |
-
/**
|
557 |
-
* Check if current user purchased any other plugins before.
|
558 |
-
*
|
559 |
-
* @author Vova Feldman (@svovaf)
|
560 |
-
* @since 1.0.9
|
561 |
-
*
|
562 |
-
* @return bool
|
563 |
-
*/
|
564 |
-
abstract function has_purchased_before();
|
565 |
-
|
566 |
-
/**
|
567 |
-
* Check if current user classified as an agency.
|
568 |
-
*
|
569 |
-
* @author Vova Feldman (@svovaf)
|
570 |
-
* @since 1.0.9
|
571 |
-
*
|
572 |
-
* @return bool
|
573 |
-
*/
|
574 |
-
abstract function is_agency();
|
575 |
-
|
576 |
-
/**
|
577 |
-
* Check if current user classified as a developer.
|
578 |
-
*
|
579 |
-
* @author Vova Feldman (@svovaf)
|
580 |
-
* @since 1.0.9
|
581 |
-
*
|
582 |
-
* @return bool
|
583 |
-
*/
|
584 |
-
abstract function is_developer();
|
585 |
-
|
586 |
-
/**
|
587 |
-
* Check if current user classified as a business.
|
588 |
-
*
|
589 |
-
* @author Vova Feldman (@svovaf)
|
590 |
-
* @since 1.0.9
|
591 |
-
*
|
592 |
-
* @return bool
|
593 |
-
*/
|
594 |
-
abstract function is_business();
|
595 |
-
|
596 |
-
#endregion
|
597 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
includes/pum-sdk/freemius/includes/class-freemius.php
DELETED
@@ -1,21794 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* @package Freemius
|
4 |
-
* @copyright Copyright (c) 2015, Freemius, Inc.
|
5 |
-
* @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3
|
6 |
-
* @since 1.0.3
|
7 |
-
*/
|
8 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
9 |
-
exit;
|
10 |
-
}
|
11 |
-
|
12 |
-
// "final class"
|
13 |
-
class Freemius extends Freemius_Abstract {
|
14 |
-
/**
|
15 |
-
* SDK Version
|
16 |
-
*
|
17 |
-
* @var string
|
18 |
-
*/
|
19 |
-
public $version = WP_FS__SDK_VERSION;
|
20 |
-
|
21 |
-
#region Plugin Info
|
22 |
-
|
23 |
-
/**
|
24 |
-
* @since 1.0.1
|
25 |
-
*
|
26 |
-
* @var string
|
27 |
-
*/
|
28 |
-
private $_slug;
|
29 |
-
|
30 |
-
/**
|
31 |
-
* @since 1.0.0
|
32 |
-
*
|
33 |
-
* @var string
|
34 |
-
*/
|
35 |
-
private $_plugin_basename;
|
36 |
-
/**
|
37 |
-
* @since 2.2.1
|
38 |
-
*
|
39 |
-
* @var string
|
40 |
-
*/
|
41 |
-
private $_premium_plugin_basename;
|
42 |
-
/**
|
43 |
-
* @since 1.0.0
|
44 |
-
*
|
45 |
-
* @var string
|
46 |
-
*/
|
47 |
-
private $_free_plugin_basename;
|
48 |
-
/**
|
49 |
-
* @since 1.0.0
|
50 |
-
*
|
51 |
-
* @var string
|
52 |
-
*/
|
53 |
-
private $_plugin_dir_path;
|
54 |
-
/**
|
55 |
-
* @since 1.0.0
|
56 |
-
*
|
57 |
-
* @var string
|
58 |
-
*/
|
59 |
-
private $_plugin_dir_name;
|
60 |
-
/**
|
61 |
-
* @since 1.0.0
|
62 |
-
*
|
63 |
-
* @var string
|
64 |
-
*/
|
65 |
-
private $_plugin_main_file_path;
|
66 |
-
/**
|
67 |
-
* @var string[]
|
68 |
-
*/
|
69 |
-
private $_plugin_data;
|
70 |
-
/**
|
71 |
-
* @since 1.0.9
|
72 |
-
*
|
73 |
-
* @var string
|
74 |
-
*/
|
75 |
-
private $_plugin_name;
|
76 |
-
/**
|
77 |
-
* @since 1.2.2
|
78 |
-
*
|
79 |
-
* @var string
|
80 |
-
*/
|
81 |
-
private $_module_type;
|
82 |
-
|
83 |
-
#endregion Plugin Info
|
84 |
-
|
85 |
-
/**
|
86 |
-
* @since 1.0.9
|
87 |
-
*
|
88 |
-
* @var bool If false, don't turn Freemius on.
|
89 |
-
*/
|
90 |
-
private $_is_on;
|
91 |
-
|
92 |
-
/**
|
93 |
-
* @since 1.1.3
|
94 |
-
*
|
95 |
-
* @var bool If false, don't turn Freemius on.
|
96 |
-
*/
|
97 |
-
private $_is_anonymous;
|
98 |
-
|
99 |
-
/**
|
100 |
-
* @since 1.0.9
|
101 |
-
* @var bool If false, issues with connectivity to Freemius API.
|
102 |
-
*/
|
103 |
-
private $_has_api_connection;
|
104 |
-
|
105 |
-
/**
|
106 |
-
* @since 1.0.9
|
107 |
-
* @since 2.0.0 Default to true since we need the property during the instance construction, prior to the dynamic_init() execution.
|
108 |
-
* @var bool Hints the SDK if plugin can support anonymous mode (if skip connect is visible).
|
109 |
-
*/
|
110 |
-
private $_enable_anonymous = true;
|
111 |
-
|
112 |
-
/**
|
113 |
-
* @since 1.1.7.5
|
114 |
-
* @var bool Hints the SDK if plugin should run in anonymous mode (only adds feedback form).
|
115 |
-
*/
|
116 |
-
private $_anonymous_mode;
|
117 |
-
|
118 |
-
/**
|
119 |
-
* @since 1.1.9
|
120 |
-
* @var bool Hints the SDK if plugin have any free plans.
|
121 |
-
*/
|
122 |
-
private $_is_premium_only;
|
123 |
-
|
124 |
-
/**
|
125 |
-
* @since 1.2.1.6
|
126 |
-
* @var bool Hints the SDK if plugin have premium code version at all.
|
127 |
-
*/
|
128 |
-
private $_has_premium_version;
|
129 |
-
|
130 |
-
/**
|
131 |
-
* @since 1.2.1.6
|
132 |
-
* @var bool Hints the SDK if plugin should ignore pending mode by simulating a skip.
|
133 |
-
*/
|
134 |
-
private $_ignore_pending_mode;
|
135 |
-
|
136 |
-
/**
|
137 |
-
* @since 1.0.8
|
138 |
-
* @var bool Hints the SDK if the plugin has any paid plans.
|
139 |
-
*/
|
140 |
-
private $_has_paid_plans;
|
141 |
-
|
142 |
-
/**
|
143 |
-
* @since 1.2.1.5
|
144 |
-
* @var int Hints the SDK if the plugin offers a trial period. If negative, no trial, if zero - has a trial but
|
145 |
-
* without a specified period, if positive - the number of trial days.
|
146 |
-
*/
|
147 |
-
private $_trial_days = - 1;
|
148 |
-
|
149 |
-
/**
|
150 |
-
* @since 1.2.1.5
|
151 |
-
* @var bool Hints the SDK if the trial requires a payment method or not.
|
152 |
-
*/
|
153 |
-
private $_is_trial_require_payment = false;
|
154 |
-
|
155 |
-
/**
|
156 |
-
* @since 1.0.7
|
157 |
-
* @var bool Hints the SDK if the plugin is WordPress.org compliant.
|
158 |
-
*/
|
159 |
-
private $_is_org_compliant;
|
160 |
-
|
161 |
-
/**
|
162 |
-
* @since 1.0.7
|
163 |
-
* @var bool Hints the SDK if the plugin is has add-ons.
|
164 |
-
*/
|
165 |
-
private $_has_addons;
|
166 |
-
|
167 |
-
/**
|
168 |
-
* @since 1.1.6
|
169 |
-
* @var string[]bool.
|
170 |
-
*/
|
171 |
-
private $_permissions;
|
172 |
-
|
173 |
-
/**
|
174 |
-
* @var FS_Storage
|
175 |
-
*/
|
176 |
-
private $_storage;
|
177 |
-
|
178 |
-
/**
|
179 |
-
* @since 1.2.2.7
|
180 |
-
* @var FS_Cache_Manager
|
181 |
-
*/
|
182 |
-
private $_cache;
|
183 |
-
|
184 |
-
/**
|
185 |
-
* @since 1.0.0
|
186 |
-
*
|
187 |
-
* @var FS_Logger
|
188 |
-
*/
|
189 |
-
private $_logger;
|
190 |
-
/**
|
191 |
-
* @since 1.0.4
|
192 |
-
*
|
193 |
-
* @var FS_Plugin
|
194 |
-
*/
|
195 |
-
private $_plugin = false;
|
196 |
-
/**
|
197 |
-
* @since 1.0.4
|
198 |
-
*
|
199 |
-
* @var FS_Plugin|false
|
200 |
-
*/
|
201 |
-
private $_parent_plugin = false;
|
202 |
-
/**
|
203 |
-
* @since 1.1.1
|
204 |
-
*
|
205 |
-
* @var Freemius
|
206 |
-
*/
|
207 |
-
private $_parent = false;
|
208 |
-
/**
|
209 |
-
* @since 1.0.1
|
210 |
-
*
|
211 |
-
* @var FS_User
|
212 |
-
*/
|
213 |
-
private $_user = false;
|
214 |
-
/**
|
215 |
-
* @since 1.0.1
|
216 |
-
*
|
217 |
-
* @var FS_Site
|
218 |
-
*/
|
219 |
-
private $_site = false;
|
220 |
-
/**
|
221 |
-
* @since 1.0.1
|
222 |
-
*
|
223 |
-
* @var FS_Plugin_License
|
224 |
-
*/
|
225 |
-
private $_license;
|
226 |
-
/**
|
227 |
-
* @since 1.0.2
|
228 |
-
*
|
229 |
-
* @var FS_Plugin_Plan[]
|
230 |
-
*/
|
231 |
-
private $_plans = false;
|
232 |
-
/**
|
233 |
-
* @var FS_Plugin_License[]
|
234 |
-
* @since 1.0.5
|
235 |
-
*/
|
236 |
-
private $_licenses = false;
|
237 |
-
|
238 |
-
/**
|
239 |
-
* @since 1.0.1
|
240 |
-
*
|
241 |
-
* @var FS_Admin_Menu_Manager
|
242 |
-
*/
|
243 |
-
private $_menu;
|
244 |
-
|
245 |
-
/**
|
246 |
-
* @var FS_Admin_Notices
|
247 |
-
*/
|
248 |
-
private $_admin_notices;
|
249 |
-
|
250 |
-
/**
|
251 |
-
* @since 1.1.6
|
252 |
-
*
|
253 |
-
* @var FS_Admin_Notices
|
254 |
-
*/
|
255 |
-
private static $_global_admin_notices;
|
256 |
-
|
257 |
-
/**
|
258 |
-
* @var FS_Logger
|
259 |
-
* @since 1.0.0
|
260 |
-
*/
|
261 |
-
private static $_static_logger;
|
262 |
-
|
263 |
-
/**
|
264 |
-
* @var FS_Options
|
265 |
-
* @since 1.0.2
|
266 |
-
*/
|
267 |
-
private static $_accounts;
|
268 |
-
|
269 |
-
/**
|
270 |
-
* @since 1.2.2
|
271 |
-
*
|
272 |
-
* @var number
|
273 |
-
*/
|
274 |
-
private $_module_id;
|
275 |
-
|
276 |
-
/**
|
277 |
-
* @var Freemius[]
|
278 |
-
*/
|
279 |
-
private static $_instances = array();
|
280 |
-
|
281 |
-
/**
|
282 |
-
* @since 1.2.3
|
283 |
-
*
|
284 |
-
* @var FS_Affiliate
|
285 |
-
*/
|
286 |
-
private $affiliate = null;
|
287 |
-
|
288 |
-
/**
|
289 |
-
* @since 1.2.3
|
290 |
-
*
|
291 |
-
* @var FS_AffiliateTerms
|
292 |
-
*/
|
293 |
-
private $plugin_affiliate_terms = null;
|
294 |
-
|
295 |
-
/**
|
296 |
-
* @since 1.2.3
|
297 |
-
*
|
298 |
-
* @var FS_AffiliateTerms
|
299 |
-
*/
|
300 |
-
private $custom_affiliate_terms = null;
|
301 |
-
|
302 |
-
/**
|
303 |
-
* @since 2.0.0
|
304 |
-
*
|
305 |
-
* @var bool
|
306 |
-
*/
|
307 |
-
private $_is_multisite_integrated;
|
308 |
-
|
309 |
-
/**
|
310 |
-
* @since 2.0.0
|
311 |
-
*
|
312 |
-
* @var bool True if the current request is for a network admin screen and the plugin is network active.
|
313 |
-
*/
|
314 |
-
private $_is_network_active;
|
315 |
-
|
316 |
-
/**
|
317 |
-
* @since 2.0.0
|
318 |
-
*
|
319 |
-
* @var int|null The original blog ID the plugin was loaded with.
|
320 |
-
*/
|
321 |
-
private $_blog_id = null;
|
322 |
-
|
323 |
-
/**
|
324 |
-
* @since 2.0.0
|
325 |
-
*
|
326 |
-
* @var int|null The current execution context. When true, run on network context. When int, run on the specified blog context.
|
327 |
-
*/
|
328 |
-
private $_context_is_network_or_blog_id = null;
|
329 |
-
|
330 |
-
/**
|
331 |
-
* @since 2.0.0
|
332 |
-
*
|
333 |
-
* @var string
|
334 |
-
*/
|
335 |
-
private $_dynamically_added_top_level_page_hook_name = '';
|
336 |
-
|
337 |
-
#region Uninstall Reasons IDs
|
338 |
-
|
339 |
-
const REASON_NO_LONGER_NEEDED = 1;
|
340 |
-
const REASON_FOUND_A_BETTER_PLUGIN = 2;
|
341 |
-
const REASON_NEEDED_FOR_A_SHORT_PERIOD = 3;
|
342 |
-
const REASON_BROKE_MY_SITE = 4;
|
343 |
-
const REASON_SUDDENLY_STOPPED_WORKING = 5;
|
344 |
-
const REASON_CANT_PAY_ANYMORE = 6;
|
345 |
-
const REASON_OTHER = 7;
|
346 |
-
const REASON_DIDNT_WORK = 8;
|
347 |
-
const REASON_DONT_LIKE_TO_SHARE_MY_INFORMATION = 9;
|
348 |
-
const REASON_COULDNT_MAKE_IT_WORK = 10;
|
349 |
-
const REASON_GREAT_BUT_NEED_SPECIFIC_FEATURE = 11;
|
350 |
-
const REASON_NOT_WORKING = 12;
|
351 |
-
const REASON_NOT_WHAT_I_WAS_LOOKING_FOR = 13;
|
352 |
-
const REASON_DIDNT_WORK_AS_EXPECTED = 14;
|
353 |
-
const REASON_TEMPORARY_DEACTIVATION = 15;
|
354 |
-
|
355 |
-
#endregion
|
356 |
-
|
357 |
-
/* Ctor
|
358 |
-
------------------------------------------------------------------------------------------------------------------*/
|
359 |
-
|
360 |
-
/**
|
361 |
-
* Main singleton instance.
|
362 |
-
*
|
363 |
-
* @author Vova Feldman (@svovaf)
|
364 |
-
* @since 1.0.0
|
365 |
-
*
|
366 |
-
* @param number $module_id
|
367 |
-
* @param string|bool $slug
|
368 |
-
* @param bool $is_init Since 1.2.1 Is initiation sequence.
|
369 |
-
*/
|
370 |
-
private function __construct( $module_id, $slug = false, $is_init = false ) {
|
371 |
-
if ( $is_init && is_numeric( $module_id ) && is_string( $slug ) ) {
|
372 |
-
$this->store_id_slug_type_path_map( $module_id, $slug );
|
373 |
-
}
|
374 |
-
|
375 |
-
$this->_module_id = $module_id;
|
376 |
-
$this->_slug = $this->get_slug();
|
377 |
-
$this->_module_type = $this->get_module_type();
|
378 |
-
|
379 |
-
$this->_blog_id = is_multisite() ? get_current_blog_id() : null;
|
380 |
-
|
381 |
-
$this->_storage = FS_Storage::instance( $this->_module_type, $this->_slug );
|
382 |
-
|
383 |
-
$this->_cache = FS_Cache_Manager::get_manager( WP_FS___OPTION_PREFIX . "cache_{$module_id}" );
|
384 |
-
|
385 |
-
$this->_logger = FS_Logger::get_logger( WP_FS__SLUG . '_' . $this->get_unique_affix(), WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK );
|
386 |
-
|
387 |
-
$this->_plugin_main_file_path = $this->_find_caller_plugin_file( $is_init );
|
388 |
-
$this->_plugin_dir_path = plugin_dir_path( $this->_plugin_main_file_path );
|
389 |
-
$this->_plugin_basename = $this->get_plugin_basename();
|
390 |
-
$this->_free_plugin_basename = str_replace( '-premium/', '/', $this->_plugin_basename );
|
391 |
-
|
392 |
-
$this->_is_multisite_integrated = (
|
393 |
-
defined( "WP_FS__PRODUCT_{$module_id}_MULTISITE" ) &&
|
394 |
-
( true === constant( "WP_FS__PRODUCT_{$module_id}_MULTISITE" ) )
|
395 |
-
);
|
396 |
-
|
397 |
-
$this->_is_network_active = (
|
398 |
-
is_multisite() &&
|
399 |
-
$this->_is_multisite_integrated &&
|
400 |
-
// Themes are always network activated, but the ACTUAL activation is per site.
|
401 |
-
$this->is_plugin() &&
|
402 |
-
( is_plugin_active_for_network( $this->_plugin_basename ) ||
|
403 |
-
// Plugin network level activation or uninstall.
|
404 |
-
is_plugin_inactive( $this->_plugin_basename ) )
|
405 |
-
);
|
406 |
-
|
407 |
-
$this->_storage->set_network_active(
|
408 |
-
$this->_is_network_active,
|
409 |
-
$this->is_delegated_connection()
|
410 |
-
);
|
411 |
-
|
412 |
-
#region Migration
|
413 |
-
|
414 |
-
if ( is_multisite() ) {
|
415 |
-
/**
|
416 |
-
* If the install_timestamp exists on the site level but doesn't exist on the
|
417 |
-
* network level storage, it means that we need to process the storage with migration.
|
418 |
-
*
|
419 |
-
* The code in this `if` scope will only be executed once and only for the first site that will execute it because once we migrate the storage data, install_timestamp will be already set in the network level storage.
|
420 |
-
*
|
421 |
-
* @author Vova Feldman (@svovaf)
|
422 |
-
* @since 2.0.0
|
423 |
-
*/
|
424 |
-
if ( false === $this->_storage->get( 'install_timestamp', false, true ) &&
|
425 |
-
false !== $this->_storage->get( 'install_timestamp', false, false )
|
426 |
-
) {
|
427 |
-
// Initiate storage migration.
|
428 |
-
$this->_storage->migrate_to_network();
|
429 |
-
|
430 |
-
// Migrate module cache to network level storage.
|
431 |
-
$this->_cache->migrate_to_network();
|
432 |
-
}
|
433 |
-
}
|
434 |
-
|
435 |
-
#endregion
|
436 |
-
|
437 |
-
$base_name_split = explode( '/', $this->_plugin_basename );
|
438 |
-
$this->_plugin_dir_name = $base_name_split[0];
|
439 |
-
|
440 |
-
if ( $this->_logger->is_on() ) {
|
441 |
-
$this->_logger->info( 'plugin_main_file_path = ' . $this->_plugin_main_file_path );
|
442 |
-
$this->_logger->info( 'plugin_dir_path = ' . $this->_plugin_dir_path );
|
443 |
-
$this->_logger->info( 'plugin_basename = ' . $this->_plugin_basename );
|
444 |
-
$this->_logger->info( 'free_plugin_basename = ' . $this->_free_plugin_basename );
|
445 |
-
$this->_logger->info( 'plugin_dir_name = ' . $this->_plugin_dir_name );
|
446 |
-
}
|
447 |
-
|
448 |
-
// Remember link between file to slug.
|
449 |
-
$this->store_file_slug_map();
|
450 |
-
|
451 |
-
// Store plugin's initial install timestamp.
|
452 |
-
if ( ! isset( $this->_storage->install_timestamp ) ) {
|
453 |
-
$this->_storage->install_timestamp = WP_FS__SCRIPT_START_TIME;
|
454 |
-
}
|
455 |
-
|
456 |
-
if ( ! is_object( $this->_plugin ) ) {
|
457 |
-
$this->_plugin = FS_Plugin_Manager::instance( $this->_module_id )->get();
|
458 |
-
}
|
459 |
-
|
460 |
-
$this->_admin_notices = FS_Admin_Notices::instance(
|
461 |
-
$this->_slug . ( $this->is_theme() ? ':theme' : '' ),
|
462 |
-
/**
|
463 |
-
* Ensure that the admin notice will always have a title by using the stored plugin title if available and
|
464 |
-
* retrieving the title via the "get_plugin_name" method if there is no stored plugin title available.
|
465 |
-
*
|
466 |
-
* @author Leo Fajardo (@leorw)
|
467 |
-
* @since 1.2.2
|
468 |
-
*/
|
469 |
-
( is_object( $this->_plugin ) ? $this->_plugin->title : $this->get_plugin_name() ),
|
470 |
-
$this->get_unique_affix()
|
471 |
-
);
|
472 |
-
|
473 |
-
if ( 'true' === fs_request_get( 'fs_clear_api_cache' ) ||
|
474 |
-
'true' === fs_request_is_action( 'restart_freemius' )
|
475 |
-
) {
|
476 |
-
FS_Api::clear_cache();
|
477 |
-
$this->_cache->clear();
|
478 |
-
}
|
479 |
-
|
480 |
-
$this->_register_hooks();
|
481 |
-
|
482 |
-
/**
|
483 |
-
* Starting from version 2.0.0, `FS_Site` entities no longer have the `plan` property and have `plan_id`
|
484 |
-
* instead. This should be called before calling `_load_account()`, otherwise, `$this->_site` will not be
|
485 |
-
* loaded in `_load_account` for versions of SDK starting from 2.0.0.
|
486 |
-
*
|
487 |
-
* @author Leo Fajardo (@leorw)
|
488 |
-
*/
|
489 |
-
self::migrate_install_plan_to_plan_id( $this->_storage );
|
490 |
-
|
491 |
-
$this->_load_account();
|
492 |
-
|
493 |
-
$this->_version_updates_handler();
|
494 |
-
}
|
495 |
-
|
496 |
-
/**
|
497 |
-
* Checks whether this module has a settings menu.
|
498 |
-
*
|
499 |
-
* @author Leo Fajardo (@leorw)
|
500 |
-
* @since 1.2.2
|
501 |
-
*
|
502 |
-
* @return bool
|
503 |
-
*/
|
504 |
-
function has_settings_menu() {
|
505 |
-
return ( $this->_is_network_active && fs_is_network_admin() ) ?
|
506 |
-
$this->_menu->has_network_menu() :
|
507 |
-
$this->_menu->has_menu();
|
508 |
-
}
|
509 |
-
|
510 |
-
/**
|
511 |
-
* Check if the context module is free wp.org theme.
|
512 |
-
*
|
513 |
-
* This method is helpful because:
|
514 |
-
* 1. wp.org themes are limited to a single submenu item,
|
515 |
-
* and sub-submenu items are most likely not allowed (never verified).
|
516 |
-
* 2. wp.org themes are not allowed to redirect the user
|
517 |
-
* after the theme activation, therefore, the agreed UX
|
518 |
-
* is showing the opt-in as a modal dialog box after
|
519 |
-
* activation (approved by @otto42, @emiluzelac, @greenshady, @grapplerulrich).
|
520 |
-
*
|
521 |
-
* @author Vova Feldman (@svovaf)
|
522 |
-
* @since 1.2.2.7
|
523 |
-
*
|
524 |
-
* @return bool
|
525 |
-
*/
|
526 |
-
function is_free_wp_org_theme() {
|
527 |
-
return (
|
528 |
-
$this->is_theme() &&
|
529 |
-
$this->is_org_repo_compliant() &&
|
530 |
-
! $this->is_premium()
|
531 |
-
);
|
532 |
-
}
|
533 |
-
|
534 |
-
/**
|
535 |
-
* Checks whether this a submenu item is visible.
|
536 |
-
*
|
537 |
-
* @author Vova Feldman (@svovaf)
|
538 |
-
* @since 1.2.2.6
|
539 |
-
* @since 1.2.2.7 Even if the menu item was specified to be hidden, when it is the context page, then show the submenu item so the user will have the right context page.
|
540 |
-
*
|
541 |
-
* @param string $slug
|
542 |
-
* @param bool $ignore_free_wp_org_theme_context This is used to decide if the associated tab should be shown
|
543 |
-
* or hidden.
|
544 |
-
*
|
545 |
-
* @return bool
|
546 |
-
*/
|
547 |
-
function is_submenu_item_visible( $slug, $ignore_free_wp_org_theme_context = false ) {
|
548 |
-
if ( $this->is_admin_page( $slug ) ) {
|
549 |
-
/**
|
550 |
-
* It is the current context page, so show the submenu item
|
551 |
-
* so the user will have the right context page, even if it
|
552 |
-
* was set to hidden.
|
553 |
-
*/
|
554 |
-
return true;
|
555 |
-
}
|
556 |
-
|
557 |
-
if ( ! $this->has_settings_menu() ) {
|
558 |
-
// No menu settings at all.
|
559 |
-
return false;
|
560 |
-
}
|
561 |
-
|
562 |
-
if ( ! $ignore_free_wp_org_theme_context && $this->is_free_wp_org_theme() ) {
|
563 |
-
/**
|
564 |
-
* wp.org themes are limited to a single submenu item, and
|
565 |
-
* sub-submenu items are most likely not allowed (never verified).
|
566 |
-
*/
|
567 |
-
return false;
|
568 |
-
}
|
569 |
-
|
570 |
-
return $this->_menu->is_submenu_item_visible( $slug );
|
571 |
-
}
|
572 |
-
|
573 |
-
/**
|
574 |
-
* Check if a Freemius page should be accessible via the UI.
|
575 |
-
*
|
576 |
-
* @author Vova Feldman (@svovaf)
|
577 |
-
* @since 1.2.2.7
|
578 |
-
*
|
579 |
-
* @param string $slug
|
580 |
-
*
|
581 |
-
* @return bool
|
582 |
-
*/
|
583 |
-
function is_page_visible( $slug ) {
|
584 |
-
if ( $this->is_admin_page( $slug ) ) {
|
585 |
-
return true;
|
586 |
-
}
|
587 |
-
|
588 |
-
return $this->_menu->is_submenu_item_visible( $slug, true, true );
|
589 |
-
}
|
590 |
-
|
591 |
-
/**
|
592 |
-
* @author Vova Feldman (@svovaf)
|
593 |
-
* @since 1.0.9
|
594 |
-
*/
|
595 |
-
private function _version_updates_handler() {
|
596 |
-
if ( ! isset( $this->_storage->sdk_version ) || $this->_storage->sdk_version != $this->version ) {
|
597 |
-
// Freemius version upgrade mode.
|
598 |
-
$this->_storage->sdk_last_version = $this->_storage->sdk_version;
|
599 |
-
$this->_storage->sdk_version = $this->version;
|
600 |
-
|
601 |
-
if ( empty( $this->_storage->sdk_last_version ) ||
|
602 |
-
version_compare( $this->_storage->sdk_last_version, $this->version, '<' )
|
603 |
-
) {
|
604 |
-
$this->_storage->sdk_upgrade_mode = true;
|
605 |
-
$this->_storage->sdk_downgrade_mode = false;
|
606 |
-
} else {
|
607 |
-
$this->_storage->sdk_downgrade_mode = true;
|
608 |
-
$this->_storage->sdk_upgrade_mode = false;
|
609 |
-
|
610 |
-
}
|
611 |
-
|
612 |
-
$this->do_action( 'sdk_version_update', $this->_storage->sdk_last_version, $this->version );
|
613 |
-
}
|
614 |
-
|
615 |
-
$plugin_version = $this->get_plugin_version();
|
616 |
-
if ( ! isset( $this->_storage->plugin_version ) || $this->_storage->plugin_version != $plugin_version ) {
|
617 |
-
// Plugin version upgrade mode.
|
618 |
-
$this->_storage->plugin_last_version = $this->_storage->plugin_version;
|
619 |
-
$this->_storage->plugin_version = $plugin_version;
|
620 |
-
|
621 |
-
if ( empty( $this->_storage->plugin_last_version ) ||
|
622 |
-
version_compare( $this->_storage->plugin_last_version, $plugin_version, '<' )
|
623 |
-
) {
|
624 |
-
$this->_storage->plugin_upgrade_mode = true;
|
625 |
-
$this->_storage->plugin_downgrade_mode = false;
|
626 |
-
} else {
|
627 |
-
$this->_storage->plugin_downgrade_mode = true;
|
628 |
-
$this->_storage->plugin_upgrade_mode = false;
|
629 |
-
}
|
630 |
-
|
631 |
-
if ( ! empty( $this->_storage->plugin_last_version ) ) {
|
632 |
-
// Different version of the plugin was installed before, therefore it's an update.
|
633 |
-
$this->_storage->is_plugin_new_install = false;
|
634 |
-
}
|
635 |
-
|
636 |
-
$this->do_action( 'plugin_version_update', $this->_storage->plugin_last_version, $plugin_version );
|
637 |
-
}
|
638 |
-
}
|
639 |
-
|
640 |
-
#--------------------------------------------------------------------------------
|
641 |
-
#region Data Migration on SDK Update
|
642 |
-
#--------------------------------------------------------------------------------
|
643 |
-
|
644 |
-
/**
|
645 |
-
* @author Vova Feldman (@svovaf)
|
646 |
-
* @since 1.1.5
|
647 |
-
*
|
648 |
-
* @param string $sdk_prev_version
|
649 |
-
* @param string $sdk_version
|
650 |
-
*/
|
651 |
-
function _sdk_version_update( $sdk_prev_version, $sdk_version ) {
|
652 |
-
/**
|
653 |
-
* @since 1.1.7.3 Fixed unwanted connectivity test cleanup.
|
654 |
-
*/
|
655 |
-
if ( empty( $sdk_prev_version ) ) {
|
656 |
-
return;
|
657 |
-
}
|
658 |
-
|
659 |
-
if ( version_compare( $sdk_prev_version, '2.1.0', '<' ) &&
|
660 |
-
version_compare( $sdk_version, '2.1.0', '>=' )
|
661 |
-
) {
|
662 |
-
$this->_storage->handle_gdpr_admin_notice = true;
|
663 |
-
}
|
664 |
-
|
665 |
-
if ( version_compare( $sdk_prev_version, '2.0.0', '<' ) &&
|
666 |
-
version_compare( $sdk_version, '2.0.0', '>=' )
|
667 |
-
) {
|
668 |
-
$this->migrate_to_subscriptions_collection();
|
669 |
-
|
670 |
-
$this->consolidate_licenses();
|
671 |
-
|
672 |
-
// Clear trial_plan since it's now loaded from the plans collection when needed.
|
673 |
-
$this->_storage->remove( 'trial_plan', true, false );
|
674 |
-
}
|
675 |
-
|
676 |
-
if ( version_compare( $sdk_prev_version, '1.2.3', '<' ) &&
|
677 |
-
version_compare( $sdk_version, '1.2.3', '>=' )
|
678 |
-
) {
|
679 |
-
/**
|
680 |
-
* Starting from version 1.2.3, paths are stored as relative instead of absolute and some of them can be
|
681 |
-
* invalid.
|
682 |
-
*
|
683 |
-
* @author Leo Fajardo (@leorw)
|
684 |
-
*/
|
685 |
-
$this->remove_invalid_paths();
|
686 |
-
}
|
687 |
-
|
688 |
-
if ( version_compare( $sdk_prev_version, '1.1.5', '<' ) &&
|
689 |
-
version_compare( $sdk_version, '1.1.5', '>=' )
|
690 |
-
) {
|
691 |
-
// On version 1.1.5 merged connectivity and is_on data.
|
692 |
-
if ( isset( $this->_storage->connectivity_test ) ) {
|
693 |
-
if ( ! isset( $this->_storage->is_on ) ) {
|
694 |
-
unset( $this->_storage->connectivity_test );
|
695 |
-
} else {
|
696 |
-
$connectivity_data = $this->_storage->connectivity_test;
|
697 |
-
$connectivity_data['is_active'] = $this->_storage->is_on['is_active'];
|
698 |
-
$connectivity_data['timestamp'] = $this->_storage->is_on['timestamp'];
|
699 |
-
|
700 |
-
// Override.
|
701 |
-
$this->_storage->connectivity_test = $connectivity_data;
|
702 |
-
|
703 |
-
// Remove previous structure.
|
704 |
-
unset( $this->_storage->is_on );
|
705 |
-
}
|
706 |
-
|
707 |
-
}
|
708 |
-
}
|
709 |
-
|
710 |
-
if (
|
711 |
-
version_compare( $sdk_prev_version, '2.2.1', '<' ) &&
|
712 |
-
version_compare( $sdk_version, '2.2.1', '>=' )
|
713 |
-
) {
|
714 |
-
/**
|
715 |
-
* Clear the file cache without storing the previous path since it could be a wrong path. For example,
|
716 |
-
* in the versions of the SDK lower than 2.2.1, it's possible for the path of an add-on to be the same
|
717 |
-
* as the parent plugin's when the add-on was auto-installed since the relevant method names were not
|
718 |
-
* skipped in the logic that determines the right path in the `get_caller_main_file_and_type` method
|
719 |
-
* (e.g. `try_activate_plugin`). Since it was an auto-installation, the caller was the parent plugin
|
720 |
-
* and so its path was used. In case the stored path is wrong, clearing the cache will resolve issues
|
721 |
-
* related to data mix-up between plugins (e.g. titles and versions of an add-on and its parent plugin).
|
722 |
-
*
|
723 |
-
* @author Leo Fajardo (@leorw)
|
724 |
-
* @since 2.2.1
|
725 |
-
*/
|
726 |
-
$this->clear_module_main_file_cache( false );
|
727 |
-
}
|
728 |
-
}
|
729 |
-
|
730 |
-
/**
|
731 |
-
* @author Leo Fajardo (@leorw)
|
732 |
-
* @since 2.0.0
|
733 |
-
*
|
734 |
-
* @param \FS_Storage $storage
|
735 |
-
* @param bool|int|null $blog_id
|
736 |
-
*/
|
737 |
-
private static function migrate_install_plan_to_plan_id( FS_Storage $storage, $blog_id = null ) {
|
738 |
-
if ( empty( $storage->sdk_version ) ) {
|
739 |
-
// New installation of the plugin, no need to upgrade.
|
740 |
-
return;
|
741 |
-
}
|
742 |
-
|
743 |
-
if ( ! version_compare( $storage->sdk_version, '2.0.0', '<' ) ) {
|
744 |
-
// Previous version is >= 2.0.0, so no need to migrate.
|
745 |
-
return;
|
746 |
-
}
|
747 |
-
|
748 |
-
// Alias.
|
749 |
-
$module_type = $storage->get_module_type();
|
750 |
-
$module_slug = $storage->get_module_slug();
|
751 |
-
|
752 |
-
$installs = self::get_all_sites( $module_type, $blog_id );
|
753 |
-
$install = isset( $installs[ $module_slug ] ) ? $installs[ $module_slug ] : null;
|
754 |
-
|
755 |
-
if ( ! is_object( $install ) ) {
|
756 |
-
return;
|
757 |
-
}
|
758 |
-
|
759 |
-
if ( isset( $install->plan ) && is_object( $install->plan ) ) {
|
760 |
-
if ( isset( $install->plan->id ) && ! empty( $install->plan->id ) ) {
|
761 |
-
$install->plan_id = self::_decrypt( $install->plan->id );
|
762 |
-
}
|
763 |
-
|
764 |
-
unset( $install->plan );
|
765 |
-
|
766 |
-
$installs[ $module_slug ] = clone $install;
|
767 |
-
|
768 |
-
self::set_account_option_by_module(
|
769 |
-
$module_type,
|
770 |
-
'sites',
|
771 |
-
$installs,
|
772 |
-
true,
|
773 |
-
$blog_id
|
774 |
-
);
|
775 |
-
}
|
776 |
-
}
|
777 |
-
|
778 |
-
/**
|
779 |
-
* @author Leo Fajardo (@leorw)
|
780 |
-
* @since 2.0.0
|
781 |
-
*/
|
782 |
-
private function migrate_to_subscriptions_collection() {
|
783 |
-
if ( ! is_object( $this->_site ) ) {
|
784 |
-
return;
|
785 |
-
}
|
786 |
-
|
787 |
-
if ( isset( $this->_storage->subscription ) && is_object( $this->_storage->subscription ) ) {
|
788 |
-
$this->_storage->subscriptions = array( $this->_storage->subscription );
|
789 |
-
}
|
790 |
-
}
|
791 |
-
|
792 |
-
/**
|
793 |
-
* @author Leo Fajardo (@leorw)
|
794 |
-
* @since 2.0.0
|
795 |
-
*/
|
796 |
-
private function consolidate_licenses() {
|
797 |
-
$plugin_licenses = self::get_account_option( 'licenses', WP_FS__MODULE_TYPE_PLUGIN );
|
798 |
-
if ( isset( $plugin_licenses[ $this->_slug ] ) ) {
|
799 |
-
$plugin_licenses = $plugin_licenses[ $this->_slug ];
|
800 |
-
} else {
|
801 |
-
$plugin_licenses = array();
|
802 |
-
}
|
803 |
-
|
804 |
-
$theme_licenses = self::get_account_option( 'licenses', WP_FS__MODULE_TYPE_THEME );
|
805 |
-
if ( isset( $theme_licenses[ $this->_slug ] ) ) {
|
806 |
-
$theme_licenses = $theme_licenses[ $this->_slug ];
|
807 |
-
} else {
|
808 |
-
$theme_licenses = array();
|
809 |
-
}
|
810 |
-
|
811 |
-
if ( empty( $plugin_licenses ) && empty( $theme_licenses ) ) {
|
812 |
-
return;
|
813 |
-
}
|
814 |
-
|
815 |
-
$all_licenses = array();
|
816 |
-
$user_id_license_ids_map = array();
|
817 |
-
|
818 |
-
foreach ( $plugin_licenses as $user_id => $user_licenses ) {
|
819 |
-
if ( is_array( $user_licenses ) ) {
|
820 |
-
if ( ! isset( $user_license_ids[ $user_id ] ) ) {
|
821 |
-
$user_id_license_ids_map[ $user_id ] = array();
|
822 |
-
}
|
823 |
-
|
824 |
-
foreach ( $user_licenses as $user_license ) {
|
825 |
-
$all_licenses[] = $user_license;
|
826 |
-
$user_id_license_ids_map[ $user_id ][] = $user_license->id;
|
827 |
-
}
|
828 |
-
}
|
829 |
-
}
|
830 |
-
|
831 |
-
foreach ( $theme_licenses as $user_id => $user_licenses ) {
|
832 |
-
if ( is_array( $user_licenses ) ) {
|
833 |
-
if ( ! isset( $user_license_ids[ $user_id ] ) ) {
|
834 |
-
$user_id_license_ids_map[ $user_id ] = array();
|
835 |
-
}
|
836 |
-
|
837 |
-
foreach ( $user_licenses as $user_license ) {
|
838 |
-
$all_licenses[] = $user_license;
|
839 |
-
$user_id_license_ids_map[ $user_id ][] = $user_license->id;
|
840 |
-
}
|
841 |
-
}
|
842 |
-
}
|
843 |
-
|
844 |
-
self::store_user_id_license_ids_map(
|
845 |
-
$user_id_license_ids_map,
|
846 |
-
$this->_module_id
|
847 |
-
);
|
848 |
-
|
849 |
-
$this->_store_licenses( true, $this->_module_id, $all_licenses );
|
850 |
-
}
|
851 |
-
|
852 |
-
/**
|
853 |
-
* Remove invalid paths.
|
854 |
-
*
|
855 |
-
* @author Leo Fajardo (@leorw)
|
856 |
-
* @since 1.2.3
|
857 |
-
*/
|
858 |
-
private function remove_invalid_paths() {
|
859 |
-
// Remove invalid path that is still associated with the current slug if there's any.
|
860 |
-
$file_slug_map = self::$_accounts->get_option( 'file_slug_map', array() );
|
861 |
-
foreach ( $file_slug_map as $plugin_basename => $slug ) {
|
862 |
-
if ( $slug === $this->_slug &&
|
863 |
-
$plugin_basename !== $this->_plugin_basename &&
|
864 |
-
! file_exists( $this->get_absolute_path( $plugin_basename ) )
|
865 |
-
) {
|
866 |
-
unset( $file_slug_map[ $plugin_basename ] );
|
867 |
-
self::$_accounts->set_option( 'file_slug_map', $file_slug_map, true );
|
868 |
-
|
869 |
-
break;
|
870 |
-
}
|
871 |
-
}
|
872 |
-
}
|
873 |
-
|
874 |
-
/**
|
875 |
-
* @author Vova Feldman (@svovaf)
|
876 |
-
* @since 1.2.2.7
|
877 |
-
*
|
878 |
-
* @param string $plugin_prev_version
|
879 |
-
* @param string $plugin_version
|
880 |
-
*/
|
881 |
-
function _after_version_update( $plugin_prev_version, $plugin_version ) {
|
882 |
-
if ( $this->is_theme() ) {
|
883 |
-
// Expire the cache of the previous tabs since the theme may
|
884 |
-
// have setting updates.
|
885 |
-
$this->_cache->expire( 'tabs' );
|
886 |
-
$this->_cache->expire( 'tabs_stylesheets' );
|
887 |
-
}
|
888 |
-
}
|
889 |
-
|
890 |
-
/**
|
891 |
-
* A special migration logic for the $_accounts, executed for all the plugins in the system:
|
892 |
-
* - Moves some data to the network level storage.
|
893 |
-
* - If the plugin's connection was skipped for all sites, set the plugin as if it was network skipped.
|
894 |
-
* - If the plugin's connection was ignored for all sites, don't do anything in terms of the network connection.
|
895 |
-
* - If the plugin was connected to all sites by the same super-admin, set the plugin as if was network opted-in for all sites.
|
896 |
-
* - If there's at least one site that was connected by a super-admin, find the "main super-admin" (the one that installed the majority of the plugin installs) and set the plugin as if was network activated with the main super-admin, set all the sites that were skipped or opted-in with a different user to delegated mode. Then, prompt the currently logged super-admin to choose what to do with the ignored sites.
|
897 |
-
* - If there are any sites in the network which the connection decision was not yet taken for, set this plugin into network activation mode so a super-admin can choose what to do with the rest of the sites.
|
898 |
-
*
|
899 |
-
* @author Vova Feldman (@svovaf)
|
900 |
-
* @since 2.0.0
|
901 |
-
*/
|
902 |
-
private static function migrate_accounts_to_network() {
|
903 |
-
$sites = self::get_sites();
|
904 |
-
$sites_count = count( $sites );
|
905 |
-
$connection_status = array();
|
906 |
-
$plugin_slugs = array();
|
907 |
-
foreach ( $sites as $site ) {
|
908 |
-
$blog_id = self::get_site_blog_id( $site );
|
909 |
-
|
910 |
-
self::$_accounts->migrate_to_network( $blog_id );
|
911 |
-
|
912 |
-
/**
|
913 |
-
* Build a list of all Freemius powered plugins slugs.
|
914 |
-
*/
|
915 |
-
$id_slug_type_path_map = self::$_accounts->get_option( 'id_slug_type_path_map', array(), $blog_id );
|
916 |
-
foreach ( $id_slug_type_path_map as $module_id => $data ) {
|
917 |
-
if ( WP_FS__MODULE_TYPE_PLUGIN === $data['type'] ) {
|
918 |
-
$plugin_slugs[ $data['slug'] ] = true;
|
919 |
-
}
|
920 |
-
}
|
921 |
-
|
922 |
-
$installs = self::get_account_option( 'sites', WP_FS__MODULE_TYPE_PLUGIN, $blog_id );
|
923 |
-
|
924 |
-
if ( is_array( $installs ) ) {
|
925 |
-
foreach ( $installs as $slug => $install ) {
|
926 |
-
if ( ! isset( $connection_status[ $slug ] ) ) {
|
927 |
-
$connection_status[ $slug ] = array();
|
928 |
-
}
|
929 |
-
|
930 |
-
if ( is_object( $install ) &&
|
931 |
-
FS_Site::is_valid_id( $install->id ) &&
|
932 |
-
FS_User::is_valid_id( $install->user_id )
|
933 |
-
) {
|
934 |
-
$connection_status[ $slug ][ $blog_id ] = $install->user_id;
|
935 |
-
}
|
936 |
-
}
|
937 |
-
}
|
938 |
-
}
|
939 |
-
|
940 |
-
foreach ( $plugin_slugs as $slug => $true ) {
|
941 |
-
if ( ! isset( $connection_status[ $slug ] ) ) {
|
942 |
-
$connection_status[ $slug ] = array();
|
943 |
-
}
|
944 |
-
|
945 |
-
foreach ( $sites as $site ) {
|
946 |
-
$blog_id = self::get_site_blog_id( $site );
|
947 |
-
|
948 |
-
if ( isset( $connection_status[ $slug ][ $blog_id ] ) ) {
|
949 |
-
continue;
|
950 |
-
}
|
951 |
-
|
952 |
-
$storage = FS_Storage::instance( WP_FS__MODULE_TYPE_PLUGIN, $slug );
|
953 |
-
|
954 |
-
$is_anonymous = $storage->get( 'is_anonymous', null, $blog_id );
|
955 |
-
|
956 |
-
if ( ! is_null( $is_anonymous ) ) {
|
957 |
-
// Since 1.1.3 is_anonymous is an array.
|
958 |
-
if ( is_array( $is_anonymous ) && isset( $is_anonymous['is'] ) ) {
|
959 |
-
$is_anonymous = $is_anonymous['is'];
|
960 |
-
}
|
961 |
-
|
962 |
-
if ( is_bool( $is_anonymous ) && true === $is_anonymous ) {
|
963 |
-
$connection_status[ $slug ][ $blog_id ] = 'skipped';
|
964 |
-
}
|
965 |
-
}
|
966 |
-
|
967 |
-
if ( ! isset( $connection_status[ $slug ][ $blog_id ] ) ) {
|
968 |
-
$connection_status[ $slug ][ $blog_id ] = 'ignored';
|
969 |
-
}
|
970 |
-
}
|
971 |
-
}
|
972 |
-
|
973 |
-
$super_admins = array();
|
974 |
-
|
975 |
-
foreach ( $connection_status as $slug => $blogs_status ) {
|
976 |
-
$skips = 0;
|
977 |
-
$ignores = 0;
|
978 |
-
$connections = 0;
|
979 |
-
$opted_in_users = array();
|
980 |
-
$opted_in_super_admins = array();
|
981 |
-
|
982 |
-
$storage = FS_Storage::instance( WP_FS__MODULE_TYPE_PLUGIN, $slug );
|
983 |
-
|
984 |
-
foreach ( $blogs_status as $blog_id => $status_or_user_id ) {
|
985 |
-
if ( 'skipped' === $status_or_user_id ) {
|
986 |
-
$skips ++;
|
987 |
-
} else if ( 'ignored' === $status_or_user_id ) {
|
988 |
-
$ignores ++;
|
989 |
-
} else if ( FS_User::is_valid_id( $status_or_user_id ) ) {
|
990 |
-
$connections ++;
|
991 |
-
|
992 |
-
if ( ! isset( $opted_in_users[ $status_or_user_id ] ) ) {
|
993 |
-
$opted_in_users[ $status_or_user_id ] = array();
|
994 |
-
}
|
995 |
-
|
996 |
-
$opted_in_users[ $status_or_user_id ][] = $blog_id;
|
997 |
-
|
998 |
-
if ( isset( $super_admins[ $status_or_user_id ] ) ||
|
999 |
-
self::is_super_admin( $status_or_user_id )
|
1000 |
-
) {
|
1001 |
-
// Cache super-admin data.
|
1002 |
-
$super_admins[ $status_or_user_id ] = true;
|
1003 |
-
|
1004 |
-
// Remember opted-in super-admins for the plugin.
|
1005 |
-
$opted_in_super_admins[ $status_or_user_id ] = true;
|
1006 |
-
}
|
1007 |
-
}
|
1008 |
-
}
|
1009 |
-
|
1010 |
-
$main_super_admin_user_id = null;
|
1011 |
-
$all_migrated = false;
|
1012 |
-
if ( $sites_count == $skips ) {
|
1013 |
-
// All sites were skipped -> network skip by copying the anonymous mode from any of the sites.
|
1014 |
-
$storage->is_anonymous_ms = $storage->is_anonymous;
|
1015 |
-
|
1016 |
-
$all_migrated = true;
|
1017 |
-
} else if ( $sites_count == $ignores ) {
|
1018 |
-
// Don't do anything, still in activation mode.
|
1019 |
-
|
1020 |
-
$all_migrated = true;
|
1021 |
-
} else if ( 0 < count( $opted_in_super_admins ) ) {
|
1022 |
-
// Find the super-admin with the majority of installs.
|
1023 |
-
$max_installs_by_super_admin = 0;
|
1024 |
-
foreach ( $opted_in_super_admins as $user_id => $true ) {
|
1025 |
-
$installs_count = count( $opted_in_users[ $user_id ] );
|
1026 |
-
|
1027 |
-
if ( $installs_count > $max_installs_by_super_admin ) {
|
1028 |
-
$max_installs_by_super_admin = $installs_count;
|
1029 |
-
$main_super_admin_user_id = $user_id;
|
1030 |
-
}
|
1031 |
-
}
|
1032 |
-
|
1033 |
-
if ( $sites_count == $connections && 1 == count( $opted_in_super_admins ) ) {
|
1034 |
-
// Super-admin opted-in for all sites in the network.
|
1035 |
-
$storage->is_network_connected = true;
|
1036 |
-
|
1037 |
-
$all_migrated = true;
|
1038 |
-
}
|
1039 |
-
|
1040 |
-
// Store network user.
|
1041 |
-
$storage->network_user_id = $main_super_admin_user_id;
|
1042 |
-
|
1043 |
-
$storage->network_install_blog_id = ( $sites_count == $connections ) ?
|
1044 |
-
// Since all sites are opted-in, associating with the main site.
|
1045 |
-
get_current_blog_id() :
|
1046 |
-
// Associating with the 1st found opted-in site.
|
1047 |
-
$opted_in_users[ $main_super_admin_user_id ][0];
|
1048 |
-
|
1049 |
-
/**
|
1050 |
-
* Make sure we migrate the plan ID of the network install, otherwise, if after the migration
|
1051 |
-
* the 1st page that will be loaded is the network level WP Admin and $storage->network_install_blog_id
|
1052 |
-
* is different than the main site of the network, the $this->_site will not be set since the plan_id
|
1053 |
-
* will be empty.
|
1054 |
-
*/
|
1055 |
-
$storage->migrate_to_network();
|
1056 |
-
self::migrate_install_plan_to_plan_id( $storage, $storage->network_install_blog_id );
|
1057 |
-
} else {
|
1058 |
-
// At least one opt-in. All the opt-in were created by a non-super-admin.
|
1059 |
-
if ( 0 == $ignores ) {
|
1060 |
-
// All sites were opted-in or skipped, all by non-super-admin. So delegate all.
|
1061 |
-
$storage->store( 'is_delegated_connection', true, true );
|
1062 |
-
|
1063 |
-
$all_migrated = true;
|
1064 |
-
}
|
1065 |
-
}
|
1066 |
-
|
1067 |
-
if ( ! $all_migrated ) {
|
1068 |
-
/**
|
1069 |
-
* Delegate all sites that were:
|
1070 |
-
* 1) Opted-in by a user that is NOT the main-super-admin.
|
1071 |
-
* 2) Skipped and non of the sites was opted-in by a super-admin. If any site was opted-in by a super-admin, there will be a main-super-admin, and we consider the skip as if it was done by that user.
|
1072 |
-
*/
|
1073 |
-
foreach ( $blogs_status as $blog_id => $status_or_user_id ) {
|
1074 |
-
if ( $status_or_user_id == $main_super_admin_user_id ) {
|
1075 |
-
continue;
|
1076 |
-
}
|
1077 |
-
|
1078 |
-
if ( FS_User::is_valid_id( $status_or_user_id ) ||
|
1079 |
-
( 'skipped' === $status_or_user_id && is_null( $main_super_admin_user_id ) )
|
1080 |
-
) {
|
1081 |
-
$storage->store( 'is_delegated_connection', true, $blog_id );
|
1082 |
-
}
|
1083 |
-
}
|
1084 |
-
}
|
1085 |
-
|
1086 |
-
|
1087 |
-
if ( ( $connections + $skips > 0 ) ) {
|
1088 |
-
if ( $ignores > 0 ) {
|
1089 |
-
/**
|
1090 |
-
* If admin already opted-in or skipped in any of the network sites, and also
|
1091 |
-
* have sites which the connection decision was not yet taken, set this plugin
|
1092 |
-
* into network activation mode so the super-admin can choose what to do with
|
1093 |
-
* the rest of the sites.
|
1094 |
-
*/
|
1095 |
-
self::set_network_upgrade_mode( $storage );
|
1096 |
-
}
|
1097 |
-
}
|
1098 |
-
}
|
1099 |
-
}
|
1100 |
-
|
1101 |
-
/**
|
1102 |
-
* Set a module into network upgrade mode.
|
1103 |
-
*
|
1104 |
-
* @author Vova Feldman (@svovaf)
|
1105 |
-
* @since 2.0.0
|
1106 |
-
*
|
1107 |
-
* @param \FS_Storage $storage
|
1108 |
-
*
|
1109 |
-
* @return bool
|
1110 |
-
*/
|
1111 |
-
private static function set_network_upgrade_mode( FS_Storage $storage ) {
|
1112 |
-
return $storage->is_network_activation = true;
|
1113 |
-
}
|
1114 |
-
|
1115 |
-
/**
|
1116 |
-
* Will return true after upgrading to the SDK with the network level integration,
|
1117 |
-
* when the super-admin involvement is required regarding the rest of the sites.
|
1118 |
-
*
|
1119 |
-
* @author Vova Feldman (@svovaf)
|
1120 |
-
* @since 2.0.0
|
1121 |
-
*
|
1122 |
-
* @return bool
|
1123 |
-
*/
|
1124 |
-
function is_network_upgrade_mode() {
|
1125 |
-
return $this->_storage->get( 'is_network_activation' );
|
1126 |
-
}
|
1127 |
-
|
1128 |
-
/**
|
1129 |
-
* Clear flag after the upgrade mode completion.
|
1130 |
-
*
|
1131 |
-
* @author Vova Feldman (@svovaf)
|
1132 |
-
* @since 2.0.0
|
1133 |
-
*
|
1134 |
-
* @return bool True if network activation was on and now completed.
|
1135 |
-
*/
|
1136 |
-
private function network_upgrade_mode_completed() {
|
1137 |
-
if ( fs_is_network_admin() && $this->is_network_upgrade_mode() ) {
|
1138 |
-
$this->_storage->remove( 'is_network_activation' );
|
1139 |
-
|
1140 |
-
return true;
|
1141 |
-
}
|
1142 |
-
|
1143 |
-
return false;
|
1144 |
-
}
|
1145 |
-
|
1146 |
-
#endregion
|
1147 |
-
|
1148 |
-
/**
|
1149 |
-
* This action is connected to the 'plugins_loaded' hook and helps to determine
|
1150 |
-
* if this is a new plugin installation or a plugin update.
|
1151 |
-
*
|
1152 |
-
* There are 3 different use-cases:
|
1153 |
-
* 1) New plugin installation right with Freemius:
|
1154 |
-
* 1.1 _activate_plugin_event_hook() will be executed first
|
1155 |
-
* 1.2 Since $this->_storage->is_plugin_new_install is not set,
|
1156 |
-
* and $this->_storage->plugin_last_version is not set,
|
1157 |
-
* $this->_storage->is_plugin_new_install will be set to TRUE.
|
1158 |
-
* 1.3 When _plugins_loaded() will be executed, $this->_storage->is_plugin_new_install will
|
1159 |
-
* be already set to TRUE.
|
1160 |
-
*
|
1161 |
-
* 2) Plugin update, didn't have Freemius before, and now have the SDK:
|
1162 |
-
* 2.1 _activate_plugin_event_hook() will not be executed, because
|
1163 |
-
* the activation hook do NOT fires on updates since WP 3.1.
|
1164 |
-
* 2.2 When _plugins_loaded() will be executed, $this->_storage->is_plugin_new_install will
|
1165 |
-
* be empty, therefore, it will be set to FALSE.
|
1166 |
-
*
|
1167 |
-
* 3) Plugin update, had Freemius in prev version as well:
|
1168 |
-
* 3.1 _version_updates_handler() will be executed 1st, since FS was installed
|
1169 |
-
* before, $this->_storage->plugin_last_version will NOT be empty,
|
1170 |
-
* therefore, $this->_storage->is_plugin_new_install will be set to FALSE.
|
1171 |
-
* 3.2 When _plugins_loaded() will be executed, $this->_storage->is_plugin_new_install is
|
1172 |
-
* already set, therefore, it will not be modified.
|
1173 |
-
*
|
1174 |
-
* Use-case #3 is backward compatible, #3.1 will be executed since 1.0.9.
|
1175 |
-
*
|
1176 |
-
* NOTE:
|
1177 |
-
* The only fallback of this mechanism is if an admin updates a plugin based on use-case #2,
|
1178 |
-
* and then, the next immediate PageView is the plugin's main settings page, it will not
|
1179 |
-
* show the opt-in right away. The reason it will happen is because Freemius execution
|
1180 |
-
* will be turned off till the plugin is fully loaded at least once
|
1181 |
-
* (till $this->_storage->was_plugin_loaded is TRUE).
|
1182 |
-
*
|
1183 |
-
* @author Vova Feldman (@svovaf)
|
1184 |
-
* @since 1.1.9
|
1185 |
-
*
|
1186 |
-
*/
|
1187 |
-
function _plugins_loaded() {
|
1188 |
-
// Update flag that plugin was loaded with Freemius at least once.
|
1189 |
-
$this->_storage->was_plugin_loaded = true;
|
1190 |
-
|
1191 |
-
/**
|
1192 |
-
* Bug fix - only set to false when it's a plugin, due to the
|
1193 |
-
* execution sequence of the theme hooks and our methods, if
|
1194 |
-
* this will be set for themes, Freemius will always assume
|
1195 |
-
* it's a theme update.
|
1196 |
-
*
|
1197 |
-
* @author Vova Feldman (@svovaf)
|
1198 |
-
* @since 1.2.2.2
|
1199 |
-
*/
|
1200 |
-
if ( $this->is_plugin() &&
|
1201 |
-
! isset( $this->_storage->is_plugin_new_install )
|
1202 |
-
) {
|
1203 |
-
$this->_storage->is_plugin_new_install = false;
|
1204 |
-
}
|
1205 |
-
}
|
1206 |
-
|
1207 |
-
/**
|
1208 |
-
* Add special parameter to WP admin AJAX calls so when we
|
1209 |
-
* process AJAX calls we can identify its source properly.
|
1210 |
-
*
|
1211 |
-
* @author Leo Fajardo (@leorw)
|
1212 |
-
* @since 2.0.0
|
1213 |
-
*/
|
1214 |
-
static function _enrich_ajax_url() {
|
1215 |
-
$admin_param = is_network_admin() ?
|
1216 |
-
'_fs_network_admin' :
|
1217 |
-
'_fs_blog_admin';
|
1218 |
-
?>
|
1219 |
-
<script type="text/javascript">
|
1220 |
-
(function ($) {
|
1221 |
-
$(document).ajaxSend(function (event, jqxhr, settings) {
|
1222 |
-
if (settings.url &&
|
1223 |
-
-1 < settings.url.indexOf('admin-ajax.php') &&
|
1224 |
-
! ( settings.url.indexOf( '<?php echo $admin_param ?>' ) > 0 )
|
1225 |
-
) {
|
1226 |
-
if (settings.url.indexOf('?') > 0) {
|
1227 |
-
settings.url += '&';
|
1228 |
-
} else {
|
1229 |
-
settings.url += '?';
|
1230 |
-
}
|
1231 |
-
|
1232 |
-
settings.url += '<?php echo $admin_param ?>=true';
|
1233 |
-
|
1234 |
-
}
|
1235 |
-
});
|
1236 |
-
})(jQuery);
|
1237 |
-
</script>
|
1238 |
-
<?php
|
1239 |
-
}
|
1240 |
-
|
1241 |
-
/**
|
1242 |
-
* Opens the support forum subemenu item in a new browser page.
|
1243 |
-
*
|
1244 |
-
* @author Vova Feldman (@svovaf)
|
1245 |
-
* @since 2.1.4
|
1246 |
-
*/
|
1247 |
-
static function _open_support_forum_in_new_page() {
|
1248 |
-
?>
|
1249 |
-
<script type="text/javascript">
|
1250 |
-
(function ($) {
|
1251 |
-
$('.fs-submenu-item.wp-support-forum').parent().attr('target', '_blank');
|
1252 |
-
})(jQuery);
|
1253 |
-
</script>
|
1254 |
-
<?php
|
1255 |
-
}
|
1256 |
-
|
1257 |
-
/**
|
1258 |
-
* @author Vova Feldman (@svovaf)
|
1259 |
-
* @since 1.0.9
|
1260 |
-
*/
|
1261 |
-
private function _register_hooks() {
|
1262 |
-
$this->_logger->entrance();
|
1263 |
-
|
1264 |
-
if ( is_admin() ) {
|
1265 |
-
add_action( 'plugins_loaded', array( &$this, '_hook_action_links_and_register_account_hooks' ) );
|
1266 |
-
|
1267 |
-
if ( $this->is_plugin() ) {
|
1268 |
-
if ( self::is_plugin_install_page() && true !== fs_request_get_bool( 'fs_allow_updater_and_dialog' ) ) {
|
1269 |
-
/**
|
1270 |
-
* Unless the `fs_allow_updater_and_dialog` URL param exists and its value is `true`, make
|
1271 |
-
* Freemius-related updates unavailable on the "Add Plugins" admin page (/plugin-install.php)
|
1272 |
-
* so that they won't interfere with the .org plugins' functionalities on that page (e.g.
|
1273 |
-
* updating of a .org plugin).
|
1274 |
-
*/
|
1275 |
-
add_filter( 'site_transient_update_plugins', array( 'Freemius', '_remove_fs_updates_from_plugin_install_page' ), 10, 2 );
|
1276 |
-
} else if ( self::is_plugins_page() || self::is_updates_page() ) {
|
1277 |
-
/**
|
1278 |
-
* On the "Plugins" and "Updates" admin pages, if there are premium or non–org-compliant
|
1279 |
-
* plugins, modify their details dialog URLs (add a Freemius-specific param) so that the SDK can
|
1280 |
-
* determine if the plugin information dialog should show information from Freemius.
|
1281 |
-
*
|
1282 |
-
* @author Leo Fajardo (@leorw)
|
1283 |
-
* @since 2.2.3
|
1284 |
-
*/
|
1285 |
-
add_action( 'admin_footer', array( 'Freemius', '_prepend_fs_allow_updater_and_dialog_flag_url_param' ) );
|
1286 |
-
}
|
1287 |
-
|
1288 |
-
$plugin_dir = dirname( $this->_plugin_dir_path ) . '/';
|
1289 |
-
|
1290 |
-
/**
|
1291 |
-
* @since 1.2.2
|
1292 |
-
*
|
1293 |
-
* Hook to both free and premium version activations to support
|
1294 |
-
* auto deactivation on the other version activation.
|
1295 |
-
*/
|
1296 |
-
register_activation_hook(
|
1297 |
-
$plugin_dir . $this->_free_plugin_basename,
|
1298 |
-
array( &$this, '_activate_plugin_event_hook' )
|
1299 |
-
);
|
1300 |
-
|
1301 |
-
register_activation_hook(
|
1302 |
-
$plugin_dir . $this->premium_plugin_basename(),
|
1303 |
-
array( &$this, '_activate_plugin_event_hook' )
|
1304 |
-
);
|
1305 |
-
} else {
|
1306 |
-
add_action( 'after_switch_theme', array( &$this, '_activate_theme_event_hook' ), 10, 2 );
|
1307 |
-
|
1308 |
-
/**
|
1309 |
-
* Include the required hooks to capture the theme settings' page tabs
|
1310 |
-
* and cache them.
|
1311 |
-
*
|
1312 |
-
* @author Vova Feldman (@svovaf)
|
1313 |
-
* @since 1.2.2.7
|
1314 |
-
*/
|
1315 |
-
if ( ! $this->_cache->has_valid( 'tabs' ) ) {
|
1316 |
-
add_action( 'admin_footer', array( &$this, '_tabs_capture' ) );
|
1317 |
-
// Add license activation AJAX callback.
|
1318 |
-
$this->add_ajax_action( 'store_tabs', array( &$this, '_store_tabs_ajax_action' ) );
|
1319 |
-
|
1320 |
-
add_action( 'admin_enqueue_scripts', array( &$this, '_store_tabs_styles' ), 9999999 );
|
1321 |
-
}
|
1322 |
-
|
1323 |
-
add_action(
|
1324 |
-
'admin_footer',
|
1325 |
-
array( &$this, '_add_freemius_tabs' ),
|
1326 |
-
/**
|
1327 |
-
* The tabs JS code must be executed after the tabs capture logic (_tabs_capture()).
|
1328 |
-
* That's why the priority is 11 while the tabs capture logic is added
|
1329 |
-
* with priority 10.
|
1330 |
-
*
|
1331 |
-
* @author Vova Feldman (@svovaf)
|
1332 |
-
*/
|
1333 |
-
11
|
1334 |
-
);
|
1335 |
-
|
1336 |
-
add_action( 'admin_footer', array( &$this, '_style_premium_theme' ) );
|
1337 |
-
}
|
1338 |
-
|
1339 |
-
/**
|
1340 |
-
* Part of the mechanism to identify new plugin install vs. plugin update.
|
1341 |
-
*
|
1342 |
-
* @author Vova Feldman (@svovaf)
|
1343 |
-
* @since 1.1.9
|
1344 |
-
*/
|
1345 |
-
if ( empty( $this->_storage->was_plugin_loaded ) ) {
|
1346 |
-
/**
|
1347 |
-
* During the plugin activation (not theme), 'plugins_loaded' will be already executed
|
1348 |
-
* when the logic gets here since the activation logic first add the activate plugins,
|
1349 |
-
* then triggers 'plugins_loaded', and only then include the code of the plugin that
|
1350 |
-
* is activated. Which means that _plugins_loaded() will NOT be executed during the
|
1351 |
-
* plugin activation, and that IS intentional.
|
1352 |
-
*
|
1353 |
-
* @author Vova Feldman (@svovaf)
|
1354 |
-
*/
|
1355 |
-
if ( $this->is_plugin() && $this->is_activation_mode( false ) ) {
|
1356 |
-
add_action( 'plugins_loaded', array( &$this, '_plugins_loaded' ) );
|
1357 |
-
} else {
|
1358 |
-
// If was activated before, then it was already loaded before.
|
1359 |
-
$this->_plugins_loaded();
|
1360 |
-
}
|
1361 |
-
}
|
1362 |
-
|
1363 |
-
if ( ! self::is_ajax() ) {
|
1364 |
-
if ( ! $this->is_addon() ) {
|
1365 |
-
add_action( 'init', array( &$this, '_add_default_submenu_items' ), WP_FS__LOWEST_PRIORITY );
|
1366 |
-
}
|
1367 |
-
}
|
1368 |
-
|
1369 |
-
if ( $this->_storage->handle_gdpr_admin_notice ) {
|
1370 |
-
add_action( 'init', array( &$this, '_maybe_show_gdpr_admin_notice' ) );
|
1371 |
-
}
|
1372 |
-
|
1373 |
-
add_action( 'init', array( &$this, '_maybe_add_gdpr_optin_ajax_handler') );
|
1374 |
-
}
|
1375 |
-
|
1376 |
-
if ( $this->is_plugin() ) {
|
1377 |
-
if ( $this->_is_network_active ) {
|
1378 |
-
add_action( 'wpmu_new_blog', array( $this, '_after_new_blog_callback' ), 10, 6 );
|
1379 |
-
}
|
1380 |
-
|
1381 |
-
register_deactivation_hook( $this->_plugin_main_file_path, array( &$this, '_deactivate_plugin_hook' ) );
|
1382 |
-
}
|
1383 |
-
|
1384 |
-
if ( is_multisite() ) {
|
1385 |
-
add_action( 'deactivate_blog', array( &$this, '_after_site_deactivated_callback' ) );
|
1386 |
-
add_action( 'archive_blog', array( &$this, '_after_site_deactivated_callback' ) );
|
1387 |
-
add_action( 'make_spam_blog', array( &$this, '_after_site_deactivated_callback' ) );
|
1388 |
-
add_action( 'deleted_blog', array( &$this, '_after_site_deleted_callback' ), 10, 2 );
|
1389 |
-
|
1390 |
-
add_action( 'activate_blog', array( &$this, '_after_site_reactivated_callback' ) );
|
1391 |
-
add_action( 'unarchive_blog', array( &$this, '_after_site_reactivated_callback' ) );
|
1392 |
-
add_action( 'make_ham_blog', array( &$this, '_after_site_reactivated_callback' ) );
|
1393 |
-
}
|
1394 |
-
|
1395 |
-
if ( $this->is_theme() &&
|
1396 |
-
self::is_customizer() &&
|
1397 |
-
$this->apply_filters( 'show_customizer_upsell', true )
|
1398 |
-
) {
|
1399 |
-
// Register customizer upsell.
|
1400 |
-
add_action( 'customize_register', array( &$this, '_customizer_register' ) );
|
1401 |
-
}
|
1402 |
-
|
1403 |
-
add_action( 'admin_init', array( &$this, '_redirect_on_clicked_menu_link' ), WP_FS__LOWEST_PRIORITY );
|
1404 |
-
|
1405 |
-
if ( $this->is_theme() ) {
|
1406 |
-
add_action( 'admin_init', array( &$this, '_add_tracking_links' ) );
|
1407 |
-
}
|
1408 |
-
|
1409 |
-
add_action( 'admin_init', array( &$this, '_add_license_activation' ) );
|
1410 |
-
add_action( 'admin_init', array( &$this, '_add_premium_version_upgrade_selection' ) );
|
1411 |
-
|
1412 |
-
$this->add_ajax_action( 'update_billing', array( &$this, '_update_billing_ajax_action' ) );
|
1413 |
-
$this->add_ajax_action( 'start_trial', array( &$this, '_start_trial_ajax_action' ) );
|
1414 |
-
|
1415 |
-
if ( $this->_is_network_active && fs_is_network_admin() ) {
|
1416 |
-
$this->add_ajax_action( 'network_activate', array( &$this, '_network_activate_ajax_action' ) );
|
1417 |
-
}
|
1418 |
-
|
1419 |
-
$this->add_ajax_action( 'install_premium_version', array(
|
1420 |
-
&$this,
|
1421 |
-
'_install_premium_version_ajax_action'
|
1422 |
-
) );
|
1423 |
-
|
1424 |
-
$this->add_ajax_action( 'submit_affiliate_application', array( &$this, '_submit_affiliate_application' ) );
|
1425 |
-
|
1426 |
-
$this->add_action( 'after_plans_sync', array( &$this, '_check_for_trial_plans' ) );
|
1427 |
-
|
1428 |
-
$this->add_action( 'sdk_version_update', array( &$this, '_sdk_version_update' ), WP_FS__DEFAULT_PRIORITY, 2 );
|
1429 |
-
|
1430 |
-
$this->add_action(
|
1431 |
-
'plugin_version_update',
|
1432 |
-
array( &$this, '_after_version_update' ),
|
1433 |
-
WP_FS__DEFAULT_PRIORITY,
|
1434 |
-
2
|
1435 |
-
);
|
1436 |
-
$this->add_filter( 'after_code_type_change', array( &$this, '_after_code_type_change' ) );
|
1437 |
-
|
1438 |
-
add_action( 'admin_init', array( &$this, '_add_trial_notice' ) );
|
1439 |
-
add_action( 'admin_init', array( &$this, '_add_affiliate_program_notice' ) );
|
1440 |
-
add_action( 'admin_enqueue_scripts', array( &$this, '_enqueue_common_css' ) );
|
1441 |
-
|
1442 |
-
/**
|
1443 |
-
* Handle request to reset anonymous mode for `get_reconnect_url()`.
|
1444 |
-
*
|
1445 |
-
* @author Vova Feldman (@svovaf)
|
1446 |
-
* @since 1.2.1.5
|
1447 |
-
*/
|
1448 |
-
if ( fs_request_is_action( 'reset_anonymous_mode' ) &&
|
1449 |
-
$this->get_unique_affix() === fs_request_get( 'fs_unique_affix' )
|
1450 |
-
) {
|
1451 |
-
add_action( 'admin_init', array( &$this, 'connect_again' ) );
|
1452 |
-
}
|
1453 |
-
}
|
1454 |
-
|
1455 |
-
/**
|
1456 |
-
* Makes Freemius-related updates unavailable on the "Add Plugins" admin page (/plugin-install.php) so that
|
1457 |
-
* they won't interfere with the .org plugins' functionalities on that page (e.g. updating of a .org plugin).
|
1458 |
-
*
|
1459 |
-
* @author Leo Fajardo (@leorw)
|
1460 |
-
* @since 2.2.3
|
1461 |
-
*
|
1462 |
-
* @param object $updates
|
1463 |
-
* @param string|null $transient
|
1464 |
-
*
|
1465 |
-
* @return object
|
1466 |
-
*/
|
1467 |
-
static function _remove_fs_updates_from_plugin_install_page( $updates, $transient = null ) {
|
1468 |
-
if ( is_object( $updates ) && isset( $updates->response ) ) {
|
1469 |
-
foreach ( $updates->response as $file => $plugin ) {
|
1470 |
-
if ( false !== strpos( $plugin->package, 'api.freemius' ) ) {
|
1471 |
-
unset( $updates->response[ $file ] );
|
1472 |
-
}
|
1473 |
-
}
|
1474 |
-
}
|
1475 |
-
|
1476 |
-
return $updates;
|
1477 |
-
}
|
1478 |
-
|
1479 |
-
/**
|
1480 |
-
* Prepends the `fs_allow_updater_and_dialog` param to the plugin information URLs to tell the SDK to handle
|
1481 |
-
* the information that is shown on the plugin details dialog that is shown when the relevant link is clicked.
|
1482 |
-
*
|
1483 |
-
* @author Leo Fajardo (@leorw)
|
1484 |
-
* @since 2.2.3
|
1485 |
-
*
|
1486 |
-
* @return string
|
1487 |
-
*/
|
1488 |
-
static function _prepend_fs_allow_updater_and_dialog_flag_url_param() {
|
1489 |
-
$slug_basename_map = array();
|
1490 |
-
foreach ( self::$_instances as $instance ) {
|
1491 |
-
if ( ! $instance->is_plugin() ) {
|
1492 |
-
continue;
|
1493 |
-
}
|
1494 |
-
|
1495 |
-
$slug_basename_map[ $instance->get_slug() ] = $instance->premium_plugin_basename();
|
1496 |
-
}
|
1497 |
-
?>
|
1498 |
-
<script type="text/javascript">
|
1499 |
-
(function( $ ) {
|
1500 |
-
var slugBasenameMap = <?php echo json_encode( $slug_basename_map ) ?>;
|
1501 |
-
for ( var slug in slugBasenameMap ) {
|
1502 |
-
var basename = slugBasenameMap[ slug ];
|
1503 |
-
|
1504 |
-
// Try to get the plugin rows if on the "Plugins" page.
|
1505 |
-
var $pluginRows = $( '.wp-list-table.plugins tr[data-plugin="' + basename + '"]');
|
1506 |
-
|
1507 |
-
if ( 0 === $pluginRows.length ) {
|
1508 |
-
// Try to get the plugin rows if on the "Updates" page.
|
1509 |
-
var $pluginCheckbox = $( '#update-plugins-table input[type="checkbox"][value="' + basename + '"]' );
|
1510 |
-
if ( 0 !== $pluginCheckbox.length ) {
|
1511 |
-
$pluginRows = $pluginCheckbox.parents( 'tr:first' );
|
1512 |
-
}
|
1513 |
-
}
|
1514 |
-
|
1515 |
-
if ( 0 === $pluginRows.length ) {
|
1516 |
-
// No plugin rows found.
|
1517 |
-
continue;
|
1518 |
-
}
|
1519 |
-
|
1520 |
-
// Find the "View details" links and add the `fs_allow_updater_and_dialog` param to the URL.
|
1521 |
-
$pluginRows.find( 'a[href*="plugin-install.php?tab=plugin-information"]' ).each(function() {
|
1522 |
-
var $this = $( this ),
|
1523 |
-
href = $this.attr( 'href' ).replace( '?tab=', '?fs_allow_updater_and_dialog=true&tab=');
|
1524 |
-
|
1525 |
-
$this.attr( 'href', href );
|
1526 |
-
});
|
1527 |
-
}
|
1528 |
-
})( jQuery );
|
1529 |
-
</script>
|
1530 |
-
<?php
|
1531 |
-
}
|
1532 |
-
|
1533 |
-
/**
|
1534 |
-
* Keeping the uninstall hook registered for free or premium plugin version may result to a fatal error that
|
1535 |
-
* could happen when a user tries to uninstall either version while one of them is still active. Uninstalling a
|
1536 |
-
* plugin will trigger inclusion of the free or premium version and if one of them is active during the
|
1537 |
-
* uninstallation, a fatal error may occur in case the plugin's class or functions are already defined.
|
1538 |
-
*
|
1539 |
-
* @author Leo Fajardo (@leorw)
|
1540 |
-
*
|
1541 |
-
* @since 1.2.0
|
1542 |
-
*/
|
1543 |
-
private function unregister_uninstall_hook() {
|
1544 |
-
$uninstallable_plugins = (array) get_option( 'uninstall_plugins' );
|
1545 |
-
unset( $uninstallable_plugins[ $this->_free_plugin_basename ] );
|
1546 |
-
unset( $uninstallable_plugins[ $this->premium_plugin_basename() ] );
|
1547 |
-
|
1548 |
-
update_option( 'uninstall_plugins', $uninstallable_plugins );
|
1549 |
-
}
|
1550 |
-
|
1551 |
-
/**
|
1552 |
-
* @since 1.2.0 Invalidate module's main file cache, otherwise, FS_Plugin_Updater will not fetch updates.
|
1553 |
-
*
|
1554 |
-
* @param bool $store_prev_path
|
1555 |
-
*/
|
1556 |
-
private function clear_module_main_file_cache( $store_prev_path = true ) {
|
1557 |
-
if ( ! isset( $this->_storage->plugin_main_file ) ||
|
1558 |
-
empty( $this->_storage->plugin_main_file->path )
|
1559 |
-
) {
|
1560 |
-
return;
|
1561 |
-
}
|
1562 |
-
|
1563 |
-
if ( ! $store_prev_path ) {
|
1564 |
-
/**
|
1565 |
-
* Storing the previous path is not needed when clearing the cache after an SDK version update since
|
1566 |
-
* the main purpose of the cache clearing in that event is to correct a wrong plugin main file path
|
1567 |
-
* which causes data mix-up between plugins (e.g. titles and versions of an add-on and its parent plugin).
|
1568 |
-
*
|
1569 |
-
* @author Leo Fajardo (@leorw)
|
1570 |
-
* @since 2.2.1
|
1571 |
-
*/
|
1572 |
-
unset( $this->_storage->plugin_main_file->path );
|
1573 |
-
} else {
|
1574 |
-
$plugin_main_file = clone $this->_storage->plugin_main_file;
|
1575 |
-
|
1576 |
-
// Store cached path (2nd layer cache).
|
1577 |
-
$plugin_main_file->prev_path = $plugin_main_file->path;
|
1578 |
-
|
1579 |
-
// Clear cached path.
|
1580 |
-
unset( $plugin_main_file->path );
|
1581 |
-
|
1582 |
-
$this->_storage->plugin_main_file = $plugin_main_file;
|
1583 |
-
}
|
1584 |
-
|
1585 |
-
/**
|
1586 |
-
* Clear global cached path.
|
1587 |
-
*
|
1588 |
-
* @author Leo Fajardo (@leorw)
|
1589 |
-
* @since 1.2.2
|
1590 |
-
*/
|
1591 |
-
$id_slug_type_path_map = self::$_accounts->get_option( 'id_slug_type_path_map' );
|
1592 |
-
unset( $id_slug_type_path_map[ $this->_module_id ]['path'] );
|
1593 |
-
self::$_accounts->set_option( 'id_slug_type_path_map', $id_slug_type_path_map, true );
|
1594 |
-
}
|
1595 |
-
|
1596 |
-
/**
|
1597 |
-
* @author Leo Fajardo (@leorw)
|
1598 |
-
* @since 2.0.0
|
1599 |
-
*/
|
1600 |
-
function _hook_action_links_and_register_account_hooks() {
|
1601 |
-
add_action( 'admin_init', array( &$this, '_add_tracking_links' ) );
|
1602 |
-
|
1603 |
-
if ( self::is_plugins_page() && $this->is_plugin() ) {
|
1604 |
-
$this->hook_plugin_action_links();
|
1605 |
-
}
|
1606 |
-
|
1607 |
-
$this->_register_account_hooks();
|
1608 |
-
}
|
1609 |
-
|
1610 |
-
/**
|
1611 |
-
* @author Vova Feldman (@svovaf)
|
1612 |
-
* @since 1.0.9
|
1613 |
-
*/
|
1614 |
-
private function _register_account_hooks() {
|
1615 |
-
if ( ! is_admin() ) {
|
1616 |
-
return;
|
1617 |
-
}
|
1618 |
-
|
1619 |
-
/**
|
1620 |
-
* Always show the deactivation feedback form since we added
|
1621 |
-
* automatic free version deactivation upon premium code activation.
|
1622 |
-
*
|
1623 |
-
* @since 1.2.1.6
|
1624 |
-
*/
|
1625 |
-
$this->add_ajax_action(
|
1626 |
-
'submit_uninstall_reason',
|
1627 |
-
array( &$this, '_submit_uninstall_reason_action' )
|
1628 |
-
);
|
1629 |
-
|
1630 |
-
$this->add_ajax_action(
|
1631 |
-
'cancel_subscription_or_trial',
|
1632 |
-
array( &$this, 'cancel_subscription_or_trial_ajax_action' )
|
1633 |
-
);
|
1634 |
-
|
1635 |
-
if ( ! $this->is_addon() || $this->is_parent_plugin_installed() ) {
|
1636 |
-
if ( ( $this->is_plugin() && self::is_plugins_page() ) ||
|
1637 |
-
( $this->is_theme() && self::is_themes_page() )
|
1638 |
-
) {
|
1639 |
-
add_action( 'admin_footer', array( &$this, '_add_deactivation_feedback_dialog_box' ) );
|
1640 |
-
}
|
1641 |
-
}
|
1642 |
-
}
|
1643 |
-
|
1644 |
-
/**
|
1645 |
-
* Leverage backtrace to find caller plugin file path.
|
1646 |
-
*
|
1647 |
-
* @author Vova Feldman (@svovaf)
|
1648 |
-
* @since 1.0.6
|
1649 |
-
*
|
1650 |
-
* @param bool $is_init Is initiation sequence.
|
1651 |
-
*
|
1652 |
-
* @return string
|
1653 |
-
*/
|
1654 |
-
private function _find_caller_plugin_file( $is_init = false ) {
|
1655 |
-
// Try to load the cached value of the file path.
|
1656 |
-
if ( isset( $this->_storage->plugin_main_file ) ) {
|
1657 |
-
$plugin_main_file = $this->_storage->plugin_main_file;
|
1658 |
-
if ( isset( $plugin_main_file->path ) ) {
|
1659 |
-
$absolute_path = $this->get_absolute_path( $plugin_main_file->path );
|
1660 |
-
if ( file_exists( $absolute_path ) ) {
|
1661 |
-
return $absolute_path;
|
1662 |
-
}
|
1663 |
-
}
|
1664 |
-
}
|
1665 |
-
|
1666 |
-
/**
|
1667 |
-
* @since 1.2.1
|
1668 |
-
*
|
1669 |
-
* `clear_module_main_file_cache()` is clearing the plugin's cached path on
|
1670 |
-
* deactivation. Therefore, if any plugin/theme was initiating `Freemius`
|
1671 |
-
* with that plugin's slug, it was overriding the empty plugin path with a wrong path.
|
1672 |
-
*
|
1673 |
-
* So, we've added a special mechanism with a 2nd layer of cache that uses `prev_path`
|
1674 |
-
* when the class instantiator isn't the module.
|
1675 |
-
*/
|
1676 |
-
if ( ! $is_init ) {
|
1677 |
-
// Fetch prev path cache.
|
1678 |
-
if ( isset( $this->_storage->plugin_main_file ) &&
|
1679 |
-
isset( $this->_storage->plugin_main_file->prev_path )
|
1680 |
-
) {
|
1681 |
-
$absolute_path = $this->get_absolute_path( $this->_storage->plugin_main_file->prev_path );
|
1682 |
-
if ( file_exists( $absolute_path ) ) {
|
1683 |
-
return $absolute_path;
|
1684 |
-
}
|
1685 |
-
}
|
1686 |
-
|
1687 |
-
wp_die(
|
1688 |
-
$this->get_text_inline( 'Freemius SDK couldn\'t find the plugin\'s main file. Please contact sdk@freemius.com with the current error.', 'failed-finding-main-path' ) .
|
1689 |
-
" Module: {$this->_slug}; SDK: " . WP_FS__SDK_VERSION . ";",
|
1690 |
-
$this->get_text_inline( 'Error', 'error' ),
|
1691 |
-
array( 'back_link' => true )
|
1692 |
-
);
|
1693 |
-
}
|
1694 |
-
|
1695 |
-
/**
|
1696 |
-
* @since 1.2.1
|
1697 |
-
*
|
1698 |
-
* Only the original instantiator that calls dynamic_init can modify the module's path.
|
1699 |
-
*/
|
1700 |
-
// Find caller module.
|
1701 |
-
$id_slug_type_path_map = self::$_accounts->get_option( 'id_slug_type_path_map', array() );
|
1702 |
-
$this->_storage->plugin_main_file = (object) array(
|
1703 |
-
'path' => $id_slug_type_path_map[ $this->_module_id ]['path'],
|
1704 |
-
);
|
1705 |
-
|
1706 |
-
return $this->get_absolute_path( $id_slug_type_path_map[ $this->_module_id ]['path'] );
|
1707 |
-
}
|
1708 |
-
|
1709 |
-
/**
|
1710 |
-
* @author Leo Fajardo (@leorw)
|
1711 |
-
* @since 1.2.3
|
1712 |
-
*
|
1713 |
-
* @param string $path
|
1714 |
-
*
|
1715 |
-
* @return string
|
1716 |
-
*/
|
1717 |
-
private function get_relative_path( $path ) {
|
1718 |
-
$module_root_dir = $this->get_module_root_dir_path();
|
1719 |
-
if ( 0 === strpos( $path, $module_root_dir ) ) {
|
1720 |
-
$path = substr( $path, strlen( $module_root_dir ) );
|
1721 |
-
}
|
1722 |
-
|
1723 |
-
return $path;
|
1724 |
-
}
|
1725 |
-
|
1726 |
-
/**
|
1727 |
-
* @author Leo Fajardo (@leorw)
|
1728 |
-
* @since 1.2.3
|
1729 |
-
*
|
1730 |
-
* @param string $path
|
1731 |
-
* @param string|bool $module_type
|
1732 |
-
*
|
1733 |
-
* @return string
|
1734 |
-
*/
|
1735 |
-
private function get_absolute_path( $path, $module_type = false ) {
|
1736 |
-
$module_root_dir = $this->get_module_root_dir_path( $module_type );
|
1737 |
-
if ( 0 !== strpos( $path, $module_root_dir ) ) {
|
1738 |
-
$path = fs_normalize_path( $module_root_dir . $path );
|
1739 |
-
}
|
1740 |
-
|
1741 |
-
return $path;
|
1742 |
-
}
|
1743 |
-
|
1744 |
-
/**
|
1745 |
-
* @author Leo Fajardo (@leorw)
|
1746 |
-
* @since 1.2.3
|
1747 |
-
*
|
1748 |
-
* @param string|bool $module_type
|
1749 |
-
*
|
1750 |
-
* @return string
|
1751 |
-
*/
|
1752 |
-
private function get_module_root_dir_path( $module_type = false ) {
|
1753 |
-
$is_plugin = empty( $module_type ) ?
|
1754 |
-
$this->is_plugin() :
|
1755 |
-
( WP_FS__MODULE_TYPE_PLUGIN === $module_type );
|
1756 |
-
|
1757 |
-
return fs_normalize_path( trailingslashit( $is_plugin ?
|
1758 |
-
WP_PLUGIN_DIR :
|
1759 |
-
get_theme_root( get_stylesheet() ) ) );
|
1760 |
-
}
|
1761 |
-
|
1762 |
-
/**
|
1763 |
-
* @author Leo Fajardo (@leorw)
|
1764 |
-
*
|
1765 |
-
* @param number $module_id
|
1766 |
-
* @param string $slug
|
1767 |
-
*
|
1768 |
-
* @since 1.2.2
|
1769 |
-
*/
|
1770 |
-
private function store_id_slug_type_path_map( $module_id, $slug ) {
|
1771 |
-
$id_slug_type_path_map = self::$_accounts->get_option( 'id_slug_type_path_map', array() );
|
1772 |
-
|
1773 |
-
$store_option = false;
|
1774 |
-
|
1775 |
-
if ( ! isset( $id_slug_type_path_map[ $module_id ] ) ) {
|
1776 |
-
$id_slug_type_path_map[ $module_id ] = array(
|
1777 |
-
'slug' => $slug
|
1778 |
-
);
|
1779 |
-
|
1780 |
-
$store_option = true;
|
1781 |
-
}
|
1782 |
-
|
1783 |
-
if ( ! isset( $id_slug_type_path_map[ $module_id ]['path'] ) ||
|
1784 |
-
/**
|
1785 |
-
* This verification is for cases when suddenly the same module
|
1786 |
-
* is installed but with a different folder name.
|
1787 |
-
*
|
1788 |
-
* @author Vova Feldman (@svovaf)
|
1789 |
-
* @since 1.2.3
|
1790 |
-
*/
|
1791 |
-
! file_exists( $this->get_absolute_path(
|
1792 |
-
$id_slug_type_path_map[ $module_id ]['path'],
|
1793 |
-
$id_slug_type_path_map[ $module_id ]['type']
|
1794 |
-
) )
|
1795 |
-
) {
|
1796 |
-
$caller_main_file_and_type = $this->get_caller_main_file_and_type();
|
1797 |
-
|
1798 |
-
$id_slug_type_path_map[ $module_id ]['type'] = $caller_main_file_and_type->module_type;
|
1799 |
-
$id_slug_type_path_map[ $module_id ]['path'] = $caller_main_file_and_type->path;
|
1800 |
-
|
1801 |
-
$store_option = true;
|
1802 |
-
}
|
1803 |
-
|
1804 |
-
if ( $store_option ) {
|
1805 |
-
self::$_accounts->set_option( 'id_slug_type_path_map', $id_slug_type_path_map, true );
|
1806 |
-
}
|
1807 |
-
}
|
1808 |
-
|
1809 |
-
/**
|
1810 |
-
* Identifies the caller type: plugin or theme.
|
1811 |
-
*
|
1812 |
-
* @author Leo Fajardo (@leorw)
|
1813 |
-
* @since 1.2.2
|
1814 |
-
*
|
1815 |
-
* @author Vova Feldman (@svovaf)
|
1816 |
-
* @since 1.2.2.3 Find the earliest module in the call stack that calls to the SDK. This fix is for cases when
|
1817 |
-
* add-ons are relying on loading the SDK from the parent module, and also allows themes including the
|
1818 |
-
* SDK an internal file instead of directly from functions.php.
|
1819 |
-
* @since 1.2.1.7 Knows how to handle cases when an add-on includes the parent module logic.
|
1820 |
-
*/
|
1821 |
-
private function get_caller_main_file_and_type() {
|
1822 |
-
self::require_plugin_essentials();
|
1823 |
-
|
1824 |
-
$all_plugins = fs_get_plugins( true );
|
1825 |
-
$all_plugins_paths = array();
|
1826 |
-
|
1827 |
-
// Get active plugin's main files real full names (might be symlinks).
|
1828 |
-
foreach ( $all_plugins as $relative_path => $data ) {
|
1829 |
-
if ( false === strpos( fs_normalize_path( $relative_path ), '/' ) ) {
|
1830 |
-
/**
|
1831 |
-
* Ignore plugins that don't have a folder (e.g. Hello Dolly) since they
|
1832 |
-
* can't really include the SDK.
|
1833 |
-
*
|
1834 |
-
* @author Vova Feldman
|
1835 |
-
* @since 1.2.1.7
|
1836 |
-
*/
|
1837 |
-
continue;
|
1838 |
-
}
|
1839 |
-
|
1840 |
-
$all_plugins_paths[] = fs_normalize_path( realpath( WP_PLUGIN_DIR . '/' . $relative_path ) );
|
1841 |
-
}
|
1842 |
-
|
1843 |
-
$caller_file_candidate = false;
|
1844 |
-
$caller_map = array();
|
1845 |
-
$module_type = WP_FS__MODULE_TYPE_PLUGIN;
|
1846 |
-
$themes_dir = fs_normalize_path( get_theme_root( get_stylesheet() ) );
|
1847 |
-
|
1848 |
-
for ( $i = 1, $bt = debug_backtrace(), $len = count( $bt ); $i < $len; $i ++ ) {
|
1849 |
-
if ( empty( $bt[ $i ]['file'] ) ) {
|
1850 |
-
continue;
|
1851 |
-
}
|
1852 |
-
|
1853 |
-
if ( $i > 1 && ! empty( $bt[ $i - 1 ]['file'] ) && $bt[ $i ]['file'] === $bt[ $i - 1 ]['file'] ) {
|
1854 |
-
// If file same as the prev file in the stack, skip it.
|
1855 |
-
continue;
|
1856 |
-
}
|
1857 |
-
|
1858 |
-
if ( ! empty( $bt[ $i ]['function'] ) && in_array( $bt[ $i ]['function'], array(
|
1859 |
-
'do_action',
|
1860 |
-
'apply_filter',
|
1861 |
-
// The string split is stupid, but otherwise, theme check
|
1862 |
-
// throws info notices.
|
1863 |
-
'requir' . 'e_once',
|
1864 |
-
'requir' . 'e',
|
1865 |
-
'includ' . 'e_once',
|
1866 |
-
'includ' . 'e',
|
1867 |
-
'install_and_activate_plugin',
|
1868 |
-
'try_activate_plugin',
|
1869 |
-
'activate_plugin'
|
1870 |
-
) )
|
1871 |
-
) {
|
1872 |
-
// Ignore call stack hooks and files inclusion.
|
1873 |
-
continue;
|
1874 |
-
}
|
1875 |
-
|
1876 |
-
$caller_file_path = fs_normalize_path( $bt[ $i ]['file'] );
|
1877 |
-
|
1878 |
-
if ( 'functions.php' === basename( $caller_file_path ) ) {
|
1879 |
-
/**
|
1880 |
-
* 1. Assumes that theme's starting execution file is functions.php.
|
1881 |
-
* 2. This complex logic fixes symlink issues (e.g. with Vargant).
|
1882 |
-
*
|
1883 |
-
* @author Vova Feldman (@svovaf)
|
1884 |
-
* @since 1.2.2.5
|
1885 |
-
*/
|
1886 |
-
|
1887 |
-
if ( $caller_file_path == fs_normalize_path( realpath( trailingslashit( $themes_dir ) . basename( dirname( $caller_file_path ) ) . '/' . basename( $caller_file_path ) ) ) ) {
|
1888 |
-
$module_type = WP_FS__MODULE_TYPE_THEME;
|
1889 |
-
|
1890 |
-
/**
|
1891 |
-
* Relative path of the theme, e.g.:
|
1892 |
-
* `my-theme/functions.php`
|
1893 |
-
*
|
1894 |
-
* @author Leo Fajardo (@leorw)
|
1895 |
-
*/
|
1896 |
-
$caller_file_candidate = basename( dirname( $caller_file_path ) ) .
|
1897 |
-
'/' .
|
1898 |
-
basename( $caller_file_path );
|
1899 |
-
|
1900 |
-
continue;
|
1901 |
-
}
|
1902 |
-
}
|
1903 |
-
|
1904 |
-
$caller_file_hash = md5( $caller_file_path );
|
1905 |
-
|
1906 |
-
if ( ! isset( $caller_map[ $caller_file_hash ] ) ) {
|
1907 |
-
foreach ( $all_plugins_paths as $plugin_path ) {
|
1908 |
-
if ( false !== strpos( $caller_file_path, fs_normalize_path( dirname( $plugin_path ) . '/' ) ) ) {
|
1909 |
-
$caller_map[ $caller_file_hash ] = fs_normalize_path( $plugin_path );
|
1910 |
-
break;
|
1911 |
-
}
|
1912 |
-
}
|
1913 |
-
}
|
1914 |
-
|
1915 |
-
if ( isset( $caller_map[ $caller_file_hash ] ) ) {
|
1916 |
-
$module_type = WP_FS__MODULE_TYPE_PLUGIN;
|
1917 |
-
$caller_file_candidate = plugin_basename( $caller_map[ $caller_file_hash ] );
|
1918 |
-
}
|
1919 |
-
}
|
1920 |
-
|
1921 |
-
return (object) array(
|
1922 |
-
'module_type' => $module_type,
|
1923 |
-
'path' => $caller_file_candidate
|
1924 |
-
);
|
1925 |
-
}
|
1926 |
-
|
1927 |
-
#----------------------------------------------------------------------------------
|
1928 |
-
#region Deactivation Feedback Form
|
1929 |
-
#----------------------------------------------------------------------------------
|
1930 |
-
|
1931 |
-
/**
|
1932 |
-
* Displays a confirmation and feedback dialog box when the user clicks on the "Deactivate" link on the plugins
|
1933 |
-
* page.
|
1934 |
-
*
|
1935 |
-
* @author Vova Feldman (@svovaf)
|
1936 |
-
* @author Leo Fajardo (@leorw)
|
1937 |
-
* @since 1.1.2
|
1938 |
-
*/
|
1939 |
-
function _add_deactivation_feedback_dialog_box() {
|
1940 |
-
/* Check the type of user:
|
1941 |
-
* 1. Long-term (long-term)
|
1942 |
-
* 2. Non-registered and non-anonymous short-term (non-registered-and-non-anonymous-short-term).
|
1943 |
-
* 3. Short-term (short-term)
|
1944 |
-
*/
|
1945 |
-
$is_long_term_user = true;
|
1946 |
-
|
1947 |
-
// Check if the site is at least 2 days old.
|
1948 |
-
$time_installed = $this->_storage->install_timestamp;
|
1949 |
-
|
1950 |
-
// Difference in seconds.
|
1951 |
-
$date_diff = time() - $time_installed;
|
1952 |
-
|
1953 |
-
// Convert seconds to days.
|
1954 |
-
$date_diff_days = floor( $date_diff / ( 60 * 60 * 24 ) );
|
1955 |
-
|
1956 |
-
if ( $date_diff_days < 2 ) {
|
1957 |
-
$is_long_term_user = false;
|
1958 |
-
}
|
1959 |
-
|
1960 |
-
$is_long_term_user = $this->apply_filters( 'is_long_term_user', $is_long_term_user );
|
1961 |
-
|
1962 |
-
if ( $is_long_term_user ) {
|
1963 |
-
$user_type = 'long-term';
|
1964 |
-
} else {
|
1965 |
-
if ( ! $this->is_registered() && ! $this->is_anonymous() ) {
|
1966 |
-
$user_type = 'non-registered-and-non-anonymous-short-term';
|
1967 |
-
} else {
|
1968 |
-
$user_type = 'short-term';
|
1969 |
-
}
|
1970 |
-
}
|
1971 |
-
|
1972 |
-
$uninstall_reasons = $this->_get_uninstall_reasons( $user_type );
|
1973 |
-
|
1974 |
-
// Load the HTML template for the deactivation feedback dialog box.
|
1975 |
-
$vars = array(
|
1976 |
-
'reasons' => $uninstall_reasons,
|
1977 |
-
'id' => $this->_module_id
|
1978 |
-
);
|
1979 |
-
|
1980 |
-
/**
|
1981 |
-
* @todo Deactivation form core functions should be loaded only once! Otherwise, when there are multiple Freemius powered plugins the same code is loaded multiple times. The only thing that should be loaded differently is the various deactivation reasons object based on the state of the plugin.
|
1982 |
-
*/
|
1983 |
-
fs_require_template( 'forms/deactivation/form.php', $vars );
|
1984 |
-
}
|
1985 |
-
|
1986 |
-
/**
|
1987 |
-
* @author Leo Fajardo (@leorw)
|
1988 |
-
* @since 1.1.2
|
1989 |
-
*
|
1990 |
-
* @param string $user_type
|
1991 |
-
*
|
1992 |
-
* @return array The uninstall reasons for the specified user type.
|
1993 |
-
*/
|
1994 |
-
function _get_uninstall_reasons( $user_type = 'long-term' ) {
|
1995 |
-
$module_type = $this->_module_type;
|
1996 |
-
|
1997 |
-
$internal_message_template_var = array(
|
1998 |
-
'id' => $this->_module_id
|
1999 |
-
);
|
2000 |
-
|
2001 |
-
$plan = $this->get_plan();
|
2002 |
-
|
2003 |
-
if ( $this->is_registered() && is_object( $plan ) && $plan->has_technical_support() ) {
|
2004 |
-
$contact_support_template = fs_get_template( 'forms/deactivation/contact.php', $internal_message_template_var );
|
2005 |
-
} else {
|
2006 |
-
$contact_support_template = '';
|
2007 |
-
}
|
2008 |
-
|
2009 |
-
$reason_found_better_plugin = array(
|
2010 |
-
'id' => self::REASON_FOUND_A_BETTER_PLUGIN,
|
2011 |
-
'text' => sprintf( $this->get_text_inline( 'I found a better %s', 'reason-found-a-better-plugin' ), $module_type ),
|
2012 |
-
'input_type' => 'textfield',
|
2013 |
-
'input_placeholder' => sprintf( $this->get_text_inline( "What's the %s's name?", 'placeholder-plugin-name' ), $module_type ),
|
2014 |
-
);
|
2015 |
-
|
2016 |
-
$reason_temporary_deactivation = array(
|
2017 |
-
'id' => self::REASON_TEMPORARY_DEACTIVATION,
|
2018 |
-
'text' => sprintf(
|
2019 |
-
$this->get_text_inline( "It's a temporary %s. I'm just debugging an issue.", 'reason-temporary-x' ),
|
2020 |
-
strtolower( $this->is_plugin() ?
|
2021 |
-
$this->get_text_inline( 'Deactivation', 'deactivation' ) :
|
2022 |
-
$this->get_text_inline( 'Theme Switch', 'theme-switch' )
|
2023 |
-
)
|
2024 |
-
),
|
2025 |
-
'input_type' => '',
|
2026 |
-
'input_placeholder' => ''
|
2027 |
-
);
|
2028 |
-
|
2029 |
-
$reason_other = array(
|
2030 |
-
'id' => self::REASON_OTHER,
|
2031 |
-
'text' => $this->get_text_inline( 'Other', 'reason-other' ),
|
2032 |
-
'input_type' => 'textfield',
|
2033 |
-
'input_placeholder' => ''
|
2034 |
-
);
|
2035 |
-
|
2036 |
-
$long_term_user_reasons = array(
|
2037 |
-
array(
|
2038 |
-
'id' => self::REASON_NO_LONGER_NEEDED,
|
2039 |
-
'text' => sprintf( $this->get_text_inline( 'I no longer need the %s', 'reason-no-longer-needed' ), $module_type ),
|
2040 |
-
'input_type' => '',
|
2041 |
-
'input_placeholder' => ''
|
2042 |
-
),
|
2043 |
-
$reason_found_better_plugin,
|
2044 |
-
array(
|
2045 |
-
'id' => self::REASON_NEEDED_FOR_A_SHORT_PERIOD,
|
2046 |
-
'text' => sprintf( $this->get_text_inline( 'I only needed the %s for a short period', 'reason-needed-for-a-short-period' ), $module_type ),
|
2047 |
-
'input_type' => '',
|
2048 |
-
'input_placeholder' => ''
|
2049 |
-
),
|
2050 |
-
array(
|
2051 |
-
'id' => self::REASON_BROKE_MY_SITE,
|
2052 |
-
'text' => sprintf( $this->get_text_inline( 'The %s broke my site', 'reason-broke-my-site' ), $module_type ),
|
2053 |
-
'input_type' => '',
|
2054 |
-
'input_placeholder' => '',
|
2055 |
-
'internal_message' => $contact_support_template
|
2056 |
-
),
|
2057 |
-
array(
|
2058 |
-
'id' => self::REASON_SUDDENLY_STOPPED_WORKING,
|
2059 |
-
'text' => sprintf( $this->get_text_inline( 'The %s suddenly stopped working', 'reason-suddenly-stopped-working' ), $module_type ),
|
2060 |
-
'input_type' => '',
|
2061 |
-
'input_placeholder' => '',
|
2062 |
-
'internal_message' => $contact_support_template
|
2063 |
-
)
|
2064 |
-
);
|
2065 |
-
|
2066 |
-
if ( $this->is_paying() ) {
|
2067 |
-
$long_term_user_reasons[] = array(
|
2068 |
-
'id' => self::REASON_CANT_PAY_ANYMORE,
|
2069 |
-
'text' => $this->get_text_inline( "I can't pay for it anymore", 'reason-cant-pay-anymore' ),
|
2070 |
-
'input_type' => 'textfield',
|
2071 |
-
'input_placeholder' => $this->get_text_inline( 'What price would you feel comfortable paying?', 'placeholder-comfortable-price' )
|
2072 |
-
);
|
2073 |
-
}
|
2074 |
-
|
2075 |
-
$reason_dont_share_info = array(
|
2076 |
-
'id' => self::REASON_DONT_LIKE_TO_SHARE_MY_INFORMATION,
|
2077 |
-
'text' => $this->get_text_inline( "I don't like to share my information with you", 'reason-dont-like-to-share-my-information' ),
|
2078 |
-
'input_type' => '',
|
2079 |
-
'input_placeholder' => ''
|
2080 |
-
);
|
2081 |
-
|
2082 |
-
/**
|
2083 |
-
* If the current user has selected the "don't share data" reason in the deactivation feedback modal, inform the
|
2084 |
-
* user by showing additional message that he doesn't have to share data and can just choose to skip the opt-in
|
2085 |
-
* (the Skip button is included in the message to show). This message will only be shown if anonymous mode is
|
2086 |
-
* enabled and the user's account is currently not in pending activation state (similar to the way the Skip
|
2087 |
-
* button in the opt-in form is shown/hidden).
|
2088 |
-
*/
|
2089 |
-
if ( $this->is_enable_anonymous() && ! $this->is_pending_activation() ) {
|
2090 |
-
$reason_dont_share_info['internal_message'] = fs_get_template( 'forms/deactivation/retry-skip.php', $internal_message_template_var );
|
2091 |
-
}
|
2092 |
-
|
2093 |
-
$uninstall_reasons = array(
|
2094 |
-
'long-term' => $long_term_user_reasons,
|
2095 |
-
'non-registered-and-non-anonymous-short-term' => array(
|
2096 |
-
array(
|
2097 |
-
'id' => self::REASON_DIDNT_WORK,
|
2098 |
-
'text' => sprintf( $this->get_text_inline( "The %s didn't work", 'reason-didnt-work' ), $module_type ),
|
2099 |
-
'input_type' => '',
|
2100 |
-
'input_placeholder' => ''
|
2101 |
-
),
|
2102 |
-
$reason_dont_share_info,
|
2103 |
-
$reason_found_better_plugin
|
2104 |
-
),
|
2105 |
-
'short-term' => array(
|
2106 |
-
array(
|
2107 |
-
'id' => self::REASON_COULDNT_MAKE_IT_WORK,
|
2108 |
-
'text' => $this->get_text_inline( "I couldn't understand how to make it work", 'reason-couldnt-make-it-work' ),
|
2109 |
-
'input_type' => '',
|
2110 |
-
'input_placeholder' => '',
|
2111 |
-
'internal_message' => $contact_support_template
|
2112 |
-
),
|
2113 |
-
$reason_found_better_plugin,
|
2114 |
-
array(
|
2115 |
-
'id' => self::REASON_GREAT_BUT_NEED_SPECIFIC_FEATURE,
|
2116 |
-
'text' => sprintf( $this->get_text_inline( "The %s is great, but I need specific feature that you don't support", 'reason-great-but-need-specific-feature' ), $module_type ),
|
2117 |
-
'input_type' => 'textarea',
|
2118 |
-
'input_placeholder' => $this->get_text_inline( 'What feature?', 'placeholder-feature' )
|
2119 |
-
),
|
2120 |
-
array(
|
2121 |
-
'id' => self::REASON_NOT_WORKING,
|
2122 |
-
'text' => sprintf( $this->get_text_inline( 'The %s is not working', 'reason-not-working' ), $module_type ),
|
2123 |
-
'input_type' => 'textarea',
|
2124 |
-
'input_placeholder' => $this->get_text_inline( "Kindly share what didn't work so we can fix it for future users...", 'placeholder-share-what-didnt-work' )
|
2125 |
-
),
|
2126 |
-
array(
|
2127 |
-
'id' => self::REASON_NOT_WHAT_I_WAS_LOOKING_FOR,
|
2128 |
-
'text' => $this->get_text_inline( "It's not what I was looking for", 'reason-not-what-i-was-looking-for' ),
|
2129 |
-
'input_type' => 'textarea',
|
2130 |
-
'input_placeholder' => $this->get_text_inline( "What you've been looking for?", 'placeholder-what-youve-been-looking-for' )
|
2131 |
-
),
|
2132 |
-
array(
|
2133 |
-
'id' => self::REASON_DIDNT_WORK_AS_EXPECTED,
|
2134 |
-
'text' => sprintf( $this->get_text_inline( "The %s didn't work as expected", 'reason-didnt-work-as-expected' ), $module_type ),
|
2135 |
-
'input_type' => 'textarea',
|
2136 |
-
'input_placeholder' => $this->get_text_inline( 'What did you expect?', 'placeholder-what-did-you-expect' )
|
2137 |
-
)
|
2138 |
-
)
|
2139 |
-
);
|
2140 |
-
|
2141 |
-
// Randomize the reasons for the current user type.
|
2142 |
-
shuffle( $uninstall_reasons[ $user_type ] );
|
2143 |
-
|
2144 |
-
// Keep the following reasons as the last items in the list.
|
2145 |
-
$uninstall_reasons[ $user_type ][] = $reason_temporary_deactivation;
|
2146 |
-
$uninstall_reasons[ $user_type ][] = $reason_other;
|
2147 |
-
|
2148 |
-
$uninstall_reasons = $this->apply_filters( 'uninstall_reasons', $uninstall_reasons );
|
2149 |
-
|
2150 |
-
return $uninstall_reasons[ $user_type ];
|
2151 |
-
}
|
2152 |
-
|
2153 |
-
/**
|
2154 |
-
* Called after the user has submitted his reason for deactivating the plugin.
|
2155 |
-
*
|
2156 |
-
* @author Leo Fajardo (@leorw)
|
2157 |
-
* @since 1.1.2
|
2158 |
-
*/
|
2159 |
-
function _submit_uninstall_reason_action() {
|
2160 |
-
$this->_logger->entrance();
|
2161 |
-
|
2162 |
-
$this->check_ajax_referer( 'submit_uninstall_reason' );
|
2163 |
-
|
2164 |
-
$reason_id = fs_request_get( 'reason_id' );
|
2165 |
-
|
2166 |
-
// Check if the given reason ID is an unsigned integer.
|
2167 |
-
if ( ! ctype_digit( $reason_id ) ) {
|
2168 |
-
exit;
|
2169 |
-
}
|
2170 |
-
|
2171 |
-
$reason_info = trim( fs_request_get( 'reason_info', '' ) );
|
2172 |
-
if ( ! empty( $reason_info ) ) {
|
2173 |
-
$reason_info = substr( $reason_info, 0, 128 );
|
2174 |
-
}
|
2175 |
-
|
2176 |
-
$reason = (object) array(
|
2177 |
-
'id' => $reason_id,
|
2178 |
-
'info' => $reason_info,
|
2179 |
-
'is_anonymous' => fs_request_get_bool( 'is_anonymous' )
|
2180 |
-
);
|
2181 |
-
|
2182 |
-
$this->_storage->store( 'uninstall_reason', $reason );
|
2183 |
-
|
2184 |
-
/**
|
2185 |
-
* If the module type is "theme", trigger the uninstall event here (on theme deactivation) since themes do
|
2186 |
-
* not support uninstall hook.
|
2187 |
-
*
|
2188 |
-
* @author Leo Fajardo (@leorw)
|
2189 |
-
* @since 1.2.2
|
2190 |
-
*/
|
2191 |
-
if ( $this->is_theme() ) {
|
2192 |
-
if ( $this->is_premium() && ! $this->has_active_valid_license() ) {
|
2193 |
-
FS_Plugin_Updater::instance( $this )->delete_update_data();
|
2194 |
-
}
|
2195 |
-
|
2196 |
-
$this->_uninstall_plugin_event( false );
|
2197 |
-
$this->remove_sdk_reference();
|
2198 |
-
}
|
2199 |
-
|
2200 |
-
// Print '1' for successful operation.
|
2201 |
-
echo 1;
|
2202 |
-
exit;
|
2203 |
-
}
|
2204 |
-
|
2205 |
-
/**
|
2206 |
-
* @author Leo Fajardo (@leorw)
|
2207 |
-
* @since 2.1.4
|
2208 |
-
*/
|
2209 |
-
function cancel_subscription_or_trial_ajax_action() {
|
2210 |
-
$this->_logger->entrance();
|
2211 |
-
|
2212 |
-
$this->check_ajax_referer( 'cancel_subscription_or_trial' );
|
2213 |
-
|
2214 |
-
$result = $this->cancel_subscription_or_trial( fs_request_get( 'plugin_id', $this->get_id() ), false );
|
2215 |
-
|
2216 |
-
if ( $this->is_api_error( $result ) ) {
|
2217 |
-
$this->shoot_ajax_failure( $result->error->message );
|
2218 |
-
}
|
2219 |
-
|
2220 |
-
$this->shoot_ajax_success();
|
2221 |
-
}
|
2222 |
-
|
2223 |
-
/**
|
2224 |
-
* @author Leo Fajardo (@leorw)
|
2225 |
-
* @since 2.1.4
|
2226 |
-
*
|
2227 |
-
* @param number $plugin_id
|
2228 |
-
*
|
2229 |
-
* @return object
|
2230 |
-
*/
|
2231 |
-
private function cancel_subscription_or_trial( $plugin_id ) {
|
2232 |
-
$fs = null;
|
2233 |
-
if ( $plugin_id == $this->get_id() ) {
|
2234 |
-
$fs = $this;
|
2235 |
-
} else if ( $this->is_addon_activated( $plugin_id ) ) {
|
2236 |
-
$fs = self::get_instance_by_id( $plugin_id );
|
2237 |
-
}
|
2238 |
-
|
2239 |
-
$result = null;
|
2240 |
-
|
2241 |
-
if ( ! is_null( $fs ) ) {
|
2242 |
-
$result = $fs->is_paid_trial() ?
|
2243 |
-
$fs->_cancel_trial() :
|
2244 |
-
$fs->_downgrade_site();
|
2245 |
-
}
|
2246 |
-
|
2247 |
-
return $result;
|
2248 |
-
}
|
2249 |
-
|
2250 |
-
/**
|
2251 |
-
* @author Leo Fajardo (@leorw)
|
2252 |
-
* @since 2.0.2
|
2253 |
-
*/
|
2254 |
-
function _delete_theme_update_data_action() {
|
2255 |
-
FS_Plugin_Updater::instance( $this )->delete_update_data();
|
2256 |
-
}
|
2257 |
-
|
2258 |
-
#endregion
|
2259 |
-
|
2260 |
-
#----------------------------------------------------------------------------------
|
2261 |
-
#region Instance
|
2262 |
-
#----------------------------------------------------------------------------------
|
2263 |
-
|
2264 |
-
/**
|
2265 |
-
* Main singleton instance.
|
2266 |
-
*
|
2267 |
-
* @author Vova Feldman (@svovaf)
|
2268 |
-
* @since 1.0.0
|
2269 |
-
*
|
2270 |
-
* @param number $module_id
|
2271 |
-
* @param string|bool $slug
|
2272 |
-
* @param bool $is_init Is initiation sequence.
|
2273 |
-
*
|
2274 |
-
* @return Freemius|false
|
2275 |
-
*/
|
2276 |
-
static function instance( $module_id, $slug = false, $is_init = false ) {
|
2277 |
-
if ( empty( $module_id ) ) {
|
2278 |
-
return false;
|
2279 |
-
}
|
2280 |
-
|
2281 |
-
/**
|
2282 |
-
* Load the essential static data prior to initiating FS_Plugin_Manager since there's an essential MS network migration logic that needs to be executed prior to the initiation.
|
2283 |
-
*/
|
2284 |
-
self::_load_required_static();
|
2285 |
-
|
2286 |
-
if ( ! is_numeric( $module_id ) ) {
|
2287 |
-
if ( ! $is_init && true === $slug ) {
|
2288 |
-
$is_init = true;
|
2289 |
-
}
|
2290 |
-
|
2291 |
-
$slug = $module_id;
|
2292 |
-
|
2293 |
-
$module = FS_Plugin_Manager::instance( $slug )->get();
|
2294 |
-
|
2295 |
-
if ( is_object( $module ) ) {
|
2296 |
-
$module_id = $module->id;
|
2297 |
-
}
|
2298 |
-
}
|
2299 |
-
|
2300 |
-
$key = 'm_' . $module_id;
|
2301 |
-
|
2302 |
-
if ( ! isset( self::$_instances[ $key ] ) ) {
|
2303 |
-
self::$_instances[ $key ] = new Freemius( $module_id, $slug, $is_init );
|
2304 |
-
}
|
2305 |
-
|
2306 |
-
return self::$_instances[ $key ];
|
2307 |
-
}
|
2308 |
-
|
2309 |
-
/**
|
2310 |
-
* @author Vova Feldman (@svovaf)
|
2311 |
-
* @since 1.0.6
|
2312 |
-
*
|
2313 |
-
* @param number $addon_id
|
2314 |
-
*
|
2315 |
-
* @return bool
|
2316 |
-
*/
|
2317 |
-
private static function has_instance( $addon_id ) {
|
2318 |
-
return isset( self::$_instances[ 'm_' . $addon_id ] );
|
2319 |
-
}
|
2320 |
-
|
2321 |
-
/**
|
2322 |
-
* @author Leo Fajardo (@leorw)
|
2323 |
-
* @since 1.2.2
|
2324 |
-
*
|
2325 |
-
* @param string|number $id_or_slug
|
2326 |
-
* @param string $module_type
|
2327 |
-
*
|
2328 |
-
* @return number|false
|
2329 |
-
*/
|
2330 |
-
private static function get_module_id( $id_or_slug, $module_type = WP_FS__MODULE_TYPE_PLUGIN ) {
|
2331 |
-
if ( is_numeric( $id_or_slug ) ) {
|
2332 |
-
return $id_or_slug;
|
2333 |
-
}
|
2334 |
-
|
2335 |
-
foreach ( self::$_instances as $instance ) {
|
2336 |
-
// Also check the module type since there can be a plugin and a theme with the same slug.
|
2337 |
-
if ( ( $module_type === $instance->get_module_type() ) && ( $id_or_slug === $instance->get_slug() ) ) {
|
2338 |
-
return $instance->get_id();
|
2339 |
-
}
|
2340 |
-
}
|
2341 |
-
|
2342 |
-
return false;
|
2343 |
-
}
|
2344 |
-
|
2345 |
-
/**
|
2346 |
-
* @author Vova Feldman (@svovaf)
|
2347 |
-
* @since 1.0.6
|
2348 |
-
*
|
2349 |
-
* @param number $id
|
2350 |
-
*
|
2351 |
-
* @return false|Freemius
|
2352 |
-
*/
|
2353 |
-
static function get_instance_by_id( $id ) {
|
2354 |
-
return isset ( self::$_instances[ 'm_' . $id ] ) ?
|
2355 |
-
self::$_instances[ 'm_' . $id ] :
|
2356 |
-
false;
|
2357 |
-
}
|
2358 |
-
|
2359 |
-
/**
|
2360 |
-
*
|
2361 |
-
* @author Vova Feldman (@svovaf)
|
2362 |
-
* @since 1.0.1
|
2363 |
-
*
|
2364 |
-
* @param string $plugin_file
|
2365 |
-
* @param string $module_type
|
2366 |
-
*
|
2367 |
-
* @return false|Freemius
|
2368 |
-
*/
|
2369 |
-
static function get_instance_by_file( $plugin_file, $module_type = WP_FS__MODULE_TYPE_PLUGIN ) {
|
2370 |
-
$slug = self::find_slug_by_basename( $plugin_file );
|
2371 |
-
|
2372 |
-
return ( false !== $slug ) ?
|
2373 |
-
self::instance( self::get_module_id( $slug, $module_type ) ) :
|
2374 |
-
false;
|
2375 |
-
}
|
2376 |
-
|
2377 |
-
/**
|
2378 |
-
* @author Vova Feldman (@svovaf)
|
2379 |
-
* @since 1.0.6
|
2380 |
-
*
|
2381 |
-
* @return false|Freemius
|
2382 |
-
*/
|
2383 |
-
function get_parent_instance() {
|
2384 |
-
return self::get_instance_by_id( $this->_plugin->parent_plugin_id );
|
2385 |
-
}
|
2386 |
-
|
2387 |
-
/**
|
2388 |
-
* @author Vova Feldman (@svovaf)
|
2389 |
-
* @since 1.0.6
|
2390 |
-
*
|
2391 |
-
* @param string|number $id_or_slug
|
2392 |
-
*
|
2393 |
-
* @return false|Freemius
|
2394 |
-
*/
|
2395 |
-
function get_addon_instance( $id_or_slug ) {
|
2396 |
-
$addon_id = self::get_module_id( $id_or_slug );
|
2397 |
-
|
2398 |
-
return self::instance( $addon_id );
|
2399 |
-
}
|
2400 |
-
|
2401 |
-
#endregion ------------------------------------------------------------------
|
2402 |
-
|
2403 |
-
/**
|
2404 |
-
* @author Vova Feldman (@svovaf)
|
2405 |
-
* @since 1.0.6
|
2406 |
-
*
|
2407 |
-
* @return bool
|
2408 |
-
*/
|
2409 |
-
function is_parent_plugin_installed() {
|
2410 |
-
$is_active = self::has_instance( $this->_plugin->parent_plugin_id );
|
2411 |
-
|
2412 |
-
if ( $is_active ) {
|
2413 |
-
return true;
|
2414 |
-
}
|
2415 |
-
|
2416 |
-
/**
|
2417 |
-
* Parent module might be a theme. If that's the case, the add-on's FS
|
2418 |
-
* instance will be loaded prior to the theme's FS instance, therefore,
|
2419 |
-
* we need to check if it's active with a "look ahead".
|
2420 |
-
*
|
2421 |
-
* @author Vova Feldman
|
2422 |
-
* @since 1.2.2.3
|
2423 |
-
*/
|
2424 |
-
global $fs_active_plugins;
|
2425 |
-
if ( is_object( $fs_active_plugins ) && is_array( $fs_active_plugins->plugins ) ) {
|
2426 |
-
$active_theme = wp_get_theme();
|
2427 |
-
|
2428 |
-
foreach ( $fs_active_plugins->plugins as $sdk => $module ) {
|
2429 |
-
if ( WP_FS__MODULE_TYPE_THEME === $module->type ) {
|
2430 |
-
if ( $module->plugin_path == $active_theme->get_stylesheet() ) {
|
2431 |
-
// Parent module is a theme and it's currently active.
|
2432 |
-
return true;
|
2433 |
-
}
|
2434 |
-
}
|
2435 |
-
}
|
2436 |
-
}
|
2437 |
-
|
2438 |
-
return false;
|
2439 |
-
}
|
2440 |
-
|
2441 |
-
/**
|
2442 |
-
* Check if add-on parent plugin in activation mode.
|
2443 |
-
*
|
2444 |
-
* @author Vova Feldman (@svovaf)
|
2445 |
-
* @since 1.0.7
|
2446 |
-
*
|
2447 |
-
* @return bool
|
2448 |
-
*/
|
2449 |
-
function is_parent_in_activation() {
|
2450 |
-
$parent_fs = $this->get_parent_instance();
|
2451 |
-
if ( ! is_object( $parent_fs ) ) {
|
2452 |
-
return false;
|
2453 |
-
}
|
2454 |
-
|
2455 |
-
return ( $parent_fs->is_activation_mode() );
|
2456 |
-
}
|
2457 |
-
|
2458 |
-
/**
|
2459 |
-
* Is plugin in activation mode.
|
2460 |
-
*
|
2461 |
-
* @author Vova Feldman (@svovaf)
|
2462 |
-
* @since 1.0.7
|
2463 |
-
*
|
2464 |
-
* @param bool $and_on
|
2465 |
-
*
|
2466 |
-
* @return bool
|
2467 |
-
*/
|
2468 |
-
function is_activation_mode( $and_on = true ) {
|
2469 |
-
return fs_is_network_admin() ?
|
2470 |
-
$this->is_network_activation_mode( $and_on ) :
|
2471 |
-
$this->is_site_activation_mode( $and_on );
|
2472 |
-
}
|
2473 |
-
|
2474 |
-
/**
|
2475 |
-
* Is plugin in activation mode.
|
2476 |
-
*
|
2477 |
-
* @author Vova Feldman (@svovaf)
|
2478 |
-
* @since 1.0.7
|
2479 |
-
*
|
2480 |
-
* @param bool $and_on
|
2481 |
-
*
|
2482 |
-
* @return bool
|
2483 |
-
*/
|
2484 |
-
function is_site_activation_mode( $and_on = true ) {
|
2485 |
-
return (
|
2486 |
-
( $this->is_on() || ! $and_on ) &&
|
2487 |
-
( $this->is_premium() && true === $this->_storage->require_license_activation ) ||
|
2488 |
-
(
|
2489 |
-
( ! $this->is_registered() ||
|
2490 |
-
( $this->is_only_premium() && ! $this->has_features_enabled_license() ) ) &&
|
2491 |
-
( ! $this->is_enable_anonymous() ||
|
2492 |
-
( ! $this->is_anonymous() && ! $this->is_pending_activation() ) )
|
2493 |
-
)
|
2494 |
-
);
|
2495 |
-
}
|
2496 |
-
|
2497 |
-
/**
|
2498 |
-
* Checks if the SDK in network activation mode.
|
2499 |
-
*
|
2500 |
-
* @author Leo Fajardo (@leorw)
|
2501 |
-
* @since 2.0.0
|
2502 |
-
*
|
2503 |
-
* @param bool $and_on
|
2504 |
-
*
|
2505 |
-
* @return bool
|
2506 |
-
*/
|
2507 |
-
private function is_network_activation_mode( $and_on = true ) {
|
2508 |
-
if ( ! $this->_is_network_active ) {
|
2509 |
-
// Not network activated.
|
2510 |
-
return false;
|
2511 |
-
}
|
2512 |
-
|
2513 |
-
if ( $this->is_network_upgrade_mode() ) {
|
2514 |
-
// Special flag to enforce network activation mode to decide what to do with the sites that are not yet opted-in nor skipped.
|
2515 |
-
return true;
|
2516 |
-
}
|
2517 |
-
|
2518 |
-
if ( ! $this->is_site_activation_mode( $and_on ) ) {
|
2519 |
-
// Whether the context is single site or the network, if the plugin is no longer in activation mode then it is not in network activation mode as well.
|
2520 |
-
return false;
|
2521 |
-
}
|
2522 |
-
|
2523 |
-
if ( $this->is_network_delegated_connection() ) {
|
2524 |
-
// Super-admin delegated the connection to the site admins -> not activation mode.
|
2525 |
-
return false;
|
2526 |
-
}
|
2527 |
-
|
2528 |
-
if ( $this->is_network_anonymous() && true !== $this->_storage->require_license_activation ) {
|
2529 |
-
// Super-admin skipped the connection network wide -> not activation mode.
|
2530 |
-
return false;
|
2531 |
-
}
|
2532 |
-
|
2533 |
-
if ( $this->is_network_registered() ) {
|
2534 |
-
// Super-admin connected at least one site -> not activation mode.
|
2535 |
-
return false;
|
2536 |
-
}
|
2537 |
-
|
2538 |
-
return true;
|
2539 |
-
}
|
2540 |
-
|
2541 |
-
/**
|
2542 |
-
* Check if current page is the opt-in/pending-activation page.
|
2543 |
-
*
|
2544 |
-
* @author Vova Feldman (@svovaf)
|
2545 |
-
* @since 1.2.1.7
|
2546 |
-
*
|
2547 |
-
* @return bool
|
2548 |
-
*/
|
2549 |
-
function is_activation_page() {
|
2550 |
-
if ( $this->_menu->is_main_settings_page() ) {
|
2551 |
-
return true;
|
2552 |
-
}
|
2553 |
-
|
2554 |
-
if ( ! $this->is_activation_mode() ) {
|
2555 |
-
return false;
|
2556 |
-
}
|
2557 |
-
|
2558 |
-
// Check if current page is matching the activation page.
|
2559 |
-
return $this->is_matching_url( $this->get_activation_url() );
|
2560 |
-
}
|
2561 |
-
|
2562 |
-
/**
|
2563 |
-
* Check if URL path's are matching and that all querystring
|
2564 |
-
* arguments of the $sub_url exist in the $url with the same values.
|
2565 |
-
*
|
2566 |
-
* WARNING:
|
2567 |
-
* 1. This method doesn't check if the sub/domain are matching.
|
2568 |
-
* 2. Ignore case sensitivity.
|
2569 |
-
*
|
2570 |
-
* @author Vova Feldman (@svovaf)
|
2571 |
-
* @since 1.2.1.7
|
2572 |
-
*
|
2573 |
-
* @param string $sub_url
|
2574 |
-
* @param string $url If argument is not set, check if the sub_url matching the current's page URL.
|
2575 |
-
*
|
2576 |
-
* @return bool
|
2577 |
-
*/
|
2578 |
-
private function is_matching_url( $sub_url, $url = '' ) {
|
2579 |
-
if ( empty( $url ) ) {
|
2580 |
-
$url = $_SERVER['REQUEST_URI'];
|
2581 |
-
}
|
2582 |
-
|
2583 |
-
$url = strtolower( $url );
|
2584 |
-
$sub_url = strtolower( $sub_url );
|
2585 |
-
|
2586 |
-
if ( parse_url( $sub_url, PHP_URL_PATH ) !== parse_url( $url, PHP_URL_PATH ) ) {
|
2587 |
-
// Different path - DO NOT OVERRIDE PAGE.
|
2588 |
-
return false;
|
2589 |
-
}
|
2590 |
-
|
2591 |
-
$url_params = array();
|
2592 |
-
parse_str( parse_url( $url, PHP_URL_QUERY ), $url_params );
|
2593 |
-
|
2594 |
-
$sub_url_params = array();
|
2595 |
-
parse_str( parse_url( $sub_url, PHP_URL_QUERY ), $sub_url_params );
|
2596 |
-
|
2597 |
-
foreach ( $sub_url_params as $key => $val ) {
|
2598 |
-
if ( ! isset( $url_params[ $key ] ) || $val != $url_params[ $key ] ) {
|
2599 |
-
// Not matching query string - DO NOT OVERRIDE PAGE.
|
2600 |
-
return false;
|
2601 |
-
}
|
2602 |
-
}
|
2603 |
-
|
2604 |
-
return true;
|
2605 |
-
}
|
2606 |
-
|
2607 |
-
/**
|
2608 |
-
* Get the basenames of all active plugins for specific blog. Including network activated plugins.
|
2609 |
-
*
|
2610 |
-
* @author Vova Feldman (@svovaf)
|
2611 |
-
* @since 2.0.0
|
2612 |
-
*
|
2613 |
-
* @param int $blog_id
|
2614 |
-
*
|
2615 |
-
* @return string[]
|
2616 |
-
*/
|
2617 |
-
private static function get_active_plugins_basenames( $blog_id = 0 ) {
|
2618 |
-
if ( is_multisite() && $blog_id > 0 ) {
|
2619 |
-
$active_basenames = get_blog_option( $blog_id, 'active_plugins' );
|
2620 |
-
} else {
|
2621 |
-
$active_basenames = get_option( 'active_plugins' );
|
2622 |
-
}
|
2623 |
-
|
2624 |
-
if ( is_multisite() ) {
|
2625 |
-
$network_active_basenames = get_site_option( 'active_sitewide_plugins' );
|
2626 |
-
|
2627 |
-
if ( is_array( $network_active_basenames ) && ! empty( $network_active_basenames ) ) {
|
2628 |
-
$active_basenames = array_merge( $active_basenames, $network_active_basenames );
|
2629 |
-
}
|
2630 |
-
}
|
2631 |
-
|
2632 |
-
return $active_basenames;
|
2633 |
-
}
|
2634 |
-
|
2635 |
-
/**
|
2636 |
-
* Get collection of all active plugins. Including network activated plugins.
|
2637 |
-
*
|
2638 |
-
* @author Vova Feldman (@svovaf)
|
2639 |
-
* @since 1.0.9
|
2640 |
-
*
|
2641 |
-
* @param int $blog_id Since 2.0.0
|
2642 |
-
*
|
2643 |
-
* @return array[string]array
|
2644 |
-
*/
|
2645 |
-
private static function get_active_plugins( $blog_id = 0 ) {
|
2646 |
-
self::require_plugin_essentials();
|
2647 |
-
|
2648 |
-
$active_plugin = array();
|
2649 |
-
$all_plugins = fs_get_plugins();
|
2650 |
-
$active_plugins_basenames = self::get_active_plugins_basenames( $blog_id );
|
2651 |
-
|
2652 |
-
foreach ( $active_plugins_basenames as $plugin_basename ) {
|
2653 |
-
$active_plugin[ $plugin_basename ] = $all_plugins[ $plugin_basename ];
|
2654 |
-
}
|
2655 |
-
|
2656 |
-
return $active_plugin;
|
2657 |
-
}
|
2658 |
-
|
2659 |
-
/**
|
2660 |
-
* Get collection of all site active plugins for a specified blog.
|
2661 |
-
*
|
2662 |
-
* @author Vova Feldman (@svovaf)
|
2663 |
-
* @since 2.0.0
|
2664 |
-
*
|
2665 |
-
* @param int $blog_id
|
2666 |
-
*
|
2667 |
-
* @return array[string]array
|
2668 |
-
*/
|
2669 |
-
private static function get_site_active_plugins( $blog_id = 0 ) {
|
2670 |
-
$active_basenames = ( is_multisite() && $blog_id > 0 ) ?
|
2671 |
-
get_blog_option( $blog_id, 'active_plugins' ) :
|
2672 |
-
get_option( 'active_plugins' );
|
2673 |
-
|
2674 |
-
$active = array();
|
2675 |
-
|
2676 |
-
if ( ! is_array( $active_basenames ) ) {
|
2677 |
-
return $active;
|
2678 |
-
}
|
2679 |
-
|
2680 |
-
foreach ( $active_basenames as $basename ) {
|
2681 |
-
$active[ $basename ] = array(
|
2682 |
-
'is_active' => true,
|
2683 |
-
'Version' => '1.0', // Dummy version.
|
2684 |
-
'slug' => self::get_plugin_slug( $basename ),
|
2685 |
-
);
|
2686 |
-
}
|
2687 |
-
|
2688 |
-
return $active;
|
2689 |
-
}
|
2690 |
-
|
2691 |
-
/**
|
2692 |
-
* Get collection of all plugins with their activation status for a specified blog.
|
2693 |
-
*
|
2694 |
-
* @author Vova Feldman (@svovaf)
|
2695 |
-
* @since 1.1.8
|
2696 |
-
*
|
2697 |
-
* @param int $blog_id Since 2.0.0
|
2698 |
-
*
|
2699 |
-
* @return array Key is the plugin file path and the value is an array of the plugin data.
|
2700 |
-
*/
|
2701 |
-
private static function get_all_plugins( $blog_id = 0 ) {
|
2702 |
-
self::require_plugin_essentials();
|
2703 |
-
|
2704 |
-
$all_plugins = fs_get_plugins();
|
2705 |
-
|
2706 |
-
$active_plugins_basenames = self::get_active_plugins_basenames( $blog_id );
|
2707 |
-
|
2708 |
-
foreach ( $all_plugins as $basename => &$data ) {
|
2709 |
-
// By default set to inactive (next foreach update the active plugins).
|
2710 |
-
$data['is_active'] = false;
|
2711 |
-
// Enrich with plugin slug.
|
2712 |
-
$data['slug'] = self::get_plugin_slug( $basename );
|
2713 |
-
}
|
2714 |
-
|
2715 |
-
// Flag active plugins.
|
2716 |
-
foreach ( $active_plugins_basenames as $basename ) {
|
2717 |
-
if ( isset( $all_plugins[ $basename ] ) ) {
|
2718 |
-
$all_plugins[ $basename ]['is_active'] = true;
|
2719 |
-
}
|
2720 |
-
}
|
2721 |
-
|
2722 |
-
return $all_plugins;
|
2723 |
-
}
|
2724 |
-
|
2725 |
-
/**
|
2726 |
-
* Get collection of all plugins and if they are network level activated.
|
2727 |
-
*
|
2728 |
-
* @author Vova Feldman (@svovaf)
|
2729 |
-
* @since 2.0.0
|
2730 |
-
*
|
2731 |
-
* @return array Key is the plugin basename and the value is an array of the plugin data.
|
2732 |
-
*/
|
2733 |
-
private static function get_network_plugins() {
|
2734 |
-
self::require_plugin_essentials();
|
2735 |
-
|
2736 |
-
$all_plugins = fs_get_plugins();
|
2737 |
-
|
2738 |
-
$network_active_basenames = is_multisite() ?
|
2739 |
-
get_site_option( 'active_sitewide_plugins' ) :
|
2740 |
-
array();
|
2741 |
-
|
2742 |
-
foreach ( $all_plugins as $basename => &$data ) {
|
2743 |
-
// By default set to inactive (next foreach update the active plugins).
|
2744 |
-
$data['is_active'] = false;
|
2745 |
-
// Enrich with plugin slug.
|
2746 |
-
$data['slug'] = self::get_plugin_slug( $basename );
|
2747 |
-
}
|
2748 |
-
|
2749 |
-
// Flag active plugins.
|
2750 |
-
foreach ( $network_active_basenames as $basename ) {
|
2751 |
-
if ( isset( $all_plugins[ $basename ] ) ) {
|
2752 |
-
$all_plugins[ $basename ]['is_active'] = true;
|
2753 |
-
}
|
2754 |
-
}
|
2755 |
-
|
2756 |
-
return $all_plugins;
|
2757 |
-
}
|
2758 |
-
|
2759 |
-
/**
|
2760 |
-
* Cached result of get_site_transient( 'update_plugins' )
|
2761 |
-
*
|
2762 |
-
* @author Vova Feldman (@svovaf)
|
2763 |
-
* @since 1.1.8
|
2764 |
-
*
|
2765 |
-
* @var object
|
2766 |
-
*/
|
2767 |
-
private static $_plugins_info;
|
2768 |
-
|
2769 |
-
/**
|
2770 |
-
* Helper function to get specified plugin's slug.
|
2771 |
-
*
|
2772 |
-
* @author Vova Feldman (@svovaf)
|
2773 |
-
* @since 1.1.8
|
2774 |
-
*
|
2775 |
-
* @param $basename
|
2776 |
-
*
|
2777 |
-
* @return string
|
2778 |
-
*/
|
2779 |
-
private static function get_plugin_slug( $basename ) {
|
2780 |
-
if ( ! isset( self::$_plugins_info ) ) {
|
2781 |
-
self::$_plugins_info = get_site_transient( 'update_plugins' );
|
2782 |
-
}
|
2783 |
-
|
2784 |
-
$slug = '';
|
2785 |
-
|
2786 |
-
if ( is_object( self::$_plugins_info ) ) {
|
2787 |
-
if ( isset( self::$_plugins_info->no_update ) &&
|
2788 |
-
isset( self::$_plugins_info->no_update[ $basename ] ) &&
|
2789 |
-
! empty( self::$_plugins_info->no_update[ $basename ]->slug )
|
2790 |
-
) {
|
2791 |
-
$slug = self::$_plugins_info->no_update[ $basename ]->slug;
|
2792 |
-
} else if ( isset( self::$_plugins_info->response ) &&
|
2793 |
-
isset( self::$_plugins_info->response[ $basename ] ) &&
|
2794 |
-
! empty( self::$_plugins_info->response[ $basename ]->slug )
|
2795 |
-
) {
|
2796 |
-
$slug = self::$_plugins_info->response[ $basename ]->slug;
|
2797 |
-
}
|
2798 |
-
}
|
2799 |
-
|
2800 |
-
if ( empty( $slug ) ) {
|
2801 |
-
// Try to find slug from FS data.
|
2802 |
-
$slug = self::find_slug_by_basename( $basename );
|
2803 |
-
}
|
2804 |
-
|
2805 |
-
if ( empty( $slug ) ) {
|
2806 |
-
// Fallback to plugin's folder name.
|
2807 |
-
$slug = dirname( $basename );
|
2808 |
-
}
|
2809 |
-
|
2810 |
-
return $slug;
|
2811 |
-
}
|
2812 |
-
|
2813 |
-
private static $_statics_loaded = false;
|
2814 |
-
|
2815 |
-
/**
|
2816 |
-
* Load static resources.
|
2817 |
-
*
|
2818 |
-
* @author Vova Feldman (@svovaf)
|
2819 |
-
* @since 1.0.1
|
2820 |
-
*/
|
2821 |
-
private static function _load_required_static() {
|
2822 |
-
if ( self::$_statics_loaded ) {
|
2823 |
-
return;
|
2824 |
-
}
|
2825 |
-
|
2826 |
-
self::$_static_logger = FS_Logger::get_logger( WP_FS__SLUG, WP_FS__DEBUG_SDK, WP_FS__ECHO_DEBUG_SDK );
|
2827 |
-
|
2828 |
-
self::$_static_logger->entrance();
|
2829 |
-
|
2830 |
-
self::$_accounts = FS_Options::instance( WP_FS__ACCOUNTS_OPTION_NAME, true );
|
2831 |
-
|
2832 |
-
if ( is_multisite() ) {
|
2833 |
-
$has_skipped_migration = (
|
2834 |
-
// 'id_slug_type_path_map' - was never stored on older versions, therefore, not exists on the site level.
|
2835 |
-
null === self::$_accounts->get_option( 'id_slug_type_path_map', null, false ) &&
|
2836 |
-
// 'file_slug_map' stored on the site level, so it was running an SDK version before it was integrated with MS-network.
|
2837 |
-
null !== self::$_accounts->get_option( 'file_slug_map', null, false )
|
2838 |
-
);
|
2839 |
-
|
2840 |
-
/**
|
2841 |
-
* If the file_slug_map exists on the site level but doesn't exist on the
|
2842 |
-
* network level storage, it means that we need to process the storage with migration.
|
2843 |
-
*
|
2844 |
-
* The code in this `if` scope will only be executed once and only for the first site that will execute it because once we migrate the storage data, file_slug_map will be already set in the network level storage.
|
2845 |
-
*
|
2846 |
-
* @author Vova Feldman (@svovaf)
|
2847 |
-
* @since 2.0.0
|
2848 |
-
*/
|
2849 |
-
if (
|
2850 |
-
( $has_skipped_migration && true !== self::$_accounts->get_option( 'ms_migration_complete', false, true ) ) ||
|
2851 |
-
( null === self::$_accounts->get_option( 'file_slug_map', null, true ) &&
|
2852 |
-
null !== self::$_accounts->get_option( 'file_slug_map', null, false ) )
|
2853 |
-
) {
|
2854 |
-
self::migrate_options_to_network();
|
2855 |
-
}
|
2856 |
-
}
|
2857 |
-
|
2858 |
-
self::$_global_admin_notices = FS_Admin_Notices::instance( 'global' );
|
2859 |
-
|
2860 |
-
if ( ! WP_FS__DEMO_MODE ) {
|
2861 |
-
add_action( ( fs_is_network_admin() ? 'network_' : '' ) . 'admin_menu', array(
|
2862 |
-
'Freemius',
|
2863 |
-
'_add_debug_section'
|
2864 |
-
) );
|
2865 |
-
}
|
2866 |
-
|
2867 |
-
add_action( "wp_ajax_fs_toggle_debug_mode", array( 'Freemius', '_toggle_debug_mode' ) );
|
2868 |
-
|
2869 |
-
self::add_ajax_action_static( 'get_debug_log', array( 'Freemius', '_get_debug_log' ) );
|
2870 |
-
|
2871 |
-
self::add_ajax_action_static( 'get_db_option', array( 'Freemius', '_get_db_option' ) );
|
2872 |
-
|
2873 |
-
self::add_ajax_action_static( 'set_db_option', array( 'Freemius', '_set_db_option' ) );
|
2874 |
-
|
2875 |
-
if ( 0 == did_action( 'plugins_loaded' ) ) {
|
2876 |
-
add_action( 'plugins_loaded', array( 'Freemius', '_load_textdomain' ), 1 );
|
2877 |
-
}
|
2878 |
-
|
2879 |
-
add_action( 'admin_footer', array( 'Freemius', '_enrich_ajax_url' ) );
|
2880 |
-
add_action( 'admin_footer', array( 'Freemius', '_open_support_forum_in_new_page' ) );
|
2881 |
-
|
2882 |
-
|
2883 |
-
self::$_statics_loaded = true;
|
2884 |
-
}
|
2885 |
-
|
2886 |
-
/**
|
2887 |
-
* @author Leo Fajardo (@leorw)
|
2888 |
-
*
|
2889 |
-
* @since 2.1.3
|
2890 |
-
*/
|
2891 |
-
private static function migrate_options_to_network() {
|
2892 |
-
self::migrate_accounts_to_network();
|
2893 |
-
|
2894 |
-
// Migrate API options from site level to network level.
|
2895 |
-
$api_network_options = FS_Option_Manager::get_manager( WP_FS__OPTIONS_OPTION_NAME, true, true );
|
2896 |
-
$api_network_options->migrate_to_network();
|
2897 |
-
|
2898 |
-
// Migrate API cache to network level storage.
|
2899 |
-
FS_Cache_Manager::get_manager( WP_FS__API_CACHE_OPTION_NAME )->migrate_to_network();
|
2900 |
-
|
2901 |
-
self::$_accounts->set_option( 'ms_migration_complete', true, true );
|
2902 |
-
}
|
2903 |
-
|
2904 |
-
#----------------------------------------------------------------------------------
|
2905 |
-
#region Localization
|
2906 |
-
#----------------------------------------------------------------------------------
|
2907 |
-
|
2908 |
-
/**
|
2909 |
-
* Load framework's text domain.
|
2910 |
-
*
|
2911 |
-
* @author Vova Feldman (@svovaf)
|
2912 |
-
* @since 1.2.1
|
2913 |
-
*/
|
2914 |
-
static function _load_textdomain() {
|
2915 |
-
if ( ! is_admin() ) {
|
2916 |
-
return;
|
2917 |
-
}
|
2918 |
-
|
2919 |
-
global $fs_active_plugins;
|
2920 |
-
|
2921 |
-
// Works both for plugins and themes.
|
2922 |
-
load_plugin_textdomain(
|
2923 |
-
'freemius',
|
2924 |
-
false,
|
2925 |
-
$fs_active_plugins->newest->sdk_path . '/languages/'
|
2926 |
-
);
|
2927 |
-
}
|
2928 |
-
|
2929 |
-
#endregion
|
2930 |
-
|
2931 |
-
#----------------------------------------------------------------------------------
|
2932 |
-
#region Debugging
|
2933 |
-
#----------------------------------------------------------------------------------
|
2934 |
-
|
2935 |
-
/**
|
2936 |
-
* @author Vova Feldman (@svovaf)
|
2937 |
-
* @since 1.0.8
|
2938 |
-
*/
|
2939 |
-
static function _add_debug_section() {
|
2940 |
-
if ( ! is_super_admin() ) {
|
2941 |
-
// Add debug page only for super-admins.
|
2942 |
-
return;
|
2943 |
-
}
|
2944 |
-
|
2945 |
-
self::$_static_logger->entrance();
|
2946 |
-
|
2947 |
-
$title = sprintf( '%s [v.%s]', fs_text_inline( 'Freemius Debug' ), WP_FS__SDK_VERSION );
|
2948 |
-
|
2949 |
-
if ( WP_FS__DEV_MODE ) {
|
2950 |
-
// Add top-level debug menu item.
|
2951 |
-
$hook = FS_Admin_Menu_Manager::add_page(
|
2952 |
-
$title,
|
2953 |
-
$title,
|
2954 |
-
'manage_options',
|
2955 |
-
'freemius',
|
2956 |
-
array( 'Freemius', '_debug_page_render' )
|
2957 |
-
);
|
2958 |
-
} else {
|
2959 |
-
// Add hidden debug page.
|
2960 |
-
$hook = FS_Admin_Menu_Manager::add_subpage(
|
2961 |
-
null,
|
2962 |
-
$title,
|
2963 |
-
$title,
|
2964 |
-
'manage_options',
|
2965 |
-
'freemius',
|
2966 |
-
array( 'Freemius', '_debug_page_render' )
|
2967 |
-
);
|
2968 |
-
}
|
2969 |
-
|
2970 |
-
if ( ! empty( $hook ) ) {
|
2971 |
-
add_action( "load-$hook", array( 'Freemius', '_debug_page_actions' ) );
|
2972 |
-
}
|
2973 |
-
}
|
2974 |
-
|
2975 |
-
/**
|
2976 |
-
* @author Vova Feldman (@svovaf)
|
2977 |
-
* @since 1.1.7.3
|
2978 |
-
*/
|
2979 |
-
static function _toggle_debug_mode() {
|
2980 |
-
if ( ! is_super_admin() ) {
|
2981 |
-
return;
|
2982 |
-
}
|
2983 |
-
|
2984 |
-
$is_on = fs_request_get( 'is_on', false, 'post' );
|
2985 |
-
|
2986 |
-
if ( fs_request_is_post() && in_array( $is_on, array( 0, 1 ) ) ) {
|
2987 |
-
update_option( 'fs_debug_mode', $is_on );
|
2988 |
-
|
2989 |
-
// Turn on/off storage logging.
|
2990 |
-
FS_Logger::_set_storage_logging( ( 1 == $is_on ) );
|
2991 |
-
}
|
2992 |
-
|
2993 |
-
exit;
|
2994 |
-
}
|
2995 |
-
|
2996 |
-
/**
|
2997 |
-
* @author Vova Feldman (@svovaf)
|
2998 |
-
* @since 1.2.1.6
|
2999 |
-
*/
|
3000 |
-
static function _get_debug_log() {
|
3001 |
-
$logs = FS_Logger::load_db_logs(
|
3002 |
-
fs_request_get( 'filters', false, 'post' ),
|
3003 |
-
! empty( $_POST['limit'] ) && is_numeric( $_POST['limit'] ) ? $_POST['limit'] : 200,
|
3004 |
-
! empty( $_POST['offset'] ) && is_numeric( $_POST['offset'] ) ? $_POST['offset'] : 0
|
3005 |
-
);
|
3006 |
-
|
3007 |
-
self::shoot_ajax_success( $logs );
|
3008 |
-
}
|
3009 |
-
|
3010 |
-
/**
|
3011 |
-
* @author Vova Feldman (@svovaf)
|
3012 |
-
* @since 1.2.1.7
|
3013 |
-
*/
|
3014 |
-
static function _get_db_option() {
|
3015 |
-
check_admin_referer( 'fs_get_db_option' );
|
3016 |
-
|
3017 |
-
$option_name = fs_request_get( 'option_name' );
|
3018 |
-
|
3019 |
-
if ( ! is_super_admin() ||
|
3020 |
-
! fs_starts_with( $option_name, 'fs_' )
|
3021 |
-
) {
|
3022 |
-
self::shoot_ajax_failure();
|
3023 |
-
}
|
3024 |
-
|
3025 |
-
$value = get_option( $option_name );
|
3026 |
-
|
3027 |
-
$result = array(
|
3028 |
-
'name' => $option_name,
|
3029 |
-
);
|
3030 |
-
|
3031 |
-
if ( false !== $value ) {
|
3032 |
-
if ( ! is_string( $value ) ) {
|
3033 |
-
$value = json_encode( $value );
|
3034 |
-
}
|
3035 |
-
|
3036 |
-
$result['value'] = $value;
|
3037 |
-
}
|
3038 |
-
|
3039 |
-
self::shoot_ajax_success( $result );
|
3040 |
-
}
|
3041 |
-
|
3042 |
-
/**
|
3043 |
-
* @author Vova Feldman (@svovaf)
|
3044 |
-
* @since 1.2.1.7
|
3045 |
-
*/
|
3046 |
-
static function _set_db_option() {
|
3047 |
-
check_admin_referer( 'fs_set_db_option' );
|
3048 |
-
|
3049 |
-
$option_name = fs_request_get( 'option_name' );
|
3050 |
-
|
3051 |
-
if ( ! is_super_admin() ||
|
3052 |
-
! fs_starts_with( $option_name, 'fs_' )
|
3053 |
-
) {
|
3054 |
-
self::shoot_ajax_failure();
|
3055 |
-
}
|
3056 |
-
|
3057 |
-
$option_value = fs_request_get( 'option_value' );
|
3058 |
-
|
3059 |
-
if ( ! empty( $option_value ) ) {
|
3060 |
-
update_option( $option_name, $option_value );
|
3061 |
-
}
|
3062 |
-
|
3063 |
-
self::shoot_ajax_success();
|
3064 |
-
}
|
3065 |
-
|
3066 |
-
/**
|
3067 |
-
* @author Vova Feldman (@svovaf)
|
3068 |
-
* @since 1.0.8
|
3069 |
-
*/
|
3070 |
-
static function _debug_page_actions() {
|
3071 |
-
self::_clean_admin_content_section();
|
3072 |
-
|
3073 |
-
if ( fs_request_is_action( 'restart_freemius' ) ) {
|
3074 |
-
check_admin_referer( 'restart_freemius' );
|
3075 |
-
|
3076 |
-
if ( ! is_multisite() ) {
|
3077 |
-
// Clear accounts data.
|
3078 |
-
self::$_accounts->clear( null, true );
|
3079 |
-
} else {
|
3080 |
-
$sites = self::get_sites();
|
3081 |
-
foreach ( $sites as $site ) {
|
3082 |
-
$blog_id = self::get_site_blog_id( $site );
|
3083 |
-
self::$_accounts->clear( $blog_id, true );
|
3084 |
-
}
|
3085 |
-
|
3086 |
-
// Clear network level storage.
|
3087 |
-
self::$_accounts->clear( true, true );
|
3088 |
-
}
|
3089 |
-
|
3090 |
-
// Clear SDK reference cache.
|
3091 |
-
delete_option( 'fs_active_plugins' );
|
3092 |
-
} else if ( fs_request_is_action( 'clear_updates_data' ) ) {
|
3093 |
-
check_admin_referer( 'clear_updates_data' );
|
3094 |
-
|
3095 |
-
if ( ! is_multisite() ) {
|
3096 |
-
set_site_transient( 'update_plugins', null );
|
3097 |
-
set_site_transient( 'update_themes', null );
|
3098 |
-
} else {
|
3099 |
-
$current_blog_id = get_current_blog_id();
|
3100 |
-
|
3101 |
-
$sites = self::get_sites();
|
3102 |
-
foreach ( $sites as $site ) {
|
3103 |
-
switch_to_blog( self::get_site_blog_id( $site ) );
|
3104 |
-
|
3105 |
-
set_site_transient( 'update_plugins', null );
|
3106 |
-
set_site_transient( 'update_themes', null );
|
3107 |
-
}
|
3108 |
-
|
3109 |
-
switch_to_blog( $current_blog_id );
|
3110 |
-
}
|
3111 |
-
} else if ( fs_request_is_action( 'simulate_trial' ) ) {
|
3112 |
-
check_admin_referer( 'simulate_trial' );
|
3113 |
-
|
3114 |
-
$fs = freemius( fs_request_get( 'module_id' ) );
|
3115 |
-
|
3116 |
-
// Update SDK install to at least 24 hours before.
|
3117 |
-
$fs->_storage->install_timestamp = ( time() - WP_FS__TIME_24_HOURS_IN_SEC );
|
3118 |
-
// Unset the trial shown timestamp.
|
3119 |
-
unset( $fs->_storage->trial_promotion_shown );
|
3120 |
-
} else if ( fs_request_is_action( 'simulate_network_upgrade' ) ) {
|
3121 |
-
check_admin_referer( 'simulate_network_upgrade' );
|
3122 |
-
|
3123 |
-
$fs = freemius( fs_request_get( 'module_id' ) );
|
3124 |
-
|
3125 |
-
self::set_network_upgrade_mode( $fs->_storage );
|
3126 |
-
} else if ( fs_request_is_action( 'delete_install' ) ) {
|
3127 |
-
check_admin_referer( 'delete_install' );
|
3128 |
-
|
3129 |
-
self::_delete_site_by_slug(
|
3130 |
-
fs_request_get( 'slug' ),
|
3131 |
-
fs_request_get( 'module_type' ),
|
3132 |
-
true,
|
3133 |
-
fs_request_get( 'blog_id', null )
|
3134 |
-
);
|
3135 |
-
} else if ( fs_request_is_action( 'delete_user' ) ) {
|
3136 |
-
check_admin_referer( 'delete_user' );
|
3137 |
-
|
3138 |
-
self::delete_user( fs_request_get( 'user_id' ) );
|
3139 |
-
} else if ( fs_request_is_action( 'download_logs' ) ) {
|
3140 |
-
check_admin_referer( 'download_logs' );
|
3141 |
-
|
3142 |
-
$download_url = FS_Logger::download_db_logs(
|
3143 |
-
fs_request_get( 'filters', false, 'post' )
|
3144 |
-
);
|
3145 |
-
|
3146 |
-
if ( false === $download_url ) {
|
3147 |
-
wp_die( 'Oops... there was an error while generating the logs download file. Please try again and if it doesn\'t work contact support@freemius.com.' );
|
3148 |
-
}
|
3149 |
-
|
3150 |
-
fs_redirect( $download_url );
|
3151 |
-
} else if ( fs_request_is_action( 'migrate_options_to_network' ) ) {
|
3152 |
-
check_admin_referer( 'migrate_options_to_network' );
|
3153 |
-
|
3154 |
-
self::migrate_options_to_network();
|
3155 |
-
}
|
3156 |
-
}
|
3157 |
-
|
3158 |
-
/**
|
3159 |
-
* @author Vova Feldman (@svovaf)
|
3160 |
-
* @since 1.0.8
|
3161 |
-
*/
|
3162 |
-
static function _debug_page_render() {
|
3163 |
-
self::$_static_logger->entrance();
|
3164 |
-
|
3165 |
-
if ( ! is_multisite() ) {
|
3166 |
-
$all_plugins_installs = self::get_all_sites( WP_FS__MODULE_TYPE_PLUGIN );
|
3167 |
-
$all_themes_installs = self::get_all_sites( WP_FS__MODULE_TYPE_THEME );
|
3168 |
-
} else {
|
3169 |
-
$sites = self::get_sites();
|
3170 |
-
|
3171 |
-
$all_plugins_installs = array();
|
3172 |
-
$all_themes_installs = array();
|
3173 |
-
|
3174 |
-
foreach ( $sites as $site ) {
|
3175 |
-
$blog_id = self::get_site_blog_id( $site );
|
3176 |
-
|
3177 |
-
$plugins_installs = self::get_all_sites( WP_FS__MODULE_TYPE_PLUGIN, $blog_id );
|
3178 |
-
|
3179 |
-
foreach ( $plugins_installs as $slug => $install ) {
|
3180 |
-
if ( ! isset( $all_plugins_installs[ $slug ] ) ) {
|
3181 |
-
$all_plugins_installs[ $slug ] = array();
|
3182 |
-
}
|
3183 |
-
|
3184 |
-
$install->blog_id = $blog_id;
|
3185 |
-
|
3186 |
-
$all_plugins_installs[ $slug ][] = $install;
|
3187 |
-
}
|
3188 |
-
|
3189 |
-
$themes_installs = self::get_all_sites( WP_FS__MODULE_TYPE_THEME, $blog_id );
|
3190 |
-
|
3191 |
-
foreach ( $themes_installs as $slug => $install ) {
|
3192 |
-
if ( ! isset( $all_themes_installs[ $slug ] ) ) {
|
3193 |
-
$all_themes_installs[ $slug ] = array();
|
3194 |
-
}
|
3195 |
-
|
3196 |
-
$install->blog_id = $blog_id;
|
3197 |
-
|
3198 |
-
$all_themes_installs[ $slug ][] = $install;
|
3199 |
-
}
|
3200 |
-
}
|
3201 |
-
}
|
3202 |
-
|
3203 |
-
$licenses_by_module_type = self::get_all_licenses_by_module_type();
|
3204 |
-
|
3205 |
-
$vars = array(
|
3206 |
-
'plugin_sites' => $all_plugins_installs,
|
3207 |
-
'theme_sites' => $all_themes_installs,
|
3208 |
-
'users' => self::get_all_users(),
|
3209 |
-
'addons' => self::get_all_addons(),
|
3210 |
-
'account_addons' => self::get_all_account_addons(),
|
3211 |
-
'plugin_licenses' => $licenses_by_module_type[ WP_FS__MODULE_TYPE_PLUGIN ],
|
3212 |
-
'theme_licenses' => $licenses_by_module_type[ WP_FS__MODULE_TYPE_THEME ]
|
3213 |
-
);
|
3214 |
-
|
3215 |
-
fs_enqueue_local_style( 'fs_debug', '/admin/debug.css' );
|
3216 |
-
fs_require_once_template( 'debug.php', $vars );
|
3217 |
-
}
|
3218 |
-
|
3219 |
-
#endregion
|
3220 |
-
|
3221 |
-
#----------------------------------------------------------------------------------
|
3222 |
-
#region Connectivity Issues
|
3223 |
-
#----------------------------------------------------------------------------------
|
3224 |
-
|
3225 |
-
/**
|
3226 |
-
* Check if Freemius should be turned on for the current plugin install.
|
3227 |
-
*
|
3228 |
-
* Note:
|
3229 |
-
* $this->_is_on is updated in has_api_connectivity()
|
3230 |
-
*
|
3231 |
-
* @author Vova Feldman (@svovaf)
|
3232 |
-
* @since 1.0.9
|
3233 |
-
*
|
3234 |
-
* @return bool
|
3235 |
-
*/
|
3236 |
-
function is_on() {
|
3237 |
-
self::$_static_logger->entrance();
|
3238 |
-
|
3239 |
-
if ( isset( $this->_is_on ) ) {
|
3240 |
-
return $this->_is_on;
|
3241 |
-
}
|
3242 |
-
|
3243 |
-
// If already installed or pending then sure it's on :)
|
3244 |
-
if ( $this->is_registered() || $this->is_pending_activation() ) {
|
3245 |
-
$this->_is_on = true;
|
3246 |
-
|
3247 |
-
return true;
|
3248 |
-
}
|
3249 |
-
|
3250 |
-
return false;
|
3251 |
-
}
|
3252 |
-
|
3253 |
-
/**
|
3254 |
-
* @author Vova Feldman (@svovaf)
|
3255 |
-
* @since 1.1.7.3
|
3256 |
-
*
|
3257 |
-
* @param bool $flush_if_no_connectivity
|
3258 |
-
*
|
3259 |
-
* @return bool
|
3260 |
-
*/
|
3261 |
-
private function should_run_connectivity_test( $flush_if_no_connectivity = false ) {
|
3262 |
-
if ( ! isset( $this->_storage->connectivity_test ) ) {
|
3263 |
-
// Connectivity test was never executed, or cache was cleared.
|
3264 |
-
return true;
|
3265 |
-
}
|
3266 |
-
|
3267 |
-
if ( WP_FS__PING_API_ON_IP_OR_HOST_CHANGES ) {
|
3268 |
-
if ( WP_FS__IS_HTTP_REQUEST ) {
|
3269 |
-
if ( $_SERVER['HTTP_HOST'] != $this->_storage->connectivity_test['host'] ) {
|
3270 |
-
// Domain changed.
|
3271 |
-
return true;
|
3272 |
-
}
|
3273 |
-
|
3274 |
-
if ( WP_FS__REMOTE_ADDR != $this->_storage->connectivity_test['server_ip'] ) {
|
3275 |
-
// Server IP changed.
|
3276 |
-
return true;
|
3277 |
-
}
|
3278 |
-
}
|
3279 |
-
}
|
3280 |
-
|
3281 |
-
if ( $this->_storage->connectivity_test['is_connected'] &&
|
3282 |
-
$this->_storage->connectivity_test['is_active']
|
3283 |
-
) {
|
3284 |
-
// API connected and Freemius is active - no need to run connectivity check.
|
3285 |
-
return false;
|
3286 |
-
}
|
3287 |
-
|
3288 |
-
if ( $flush_if_no_connectivity ) {
|
3289 |
-
/**
|
3290 |
-
* If explicitly asked to flush when no connectivity - do it only
|
3291 |
-
* if at least 10 sec passed from the last API connectivity test.
|
3292 |
-
*/
|
3293 |
-
return ( isset( $this->_storage->connectivity_test['timestamp'] ) &&
|
3294 |
-
( WP_FS__SCRIPT_START_TIME - $this->_storage->connectivity_test['timestamp'] ) > 10 );
|
3295 |
-
}
|
3296 |
-
|
3297 |
-
/**
|
3298 |
-
* @since 1.1.7 Don't check for connectivity on plugin downgrade.
|
3299 |
-
*/
|
3300 |
-
$version = $this->get_plugin_version();
|
3301 |
-
if ( version_compare( $version, $this->_storage->connectivity_test['version'], '>' ) ) {
|
3302 |
-
// If it's a plugin version upgrade and Freemius is off or no connectivity, run connectivity test.
|
3303 |
-
return true;
|
3304 |
-
}
|
3305 |
-
|
3306 |
-
return false;
|
3307 |
-
}
|
3308 |
-
|
3309 |
-
/**
|
3310 |
-
* @author Vova Feldman (@svovaf)
|
3311 |
-
* @since 1.1.7.4
|
3312 |
-
*
|
3313 |
-
* @param int|null $blog_id Since 2.0.0.
|
3314 |
-
* @param bool $is_gdpr_test Since 2.0.2. Perform only the GDPR test.
|
3315 |
-
*
|
3316 |
-
* @return object|false
|
3317 |
-
*/
|
3318 |
-
private function ping( $blog_id = null, $is_gdpr_test = false ) {
|
3319 |
-
if ( WP_FS__SIMULATE_NO_API_CONNECTIVITY ) {
|
3320 |
-
return false;
|
3321 |
-
}
|
3322 |
-
|
3323 |
-
$version = $this->get_plugin_version();
|
3324 |
-
|
3325 |
-
$is_update = $this->apply_filters( 'is_plugin_update', $this->is_plugin_update() );
|
3326 |
-
|
3327 |
-
return $this->get_api_plugin_scope()->ping(
|
3328 |
-
$this->get_anonymous_id( $blog_id ),
|
3329 |
-
array(
|
3330 |
-
'is_update' => json_encode( $is_update ),
|
3331 |
-
'version' => $version,
|
3332 |
-
'sdk' => $this->version,
|
3333 |
-
'is_admin' => json_encode( is_admin() ),
|
3334 |
-
'is_ajax' => json_encode( self::is_ajax() ),
|
3335 |
-
'is_cron' => json_encode( self::is_cron() ),
|
3336 |
-
'is_gdpr_test' => $is_gdpr_test,
|
3337 |
-
'is_http' => json_encode( WP_FS__IS_HTTP_REQUEST ),
|
3338 |
-
)
|
3339 |
-
);
|
3340 |
-
}
|
3341 |
-
|
3342 |
-
/**
|
3343 |
-
* Check if there's any connectivity issue to Freemius API.
|
3344 |
-
*
|
3345 |
-
* @author Vova Feldman (@svovaf)
|
3346 |
-
* @since 1.0.9
|
3347 |
-
*
|
3348 |
-
* @param bool $flush_if_no_connectivity
|
3349 |
-
*
|
3350 |
-
* @return bool
|
3351 |
-
*/
|
3352 |
-
function has_api_connectivity( $flush_if_no_connectivity = false ) {
|
3353 |
-
$this->_logger->entrance();
|
3354 |
-
|
3355 |
-
if ( isset( $this->_has_api_connection ) && ( $this->_has_api_connection || ! $flush_if_no_connectivity ) ) {
|
3356 |
-
return $this->_has_api_connection;
|
3357 |
-
}
|
3358 |
-
|
3359 |
-
if ( WP_FS__SIMULATE_NO_API_CONNECTIVITY &&
|
3360 |
-
isset( $this->_storage->connectivity_test ) &&
|
3361 |
-
true === $this->_storage->connectivity_test['is_connected']
|
3362 |
-
) {
|
3363 |
-
unset( $this->_storage->connectivity_test );
|
3364 |
-
}
|
3365 |
-
|
3366 |
-
if ( ! $this->should_run_connectivity_test( $flush_if_no_connectivity ) ) {
|
3367 |
-
$this->_has_api_connection = $this->_storage->connectivity_test['is_connected'];
|
3368 |
-
/**
|
3369 |
-
* @since 1.1.6 During dev mode, if there's connectivity - turn Freemius on regardless the configuration.
|
3370 |
-
*
|
3371 |
-
* @since 1.2.1.5 If the user running the premium version then ignore the 'is_active' flag and turn Freemius on to enable license key activation.
|
3372 |
-
*/
|
3373 |
-
$this->_is_on = $this->_storage->connectivity_test['is_active'] ||
|
3374 |
-
$this->is_premium() ||
|
3375 |
-
( WP_FS__DEV_MODE && $this->_has_api_connection && ! WP_FS__SIMULATE_FREEMIUS_OFF );
|
3376 |
-
|
3377 |
-
return $this->_has_api_connection;
|
3378 |
-
}
|
3379 |
-
|
3380 |
-
$pong = $this->ping();
|
3381 |
-
$is_connected = $this->get_api_plugin_scope()->is_valid_ping( $pong );
|
3382 |
-
|
3383 |
-
if ( ! $is_connected ) {
|
3384 |
-
// API failure.
|
3385 |
-
$this->_add_connectivity_issue_message( $pong );
|
3386 |
-
}
|
3387 |
-
|
3388 |
-
if ( $is_connected ) {
|
3389 |
-
FS_GDPR_Manager::instance()->store_is_required( $pong->is_gdpr_required );
|
3390 |
-
}
|
3391 |
-
|
3392 |
-
$this->store_connectivity_info( $pong, $is_connected );
|
3393 |
-
|
3394 |
-
return $this->_has_api_connection;
|
3395 |
-
}
|
3396 |
-
|
3397 |
-
/**
|
3398 |
-
* @author Vova Feldman (@svovaf)
|
3399 |
-
* @since 1.1.7.4
|
3400 |
-
*
|
3401 |
-
* @param object $pong
|
3402 |
-
* @param bool $is_connected
|
3403 |
-
*/
|
3404 |
-
private function store_connectivity_info( $pong, $is_connected ) {
|
3405 |
-
$this->_logger->entrance();
|
3406 |
-
|
3407 |
-
$version = $this->get_plugin_version();
|
3408 |
-
|
3409 |
-
if ( ! $is_connected || WP_FS__SIMULATE_FREEMIUS_OFF ) {
|
3410 |
-
$is_active = false;
|
3411 |
-
} else {
|
3412 |
-
$is_active = ( isset( $pong->is_active ) && true == $pong->is_active );
|
3413 |
-
}
|
3414 |
-
|
3415 |
-
$is_active = $this->apply_filters(
|
3416 |
-
'is_on',
|
3417 |
-
$is_active,
|
3418 |
-
$this->is_plugin_update(),
|
3419 |
-
$version
|
3420 |
-
);
|
3421 |
-
|
3422 |
-
$this->_storage->connectivity_test = array(
|
3423 |
-
'is_connected' => $is_connected,
|
3424 |
-
'host' => $_SERVER['HTTP_HOST'],
|
3425 |
-
'server_ip' => WP_FS__REMOTE_ADDR,
|
3426 |
-
'is_active' => $is_active,
|
3427 |
-
'timestamp' => WP_FS__SCRIPT_START_TIME,
|
3428 |
-
// Last version with connectivity attempt.
|
3429 |
-
'version' => $version,
|
3430 |
-
);
|
3431 |
-
|
3432 |
-
$this->_has_api_connection = $is_connected;
|
3433 |
-
$this->_is_on = $is_active || ( WP_FS__DEV_MODE && $is_connected && ! WP_FS__SIMULATE_FREEMIUS_OFF );
|
3434 |
-
}
|
3435 |
-
|
3436 |
-
/**
|
3437 |
-
* Force turning Freemius on.
|
3438 |
-
*
|
3439 |
-
* @author Vova Feldman (@svovaf)
|
3440 |
-
* @since 1.1.8.1
|
3441 |
-
*
|
3442 |
-
* @return bool TRUE if successfully turned on.
|
3443 |
-
*/
|
3444 |
-
private function turn_on() {
|
3445 |
-
$this->_logger->entrance();
|
3446 |
-
|
3447 |
-
if ( $this->is_on() || ! isset( $this->_storage->connectivity_test['is_active'] ) ) {
|
3448 |
-
return false;
|
3449 |
-
}
|
3450 |
-
|
3451 |
-
$updated_connectivity = $this->_storage->connectivity_test;
|
3452 |
-
$updated_connectivity['is_active'] = true;
|
3453 |
-
$updated_connectivity['timestamp'] = WP_FS__SCRIPT_START_TIME;
|
3454 |
-
$this->_storage->connectivity_test = $updated_connectivity;
|
3455 |
-
|
3456 |
-
$this->_is_on = true;
|
3457 |
-
|
3458 |
-
return true;
|
3459 |
-
}
|
3460 |
-
|
3461 |
-
/**
|
3462 |
-
* Anonymous and unique site identifier (Hash).
|
3463 |
-
*
|
3464 |
-
* @author Vova Feldman (@svovaf)
|
3465 |
-
* @since 1.1.0
|
3466 |
-
*
|
3467 |
-
* @param null|int $blog_id Since 2.0.0
|
3468 |
-
*
|
3469 |
-
* @return string
|
3470 |
-
*/
|
3471 |
-
function get_anonymous_id( $blog_id = null ) {
|
3472 |
-
$unique_id = self::$_accounts->get_option( 'unique_id', null, $blog_id );
|
3473 |
-
|
3474 |
-
if ( empty( $unique_id ) || ! is_string( $unique_id ) ) {
|
3475 |
-
$key = fs_strip_url_protocol( get_site_url( $blog_id ) );
|
3476 |
-
|
3477 |
-
$secure_auth = SECURE_AUTH_KEY;
|
3478 |
-
if ( empty( $secure_auth ) || false !== strpos( $secure_auth, ' ' ) ) {
|
3479 |
-
// Protect against default auth key.
|
3480 |
-
$secure_auth = md5( microtime() );
|
3481 |
-
}
|
3482 |
-
|
3483 |
-
/**
|
3484 |
-
* Base the unique identifier on the WP secure authentication key. Which
|
3485 |
-
* turns the key into a secret anonymous identifier. This will help us
|
3486 |
-
* to avoid duplicate installs generation on the backend upon opt-in.
|
3487 |
-
*
|
3488 |
-
* @author Vova Feldman (@svovaf)
|
3489 |
-
* @since 1.2.3
|
3490 |
-
*/
|
3491 |
-
$unique_id = md5( $key . $secure_auth );
|
3492 |
-
|
3493 |
-
self::$_accounts->set_option( 'unique_id', $unique_id, true, $blog_id );
|
3494 |
-
}
|
3495 |
-
|
3496 |
-
$this->_logger->departure( $unique_id );
|
3497 |
-
|
3498 |
-
return $unique_id;
|
3499 |
-
}
|
3500 |
-
|
3501 |
-
/**
|
3502 |
-
* @author Vova Feldman (@svovaf)
|
3503 |
-
* @since 1.1.7.4
|
3504 |
-
*
|
3505 |
-
* @return \WP_User
|
3506 |
-
*/
|
3507 |
-
static function _get_current_wp_user() {
|
3508 |
-
self::require_pluggable_essentials();
|
3509 |
-
self::wp_cookie_constants();
|
3510 |
-
|
3511 |
-
return wp_get_current_user();
|
3512 |
-
}
|
3513 |
-
|
3514 |
-
/**
|
3515 |
-
* Define cookie constants which are required by Freemius::_get_current_wp_user() since
|
3516 |
-
* it uses wp_get_current_user() which needs the cookie constants set. When a plugin
|
3517 |
-
* is network activated the cookie constants are only configured after the network
|
3518 |
-
* plugins activation, therefore, if we don't define those constants WP will throw
|
3519 |
-
* PHP warnings/notices.
|
3520 |
-
*
|
3521 |
-
* @author Vova Feldman (@svovaf)
|
3522 |
-
* @since 2.1.1
|
3523 |
-
*/
|
3524 |
-
private static function wp_cookie_constants() {
|
3525 |
-
if ( defined( 'LOGGED_IN_COOKIE' ) &&
|
3526 |
-
( defined( 'AUTH_COOKIE' ) || defined( 'SECURE_AUTH_COOKIE' ) )
|
3527 |
-
) {
|
3528 |
-
return;
|
3529 |
-
}
|
3530 |
-
|
3531 |
-
/**
|
3532 |
-
* Used to guarantee unique hash cookies
|
3533 |
-
*
|
3534 |
-
* @since 1.5.0
|
3535 |
-
*/
|
3536 |
-
if ( ! defined( 'COOKIEHASH' ) ) {
|
3537 |
-
$siteurl = get_site_option( 'siteurl' );
|
3538 |
-
if ( $siteurl ) {
|
3539 |
-
define( 'COOKIEHASH', md5( $siteurl ) );
|
3540 |
-
} else {
|
3541 |
-
define( 'COOKIEHASH', '' );
|
3542 |
-
}
|
3543 |
-
}
|
3544 |
-
|
3545 |
-
if ( ! defined( 'LOGGED_IN_COOKIE' ) ) {
|
3546 |
-
define( 'LOGGED_IN_COOKIE', 'wordpress_logged_in_' . COOKIEHASH );
|
3547 |
-
}
|
3548 |
-
|
3549 |
-
/**
|
3550 |
-
* @since 2.5.0
|
3551 |
-
*/
|
3552 |
-
if ( ! defined( 'AUTH_COOKIE' ) ) {
|
3553 |
-
define( 'AUTH_COOKIE', 'wordpress_' . COOKIEHASH );
|
3554 |
-
}
|
3555 |
-
|
3556 |
-
/**
|
3557 |
-
* @since 2.6.0
|
3558 |
-
*/
|
3559 |
-
if ( ! defined( 'SECURE_AUTH_COOKIE' ) ) {
|
3560 |
-
define( 'SECURE_AUTH_COOKIE', 'wordpress_sec_' . COOKIEHASH );
|
3561 |
-
}
|
3562 |
-
}
|
3563 |
-
|
3564 |
-
/**
|
3565 |
-
* @author Vova Feldman (@svovaf)
|
3566 |
-
* @since 2.1.0
|
3567 |
-
*
|
3568 |
-
* @return int
|
3569 |
-
*/
|
3570 |
-
static function get_current_wp_user_id() {
|
3571 |
-
$wp_user = self::_get_current_wp_user();
|
3572 |
-
|
3573 |
-
return $wp_user->ID;
|
3574 |
-
}
|
3575 |
-
|
3576 |
-
/**
|
3577 |
-
* @author Vova Feldman (@svovaf)
|
3578 |
-
* @since 1.2.1.7
|
3579 |
-
*
|
3580 |
-
* @param string $email
|
3581 |
-
*
|
3582 |
-
* @return bool
|
3583 |
-
*/
|
3584 |
-
static function is_valid_email( $email ) {
|
3585 |
-
if ( false === filter_var( $email, FILTER_VALIDATE_EMAIL ) ) {
|
3586 |
-
return false;
|
3587 |
-
}
|
3588 |
-
|
3589 |
-
$parts = explode( '@', $email );
|
3590 |
-
|
3591 |
-
if ( 2 !== count( $parts ) || empty( $parts[1] ) ) {
|
3592 |
-
return false;
|
3593 |
-
}
|
3594 |
-
|
3595 |
-
$blacklist = array(
|
3596 |
-
'admin.',
|
3597 |
-
'webmaster.',
|
3598 |
-
'localhost.',
|
3599 |
-
'dev.',
|
3600 |
-
'development.',
|
3601 |
-
'test.',
|
3602 |
-
'stage.',
|
3603 |
-
'staging.',
|
3604 |
-
);
|
3605 |
-
|
3606 |
-
// Make sure domain is not one of the blacklisted.
|
3607 |
-
foreach ( $blacklist as $invalid ) {
|
3608 |
-
if ( 0 === strpos( $parts[1], $invalid ) ) {
|
3609 |
-
return false;
|
3610 |
-
}
|
3611 |
-
}
|
3612 |
-
|
3613 |
-
// Get the UTF encoded domain name.
|
3614 |
-
$domain = idn_to_ascii( $parts[1] ) . '.';
|
3615 |
-
|
3616 |
-
return ( checkdnsrr( $domain, 'MX' ) || checkdnsrr( $domain, 'A' ) );
|
3617 |
-
}
|
3618 |
-
|
3619 |
-
/**
|
3620 |
-
* Generate API connectivity issue message.
|
3621 |
-
*
|
3622 |
-
* @author Vova Feldman (@svovaf)
|
3623 |
-
* @since 1.0.9
|
3624 |
-
*
|
3625 |
-
* @param mixed $api_result
|
3626 |
-
* @param bool $is_first_failure
|
3627 |
-
*/
|
3628 |
-
function _add_connectivity_issue_message( $api_result, $is_first_failure = true ) {
|
3629 |
-
if ( ! $this->is_premium() && $this->_enable_anonymous ) {
|
3630 |
-
// Don't add message if it's the free version and can run anonymously.
|
3631 |
-
return;
|
3632 |
-
}
|
3633 |
-
|
3634 |
-
if ( ! function_exists( 'wp_nonce_url' ) ) {
|
3635 |
-
require_once ABSPATH . 'wp-includes/functions.php';
|
3636 |
-
}
|
3637 |
-
|
3638 |
-
$current_user = self::_get_current_wp_user();
|
3639 |
-
// $admin_email = get_option( 'admin_email' );
|
3640 |
-
$admin_email = $current_user->user_email;
|
3641 |
-
|
3642 |
-
// Aliases.
|
3643 |
-
$deactivate_plugin_title = $this->esc_html_inline( 'That\'s exhausting, please deactivate', 'deactivate-plugin-title' );
|
3644 |
-
$deactivate_plugin_desc = $this->esc_html_inline( 'We feel your frustration and sincerely apologize for the inconvenience. Hope to see you again in the future.', 'deactivate-plugin-desc' );
|
3645 |
-
$install_previous_title = $this->esc_html_inline( 'Let\'s try your previous version', 'install-previous-title' );
|
3646 |
-
$install_previous_desc = $this->esc_html_inline( 'Uninstall this version and install the previous one.', 'install-previous-desc' );
|
3647 |
-
$fix_issue_title = $this->esc_html_inline( 'Yes - I\'m giving you a chance to fix it', 'fix-issue-title' );
|
3648 |
-
$fix_issue_desc = $this->esc_html_inline( 'We will do our best to whitelist your server and resolve this issue ASAP. You will get a follow-up email to %s once we have an update.', 'fix-issue-desc' );
|
3649 |
-
/* translators: %s: product title (e.g. "Awesome Plugin" requires an access to...) */
|
3650 |
-
$x_requires_access_to_api = $this->esc_html_inline( '%s requires an access to our API.', 'x-requires-access-to-api' );
|
3651 |
-
$sysadmin_title = $this->esc_html_inline( 'I\'m a system administrator', 'sysadmin-title' );
|
3652 |
-
$happy_to_resolve_issue_asap = $this->esc_html_inline( 'We are sure it\'s an issue on our side and more than happy to resolve it for you ASAP if you give us a chance.', 'happy-to-resolve-issue-asap' );
|
3653 |
-
|
3654 |
-
$message = false;
|
3655 |
-
if ( is_object( $api_result ) &&
|
3656 |
-
isset( $api_result->error ) &&
|
3657 |
-
isset( $api_result->error->code )
|
3658 |
-
) {
|
3659 |
-
switch ( $api_result->error->code ) {
|
3660 |
-
case 'curl_missing':
|
3661 |
-
$missing_methods = '';
|
3662 |
-
if ( is_array( $api_result->missing_methods ) &&
|
3663 |
-
! empty( $api_result->missing_methods )
|
3664 |
-
) {
|
3665 |
-
foreach ( $api_result->missing_methods as $m ) {
|
3666 |
-
if ( 'curl_version' === $m ) {
|
3667 |
-
continue;
|
3668 |
-
}
|
3669 |
-
|
3670 |
-
if ( ! empty( $missing_methods ) ) {
|
3671 |
-
$missing_methods .= ', ';
|
3672 |
-
}
|
3673 |
-
|
3674 |
-
$missing_methods .= sprintf( '<code>%s</code>', $m );
|
3675 |
-
}
|
3676 |
-
|
3677 |
-
if ( ! empty( $missing_methods ) ) {
|
3678 |
-
$missing_methods = sprintf(
|
3679 |
-
'<br><br><b>%s</b> %s',
|
3680 |
-
$this->esc_html_inline( 'Disabled method(s):', 'curl-disabled-methods' ),
|
3681 |
-
$missing_methods
|
3682 |
-
);
|
3683 |
-
}
|
3684 |
-
}
|
3685 |
-
|
3686 |
-
$message = sprintf(
|
3687 |
-
$x_requires_access_to_api . ' ' .
|
3688 |
-
$this->esc_html_inline( 'We use PHP cURL library for the API calls, which is a very common library and usually installed and activated out of the box. Unfortunately, cURL is not activated (or disabled) on your server.', 'curl-missing-message' ) . ' ' .
|
3689 |
-
$missing_methods .
|
3690 |
-
' %s',
|
3691 |
-
'<b>' . $this->get_plugin_name() . '</b>',
|
3692 |
-
sprintf(
|
3693 |
-
'<ol id="fs_firewall_issue_options"><li>%s</li><li>%s</li><li>%s</li></ol>',
|
3694 |
-
sprintf(
|
3695 |
-
'<a class="fs-resolve" data-type="curl" href="#"><b>%s</b></a>%s',
|
3696 |
-
$this->get_text_inline( 'I don\'t know what is cURL or how to install it, help me!', 'curl-missing-no-clue-title' ),
|
3697 |
-
' - ' . sprintf(
|
3698 |
-
$this->get_text_inline( 'We\'ll make sure to contact your hosting company and resolve the issue. You will get a follow-up email to %s once we have an update.', 'curl-missing-no-clue-desc' ),
|
3699 |
-
'<a href="mailto:' . $admin_email . '">' . $admin_email . '</a>'
|
3700 |
-
)
|
3701 |
-
),
|
3702 |
-
sprintf(
|
3703 |
-
'<b>%s</b> - %s',
|
3704 |
-
$sysadmin_title,
|
3705 |
-
esc_html( sprintf( $this->get_text_inline( 'Great, please install cURL and enable it in your php.ini file. In addition, search for the \'disable_functions\' directive in your php.ini file and remove any disabled methods starting with \'curl_\'. To make sure it was successfully activated, use \'phpinfo()\'. Once activated, deactivate the %s and reactivate it back again.', 'curl-missing-sysadmin-desc' ), $this->get_module_label( true ) ) )
|
3706 |
-
),
|
3707 |
-
sprintf(
|
3708 |
-
'<a href="%s"><b>%s</b></a> - %s',
|
3709 |
-
wp_nonce_url( 'plugins.php?action=deactivate&plugin=' . $this->_plugin_basename . '&plugin_status=all&paged=1&s=', 'deactivate-plugin_' . $this->_plugin_basename ),
|
3710 |
-
$deactivate_plugin_title,
|
3711 |
-
$deactivate_plugin_desc
|
3712 |
-
)
|
3713 |
-
)
|
3714 |
-
);
|
3715 |
-
break;
|
3716 |
-
case 'cloudflare_ddos_protection':
|
3717 |
-
$message = sprintf(
|
3718 |
-
$x_requires_access_to_api . ' ' .
|
3719 |
-
$this->esc_html_inline( 'From unknown reason, CloudFlare, the firewall we use, blocks the connection.', 'cloudflare-blocks-connection-message' ) . ' ' .
|
3720 |
-
$happy_to_resolve_issue_asap .
|
3721 |
-
' %s',
|
3722 |
-
'<b>' . $this->get_plugin_name() . '</b>',
|
3723 |
-
sprintf(
|
3724 |
-
'<ol id="fs_firewall_issue_options"><li>%s</li><li>%s</li><li>%s</li></ol>',
|
3725 |
-
sprintf(
|
3726 |
-
'<a class="fs-resolve" data-type="cloudflare" href="#"><b>%s</b></a>%s',
|
3727 |
-
$fix_issue_title,
|
3728 |
-
' - ' . sprintf(
|
3729 |
-
$fix_issue_desc,
|
3730 |
-
'<a href="mailto:' . $admin_email . '">' . $admin_email . '</a>'
|
3731 |
-
)
|
3732 |
-
),
|
3733 |
-
sprintf(
|
3734 |
-
'<a href="%s" target="_blank"><b>%s</b></a> - %s',
|
3735 |
-
sprintf( 'https://wordpress.org/plugins/%s/download/', $this->_slug ),
|
3736 |
-
$install_previous_title,
|
3737 |
-
$install_previous_desc
|
3738 |
-
),
|
3739 |
-
sprintf(
|
3740 |
-
'<a href="%s"><b>%s</b></a> - %s',
|
3741 |
-
wp_nonce_url( 'plugins.php?action=deactivate&plugin=' . $this->_plugin_basename . '&plugin_status=all&paged=1&s=' . '', 'deactivate-plugin_' . $this->_plugin_basename ),
|
3742 |
-
$deactivate_plugin_title,
|
3743 |
-
$deactivate_plugin_desc
|
3744 |
-
)
|
3745 |
-
)
|
3746 |
-
);
|
3747 |
-
break;
|
3748 |
-
case 'squid_cache_block':
|
3749 |
-
$message = sprintf(
|
3750 |
-
$x_requires_access_to_api . ' ' .
|
3751 |
-
$this->esc_html_inline( 'It looks like your server is using Squid ACL (access control lists), which blocks the connection.', 'squid-blocks-connection-message' ) .
|
3752 |
-
' %s',
|
3753 |
-
'<b>' . $this->get_plugin_name() . '</b>',
|
3754 |
-
sprintf(
|
3755 |
-
'<ol id="fs_firewall_issue_options"><li>%s</li><li>%s</li><li>%s</li></ol>',
|
3756 |
-
sprintf(
|
3757 |
-
'<a class="fs-resolve" data-type="squid" href="#"><b>%s</b></a> - %s',
|
3758 |
-
$this->esc_html_inline( 'I don\'t know what is Squid or ACL, help me!', 'squid-no-clue-title' ),
|
3759 |
-
sprintf(
|
3760 |
-
$this->esc_html_inline( 'We\'ll make sure to contact your hosting company and resolve the issue. You will get a follow-up email to %s once we have an update.', 'squid-no-clue-desc' ),
|
3761 |
-
'<a href="mailto:' . $admin_email . '">' . $admin_email . '</a>'
|
3762 |
-
)
|
3763 |
-
),
|
3764 |
-
sprintf(
|
3765 |
-
'<b>%s</b> - %s',
|
3766 |
-
$sysadmin_title,
|
3767 |
-
sprintf(
|
3768 |
-
$this->esc_html_inline( 'Great, please whitelist the following domains: %s. Once you are done, deactivate the %s and activate it again.', 'squid-sysadmin-desc' ),
|
3769 |
-
// We use a filter since the plugin might require additional API connectivity.
|
3770 |
-
'<b>' . implode( ', ', $this->apply_filters( 'api_domains', array(
|
3771 |
-
'api.freemius.com',
|
3772 |
-
'wp.freemius.com'
|
3773 |
-
) ) ) . '</b>',
|
3774 |
-
$this->_module_type
|
3775 |
-
)
|
3776 |
-
),
|
3777 |
-
sprintf(
|
3778 |
-
'<a href="%s"><b>%s</b></a> - %s',
|
3779 |
-
wp_nonce_url( 'plugins.php?action=deactivate&plugin=' . $this->_plugin_basename . '&plugin_status=all&paged=1&s=', 'deactivate-plugin_' . $this->_plugin_basename ),
|
3780 |
-
$deactivate_plugin_title,
|
3781 |
-
$deactivate_plugin_desc
|
3782 |
-
)
|
3783 |
-
)
|
3784 |
-
);
|
3785 |
-
break;
|
3786 |
-
// default:
|
3787 |
-
// $message = $this->get_text_inline( 'connectivity-test-fails-message' );
|
3788 |
-
// break;
|
3789 |
-
}
|
3790 |
-
}
|
3791 |
-
|
3792 |
-
$message_id = 'failed_connect_api';
|
3793 |
-
$type = 'error';
|
3794 |
-
|
3795 |
-
$connectivity_test_fails_message = $this->esc_html_inline( 'From unknown reason, the API connectivity test failed.', 'connectivity-test-fails-message' );
|
3796 |
-
|
3797 |
-
if ( false === $message ) {
|
3798 |
-
if ( $is_first_failure ) {
|
3799 |
-
// First attempt failed.
|
3800 |
-
$message = sprintf(
|
3801 |
-
$x_requires_access_to_api . ' ' .
|
3802 |
-
$connectivity_test_fails_message . ' ' .
|
3803 |
-
$this->esc_html_inline( 'It\'s probably a temporary issue on our end. Just to be sure, with your permission, would it be o.k to run another connectivity test?', 'connectivity-test-maybe-temporary' ) . '<br><br>' .
|
3804 |
-
'%s',
|
3805 |
-
'<b>' . $this->get_plugin_name() . '</b>',
|
3806 |
-
sprintf(
|
3807 |
-
'<div id="fs_firewall_issue_options">%s %s</div>',
|
3808 |
-
sprintf(
|
3809 |
-
'<a class="button button-primary fs-resolve" data-type="retry_ping" href="#">%s</a>',
|
3810 |
-
$this->get_text_inline( 'Yes - do your thing', 'yes-do-your-thing' )
|
3811 |
-
),
|
3812 |
-
sprintf(
|
3813 |
-
'<a href="%s" class="button">%s</a>',
|
3814 |
-
wp_nonce_url( 'plugins.php?action=deactivate&plugin=' . $this->_plugin_basename . '&plugin_status=all&paged=1&s=', 'deactivate-plugin_' . $this->_plugin_basename ),
|
3815 |
-
$this->get_text_inline( 'No - just deactivate', 'no-deactivate' )
|
3816 |
-
)
|
3817 |
-
)
|
3818 |
-
);
|
3819 |
-
|
3820 |
-
$message_id = 'failed_connect_api_first';
|
3821 |
-
$type = 'promotion';
|
3822 |
-
} else {
|
3823 |
-
// Second connectivity attempt failed.
|
3824 |
-
$message = sprintf(
|
3825 |
-
$x_requires_access_to_api . ' ' .
|
3826 |
-
$connectivity_test_fails_message . ' ' .
|
3827 |
-
$happy_to_resolve_issue_asap .
|
3828 |
-
' %s',
|
3829 |
-
'<b>' . $this->get_plugin_name() . '</b>',
|
3830 |
-
sprintf(
|
3831 |
-
'<ol id="fs_firewall_issue_options"><li>%s</li><li>%s</li><li>%s</li></ol>',
|
3832 |
-
sprintf(
|
3833 |
-
'<a class="fs-resolve" data-type="general" href="#"><b>%s</b></a>%s',
|
3834 |
-
$fix_issue_title,
|
3835 |
-
' - ' . sprintf(
|
3836 |
-
$fix_issue_desc,
|
3837 |
-
'<a href="mailto:' . $admin_email . '">' . $admin_email . '</a>'
|
3838 |
-
)
|
3839 |
-
),
|
3840 |
-
sprintf(
|
3841 |
-
'<a href="%s" target="_blank"><b>%s</b></a> - %s',
|
3842 |
-
sprintf( 'https://wordpress.org/plugins/%s/download/', $this->_slug ),
|
3843 |
-
$install_previous_title,
|
3844 |
-
$install_previous_desc
|
3845 |
-
),
|
3846 |
-
sprintf(
|
3847 |
-
'<a href="%s"><b>%s</b></a> - %s',
|
3848 |
-
wp_nonce_url( 'plugins.php?action=deactivate&plugin=' . $this->_plugin_basename . '&plugin_status=all&paged=1&s=', 'deactivate-plugin_' . $this->_plugin_basename ),
|
3849 |
-
$deactivate_plugin_title,
|
3850 |
-
$deactivate_plugin_desc
|
3851 |
-
)
|
3852 |
-
)
|
3853 |
-
);
|
3854 |
-
}
|
3855 |
-
}
|
3856 |
-
|
3857 |
-
$this->_admin_notices->add_sticky(
|
3858 |
-
$message,
|
3859 |
-
$message_id,
|
3860 |
-
$this->get_text_x_inline( 'Oops', 'exclamation', 'oops' ) . '...',
|
3861 |
-
$type
|
3862 |
-
);
|
3863 |
-
}
|
3864 |
-
|
3865 |
-
/**
|
3866 |
-
* Handle user request to resolve connectivity issue.
|
3867 |
-
* This method will send an email to Freemius API technical staff for resolution.
|
3868 |
-
* The email will contain server's info and installed plugins (might be caching issue).
|
3869 |
-
*
|
3870 |
-
* @author Vova Feldman (@svovaf)
|
3871 |
-
* @since 1.0.9
|
3872 |
-
*/
|
3873 |
-
function _email_about_firewall_issue() {
|
3874 |
-
$this->_admin_notices->remove_sticky( 'failed_connect_api' );
|
3875 |
-
|
3876 |
-
$pong = $this->ping();
|
3877 |
-
|
3878 |
-
$is_connected = $this->get_api_plugin_scope()->is_valid_ping( $pong );
|
3879 |
-
|
3880 |
-
if ( $is_connected ) {
|
3881 |
-
FS_GDPR_Manager::instance()->store_is_required( $pong->is_gdpr_required );
|
3882 |
-
|
3883 |
-
$this->store_connectivity_info( $pong, $is_connected );
|
3884 |
-
|
3885 |
-
echo $this->get_after_plugin_activation_redirect_url();
|
3886 |
-
exit;
|
3887 |
-
}
|
3888 |
-
|
3889 |
-
$current_user = self::_get_current_wp_user();
|
3890 |
-
$admin_email = $current_user->user_email;
|
3891 |
-
|
3892 |
-
$error_type = fs_request_get( 'error_type', 'general' );
|
3893 |
-
|
3894 |
-
switch ( $error_type ) {
|
3895 |
-
case 'squid':
|
3896 |
-
$title = 'Squid ACL Blocking Issue';
|
3897 |
-
break;
|
3898 |
-
case 'cloudflare':
|
3899 |
-
$title = 'CloudFlare Blocking Issue';
|
3900 |
-
break;
|
3901 |
-
default:
|
3902 |
-
$title = 'API Connectivity Issue';
|
3903 |
-
break;
|
3904 |
-
}
|
3905 |
-
|
3906 |
-
$custom_email_sections = array();
|
3907 |
-
|
3908 |
-
// Add 'API Error' custom email section.
|
3909 |
-
$custom_email_sections['api_error'] = array(
|
3910 |
-
'title' => 'API Error',
|
3911 |
-
'rows' => array(
|
3912 |
-
'ping' => array(
|
3913 |
-
'API Error',
|
3914 |
-
is_string( $pong ) ? htmlentities( $pong ) : json_encode( $pong )
|
3915 |
-
),
|
3916 |
-
)
|
3917 |
-
);
|
3918 |
-
|
3919 |
-
// Send email with technical details to resolve API connectivity issues.
|
3920 |
-
$this->send_email(
|
3921 |
-
'api@freemius.com', // recipient
|
3922 |
-
$title . ' [' . $this->get_plugin_name() . ']', // subject
|
3923 |
-
$custom_email_sections,
|
3924 |
-
array( "Reply-To: $admin_email <$admin_email>" ) // headers
|
3925 |
-
);
|
3926 |
-
|
3927 |
-
$this->_admin_notices->add_sticky(
|
3928 |
-
sprintf(
|
3929 |
-
$this->get_text_inline( 'Thank for giving us the chance to fix it! A message was just sent to our technical staff. We will get back to you as soon as we have an update to %s. Appreciate your patience.', 'fix-request-sent-message' ),
|
3930 |
-
'<a href="mailto:' . $admin_email . '">' . $admin_email . '</a>'
|
3931 |
-
),
|
3932 |
-
'server_details_sent'
|
3933 |
-
);
|
3934 |
-
|
3935 |
-
// Action was taken, tell that API connectivity troubleshooting should be off now.
|
3936 |
-
|
3937 |
-
echo "1";
|
3938 |
-
exit;
|
3939 |
-
}
|
3940 |
-
|
3941 |
-
/**
|
3942 |
-
* Handle connectivity test retry approved by the user.
|
3943 |
-
*
|
3944 |
-
* @author Vova Feldman (@svovaf)
|
3945 |
-
* @since 1.1.7.4
|
3946 |
-
*/
|
3947 |
-
function _retry_connectivity_test() {
|
3948 |
-
$this->_admin_notices->remove_sticky( 'failed_connect_api_first' );
|
3949 |
-
|
3950 |
-
$pong = $this->ping();
|
3951 |
-
|
3952 |
-
$is_connected = $this->get_api_plugin_scope()->is_valid_ping( $pong );
|
3953 |
-
|
3954 |
-
if ( $is_connected ) {
|
3955 |
-
FS_GDPR_Manager::instance()->store_is_required( $pong->is_gdpr_required );
|
3956 |
-
|
3957 |
-
$this->store_connectivity_info( $pong, $is_connected );
|
3958 |
-
|
3959 |
-
echo $this->get_after_plugin_activation_redirect_url();
|
3960 |
-
} else {
|
3961 |
-
// Add connectivity issue message after 2nd failed attempt.
|
3962 |
-
$this->_add_connectivity_issue_message( $pong, false );
|
3963 |
-
|
3964 |
-
echo "1";
|
3965 |
-
}
|
3966 |
-
|
3967 |
-
exit;
|
3968 |
-
}
|
3969 |
-
|
3970 |
-
static function _add_firewall_issues_javascript() {
|
3971 |
-
$params = array();
|
3972 |
-
fs_require_once_template( 'firewall-issues-js.php', $params );
|
3973 |
-
}
|
3974 |
-
|
3975 |
-
#endregion
|
3976 |
-
|
3977 |
-
#----------------------------------------------------------------------------------
|
3978 |
-
#region Email
|
3979 |
-
#----------------------------------------------------------------------------------
|
3980 |
-
|
3981 |
-
/**
|
3982 |
-
* Generates and sends an HTML email with customizable sections.
|
3983 |
-
*
|
3984 |
-
* @author Leo Fajardo (@leorw)
|
3985 |
-
* @since 1.1.2
|
3986 |
-
*
|
3987 |
-
* @param string $to_address
|
3988 |
-
* @param string $subject
|
3989 |
-
* @param array $sections
|
3990 |
-
* @param array $headers
|
3991 |
-
*
|
3992 |
-
* @return bool Whether the email contents were sent successfully.
|
3993 |
-
*/
|
3994 |
-
private function send_email(
|
3995 |
-
$to_address,
|
3996 |
-
$subject,
|
3997 |
-
$sections = array(),
|
3998 |
-
$headers = array()
|
3999 |
-
) {
|
4000 |
-
$default_sections = $this->get_email_sections();
|
4001 |
-
|
4002 |
-
// Insert new sections or replace the default email sections.
|
4003 |
-
if ( is_array( $sections ) && ! empty( $sections ) ) {
|
4004 |
-
foreach ( $sections as $section_id => $custom_section ) {
|
4005 |
-
if ( ! isset( $default_sections[ $section_id ] ) ) {
|
4006 |
-
// If the section does not exist, add it.
|
4007 |
-
$default_sections[ $section_id ] = $custom_section;
|
4008 |
-
} else {
|
4009 |
-
// If the section already exists, override it.
|
4010 |
-
$current_section = $default_sections[ $section_id ];
|
4011 |
-
|
4012 |
-
// Replace the current section's title if a custom section title exists.
|
4013 |
-
if ( isset( $custom_section['title'] ) ) {
|
4014 |
-
$current_section['title'] = $custom_section['title'];
|
4015 |
-
}
|
4016 |
-
|
4017 |
-
// Insert new rows under the current section or replace the default rows.
|
4018 |
-
if ( isset( $custom_section['rows'] ) && is_array( $custom_section['rows'] ) && ! empty( $custom_section['rows'] ) ) {
|
4019 |
-
foreach ( $custom_section['rows'] as $row_id => $row ) {
|
4020 |
-
$current_section['rows'][ $row_id ] = $row;
|
4021 |
-
}
|
4022 |
-
}
|
4023 |
-
|
4024 |
-
$default_sections[ $section_id ] = $current_section;
|
4025 |
-
}
|
4026 |
-
}
|
4027 |
-
}
|
4028 |
-
|
4029 |
-
$vars = array( 'sections' => $default_sections );
|
4030 |
-
$message = fs_get_template( 'email.php', $vars );
|
4031 |
-
|
4032 |
-
// Set the type of email to HTML.
|
4033 |
-
$headers[] = 'Content-type: text/html; charset=UTF-8';
|
4034 |
-
|
4035 |
-
$header_string = implode( "\r\n", $headers );
|
4036 |
-
|
4037 |
-
return wp_mail(
|
4038 |
-
$to_address,
|
4039 |
-
$subject,
|
4040 |
-
$message,
|
4041 |
-
$header_string
|
4042 |
-
);
|
4043 |
-
}
|
4044 |
-
|
4045 |
-
/**
|
4046 |
-
* Generates the data for the sections of the email content.
|
4047 |
-
*
|
4048 |
-
* @author Leo Fajardo (@leorw)
|
4049 |
-
* @since 1.1.2
|
4050 |
-
*
|
4051 |
-
* @return array
|
4052 |
-
*/
|
4053 |
-
private function get_email_sections() {
|
4054 |
-
// Retrieve the current user's information so that we can get the user's email, first name, and last name below.
|
4055 |
-
$current_user = self::_get_current_wp_user();
|
4056 |
-
|
4057 |
-
// Retrieve the cURL version information so that we can get the version number below.
|
4058 |
-
$curl_version_information = curl_version();
|
4059 |
-
|
4060 |
-
$active_plugin = self::get_active_plugins();
|
4061 |
-
|
4062 |
-
// Generate the list of active plugins separated by new line.
|
4063 |
-
$active_plugin_string = '';
|
4064 |
-
foreach ( $active_plugin as $plugin ) {
|
4065 |
-
$active_plugin_string .= sprintf(
|
4066 |
-
'<a href="%s">%s</a> [v%s]<br>',
|
4067 |
-
$plugin['PluginURI'],
|
4068 |
-
$plugin['Name'],
|
4069 |
-
$plugin['Version']
|
4070 |
-
);
|
4071 |
-
}
|
4072 |
-
|
4073 |
-
$server_ip = WP_FS__REMOTE_ADDR;
|
4074 |
-
|
4075 |
-
// Add PHP info for deeper investigation.
|
4076 |
-
ob_start();
|
4077 |
-
phpinfo();
|
4078 |
-
$php_info = ob_get_clean();
|
4079 |
-
|
4080 |
-
$api_domain = substr( FS_API__ADDRESS, strpos( FS_API__ADDRESS, ':' ) + 3 );
|
4081 |
-
|
4082 |
-
// Generate the default email sections.
|
4083 |
-
$sections = array(
|
4084 |
-
'sdk' => array(
|
4085 |
-
'title' => 'SDK',
|
4086 |
-
'rows' => array(
|
4087 |
-
'fs_version' => array( 'FS Version', $this->version ),
|
4088 |
-
'curl_version' => array( 'cURL Version', $curl_version_information['version'] )
|
4089 |
-
)
|
4090 |
-
),
|
4091 |
-
'plugin' => array(
|
4092 |
-
'title' => ucfirst( $this->get_module_type() ),
|
4093 |
-
'rows' => array(
|
4094 |
-
'name' => array( 'Name', $this->get_plugin_name() ),
|
4095 |
-
'version' => array( 'Version', $this->get_plugin_version() )
|
4096 |
-
)
|
4097 |
-
),
|
4098 |
-
'api' => array(
|
4099 |
-
'title' => 'API Subdomain',
|
4100 |
-
'rows' => array(
|
4101 |
-
'dns' => array(
|
4102 |
-
'DNS_CNAME',
|
4103 |
-
function_exists( 'dns_get_record' ) ?
|
4104 |
-
var_export( dns_get_record( $api_domain, DNS_CNAME ), true ) :
|
4105 |
-
'dns_get_record() disabled/blocked'
|
4106 |
-
),
|
4107 |
-
'ip' => array(
|
4108 |
-
'IP',
|
4109 |
-
function_exists( 'gethostbyname' ) ?
|
4110 |
-
gethostbyname( $api_domain ) :
|
4111 |
-
'gethostbyname() disabled/blocked'
|
4112 |
-
),
|
4113 |
-
),
|
4114 |
-
),
|
4115 |
-
'site' => array(
|
4116 |
-
'title' => 'Site',
|
4117 |
-
'rows' => array(
|
4118 |
-
'unique_id' => array( 'Unique ID', $this->get_anonymous_id() ),
|
4119 |
-
'address' => array( 'Address', site_url() ),
|
4120 |
-
'host' => array(
|
4121 |
-
'HTTP_HOST',
|
4122 |
-
( ! empty( $_SERVER['HTTP_HOST'] ) ? $_SERVER['HTTP_HOST'] : '' )
|
4123 |
-
),
|
4124 |
-
'hosting' => array(
|
4125 |
-
'Hosting Company' => fs_request_has( 'hosting_company' ) ?
|
4126 |
-
fs_request_get( 'hosting_company' ) :
|
4127 |
-
'Unknown',
|
4128 |
-
),
|
4129 |
-
'server_addr' => array(
|
4130 |
-
'SERVER_ADDR',
|
4131 |
-
'<a href="http://www.projecthoneypot.org/ip_' . $server_ip . '">' . $server_ip . '</a>'
|
4132 |
-
)
|
4133 |
-
)
|
4134 |
-
),
|
4135 |
-
'user' => array(
|
4136 |
-
'title' => 'User',
|
4137 |
-
'rows' => array(
|
4138 |
-
'email' => array( 'Email', $current_user->user_email ),
|
4139 |
-
'first' => array( 'First', $current_user->user_firstname ),
|
4140 |
-
'last' => array( 'Last', $current_user->user_lastname )
|
4141 |
-
)
|
4142 |
-
),
|
4143 |
-
'plugins' => array(
|
4144 |
-
'title' => 'Plugins',
|
4145 |
-
'rows' => array(
|
4146 |
-
'active_plugins' => array( 'Active Plugins', $active_plugin_string )
|
4147 |
-
)
|
4148 |
-
),
|
4149 |
-
'php_info' => array(
|
4150 |
-
'title' => 'PHP Info',
|
4151 |
-
'rows' => array(
|
4152 |
-
'info' => array( $php_info )
|
4153 |
-
),
|
4154 |
-
)
|
4155 |
-
);
|
4156 |
-
|
4157 |
-
// Allow the sections to be modified by other code.
|
4158 |
-
$sections = $this->apply_filters( 'email_template_sections', $sections );
|
4159 |
-
|
4160 |
-
return $sections;
|
4161 |
-
}
|
4162 |
-
|
4163 |
-
#endregion
|
4164 |
-
|
4165 |
-
#----------------------------------------------------------------------------------
|
4166 |
-
#region Initialization
|
4167 |
-
#----------------------------------------------------------------------------------
|
4168 |
-
|
4169 |
-
/**
|
4170 |
-
* Init plugin's Freemius instance.
|
4171 |
-
*
|
4172 |
-
* @author Vova Feldman (@svovaf)
|
4173 |
-
* @since 1.0.1
|
4174 |
-
*
|
4175 |
-
* @param number $id
|
4176 |
-
* @param string $public_key
|
4177 |
-
* @param bool $is_live
|
4178 |
-
* @param bool $is_premium
|
4179 |
-
*/
|
4180 |
-
function init( $id, $public_key, $is_live = true, $is_premium = true ) {
|
4181 |
-
$this->_logger->entrance();
|
4182 |
-
|
4183 |
-
$this->dynamic_init( array(
|
4184 |
-
'id' => $id,
|
4185 |
-
'public_key' => $public_key,
|
4186 |
-
'is_live' => $is_live,
|
4187 |
-
'is_premium' => $is_premium,
|
4188 |
-
) );
|
4189 |
-
}
|
4190 |
-
|
4191 |
-
/**
|
4192 |
-
* Dynamic initiator, originally created to support initiation
|
4193 |
-
* with parent_id for add-ons.
|
4194 |
-
*
|
4195 |
-
* @author Vova Feldman (@svovaf)
|
4196 |
-
* @since 1.0.6
|
4197 |
-
*
|
4198 |
-
* @param array $plugin_info
|
4199 |
-
*
|
4200 |
-
* @throws Freemius_Exception
|
4201 |
-
*/
|
4202 |
-
function dynamic_init( array $plugin_info ) {
|
4203 |
-
$this->_logger->entrance();
|
4204 |
-
|
4205 |
-
$this->parse_settings( $plugin_info );
|
4206 |
-
|
4207 |
-
if ( is_admin() && $this->is_theme() && $this->is_premium() && ! $this->has_active_valid_license() ) {
|
4208 |
-
$this->add_ajax_action(
|
4209 |
-
'delete_theme_update_data',
|
4210 |
-
array( &$this, '_delete_theme_update_data_action' )
|
4211 |
-
);
|
4212 |
-
}
|
4213 |
-
|
4214 |
-
if ( ! self::is_ajax() ) {
|
4215 |
-
if ( ! $this->is_addon() || $this->is_only_premium() ) {
|
4216 |
-
add_action(
|
4217 |
-
( $this->_is_network_active && fs_is_network_admin() ? 'network_' : '' ) . 'admin_menu',
|
4218 |
-
array( &$this, '_prepare_admin_menu' ),
|
4219 |
-
WP_FS__LOWEST_PRIORITY
|
4220 |
-
);
|
4221 |
-
}
|
4222 |
-
}
|
4223 |
-
|
4224 |
-
if ( $this->should_stop_execution() ) {
|
4225 |
-
return;
|
4226 |
-
}
|
4227 |
-
|
4228 |
-
if ( ! $this->is_registered() ) {
|
4229 |
-
if ( $this->is_anonymous() ) {
|
4230 |
-
// If user skipped, no need to test connectivity.
|
4231 |
-
$this->_has_api_connection = true;
|
4232 |
-
$this->_is_on = true;
|
4233 |
-
} else {
|
4234 |
-
if ( ! $this->has_api_connectivity() ) {
|
4235 |
-
if ( $this->_admin_notices->has_sticky( 'failed_connect_api_first' ) ||
|
4236 |
-
$this->_admin_notices->has_sticky( 'failed_connect_api' )
|
4237 |
-
) {
|
4238 |
-
if ( ! $this->_enable_anonymous || $this->is_premium() ) {
|
4239 |
-
// If anonymous mode is disabled, add firewall admin-notice message.
|
4240 |
-
add_action( 'admin_footer', array( 'Freemius', '_add_firewall_issues_javascript' ) );
|
4241 |
-
|
4242 |
-
$ajax_action_suffix = $this->_slug . ( $this->is_theme() ? ':theme' : '' );
|
4243 |
-
add_action( "wp_ajax_fs_resolve_firewall_issues_{$ajax_action_suffix}", array(
|
4244 |
-
&$this,
|
4245 |
-
'_email_about_firewall_issue'
|
4246 |
-
) );
|
4247 |
-
|
4248 |
-
add_action( "wp_ajax_fs_retry_connectivity_test_{$ajax_action_suffix}", array(
|
4249 |
-
&$this,
|
4250 |
-
'_retry_connectivity_test'
|
4251 |
-
) );
|
4252 |
-
|
4253 |
-
/**
|
4254 |
-
* Currently the admin notice manager relies on the module's type and slug. The new AJAX actions manager uses module IDs, hence, consider to replace the if block above with the commented code below after adjusting the admin notices manager to work with module IDs.
|
4255 |
-
*
|
4256 |
-
* @author Vova Feldman (@svovaf)
|
4257 |
-
* @since 2.0.0
|
4258 |
-
*/
|
4259 |
-
/*$this->add_ajax_action( 'resolve_firewall_issues', array(
|
4260 |
-
&$this,
|
4261 |
-
'_email_about_firewall_issue'
|
4262 |
-
) );
|
4263 |
-
|
4264 |
-
$this->add_ajax_action( 'retry_connectivity_test', array(
|
4265 |
-
&$this,
|
4266 |
-
'_retry_connectivity_test'
|
4267 |
-
) );*/
|
4268 |
-
}
|
4269 |
-
}
|
4270 |
-
|
4271 |
-
return;
|
4272 |
-
} else {
|
4273 |
-
$this->_admin_notices->remove_sticky( array(
|
4274 |
-
'failed_connect_api_first',
|
4275 |
-
'failed_connect_api',
|
4276 |
-
) );
|
4277 |
-
|
4278 |
-
if ( $this->_anonymous_mode ) {
|
4279 |
-
// Simulate anonymous mode.
|
4280 |
-
$this->_is_anonymous = true;
|
4281 |
-
}
|
4282 |
-
}
|
4283 |
-
}
|
4284 |
-
}
|
4285 |
-
|
4286 |
-
/**
|
4287 |
-
* This should be executed even if Freemius is off for the core module,
|
4288 |
-
* otherwise, the add-ons dialogbox won't work properly. This is esepcially
|
4289 |
-
* relevant when the developer decided to turn FS off for existing users.
|
4290 |
-
*
|
4291 |
-
* @author Vova Feldman (@svovaf)
|
4292 |
-
*/
|
4293 |
-
if ( $this->is_user_in_admin() &&
|
4294 |
-
'plugin-information' === fs_request_get( 'tab', false ) &&
|
4295 |
-
$this->should_use_freemius_updater_and_dialog() &&
|
4296 |
-
(
|
4297 |
-
( $this->is_addon() && $this->get_slug() == fs_request_get( 'plugin', false ) ) ||
|
4298 |
-
( $this->has_addons() && $this->get_id() == fs_request_get( 'parent_plugin_id', false ) )
|
4299 |
-
)
|
4300 |
-
) {
|
4301 |
-
require_once WP_FS__DIR_INCLUDES . '/fs-plugin-info-dialog.php';
|
4302 |
-
|
4303 |
-
new FS_Plugin_Info_Dialog( $this->is_addon() ? $this->get_parent_instance() : $this );
|
4304 |
-
}
|
4305 |
-
|
4306 |
-
// Check if Freemius is on for the current plugin.
|
4307 |
-
// This MUST be executed after all the plugin variables has been loaded.
|
4308 |
-
if ( ! $this->is_registered() && ! $this->is_on() ) {
|
4309 |
-
return;
|
4310 |
-
}
|
4311 |
-
|
4312 |
-
if ( $this->has_api_connectivity() ) {
|
4313 |
-
if ( self::is_cron() ) {
|
4314 |
-
$this->hook_callback_to_sync_cron();
|
4315 |
-
} else if ( $this->is_user_in_admin() ) {
|
4316 |
-
/**
|
4317 |
-
* Schedule daily data sync cron if:
|
4318 |
-
*
|
4319 |
-
* 1. User opted-in (for tracking).
|
4320 |
-
* 2. If skipped, but later upgraded (opted-in via upgrade).
|
4321 |
-
*
|
4322 |
-
* @author Vova Feldman (@svovaf)
|
4323 |
-
* @since 1.1.7.3
|
4324 |
-
*
|
4325 |
-
*/
|
4326 |
-
if ( $this->is_registered() ) {
|
4327 |
-
if ( ! $this->is_sync_cron_on() && $this->is_tracking_allowed() ) {
|
4328 |
-
$this->schedule_sync_cron();
|
4329 |
-
}
|
4330 |
-
}
|
4331 |
-
|
4332 |
-
/**
|
4333 |
-
* Check if requested for manual blocking background sync.
|
4334 |
-
*/
|
4335 |
-
if ( fs_request_has( 'background_sync' ) ) {
|
4336 |
-
$this->run_manual_sync();
|
4337 |
-
}
|
4338 |
-
}
|
4339 |
-
}
|
4340 |
-
|
4341 |
-
if ( $this->is_registered() ) {
|
4342 |
-
$this->hook_callback_to_install_sync();
|
4343 |
-
}
|
4344 |
-
|
4345 |
-
if ( $this->is_addon() ) {
|
4346 |
-
if ( $this->is_parent_plugin_installed() ) {
|
4347 |
-
// Link to parent FS.
|
4348 |
-
$this->_parent = self::get_instance_by_id( $this->_plugin->parent_plugin_id );
|
4349 |
-
|
4350 |
-
// Get parent plugin reference.
|
4351 |
-
$this->_parent_plugin = $this->_parent->get_plugin();
|
4352 |
-
}
|
4353 |
-
}
|
4354 |
-
|
4355 |
-
if ( $this->is_user_in_admin() ) {
|
4356 |
-
if ( $this->is_addon() ) {
|
4357 |
-
if ( ! $this->is_parent_plugin_installed() ) {
|
4358 |
-
$parent_name = $this->get_option( $plugin_info, 'parent_name', null );
|
4359 |
-
|
4360 |
-
if ( isset( $plugin_info['parent'] ) ) {
|
4361 |
-
$parent_name = $this->get_option( $plugin_info['parent'], 'name', null );
|
4362 |
-
}
|
4363 |
-
|
4364 |
-
$this->_admin_notices->add(
|
4365 |
-
( ! empty( $parent_name ) ?
|
4366 |
-
sprintf( $this->get_text_x_inline( '%s cannot run without %s.', 'addonX cannot run without pluginY', 'addon-x-cannot-run-without-y' ), $this->get_plugin_name(), $parent_name ) :
|
4367 |
-
sprintf( $this->get_text_x_inline( '%s cannot run without the plugin.', 'addonX cannot run...', 'addon-x-cannot-run-without-parent' ), $this->get_plugin_name() )
|
4368 |
-
),
|
4369 |
-
$this->get_text_x_inline( 'Oops', 'exclamation', 'oops' ) . '...',
|
4370 |
-
'error'
|
4371 |
-
);
|
4372 |
-
|
4373 |
-
return;
|
4374 |
-
} else {
|
4375 |
-
if ( $this->_parent->is_registered() && ! $this->is_registered() ) {
|
4376 |
-
// If parent plugin activated, automatically install add-on for the user.
|
4377 |
-
$this->_activate_addon_account( $this->_parent );
|
4378 |
-
} else if ( ! $this->_parent->is_registered() && $this->is_registered() ) {
|
4379 |
-
// If add-on activated and parent not, automatically install parent for the user.
|
4380 |
-
$this->activate_parent_account( $this->_parent );
|
4381 |
-
}
|
4382 |
-
|
4383 |
-
// @todo This should be only executed on activation. It should be migrated to register_activation_hook() together with other activation related logic.
|
4384 |
-
if ( $this->is_premium() ) {
|
4385 |
-
// Remove add-on download admin-notice.
|
4386 |
-
$this->_parent->_admin_notices->remove_sticky( array(
|
4387 |
-
'addon_plan_upgraded_' . $this->_slug,
|
4388 |
-
'no_addon_license_' . $this->_slug,
|
4389 |
-
) );
|
4390 |
-
}
|
4391 |
-
|
4392 |
-
// $this->deactivate_premium_only_addon_without_license();
|
4393 |
-
}
|
4394 |
-
}
|
4395 |
-
|
4396 |
-
add_action( 'admin_init', array( &$this, '_admin_init_action' ) );
|
4397 |
-
|
4398 |
-
// if ( $this->is_registered() ||
|
4399 |
-
// $this->is_anonymous() ||
|
4400 |
-
// $this->is_pending_activation()
|
4401 |
-
// ) {
|
4402 |
-
// $this->_init_admin();
|
4403 |
-
// }
|
4404 |
-
}
|
4405 |
-
|
4406 |
-
/**
|
4407 |
-
* Should be called outside `$this->is_user_in_admin()` scope
|
4408 |
-
* because the updater has some logic that needs to be executed
|
4409 |
-
* during AJAX calls.
|
4410 |
-
*
|
4411 |
-
* Currently we need to hook to the `http_request_host_is_external` filter.
|
4412 |
-
* In the future, there might be additional logic added.
|
4413 |
-
*
|
4414 |
-
* @author Vova Feldman
|
4415 |
-
* @since 1.2.1.6
|
4416 |
-
*/
|
4417 |
-
if (
|
4418 |
-
$this->should_use_freemius_updater_and_dialog() &&
|
4419 |
-
(
|
4420 |
-
$this->is_premium() ||
|
4421 |
-
/**
|
4422 |
-
* If not premium but the premium version is installed, also instantiate the updater so that the
|
4423 |
-
* plugin information dialog of the premium version will have the information from the server.
|
4424 |
-
*
|
4425 |
-
* @author Leo Fajardo (@leorw)
|
4426 |
-
* @since 2.2.3
|
4427 |
-
*/
|
4428 |
-
( file_exists( fs_normalize_path( WP_PLUGIN_DIR . '/' . $this->premium_plugin_basename() ) ) )
|
4429 |
-
) &&
|
4430 |
-
$this->has_release_on_freemius()
|
4431 |
-
) {
|
4432 |
-
FS_Plugin_Updater::instance( $this );
|
4433 |
-
}
|
4434 |
-
|
4435 |
-
$this->do_action( 'initiated' );
|
4436 |
-
|
4437 |
-
if ( $this->_storage->prev_is_premium !== $this->_plugin->is_premium ) {
|
4438 |
-
if ( isset( $this->_storage->prev_is_premium ) ) {
|
4439 |
-
$this->apply_filters(
|
4440 |
-
'after_code_type_change',
|
4441 |
-
// New code type.
|
4442 |
-
$this->_plugin->is_premium
|
4443 |
-
);
|
4444 |
-
} else {
|
4445 |
-
// Set for code type for the first time.
|
4446 |
-
$this->_storage->prev_is_premium = $this->_plugin->is_premium;
|
4447 |
-
}
|
4448 |
-
}
|
4449 |
-
|
4450 |
-
if ( ! $this->is_addon() ) {
|
4451 |
-
if ( $this->is_registered() ) {
|
4452 |
-
// Fix for upgrade from versions < 1.0.9.
|
4453 |
-
if ( ! isset( $this->_storage->activation_timestamp ) ) {
|
4454 |
-
$this->_storage->activation_timestamp = WP_FS__SCRIPT_START_TIME;
|
4455 |
-
}
|
4456 |
-
|
4457 |
-
$this->do_action( 'after_init_plugin_registered' );
|
4458 |
-
} else if ( $this->is_anonymous() ) {
|
4459 |
-
$this->do_action( 'after_init_plugin_anonymous' );
|
4460 |
-
} else if ( $this->is_pending_activation() ) {
|
4461 |
-
$this->do_action( 'after_init_plugin_pending_activations' );
|
4462 |
-
}
|
4463 |
-
} else {
|
4464 |
-
if ( $this->is_registered() ) {
|
4465 |
-
$this->do_action( 'after_init_addon_registered' );
|
4466 |
-
} else if ( $this->is_anonymous() ) {
|
4467 |
-
$this->do_action( 'after_init_addon_anonymous' );
|
4468 |
-
} else if ( $this->is_pending_activation() ) {
|
4469 |
-
$this->do_action( 'after_init_addon_pending_activations' );
|
4470 |
-
}
|
4471 |
-
}
|
4472 |
-
}
|
4473 |
-
|
4474 |
-
/**
|
4475 |
-
* @author Leo Fajardo (@leorw)
|
4476 |
-
* @since 2.2.3
|
4477 |
-
*
|
4478 |
-
* @return bool
|
4479 |
-
*/
|
4480 |
-
private function should_use_freemius_updater_and_dialog() {
|
4481 |
-
return (
|
4482 |
-
/**
|
4483 |
-
* Unless the `fs_allow_updater_and_dialog` URL param exists and its value is `true`, disallow updater
|
4484 |
-
* and dialog on the "Add Plugins" admin page (/plugin-install.php) so that they won't interfere with
|
4485 |
-
* the .org plugins' functionalities on that page (e.g. installation and viewing plugin details from
|
4486 |
-
* .org).
|
4487 |
-
*/
|
4488 |
-
( ! self::is_plugin_install_page() || true === fs_request_get_bool( 'fs_allow_updater_and_dialog' ) ) &&
|
4489 |
-
// Disallow updater and dialog when installing a plugin, otherwise .org "add-on" plugins will be affected.
|
4490 |
-
( 'install-plugin' !== fs_request_get( 'action' ) )
|
4491 |
-
);
|
4492 |
-
}
|
4493 |
-
|
4494 |
-
/**
|
4495 |
-
* @author Leo Fajardo (@leorw)
|
4496 |
-
*
|
4497 |
-
* @since 1.2.1.5
|
4498 |
-
*/
|
4499 |
-
function _stop_tracking_callback() {
|
4500 |
-
$this->_logger->entrance();
|
4501 |
-
|
4502 |
-
$this->check_ajax_referer( 'stop_tracking' );
|
4503 |
-
|
4504 |
-
$result = $this->stop_tracking( fs_is_network_admin() );
|
4505 |
-
|
4506 |
-
if ( true === $result ) {
|
4507 |
-
self::shoot_ajax_success();
|
4508 |
-
}
|
4509 |
-
|
4510 |
-
$this->_logger->api_error( $result );
|
4511 |
-
|
4512 |
-
self::shoot_ajax_failure(
|
4513 |
-
sprintf( $this->get_text_inline( 'Unexpected API error. Please contact the %s\'s author with the following error.', 'unexpected-api-error' ), $this->_module_type ) .
|
4514 |
-
( $this->is_api_error( $result ) && isset( $result->error ) ?
|
4515 |
-
$result->error->message :
|
4516 |
-
var_export( $result, true ) )
|
4517 |
-
);
|
4518 |
-
}
|
4519 |
-
|
4520 |
-
/**
|
4521 |
-
* @author Leo Fajardo (@leorw)
|
4522 |
-
* @since 1.2.1.5
|
4523 |
-
*/
|
4524 |
-
function _allow_tracking_callback() {
|
4525 |
-
$this->_logger->entrance();
|
4526 |
-
|
4527 |
-
$this->check_ajax_referer( 'allow_tracking' );
|
4528 |
-
|
4529 |
-
$result = $this->allow_tracking( fs_is_network_admin() );
|
4530 |
-
|
4531 |
-
if ( true === $result ) {
|
4532 |
-
self::shoot_ajax_success();
|
4533 |
-
}
|
4534 |
-
|
4535 |
-
$this->_logger->api_error( $result );
|
4536 |
-
|
4537 |
-
self::shoot_ajax_failure(
|
4538 |
-
sprintf( $this->get_text_inline( 'Unexpected API error. Please contact the %s\'s author with the following error.', 'unexpected-api-error' ), $this->_module_type ) .
|
4539 |
-
( $this->is_api_error( $result ) && isset( $result->error ) ?
|
4540 |
-
$result->error->message :
|
4541 |
-
var_export( $result, true ) )
|
4542 |
-
);
|
4543 |
-
}
|
4544 |
-
|
4545 |
-
/**
|
4546 |
-
* Opt-out from usage tracking.
|
4547 |
-
*
|
4548 |
-
* Note: This will not delete the account information but will stop all tracking.
|
4549 |
-
*
|
4550 |
-
* Returns:
|
4551 |
-
* 1. FALSE - If the user never opted-in.
|
4552 |
-
* 2. TRUE - If successfully opted-out.
|
4553 |
-
* 3. object - API result on failure.
|
4554 |
-
*
|
4555 |
-
* @author Leo Fajardo (@leorw)
|
4556 |
-
* @since 1.2.1.5
|
4557 |
-
*
|
4558 |
-
* @return bool|object
|
4559 |
-
*/
|
4560 |
-
function stop_site_tracking() {
|
4561 |
-
$this->_logger->entrance();
|
4562 |
-
|
4563 |
-
if ( ! $this->is_registered() ) {
|
4564 |
-
// User never opted-in.
|
4565 |
-
return false;
|
4566 |
-
}
|
4567 |
-
|
4568 |
-
if ( $this->is_tracking_prohibited() ) {
|
4569 |
-
// Already disconnected.
|
4570 |
-
return true;
|
4571 |
-
}
|
4572 |
-
|
4573 |
-
// Send update to FS.
|
4574 |
-
$result = $this->get_api_site_scope()->call( '/?fields=is_disconnected', 'put', array(
|
4575 |
-
'is_disconnected' => true
|
4576 |
-
) );
|
4577 |
-
|
4578 |
-
if ( ! $this->is_api_result_entity( $result ) ||
|
4579 |
-
! isset( $result->is_disconnected ) ||
|
4580 |
-
! $result->is_disconnected
|
4581 |
-
) {
|
4582 |
-
$this->_logger->api_error( $result );
|
4583 |
-
|
4584 |
-
return $result;
|
4585 |
-
}
|
4586 |
-
|
4587 |
-
$this->_site->is_disconnected = $result->is_disconnected;
|
4588 |
-
$this->_store_site();
|
4589 |
-
|
4590 |
-
$this->clear_sync_cron();
|
4591 |
-
|
4592 |
-
// Successfully disconnected.
|
4593 |
-
return true;
|
4594 |
-
}
|
4595 |
-
|
4596 |
-
/**
|
4597 |
-
* Opt-out network from usage tracking.
|
4598 |
-
*
|
4599 |
-
* Note: This will not delete the account information but will stop all tracking.
|
4600 |
-
*
|
4601 |
-
* Returns:
|
4602 |
-
* 1. FALSE - If the user never opted-in.
|
4603 |
-
* 2. TRUE - If successfully opted-out.
|
4604 |
-
* 3. object - API result on failure.
|
4605 |
-
*
|
4606 |
-
* @author Leo Fajardo (@leorw)
|
4607 |
-
* @since 1.2.1.5
|
4608 |
-
*
|
4609 |
-
* @return bool|object
|
4610 |
-
*/
|
4611 |
-
function stop_network_tracking() {
|
4612 |
-
$this->_logger->entrance();
|
4613 |
-
|
4614 |
-
if ( ! $this->is_registered() ) {
|
4615 |
-
// User never opted-in.
|
4616 |
-
return false;
|
4617 |
-
}
|
4618 |
-
|
4619 |
-
$install_id_2_blog_id = array();
|
4620 |
-
$installs_map = $this->get_blog_install_map();
|
4621 |
-
|
4622 |
-
$opt_out_all = true;
|
4623 |
-
|
4624 |
-
$params = array();
|
4625 |
-
foreach ( $installs_map as $blog_id => $install ) {
|
4626 |
-
if ( $install->is_tracking_prohibited() ) {
|
4627 |
-
// Already opted-out.
|
4628 |
-
continue;
|
4629 |
-
}
|
4630 |
-
|
4631 |
-
if ( $this->is_site_delegated_connection( $blog_id ) ) {
|
4632 |
-
// Opt-out only from non-delegated installs.
|
4633 |
-
$opt_out_all = false;
|
4634 |
-
continue;
|
4635 |
-
}
|
4636 |
-
|
4637 |
-
$params[] = array( 'id' => $install->id );
|
4638 |
-
|
4639 |
-
$install_id_2_blog_id[ $install->id ] = $blog_id;
|
4640 |
-
}
|
4641 |
-
|
4642 |
-
if ( empty( $install_id_2_blog_id ) ) {
|
4643 |
-
return true;
|
4644 |
-
}
|
4645 |
-
|
4646 |
-
$params[] = array( 'is_disconnected' => true );
|
4647 |
-
|
4648 |
-
// Send update to FS.
|
4649 |
-
$result = $this->get_current_or_network_user_api_scope()->call( "/plugins/{$this->_module_id}/installs.json", 'put', $params );
|
4650 |
-
|
4651 |
-
if ( ! $this->is_api_result_object( $result, 'installs' ) ) {
|
4652 |
-
$this->_logger->api_error( $result );
|
4653 |
-
|
4654 |
-
return $result;
|
4655 |
-
}
|
4656 |
-
|
4657 |
-
foreach ( $result->installs as $r_install ) {
|
4658 |
-
$blog_id = $install_id_2_blog_id[ $r_install->id ];
|
4659 |
-
$install = $installs_map[ $blog_id ];
|
4660 |
-
$install->is_disconnected = $r_install->is_disconnected;
|
4661 |
-
$this->_store_site( true, $blog_id, $install );
|
4662 |
-
}
|
4663 |
-
|
4664 |
-
$this->clear_sync_cron( $opt_out_all );
|
4665 |
-
|
4666 |
-
// Successfully disconnected.
|
4667 |
-
return true;
|
4668 |
-
}
|
4669 |
-
|
4670 |
-
/**
|
4671 |
-
* Opt-out from usage tracking.
|
4672 |
-
*
|
4673 |
-
* Note: This will not delete the account information but will stop all tracking.
|
4674 |
-
*
|
4675 |
-
* Returns:
|
4676 |
-
* 1. FALSE - If the user never opted-in.
|
4677 |
-
* 2. TRUE - If successfully opted-out.
|
4678 |
-
* 3. object - API result on failure.
|
4679 |
-
*
|
4680 |
-
* @author Leo Fajardo (@leorw)
|
4681 |
-
* @since 1.2.1.5
|
4682 |
-
*
|
4683 |
-
* @param bool $is_network_action
|
4684 |
-
*
|
4685 |
-
* @return bool|object
|
4686 |
-
*/
|
4687 |
-
function stop_tracking( $is_network_action = false ) {
|
4688 |
-
$this->_logger->entrance();
|
4689 |
-
|
4690 |
-
return $is_network_action ?
|
4691 |
-
$this->stop_network_tracking() :
|
4692 |
-
$this->stop_site_tracking();
|
4693 |
-
}
|
4694 |
-
|
4695 |
-
/**
|
4696 |
-
* Opt-in back into usage tracking.
|
4697 |
-
*
|
4698 |
-
* Note: This will only work if the user opted-in previously.
|
4699 |
-
*
|
4700 |
-
* Returns:
|
4701 |
-
* 1. FALSE - If the user never opted-in.
|
4702 |
-
* 2. TRUE - If successfully opted-in back to usage tracking.
|
4703 |
-
* 3. object - API result on failure.
|
4704 |
-
*
|
4705 |
-
* @author Leo Fajardo (@leorw)
|
4706 |
-
* @since 1.2.1.5
|
4707 |
-
*
|
4708 |
-
* @return bool|object
|
4709 |
-
*/
|
4710 |
-
function allow_site_tracking() {
|
4711 |
-
$this->_logger->entrance();
|
4712 |
-
|
4713 |
-
if ( ! $this->is_registered() ) {
|
4714 |
-
// User never opted-in.
|
4715 |
-
return false;
|
4716 |
-
}
|
4717 |
-
|
4718 |
-
if ( $this->is_tracking_allowed() ) {
|
4719 |
-
// Tracking already allowed.
|
4720 |
-
return true;
|
4721 |
-
}
|
4722 |
-
|
4723 |
-
$result = $this->get_api_site_scope()->call( '/?is_disconnected', 'put', array(
|
4724 |
-
'is_disconnected' => false
|
4725 |
-
) );
|
4726 |
-
|
4727 |
-
if ( ! $this->is_api_result_entity( $result ) ||
|
4728 |
-
! isset( $result->is_disconnected ) ||
|
4729 |
-
$result->is_disconnected
|
4730 |
-
) {
|
4731 |
-
$this->_logger->api_error( $result );
|
4732 |
-
|
4733 |
-
return $result;
|
4734 |
-
}
|
4735 |
-
|
4736 |
-
$this->_site->is_disconnected = $result->is_disconnected;
|
4737 |
-
$this->_store_site();
|
4738 |
-
|
4739 |
-
$this->schedule_sync_cron();
|
4740 |
-
|
4741 |
-
// Successfully reconnected.
|
4742 |
-
return true;
|
4743 |
-
}
|
4744 |
-
|
4745 |
-
/**
|
4746 |
-
* Opt-in network back into usage tracking.
|
4747 |
-
*
|
4748 |
-
* Note: This will only work if the user opted-in previously.
|
4749 |
-
*
|
4750 |
-
* Returns:
|
4751 |
-
* 1. FALSE - If the user never opted-in.
|
4752 |
-
* 2. TRUE - If successfully opted-in back to usage tracking.
|
4753 |
-
* 3. object - API result on failure.
|
4754 |
-
*
|
4755 |
-
* @author Leo Fajardo (@leorw)
|
4756 |
-
* @since 1.2.1.5
|
4757 |
-
*
|
4758 |
-
* @return bool|object
|
4759 |
-
*/
|
4760 |
-
function allow_network_tracking() {
|
4761 |
-
$this->_logger->entrance();
|
4762 |
-
|
4763 |
-
if ( ! $this->is_registered() ) {
|
4764 |
-
// User never opted-in.
|
4765 |
-
return false;
|
4766 |
-
}
|
4767 |
-
|
4768 |
-
$install_id_2_blog_id = array();
|
4769 |
-
$installs_map = $this->get_blog_install_map();
|
4770 |
-
|
4771 |
-
$params = array();
|
4772 |
-
foreach ( $installs_map as $blog_id => $install ) {
|
4773 |
-
if ( $install->is_tracking_allowed() ) {
|
4774 |
-
continue;
|
4775 |
-
}
|
4776 |
-
|
4777 |
-
$params[] = array( 'id' => $install->id );
|
4778 |
-
|
4779 |
-
$install_id_2_blog_id[ $install->id ] = $blog_id;
|
4780 |
-
}
|
4781 |
-
|
4782 |
-
if ( empty( $install_id_2_blog_id ) ) {
|
4783 |
-
return true;
|
4784 |
-
}
|
4785 |
-
|
4786 |
-
$params[] = array( 'is_disconnected' => false );
|
4787 |
-
|
4788 |
-
// Send update to FS.
|
4789 |
-
$result = $this->get_current_or_network_user_api_scope()->call( "/plugins/{$this->_module_id}/installs.json", 'put', $params );
|
4790 |
-
|
4791 |
-
|
4792 |
-
if ( ! $this->is_api_result_object( $result, 'installs' ) ) {
|
4793 |
-
$this->_logger->api_error( $result );
|
4794 |
-
|
4795 |
-
return $result;
|
4796 |
-
}
|
4797 |
-
|
4798 |
-
foreach ( $result->installs as $r_install ) {
|
4799 |
-
$blog_id = $install_id_2_blog_id[ $r_install->id ];
|
4800 |
-
$install = $installs_map[ $blog_id ];
|
4801 |
-
$install->is_disconnected = $r_install->is_disconnected;
|
4802 |
-
$this->_store_site( true, $blog_id, $install );
|
4803 |
-
}
|
4804 |
-
|
4805 |
-
$this->schedule_sync_cron();
|
4806 |
-
|
4807 |
-
// Successfully reconnected.
|
4808 |
-
return true;
|
4809 |
-
}
|
4810 |
-
|
4811 |
-
/**
|
4812 |
-
* Opt-in back into usage tracking.
|
4813 |
-
*
|
4814 |
-
* Note: This will only work if the user opted-in previously.
|
4815 |
-
*
|
4816 |
-
* Returns:
|
4817 |
-
* 1. FALSE - If the user never opted-in.
|
4818 |
-
* 2. TRUE - If successfully opted-in back to usage tracking.
|
4819 |
-
* 3. object - API result on failure.
|
4820 |
-
*
|
4821 |
-
* @author Leo Fajardo (@leorw)
|
4822 |
-
* @since 1.2.1.5
|
4823 |
-
*
|
4824 |
-
* @param bool $is_network_action
|
4825 |
-
*
|
4826 |
-
* @return bool|object
|
4827 |
-
*/
|
4828 |
-
function allow_tracking( $is_network_action = false ) {
|
4829 |
-
$this->_logger->entrance();
|
4830 |
-
|
4831 |
-
return $is_network_action ?
|
4832 |
-
$this->allow_network_tracking() :
|
4833 |
-
$this->allow_site_tracking();
|
4834 |
-
}
|
4835 |
-
|
4836 |
-
/**
|
4837 |
-
* If user opted-in and later disabled usage-tracking,
|
4838 |
-
* re-allow tracking for licensing and updates.
|
4839 |
-
*
|
4840 |
-
* @author Leo Fajardo (@leorw)
|
4841 |
-
* @since 1.2.1.5
|
4842 |
-
*
|
4843 |
-
* @param bool $is_context_single_site
|
4844 |
-
*/
|
4845 |
-
private function reconnect_locally( $is_context_single_site = false ) {
|
4846 |
-
$this->_logger->entrance();
|
4847 |
-
|
4848 |
-
if ( ! $this->is_registered() ) {
|
4849 |
-
return;
|
4850 |
-
}
|
4851 |
-
|
4852 |
-
if ( ! fs_is_network_admin() || $is_context_single_site ) {
|
4853 |
-
if ( $this->is_tracking_prohibited() ) {
|
4854 |
-
$this->_site->is_disconnected = false;
|
4855 |
-
$this->_store_site();
|
4856 |
-
}
|
4857 |
-
} else {
|
4858 |
-
$installs_map = $this->get_blog_install_map();
|
4859 |
-
foreach ( $installs_map as $blog_id => $install ) {
|
4860 |
-
/**
|
4861 |
-
* @var FS_Site $install
|
4862 |
-
*/
|
4863 |
-
if ( $install->is_tracking_prohibited() ) {
|
4864 |
-
$install->is_disconnected = false;
|
4865 |
-
$this->_store_site( true, $blog_id, $install );
|
4866 |
-
}
|
4867 |
-
}
|
4868 |
-
}
|
4869 |
-
}
|
4870 |
-
|
4871 |
-
/**
|
4872 |
-
* Parse plugin's settings (as defined by the plugin dev).
|
4873 |
-
*
|
4874 |
-
* @author Vova Feldman (@svovaf)
|
4875 |
-
* @since 1.1.7.3
|
4876 |
-
*
|
4877 |
-
* @param array $plugin_info
|
4878 |
-
*
|
4879 |
-
* @throws \Freemius_Exception
|
4880 |
-
*/
|
4881 |
-
private function parse_settings( &$plugin_info ) {
|
4882 |
-
$this->_logger->entrance();
|
4883 |
-
|
4884 |
-
$id = $this->get_numeric_option( $plugin_info, 'id', false );
|
4885 |
-
$public_key = $this->get_option( $plugin_info, 'public_key', false );
|
4886 |
-
$secret_key = $this->get_option( $plugin_info, 'secret_key', null );
|
4887 |
-
$parent_id = $this->get_numeric_option( $plugin_info, 'parent_id', null );
|
4888 |
-
$parent_name = $this->get_option( $plugin_info, 'parent_name', null );
|
4889 |
-
|
4890 |
-
/**
|
4891 |
-
* @author Vova Feldman (@svovaf)
|
4892 |
-
* @since 1.1.9 Try to pull secret key from external config.
|
4893 |
-
*/
|
4894 |
-
if ( is_null( $secret_key ) && defined( "WP_FS__{$this->_slug}_SECRET_KEY" ) ) {
|
4895 |
-
$secret_key = constant( "WP_FS__{$this->_slug}_SECRET_KEY" );
|
4896 |
-
}
|
4897 |
-
|
4898 |
-
if ( isset( $plugin_info['parent'] ) ) {
|
4899 |
-
$parent_id = $this->get_numeric_option( $plugin_info['parent'], 'id', null );
|
4900 |
-
// $parent_slug = $this->get_option( $plugin_info['parent'], 'slug', null );
|
4901 |
-
// $parent_public_key = $this->get_option( $plugin_info['parent'], 'public_key', null );
|
4902 |
-
// $parent_name = $this->get_option( $plugin_info['parent'], 'name', null );
|
4903 |
-
}
|
4904 |
-
|
4905 |
-
if ( false === $id ) {
|
4906 |
-
throw new Freemius_Exception( array(
|
4907 |
-
'error' => array(
|
4908 |
-
'type' => 'ParameterNotSet',
|
4909 |
-
'message' => 'Plugin id parameter is not set.',
|
4910 |
-
'code' => 'plugin_id_not_set',
|
4911 |
-
'http' => 500,
|
4912 |
-
)
|
4913 |
-
) );
|
4914 |
-
}
|
4915 |
-
if ( false === $public_key ) {
|
4916 |
-
throw new Freemius_Exception( array(
|
4917 |
-
'error' => array(
|
4918 |
-
'type' => 'ParameterNotSet',
|
4919 |
-
'message' => 'Plugin public_key parameter is not set.',
|
4920 |
-
'code' => 'plugin_public_key_not_set',
|
4921 |
-
'http' => 500,
|
4922 |
-
)
|
4923 |
-
) );
|
4924 |
-
}
|
4925 |
-
|
4926 |
-
$plugin = ( $this->_plugin instanceof FS_Plugin ) ?
|
4927 |
-
$this->_plugin :
|
4928 |
-
new FS_Plugin();
|
4929 |
-
|
4930 |
-
$premium_suffix = $this->get_option( $plugin_info, 'premium_suffix', '(Premium)' );
|
4931 |
-
|
4932 |
-
$plugin->update( array(
|
4933 |
-
'id' => $id,
|
4934 |
-
'type' => $this->get_option( $plugin_info, 'type', $this->_module_type ),
|
4935 |
-
'public_key' => $public_key,
|
4936 |
-
'slug' => $this->_slug,
|
4937 |
-
'premium_slug' => $this->get_option( $plugin_info, 'premium_slug', "{$this->_slug}-premium" ),
|
4938 |
-
'parent_plugin_id' => $parent_id,
|
4939 |
-
'version' => $this->get_plugin_version(),
|
4940 |
-
'title' => $this->get_plugin_name( $premium_suffix ),
|
4941 |
-
'file' => $this->_plugin_basename,
|
4942 |
-
'is_premium' => $this->get_bool_option( $plugin_info, 'is_premium', true ),
|
4943 |
-
'premium_suffix' => $premium_suffix,
|
4944 |
-
'is_live' => $this->get_bool_option( $plugin_info, 'is_live', true ),
|
4945 |
-
'affiliate_moderation' => $this->get_option( $plugin_info, 'has_affiliation' ),
|
4946 |
-
) );
|
4947 |
-
|
4948 |
-
if ( $plugin->is_updated() ) {
|
4949 |
-
// Update plugin details.
|
4950 |
-
$this->_plugin = FS_Plugin_Manager::instance( $this->_module_id )->store( $plugin );
|
4951 |
-
}
|
4952 |
-
// Set the secret key after storing the plugin, we don't want to store the key in the storage.
|
4953 |
-
$this->_plugin->secret_key = $secret_key;
|
4954 |
-
|
4955 |
-
if ( ! isset( $plugin_info['menu'] ) ) {
|
4956 |
-
$plugin_info['menu'] = array();
|
4957 |
-
|
4958 |
-
if ( ! empty( $this->_storage->sdk_last_version ) &&
|
4959 |
-
version_compare( $this->_storage->sdk_last_version, '1.1.2', '<=' )
|
4960 |
-
) {
|
4961 |
-
// Backward compatibility to 1.1.2
|
4962 |
-
$plugin_info['menu']['slug'] = isset( $plugin_info['menu_slug'] ) ?
|
4963 |
-
$plugin_info['menu_slug'] :
|
4964 |
-
$this->_slug;
|
4965 |
-
}
|
4966 |
-
}
|
4967 |
-
|
4968 |
-
$this->_menu = FS_Admin_Menu_Manager::instance(
|
4969 |
-
$this->_module_id,
|
4970 |
-
$this->_module_type,
|
4971 |
-
$this->get_unique_affix()
|
4972 |
-
);
|
4973 |
-
|
4974 |
-
$this->_menu->init( $plugin_info['menu'], $this->is_addon() );
|
4975 |
-
|
4976 |
-
$this->_has_addons = $this->get_bool_option( $plugin_info, 'has_addons', false );
|
4977 |
-
$this->_has_paid_plans = $this->get_bool_option( $plugin_info, 'has_paid_plans', true );
|
4978 |
-
$this->_has_premium_version = $this->get_bool_option( $plugin_info, 'has_premium_version', $this->_has_paid_plans );
|
4979 |
-
$this->_ignore_pending_mode = $this->get_bool_option( $plugin_info, 'ignore_pending_mode', false );
|
4980 |
-
$this->_is_org_compliant = $this->get_bool_option( $plugin_info, 'is_org_compliant', true );
|
4981 |
-
$this->_is_premium_only = $this->get_bool_option( $plugin_info, 'is_premium_only', false );
|
4982 |
-
if ( $this->_is_premium_only ) {
|
4983 |
-
// If premium only plugin, disable anonymous mode.
|
4984 |
-
$this->_enable_anonymous = false;
|
4985 |
-
$this->_anonymous_mode = false;
|
4986 |
-
} else {
|
4987 |
-
$this->_enable_anonymous = $this->get_bool_option( $plugin_info, 'enable_anonymous', true );
|
4988 |
-
$this->_anonymous_mode = $this->get_bool_option( $plugin_info, 'anonymous_mode', false );
|
4989 |
-
}
|
4990 |
-
$this->_permissions = $this->get_option( $plugin_info, 'permissions', array() );
|
4991 |
-
|
4992 |
-
if ( ! empty( $plugin_info['trial'] ) ) {
|
4993 |
-
$this->_trial_days = $this->get_numeric_option(
|
4994 |
-
$plugin_info['trial'],
|
4995 |
-
'days',
|
4996 |
-
// Default to 0 - trial without days specification.
|
4997 |
-
0
|
4998 |
-
);
|
4999 |
-
|
5000 |
-
$this->_is_trial_require_payment = $this->get_bool_option( $plugin_info['trial'], 'is_require_payment', false );
|
5001 |
-
}
|
5002 |
-
}
|
5003 |
-
|
5004 |
-
/**
|
5005 |
-
* @param string[] $options
|
5006 |
-
* @param string $key
|
5007 |
-
* @param mixed $default
|
5008 |
-
*
|
5009 |
-
* @return bool
|
5010 |
-
*/
|
5011 |
-
private function get_option( &$options, $key, $default = false ) {
|
5012 |
-
return ! empty( $options[ $key ] ) ? $options[ $key ] : $default;
|
5013 |
-
}
|
5014 |
-
|
5015 |
-
private function get_bool_option( &$options, $key, $default = false ) {
|
5016 |
-
return isset( $options[ $key ] ) && is_bool( $options[ $key ] ) ? $options[ $key ] : $default;
|
5017 |
-
}
|
5018 |
-
|
5019 |
-
private function get_numeric_option( &$options, $key, $default = false ) {
|
5020 |
-
return isset( $options[ $key ] ) && is_numeric( $options[ $key ] ) ? $options[ $key ] : $default;
|
5021 |
-
}
|
5022 |
-
|
5023 |
-
/**
|
5024 |
-
* Gate keeper.
|
5025 |
-
*
|
5026 |
-
* @author Vova Feldman (@svovaf)
|
5027 |
-
* @since 1.1.7.3
|
5028 |
-
*
|
5029 |
-
* @return bool
|
5030 |
-
*/
|
5031 |
-
private function should_stop_execution() {
|
5032 |
-
if ( empty( $this->_storage->was_plugin_loaded ) ) {
|
5033 |
-
/**
|
5034 |
-
* Don't execute Freemius until plugin was fully loaded at least once,
|
5035 |
-
* to give the opportunity for the activation hook to run before pinging
|
5036 |
-
* the API for connectivity test. This logic is relevant for the
|
5037 |
-
* identification of new plugin install vs. plugin update.
|
5038 |
-
*
|
5039 |
-
* @author Vova Feldman (@svovaf)
|
5040 |
-
* @since 1.1.9
|
5041 |
-
*/
|
5042 |
-
return true;
|
5043 |
-
}
|
5044 |
-
|
5045 |
-
if ( $this->is_activation_mode() ) {
|
5046 |
-
if ( ! is_admin() ) {
|
5047 |
-
/**
|
5048 |
-
* If in activation mode, don't execute Freemius outside of the
|
5049 |
-
* admin dashboard.
|
5050 |
-
*
|
5051 |
-
* @author Vova Feldman (@svovaf)
|
5052 |
-
* @since 1.1.7.3
|
5053 |
-
*/
|
5054 |
-
return true;
|
5055 |
-
}
|
5056 |
-
|
5057 |
-
if ( ! WP_FS__IS_HTTP_REQUEST ) {
|
5058 |
-
/**
|
5059 |
-
* If in activation and executed without HTTP context (e.g. CLI, Cronjob),
|
5060 |
-
* then don't start Freemius.
|
5061 |
-
*
|
5062 |
-
* @author Vova Feldman (@svovaf)
|
5063 |
-
* @since 1.1.6.3
|
5064 |
-
*
|
5065 |
-
* @link https://wordpress.org/support/topic/errors-in-the-freemius-class-when-running-in-wordpress-in-cli
|
5066 |
-
*/
|
5067 |
-
return true;
|
5068 |
-
}
|
5069 |
-
|
5070 |
-
if ( self::is_cron() ) {
|
5071 |
-
/**
|
5072 |
-
* If in activation mode, don't execute Freemius during wp crons
|
5073 |
-
* (wp crons have HTTP context - called as HTTP request).
|
5074 |
-
*
|
5075 |
-
* @author Vova Feldman (@svovaf)
|
5076 |
-
* @since 1.1.7.3
|
5077 |
-
*/
|
5078 |
-
return true;
|
5079 |
-
}
|
5080 |
-
|
5081 |
-
if ( self::is_ajax() &&
|
5082 |
-
! $this->_admin_notices->has_sticky( 'failed_connect_api_first' ) &&
|
5083 |
-
! $this->_admin_notices->has_sticky( 'failed_connect_api' )
|
5084 |
-
) {
|
5085 |
-
/**
|
5086 |
-
* During activation, if running in AJAX mode, unless there's a sticky
|
5087 |
-
* connectivity issue notice, don't run Freemius.
|
5088 |
-
*
|
5089 |
-
* @author Vova Feldman (@svovaf)
|
5090 |
-
* @since 1.1.7.3
|
5091 |
-
*/
|
5092 |
-
return true;
|
5093 |
-
}
|
5094 |
-
}
|
5095 |
-
|
5096 |
-
return false;
|
5097 |
-
}
|
5098 |
-
|
5099 |
-
/**
|
5100 |
-
* Triggered after code type has changed.
|
5101 |
-
*
|
5102 |
-
* @author Vova Feldman (@svovaf)
|
5103 |
-
* @since 1.1.9.1
|
5104 |
-
*/
|
5105 |
-
function _after_code_type_change() {
|
5106 |
-
$this->_logger->entrance();
|
5107 |
-
|
5108 |
-
if ( $this->is_theme() ) {
|
5109 |
-
// Expire the cache of the previous tabs since the theme may
|
5110 |
-
// have setting updates after code type has changed.
|
5111 |
-
$this->_cache->expire( 'tabs' );
|
5112 |
-
$this->_cache->expire( 'tabs_stylesheets' );
|
5113 |
-
}
|
5114 |
-
|
5115 |
-
if ( $this->is_registered() ) {
|
5116 |
-
if ( ! $this->is_addon() ) {
|
5117 |
-
add_action(
|
5118 |
-
is_admin() ? 'admin_init' : 'init',
|
5119 |
-
array( &$this, '_plugin_code_type_changed' )
|
5120 |
-
);
|
5121 |
-
}
|
5122 |
-
|
5123 |
-
if ( $this->is_premium() ) {
|
5124 |
-
// Purge cached payments after switching to the premium version.
|
5125 |
-
// @todo This logic doesn't handle purging the cache for serviceware module upgrade.
|
5126 |
-
$this->get_api_user_scope()->purge_cache( "/plugins/{$this->_module_id}/payments.json?include_addons=true" );
|
5127 |
-
}
|
5128 |
-
}
|
5129 |
-
}
|
5130 |
-
|
5131 |
-
/**
|
5132 |
-
* Handles plugin's code type change (free <--> premium).
|
5133 |
-
*
|
5134 |
-
* @author Vova Feldman (@svovaf)
|
5135 |
-
* @since 1.0.9
|
5136 |
-
*/
|
5137 |
-
function _plugin_code_type_changed() {
|
5138 |
-
$this->_logger->entrance();
|
5139 |
-
|
5140 |
-
if ( $this->is_premium() ) {
|
5141 |
-
$this->reconnect_locally();
|
5142 |
-
|
5143 |
-
// Activated premium code.
|
5144 |
-
$this->do_action( 'after_premium_version_activation' );
|
5145 |
-
|
5146 |
-
// Remove all sticky messages related to download of the premium version.
|
5147 |
-
$this->_admin_notices->remove_sticky( array(
|
5148 |
-
'trial_started',
|
5149 |
-
'plan_upgraded',
|
5150 |
-
'plan_changed',
|
5151 |
-
'license_activated',
|
5152 |
-
) );
|
5153 |
-
|
5154 |
-
$notice = '';
|
5155 |
-
if ( ! $this->is_only_premium() ) {
|
5156 |
-
$notice = sprintf( $this->get_text_inline( 'Premium %s version was successfully activated.', 'premium-activated-message' ), $this->_module_type );
|
5157 |
-
}
|
5158 |
-
|
5159 |
-
$license_notice = $this->get_license_network_activation_notice();
|
5160 |
-
if ( ! empty( $license_notice ) ) {
|
5161 |
-
$notice .= ' ' . $license_notice;
|
5162 |
-
}
|
5163 |
-
|
5164 |
-
if ( ! empty( $notice ) ) {
|
5165 |
-
$this->_admin_notices->add_sticky(
|
5166 |
-
trim( $notice ),
|
5167 |
-
'premium_activated',
|
5168 |
-
$this->get_text_x_inline( 'W00t',
|
5169 |
-
'Used to express elation, enthusiasm, or triumph (especially in electronic communication).', 'woot' ) . '!'
|
5170 |
-
);
|
5171 |
-
}
|
5172 |
-
} else {
|
5173 |
-
// Remove sticky message related to premium code activation.
|
5174 |
-
$this->_admin_notices->remove_sticky( 'premium_activated' );
|
5175 |
-
|
5176 |
-
// Activated free code (after had the premium before).
|
5177 |
-
$this->do_action( 'after_free_version_reactivation' );
|
5178 |
-
|
5179 |
-
if ( $this->is_paying() && ! $this->is_premium() ) {
|
5180 |
-
$this->_admin_notices->add_sticky(
|
5181 |
-
sprintf(
|
5182 |
-
/* translators: %s: License type (e.g. you have a professional license) */
|
5183 |
-
$this->get_text_inline( 'You have a %s license.', 'you-have-x-license' ),
|
5184 |
-
$this->get_plan_title()
|
5185 |
-
) . $this->get_complete_upgrade_instructions(),
|
5186 |
-
'plan_upgraded',
|
5187 |
-
$this->get_text_x_inline( 'Yee-haw', 'interjection expressing joy or exuberance', 'yee-haw' ) . '!'
|
5188 |
-
);
|
5189 |
-
}
|
5190 |
-
}
|
5191 |
-
|
5192 |
-
// Schedule code type changes event.
|
5193 |
-
$this->schedule_install_sync();
|
5194 |
-
|
5195 |
-
/**
|
5196 |
-
* Unregister the uninstall hook for the other version of the plugin (with different code type) to avoid
|
5197 |
-
* triggering a fatal error when uninstalling that plugin. For example, after deactivating the "free" version
|
5198 |
-
* of a specific plugin, its uninstall hook should be unregistered after the "premium" version has been
|
5199 |
-
* activated. If we don't do that, a fatal error will occur when we try to uninstall the "free" version since
|
5200 |
-
* the main file of the "free" version will be loaded first before calling the hooked callback. Since the
|
5201 |
-
* free and premium versions are almost identical (same class or have same functions), a fatal error like
|
5202 |
-
* "Cannot redeclare class MyClass" or "Cannot redeclare my_function()" will occur.
|
5203 |
-
*/
|
5204 |
-
$this->unregister_uninstall_hook();
|
5205 |
-
|
5206 |
-
$this->clear_module_main_file_cache();
|
5207 |
-
|
5208 |
-
// Update is_premium of latest version.
|
5209 |
-
$this->_storage->prev_is_premium = $this->_plugin->is_premium;
|
5210 |
-
}
|
5211 |
-
|
5212 |
-
#endregion
|
5213 |
-
|
5214 |
-
#----------------------------------------------------------------------------------
|
5215 |
-
#region Add-ons
|
5216 |
-
#----------------------------------------------------------------------------------
|
5217 |
-
|
5218 |
-
/**
|
5219 |
-
* Check if add-on installed and activated on site.
|
5220 |
-
*
|
5221 |
-
* @author Vova Feldman (@svovaf)
|
5222 |
-
* @since 1.0.6
|
5223 |
-
*
|
5224 |
-
* @param string|number $id_or_slug
|
5225 |
-
* @param bool|null $is_premium Since 1.2.1.7 can check for specified add-on version.
|
5226 |
-
*
|
5227 |
-
* @return bool
|
5228 |
-
*/
|
5229 |
-
function is_addon_activated( $id_or_slug, $is_premium = null ) {
|
5230 |
-
$this->_logger->entrance();
|
5231 |
-
|
5232 |
-
$addon_id = self::get_module_id( $id_or_slug );
|
5233 |
-
$is_activated = self::has_instance( $addon_id );
|
5234 |
-
|
5235 |
-
if ( ! $is_activated ) {
|
5236 |
-
return false;
|
5237 |
-
}
|
5238 |
-
|
5239 |
-
if ( is_bool( $is_premium ) ) {
|
5240 |
-
// Check if the specified code version is activate.
|
5241 |
-
$addon = $this->get_addon_instance( $addon_id );
|
5242 |
-
$is_activated = ( $is_premium === $addon->is_premium() );
|
5243 |
-
}
|
5244 |
-
|
5245 |
-
return $is_activated;
|
5246 |
-
}
|
5247 |
-
|
5248 |
-
/**
|
5249 |
-
* Check if add-on was connected to install
|
5250 |
-
*
|
5251 |
-
* @author Vova Feldman (@svovaf)
|
5252 |
-
* @since 1.1.7
|
5253 |
-
*
|
5254 |
-
* @param string|number $id_or_slug
|
5255 |
-
*
|
5256 |
-
* @return bool
|
5257 |
-
*/
|
5258 |
-
function is_addon_connected( $id_or_slug ) {
|
5259 |
-
$this->_logger->entrance();
|
5260 |
-
|
5261 |
-
$sites = self::get_all_sites( WP_FS__MODULE_TYPE_PLUGIN );
|
5262 |
-
|
5263 |
-
$addon_id = self::get_module_id( $id_or_slug );
|
5264 |
-
$addon = $this->get_addon( $addon_id );
|
5265 |
-
$slug = $addon->slug;
|
5266 |
-
if ( ! isset( $sites[ $slug ] ) ) {
|
5267 |
-
return false;
|
5268 |
-
}
|
5269 |
-
|
5270 |
-
$site = $sites[ $slug ];
|
5271 |
-
|
5272 |
-
$plugin = FS_Plugin_Manager::instance( $addon_id )->get();
|
5273 |
-
|
5274 |
-
if ( $plugin->parent_plugin_id != $this->_plugin->id ) {
|
5275 |
-
// The given slug do NOT belong to any of the plugin's add-ons.
|
5276 |
-
return false;
|
5277 |
-
}
|
5278 |
-
|
5279 |
-
return ( is_object( $site ) &&
|
5280 |
-
is_numeric( $site->id ) &&
|
5281 |
-
is_numeric( $site->user_id ) &&
|
5282 |
-
FS_Plugin_Plan::is_valid_id( $site->plan_id )
|
5283 |
-
);
|
5284 |
-
}
|
5285 |
-
|
5286 |
-
/**
|
5287 |
-
* Determines if add-on installed.
|
5288 |
-
*
|
5289 |
-
* NOTE: This is a heuristic and only works if the folder/file named as the slug.
|
5290 |
-
*
|
5291 |
-
* @author Vova Feldman (@svovaf)
|
5292 |
-
* @since 1.0.6
|
5293 |
-
*
|
5294 |
-
* @param string|number $id_or_slug
|
5295 |
-
*
|
5296 |
-
* @return bool
|
5297 |
-
*/
|
5298 |
-
function is_addon_installed( $id_or_slug ) {
|
5299 |
-
$this->_logger->entrance();
|
5300 |
-
|
5301 |
-
$addon_id = self::get_module_id( $id_or_slug );
|
5302 |
-
|
5303 |
-
return file_exists( fs_normalize_path( WP_PLUGIN_DIR . '/' . $this->get_addon_basename( $addon_id ) ) );
|
5304 |
-
}
|
5305 |
-
|
5306 |
-
/**
|
5307 |
-
* Get add-on basename.
|
5308 |
-
*
|
5309 |
-
* @author Vova Feldman (@svovaf)
|
5310 |
-
* @since 1.0.6
|
5311 |
-
*
|
5312 |
-
* @param string|number $id_or_slug
|
5313 |
-
*
|
5314 |
-
* @return string
|
5315 |
-
*/
|
5316 |
-
function get_addon_basename( $id_or_slug ) {
|
5317 |
-
$addon_id = self::get_module_id( $id_or_slug );
|
5318 |
-
|
5319 |
-
if ( $this->is_addon_activated( $addon_id ) ) {
|
5320 |
-
return self::instance( $addon_id )->get_plugin_basename();
|
5321 |
-
}
|
5322 |
-
|
5323 |
-
$addon = $this->get_addon( $addon_id );
|
5324 |
-
$premium_basename = "{$addon->premium_slug}/{$addon->slug}.php";
|
5325 |
-
|
5326 |
-
if ( file_exists( fs_normalize_path( WP_PLUGIN_DIR . '/' . $premium_basename ) ) ) {
|
5327 |
-
return $premium_basename;
|
5328 |
-
}
|
5329 |
-
|
5330 |
-
$all_plugins = $this->get_all_plugins();
|
5331 |
-
|
5332 |
-
foreach ( $all_plugins as $basename => $data ) {
|
5333 |
-
if ( $addon->slug === $data['slug'] ||
|
5334 |
-
$addon->premium_slug === $data['slug']
|
5335 |
-
) {
|
5336 |
-
return $basename;
|
5337 |
-
}
|
5338 |
-
}
|
5339 |
-
|
5340 |
-
$free_basename = "{$addon->slug}/{$addon->slug}.php";
|
5341 |
-
|
5342 |
-
return $free_basename;
|
5343 |
-
}
|
5344 |
-
|
5345 |
-
/**
|
5346 |
-
* Get installed add-ons instances.
|
5347 |
-
*
|
5348 |
-
* @author Vova Feldman (@svovaf)
|
5349 |
-
* @since 1.0.6
|
5350 |
-
*
|
5351 |
-
* @return Freemius[]
|
5352 |
-
*/
|
5353 |
-
function get_installed_addons() {
|
5354 |
-
$installed_addons = array();
|
5355 |
-
foreach ( self::$_instances as $instance ) {
|
5356 |
-
if ( $instance->is_addon() && is_object( $instance->_parent_plugin ) ) {
|
5357 |
-
if ( $this->_plugin->id == $instance->_parent_plugin->id ) {
|
5358 |
-
$installed_addons[] = $instance;
|
5359 |
-
}
|
5360 |
-
}
|
5361 |
-
}
|
5362 |
-
|
5363 |
-
return $installed_addons;
|
5364 |
-
}
|
5365 |
-
|
5366 |
-
/**
|
5367 |
-
* Check if any add-ons of the plugin are installed.
|
5368 |
-
*
|
5369 |
-
* @author Leo Fajardo (@leorw)
|
5370 |
-
* @since 1.1.1
|
5371 |
-
*
|
5372 |
-
* @return bool
|
5373 |
-
*/
|
5374 |
-
function has_installed_addons() {
|
5375 |
-
if ( ! $this->has_addons() ) {
|
5376 |
-
return false;
|
5377 |
-
}
|
5378 |
-
|
5379 |
-
foreach ( self::$_instances as $instance ) {
|
5380 |
-
if ( $instance->is_addon() && is_object( $instance->_parent_plugin ) ) {
|
5381 |
-
if ( $this->_plugin->id == $instance->_parent_plugin->id ) {
|
5382 |
-
return true;
|
5383 |
-
}
|
5384 |
-
}
|
5385 |
-
}
|
5386 |
-
|
5387 |
-
return false;
|
5388 |
-
}
|
5389 |
-
|
5390 |
-
/**
|
5391 |
-
* Tell Freemius that the current plugin is an add-on.
|
5392 |
-
*
|
5393 |
-
* @author Vova Feldman (@svovaf)
|
5394 |
-
* @since 1.0.6
|
5395 |
-
*
|
5396 |
-
* @param number $parent_plugin_id The parent plugin ID
|
5397 |
-
*/
|
5398 |
-
function init_addon( $parent_plugin_id ) {
|
5399 |
-
$this->_plugin->parent_plugin_id = $parent_plugin_id;
|
5400 |
-
}
|
5401 |
-
|
5402 |
-
/**
|
5403 |
-
* @author Vova Feldman (@svovaf)
|
5404 |
-
* @since 1.0.6
|
5405 |
-
*
|
5406 |
-
* @return bool
|
5407 |
-
*/
|
5408 |
-
function is_addon() {
|
5409 |
-
return isset( $this->_plugin->parent_plugin_id ) && is_numeric( $this->_plugin->parent_plugin_id );
|
5410 |
-
}
|
5411 |
-
|
5412 |
-
/**
|
5413 |
-
* Deactivate add-on if it's premium only and the user does't have a valid license.
|
5414 |
-
*
|
5415 |
-
* @param bool $is_after_trial_cancel
|
5416 |
-
*
|
5417 |
-
* @return bool If add-on was deactivated.
|
5418 |
-
*/
|
5419 |
-
private function deactivate_premium_only_addon_without_license( $is_after_trial_cancel = false ) {
|
5420 |
-
if ( ! $this->has_free_plan() &&
|
5421 |
-
! $this->has_features_enabled_license() &&
|
5422 |
-
! $this->_has_premium_license()
|
5423 |
-
) {
|
5424 |
-
if ( $this->is_registered() ) {
|
5425 |
-
// IF wrapper is turned off because activation_timestamp is currently only stored for plugins (not addons).
|
5426 |
-
// if (empty($this->_storage->activation_timestamp) ||
|
5427 |
-
// (WP_FS__SCRIPT_START_TIME - $this->_storage->activation_timestamp) > 30
|
5428 |
-
// ) {
|
5429 |
-
/**
|
5430 |
-
* @todo When it's first fail, there's no reason to try and re-sync because the licenses were just synced after initial activation.
|
5431 |
-
*
|
5432 |
-
* Retry syncing the user add-on licenses.
|
5433 |
-
*/
|
5434 |
-
// Sync licenses.
|
5435 |
-
$this->_sync_licenses();
|
5436 |
-
// }
|
5437 |
-
|
5438 |
-
// Try to activate premium license.
|
5439 |
-
$this->_activate_license( true );
|
5440 |
-
}
|
5441 |
-
|
5442 |
-
if ( ! $this->has_free_plan() &&
|
5443 |
-
! $this->has_features_enabled_license() &&
|
5444 |
-
! $this->_has_premium_license()
|
5445 |
-
) {
|
5446 |
-
// @todo Check if deactivate plugins also call the deactivation hook.
|
5447 |
-
|
5448 |
-
$this->_parent->_admin_notices->add_sticky(
|
5449 |
-
sprintf(
|
5450 |
-
( $is_after_trial_cancel ?
|
5451 |
-
$this->_parent->get_text_inline(
|
5452 |
-
'%s free trial was successfully cancelled. Since the add-on is premium only it was automatically deactivated. If you like to use it in the future, you\'ll have to purchase a license.',
|
5453 |
-
'addon-trial-cancelled-message'
|
5454 |
-
) :
|
5455 |
-
$this->_parent->get_text_inline(
|
5456 |
-
'%s is a premium only add-on. You have to purchase a license first before activating the plugin.',
|
5457 |
-
'addon-no-license-message'
|
5458 |
-
)
|
5459 |
-
),
|
5460 |
-
'<b>' . $this->_plugin->title . '</b>'
|
5461 |
-
) . ' ' . sprintf(
|
5462 |
-
'<a href="%s" aria-label="%s" class="button button-primary" style="margin-left: 10px; vertical-align: middle;">%s ➜</a>',
|
5463 |
-
$this->_parent->addon_url( $this->_slug ),
|
5464 |
-
esc_attr( sprintf( $this->_parent->get_text_inline( 'More information about %s', 'more-information-about-x' ), $this->_plugin->title ) ),
|
5465 |
-
$this->_parent->get_text_inline( 'Purchase License', 'purchase-license' )
|
5466 |
-
),
|
5467 |
-
'no_addon_license_' . $this->_slug,
|
5468 |
-
( $is_after_trial_cancel ? '' : $this->_parent->get_text_x_inline( 'Oops', 'exclamation', 'oops' ) . '...' ),
|
5469 |
-
( $is_after_trial_cancel ? 'success' : 'error' )
|
5470 |
-
);
|
5471 |
-
|
5472 |
-
deactivate_plugins( array( $this->_plugin_basename ), true );
|
5473 |
-
|
5474 |
-
return true;
|
5475 |
-
}
|
5476 |
-
}
|
5477 |
-
|
5478 |
-
return false;
|
5479 |
-
}
|
5480 |
-
|
5481 |
-
#endregion
|
5482 |
-
|
5483 |
-
#----------------------------------------------------------------------------------
|
5484 |
-
#region Sandbox
|
5485 |
-
#----------------------------------------------------------------------------------
|
5486 |
-
|
5487 |
-
/**
|
5488 |
-
* Set Freemius into sandbox mode for debugging.
|
5489 |
-
*
|
5490 |
-
* @author Vova Feldman (@svovaf)
|
5491 |
-
* @since 1.0.4
|
5492 |
-
*
|
5493 |
-
* @param string $secret_key
|
5494 |
-
*/
|
5495 |
-
function init_sandbox( $secret_key ) {
|
5496 |
-
$this->_plugin->secret_key = $secret_key;
|
5497 |
-
|
5498 |
-
// Update plugin details.
|
5499 |
-
FS_Plugin_Manager::instance( $this->_module_id )->update( $this->_plugin, true );
|
5500 |
-
}
|
5501 |
-
|
5502 |
-
/**
|
5503 |
-
* Check if running payments in sandbox mode.
|
5504 |
-
*
|
5505 |
-
* @author Vova Feldman (@svovaf)
|
5506 |
-
* @since 1.0.4
|
5507 |
-
*
|
5508 |
-
* @return bool
|
5509 |
-
*/
|
5510 |
-
function is_payments_sandbox() {
|
5511 |
-
return ( ! $this->is_live() ) || isset( $this->_plugin->secret_key );
|
5512 |
-
}
|
5513 |
-
|
5514 |
-
#endregion
|
5515 |
-
|
5516 |
-
/**
|
5517 |
-
* Check if running test vs. live plugin.
|
5518 |
-
*
|
5519 |
-
* @author Vova Feldman (@svovaf)
|
5520 |
-
* @since 1.0.5
|
5521 |
-
*
|
5522 |
-
* @return bool
|
5523 |
-
*/
|
5524 |
-
function is_live() {
|
5525 |
-
return $this->_plugin->is_live;
|
5526 |
-
}
|
5527 |
-
|
5528 |
-
/**
|
5529 |
-
* Check if super-admin skipped connection for all sites in the network.
|
5530 |
-
*
|
5531 |
-
* @author Vova Feldman (@svovaf)
|
5532 |
-
* @since 2.0.0
|
5533 |
-
*/
|
5534 |
-
function is_network_anonymous() {
|
5535 |
-
if ( ! $this->_is_network_active ) {
|
5536 |
-
return false;
|
5537 |
-
}
|
5538 |
-
|
5539 |
-
$is_anonymous_ms = $this->_storage->get( 'is_anonymous_ms' );
|
5540 |
-
|
5541 |
-
if ( empty( $is_anonymous_ms ) ) {
|
5542 |
-
return false;
|
5543 |
-
}
|
5544 |
-
|
5545 |
-
return $is_anonymous_ms['is'];
|
5546 |
-
}
|
5547 |
-
|
5548 |
-
/**
|
5549 |
-
* Check if super-admin opted-in for all sites in the network.
|
5550 |
-
*
|
5551 |
-
* @author Vova Feldman (@svovaf)
|
5552 |
-
* @since 2.0.0
|
5553 |
-
*/
|
5554 |
-
function is_network_connected() {
|
5555 |
-
if ( ! $this->_is_network_active ) {
|
5556 |
-
return false;
|
5557 |
-
}
|
5558 |
-
|
5559 |
-
return $this->_storage->get( 'is_network_connected' );
|
5560 |
-
}
|
5561 |
-
|
5562 |
-
/**
|
5563 |
-
* Check if the user skipped connecting the account with Freemius.
|
5564 |
-
*
|
5565 |
-
* @author Vova Feldman (@svovaf)
|
5566 |
-
* @since 1.0.7
|
5567 |
-
*
|
5568 |
-
* @return bool
|
5569 |
-
*/
|
5570 |
-
function is_anonymous() {
|
5571 |
-
if ( ! isset( $this->_is_anonymous ) ) {
|
5572 |
-
if ( $this->is_network_anonymous() ) {
|
5573 |
-
$this->_is_anonymous = true;
|
5574 |
-
} else if ( ! fs_is_network_admin() ) {
|
5575 |
-
if ( ! isset( $this->_storage->is_anonymous ) ) {
|
5576 |
-
// Not skipped.
|
5577 |
-
$this->_is_anonymous = false;
|
5578 |
-
} else if ( is_bool( $this->_storage->is_anonymous ) ) {
|
5579 |
-
// For back compatibility, since the variable was boolean before.
|
5580 |
-
$this->_is_anonymous = $this->_storage->is_anonymous;
|
5581 |
-
|
5582 |
-
// Upgrade stored data format to 1.1.3 format.
|
5583 |
-
$this->set_anonymous_mode( $this->_storage->is_anonymous );
|
5584 |
-
} else {
|
5585 |
-
// Version 1.1.3 and later.
|
5586 |
-
$this->_is_anonymous = $this->_storage->is_anonymous['is'];
|
5587 |
-
}
|
5588 |
-
}
|
5589 |
-
}
|
5590 |
-
|
5591 |
-
return $this->_is_anonymous;
|
5592 |
-
}
|
5593 |
-
|
5594 |
-
/**
|
5595 |
-
* Check if the user skipped the connection of a specified site.
|
5596 |
-
*
|
5597 |
-
* @author Vova Feldman (@svovaf)
|
5598 |
-
* @since 2.0.0
|
5599 |
-
*
|
5600 |
-
* @param int $blog_id
|
5601 |
-
*
|
5602 |
-
* @return bool
|
5603 |
-
*/
|
5604 |
-
function is_anonymous_site( $blog_id = 0 ) {
|
5605 |
-
if ( $this->is_network_anonymous() ) {
|
5606 |
-
return true;
|
5607 |
-
}
|
5608 |
-
|
5609 |
-
$is_anonymous = $this->_storage->get( 'is_anonymous', false, $blog_id );
|
5610 |
-
|
5611 |
-
if ( empty( $is_anonymous ) ) {
|
5612 |
-
return false;
|
5613 |
-
}
|
5614 |
-
|
5615 |
-
return $is_anonymous['is'];
|
5616 |
-
}
|
5617 |
-
|
5618 |
-
/**
|
5619 |
-
* Check if user connected his account and install pending email activation.
|
5620 |
-
*
|
5621 |
-
* @author Vova Feldman (@svovaf)
|
5622 |
-
* @since 1.0.7
|
5623 |
-
*
|
5624 |
-
* @return bool
|
5625 |
-
*/
|
5626 |
-
function is_pending_activation() {
|
5627 |
-
return $this->_storage->get( 'is_pending_activation', false );
|
5628 |
-
}
|
5629 |
-
|
5630 |
-
/**
|
5631 |
-
* Check if plugin must be WordPress.org compliant.
|
5632 |
-
*
|
5633 |
-
* @since 1.0.7
|
5634 |
-
*
|
5635 |
-
* @return bool
|
5636 |
-
*/
|
5637 |
-
function is_org_repo_compliant() {
|
5638 |
-
return $this->_is_org_compliant;
|
5639 |
-
}
|
5640 |
-
|
5641 |
-
#--------------------------------------------------------------------------------
|
5642 |
-
#region WP Cron Common
|
5643 |
-
#--------------------------------------------------------------------------------
|
5644 |
-
|
5645 |
-
/**
|
5646 |
-
* @author Vova Feldman (@svovaf)
|
5647 |
-
* @since 2.0.0
|
5648 |
-
*
|
5649 |
-
* @param string $name Cron name.
|
5650 |
-
*
|
5651 |
-
* @return object
|
5652 |
-
*/
|
5653 |
-
private function get_cron_data( $name ) {
|
5654 |
-
$this->_logger->entrance( $name );
|
5655 |
-
|
5656 |
-
/**
|
5657 |
-
* @var object $cron_data
|
5658 |
-
*/
|
5659 |
-
return $this->_storage->get( "{$name}_cron", null );
|
5660 |
-
}
|
5661 |
-
|
5662 |
-
/**
|
5663 |
-
* @author Vova Feldman (@svovaf)
|
5664 |
-
* @since 2.0.0
|
5665 |
-
*
|
5666 |
-
* @param string $name Cron name.
|
5667 |
-
*/
|
5668 |
-
private function clear_cron_data( $name ) {
|
5669 |
-
$this->_logger->entrance( $name );
|
5670 |
-
|
5671 |
-
$this->_storage->remove( "{$name}_cron" );
|
5672 |
-
}
|
5673 |
-
|
5674 |
-
/**
|
5675 |
-
* @author Vova Feldman (@svovaf)
|
5676 |
-
* @since 2.0.0
|
5677 |
-
*
|
5678 |
-
* @param string $name Cron name.
|
5679 |
-
* @param int $cron_blog_id The cron executing blog ID.
|
5680 |
-
*/
|
5681 |
-
private function set_cron_data( $name, $cron_blog_id = 0 ) {
|
5682 |
-
$this->_logger->entrance( $name );
|
5683 |
-
|
5684 |
-
$this->_storage->store( "{$name}_cron", (object) array(
|
5685 |
-
'version' => $this->get_plugin_version(),
|
5686 |
-
'blog_id' => $cron_blog_id,
|
5687 |
-
'sdk_version' => $this->version,
|
5688 |
-
'timestamp' => WP_FS__SCRIPT_START_TIME,
|
5689 |
-
'on' => true,
|
5690 |
-
) );
|
5691 |
-
}
|
5692 |
-
|
5693 |
-
/**
|
5694 |
-
* Get the cron's executing blog ID.
|
5695 |
-
*
|
5696 |
-
* @author Vova Feldman (@svovaf)
|
5697 |
-
* @since 2.0.0
|
5698 |
-
*
|
5699 |
-
* @param string $name Cron name.
|
5700 |
-
*
|
5701 |
-
* @return int
|
5702 |
-
*/
|
5703 |
-
private function get_cron_blog_id( $name ) {
|
5704 |
-
$this->_logger->entrance( $name );
|
5705 |
-
|
5706 |
-
/**
|
5707 |
-
* @var object $cron_data
|
5708 |
-
*/
|
5709 |
-
$cron_data = $this->get_cron_data( $name );
|
5710 |
-
|
5711 |
-
return ( is_object( $cron_data ) && is_numeric( $cron_data->blog_id ) ) ?
|
5712 |
-
$cron_data->blog_id :
|
5713 |
-
0;
|
5714 |
-
}
|
5715 |
-
|
5716 |
-
/**
|
5717 |
-
* @author Vova Feldman (@svovaf)
|
5718 |
-
* @since 2.0.0
|
5719 |
-
*
|
5720 |
-
* @param string $name Cron name.
|
5721 |
-
*
|
5722 |
-
* @return bool
|
5723 |
-
*/
|
5724 |
-
private function is_cron_on( $name ) {
|
5725 |
-
$this->_logger->entrance( $name );
|
5726 |
-
|
5727 |
-
/**
|
5728 |
-
* @var object $cron_data
|
5729 |
-
*/
|
5730 |
-
$cron_data = $this->get_cron_data( $name );
|
5731 |
-
|
5732 |
-
return ( ! is_null( $cron_data ) && true === $cron_data->on );
|
5733 |
-
}
|
5734 |
-
|
5735 |
-
/**
|
5736 |
-
* Unix timestamp for previous cron execution or false if never executed.
|
5737 |
-
*
|
5738 |
-
* @author Vova Feldman (@svovaf)
|
5739 |
-
* @since 2.0.0
|
5740 |
-
*
|
5741 |
-
* @param string $name Cron name.
|
5742 |
-
*
|
5743 |
-
* @return int|false
|
5744 |
-
*/
|
5745 |
-
private function cron_last_execution( $name ) {
|
5746 |
-
$this->_logger->entrance( $name );
|
5747 |
-
|
5748 |
-
return $this->_storage->get( "{$name}_timestamp" );
|
5749 |
-
}
|
5750 |
-
|
5751 |
-
/**
|
5752 |
-
* Set cron execution time to now.
|
5753 |
-
*
|
5754 |
-
* @author Vova Feldman (@svovaf)
|
5755 |
-
* @since 2.0.0
|
5756 |
-
*
|
5757 |
-
* @param string $name Cron name.
|
5758 |
-
*/
|
5759 |
-
private function set_cron_execution_timestamp( $name ) {
|
5760 |
-
$this->_logger->entrance( $name );
|
5761 |
-
|
5762 |
-
$this->_storage->store( "{$name}_timestamp", time() );
|
5763 |
-
}
|
5764 |
-
|
5765 |
-
/**
|
5766 |
-
* Sets the keepalive time to now.
|
5767 |
-
*
|
5768 |
-
* @author Leo Fajardo (@leorw)
|
5769 |
-
* @since 2.2.3
|
5770 |
-
*
|
5771 |
-
* @param bool|null $use_network_level_storage
|
5772 |
-
*/
|
5773 |
-
private function set_keepalive_timestamp( $use_network_level_storage = null ) {
|
5774 |
-
$this->_logger->entrance();
|
5775 |
-
|
5776 |
-
$this->_storage->store( 'keepalive_timestamp', time(), $use_network_level_storage );
|
5777 |
-
}
|
5778 |
-
|
5779 |
-
/**
|
5780 |
-
* Check if cron was executed in the last $period of seconds.
|
5781 |
-
*
|
5782 |
-
* @author Vova Feldman (@svovaf)
|
5783 |
-
* @since 2.0.0
|
5784 |
-
*
|
5785 |
-
* @param string $name Cron name.
|
5786 |
-
* @param int $period In seconds
|
5787 |
-
*
|
5788 |
-
* @return bool
|
5789 |
-
*/
|
5790 |
-
private function is_cron_executed( $name, $period = WP_FS__TIME_24_HOURS_IN_SEC ) {
|
5791 |
-
$this->_logger->entrance( $name );
|
5792 |
-
|
5793 |
-
$last_execution = $this->cron_last_execution( $name );
|
5794 |
-
|
5795 |
-
if ( ! is_numeric( $last_execution ) ) {
|
5796 |
-
return false;
|
5797 |
-
}
|
5798 |
-
|
5799 |
-
return ( $last_execution > ( WP_FS__SCRIPT_START_TIME - $period ) );
|
5800 |
-
}
|
5801 |
-
|
5802 |
-
/**
|
5803 |
-
* WP Cron is executed on a site level. When running in a multisite network environment
|
5804 |
-
* with the network integration activated, for optimization reasons, we are consolidating
|
5805 |
-
* the installs data sync cron to be executed only from a single site.
|
5806 |
-
*
|
5807 |
-
* @author Vova Feldman (@svovaf)
|
5808 |
-
* @since 2.0.0
|
5809 |
-
*
|
5810 |
-
* @param int $except_blog_id Target any except the excluded blog ID.
|
5811 |
-
*
|
5812 |
-
* @return int
|
5813 |
-
*/
|
5814 |
-
private function get_cron_target_blog_id( $except_blog_id = 0 ) {
|
5815 |
-
if ( ! is_multisite() ) {
|
5816 |
-
return 0;
|
5817 |
-
}
|
5818 |
-
|
5819 |
-
if ( $this->_is_network_active &&
|
5820 |
-
is_numeric( $this->_storage->network_install_blog_id ) &&
|
5821 |
-
$except_blog_id != $this->_storage->network_install_blog_id &&
|
5822 |
-
self::is_site_active( $this->_storage->network_install_blog_id )
|
5823 |
-
) {
|
5824 |
-
// Try to run cron from the main network blog.
|
5825 |
-
$install = $this->get_install_by_blog_id( $this->_storage->network_install_blog_id );
|
5826 |
-
|
5827 |
-
if ( is_object( $install ) &&
|
5828 |
-
( $this->is_premium() || $install->is_tracking_allowed() )
|
5829 |
-
) {
|
5830 |
-
return $this->_storage->network_install_blog_id;
|
5831 |
-
}
|
5832 |
-
}
|
5833 |
-
|
5834 |
-
// Get first opted-in blog ID with active tracking.
|
5835 |
-
$installs = $this->get_blog_install_map();
|
5836 |
-
foreach ( $installs as $blog_id => $install ) {
|
5837 |
-
if ( $except_blog_id != $blog_id &&
|
5838 |
-
self::is_site_active( $blog_id ) &&
|
5839 |
-
( $this->is_premium() || $install->is_tracking_allowed() )
|
5840 |
-
) {
|
5841 |
-
return $blog_id;
|
5842 |
-
}
|
5843 |
-
}
|
5844 |
-
|
5845 |
-
return 0;
|
5846 |
-
}
|
5847 |
-
|
5848 |
-
/**
|
5849 |
-
* @author Vova Feldman (@svovaf)
|
5850 |
-
* @since 2.0.0
|
5851 |
-
*
|
5852 |
-
* @param string $name Cron name.
|
5853 |
-
* @param string $action_tag Callback action tag.
|
5854 |
-
* @param bool $is_network_clear If set to TRUE, clear sync cron even if there are installs that are still connected.
|
5855 |
-
*/
|
5856 |
-
private function clear_cron( $name, $action_tag = '', $is_network_clear = false ) {
|
5857 |
-
$this->_logger->entrance( $name );
|
5858 |
-
|
5859 |
-
if ( ! $this->is_cron_on( $name ) ) {
|
5860 |
-
return;
|
5861 |
-
}
|
5862 |
-
|
5863 |
-
$clear_cron = true;
|
5864 |
-
if ( ! $is_network_clear && $this->_is_network_active ) {
|
5865 |
-
$installs = $this->get_blog_install_map();
|
5866 |
-
|
5867 |
-
foreach ( $installs as $blog_id => $install ) {
|
5868 |
-
/**
|
5869 |
-
* @var FS_Site $install
|
5870 |
-
*/
|
5871 |
-
if ( $install->is_tracking_allowed() ) {
|
5872 |
-
$clear_cron = false;
|
5873 |
-
break;
|
5874 |
-
}
|
5875 |
-
}
|
5876 |
-
}
|
5877 |
-
|
5878 |
-
if ( ! $clear_cron ) {
|
5879 |
-
return;
|
5880 |
-
}
|
5881 |
-
|
5882 |
-
/**
|
5883 |
-
* @var object $cron_data
|
5884 |
-
*/
|
5885 |
-
$cron_data = $this->get_cron_data( $name );
|
5886 |
-
|
5887 |
-
$cron_blog_id = is_object( $cron_data ) && isset( $cron_data->blog_id ) ?
|
5888 |
-
$cron_data->blog_id :
|
5889 |
-
0;
|
5890 |
-
|
5891 |
-
$this->clear_cron_data( $name );
|
5892 |
-
|
5893 |
-
if ( 0 < $cron_blog_id ) {
|
5894 |
-
switch_to_blog( $cron_blog_id );
|
5895 |
-
}
|
5896 |
-
|
5897 |
-
if ( empty( $action_tag ) ) {
|
5898 |
-
$action_tag = $name;
|
5899 |
-
}
|
5900 |
-
|
5901 |
-
wp_clear_scheduled_hook( $this->get_action_tag( $action_tag ) );
|
5902 |
-
|
5903 |
-
if ( 0 < $cron_blog_id ) {
|
5904 |
-
restore_current_blog();
|
5905 |
-
}
|
5906 |
-
}
|
5907 |
-
|
5908 |
-
/**
|
5909 |
-
* Unix timestamp for next cron execution or false if not scheduled.
|
5910 |
-
*
|
5911 |
-
* @author Vova Feldman (@svovaf)
|
5912 |
-
* @since 2.0.0
|
5913 |
-
*
|
5914 |
-
* @param string $name Cron name.
|
5915 |
-
* @param string $action_tag Callback action tag.
|
5916 |
-
*
|
5917 |
-
* @return int|false
|
5918 |
-
*/
|
5919 |
-
private function get_next_scheduled_cron( $name, $action_tag = '' ) {
|
5920 |
-
$this->_logger->entrance( $name );
|
5921 |
-
|
5922 |
-
if ( ! $this->is_cron_on( $name ) ) {
|
5923 |
-
return false;
|
5924 |
-
}
|
5925 |
-
|
5926 |
-
/**
|
5927 |
-
* @var object $cron_data
|
5928 |
-
*/
|
5929 |
-
$cron_data = $this->get_cron_data( $name );
|
5930 |
-
|
5931 |
-
$cron_blog_id = is_object( $cron_data ) && isset( $cron_data->blog_id ) ?
|
5932 |
-
$cron_data->blog_id :
|
5933 |
-
0;
|
5934 |
-
|
5935 |
-
if ( 0 < $cron_blog_id ) {
|
5936 |
-
switch_to_blog( $cron_blog_id );
|
5937 |
-
}
|
5938 |
-
|
5939 |
-
if ( empty( $action_tag ) ) {
|
5940 |
-
$action_tag = $name;
|
5941 |
-
}
|
5942 |
-
|
5943 |
-
$next_scheduled = wp_next_scheduled( $this->get_action_tag( $action_tag ) );
|
5944 |
-
|
5945 |
-
if ( 0 < $cron_blog_id ) {
|
5946 |
-
restore_current_blog();
|
5947 |
-
}
|
5948 |
-
|
5949 |
-
return $next_scheduled;
|
5950 |
-
}
|
5951 |
-
|
5952 |
-
/**
|
5953 |
-
* @author Vova Feldman (@svovaf)
|
5954 |
-
* @since 2.0.0
|
5955 |
-
*
|
5956 |
-
* @param string $name Cron name.
|
5957 |
-
* @param string $action_tag Callback action tag.
|
5958 |
-
* @param string $recurrence 'single' or 'daily'.
|
5959 |
-
* @param int $start_at Defaults to now.
|
5960 |
-
* @param bool $randomize_start If true, schedule first job randomly during the next 12 hours. Otherwise, schedule job to start right away.
|
5961 |
-
* @param int $except_blog_id Target any except the excluded blog ID.
|
5962 |
-
*/
|
5963 |
-
private function schedule_cron(
|
5964 |
-
$name,
|
5965 |
-
$action_tag = '',
|
5966 |
-
$recurrence = 'single',
|
5967 |
-
$start_at = WP_FS__SCRIPT_START_TIME,
|
5968 |
-
$randomize_start = true,
|
5969 |
-
$except_blog_id = 0
|
5970 |
-
) {
|
5971 |
-
$this->_logger->entrance( $name );
|
5972 |
-
|
5973 |
-
$this->clear_cron( $name, $action_tag, true );
|
5974 |
-
|
5975 |
-
$cron_blog_id = $this->get_cron_target_blog_id( $except_blog_id );
|
5976 |
-
|
5977 |
-
if ( is_multisite() && 0 == $cron_blog_id ) {
|
5978 |
-
// Don't schedule cron since couldn't find a target blog.
|
5979 |
-
return;
|
5980 |
-
}
|
5981 |
-
|
5982 |
-
if ( 0 < $cron_blog_id ) {
|
5983 |
-
switch_to_blog( $cron_blog_id );
|
5984 |
-
}
|
5985 |
-
|
5986 |
-
if ( 'daily' === $recurrence ) {
|
5987 |
-
if ( $randomize_start ) {
|
5988 |
-
// Schedule first sync with a random 12 hour time range from now.
|
5989 |
-
$start_at += rand( 0, ( WP_FS__TIME_24_HOURS_IN_SEC / 2 ) );
|
5990 |
-
}
|
5991 |
-
|
5992 |
-
// Schedule daily WP cron.
|
5993 |
-
wp_schedule_event(
|
5994 |
-
$start_at,
|
5995 |
-
'daily',
|
5996 |
-
$this->get_action_tag( $action_tag )
|
5997 |
-
);
|
5998 |
-
} else if ( 'single' === $recurrence ) {
|
5999 |
-
// Schedule single cron.
|
6000 |
-
wp_schedule_single_event(
|
6001 |
-
$start_at,
|
6002 |
-
$this->get_action_tag( $action_tag )
|
6003 |
-
);
|
6004 |
-
}
|
6005 |
-
|
6006 |
-
$this->set_cron_data( $name, $cron_blog_id );
|
6007 |
-
|
6008 |
-
if ( 0 < $cron_blog_id ) {
|
6009 |
-
restore_current_blog();
|
6010 |
-
}
|
6011 |
-
}
|
6012 |
-
|
6013 |
-
/**
|
6014 |
-
* Consolidated cron execution for performance optimization. The max number of API requests is based on the number of unique opted-in users.
|
6015 |
-
* that doesn't halt page loading.
|
6016 |
-
*
|
6017 |
-
* @author Vova Feldman (@svovaf)
|
6018 |
-
* @since 2.0.0
|
6019 |
-
*
|
6020 |
-
* @param string $name Cron name.
|
6021 |
-
* @param callable $callable The function that should be executed.
|
6022 |
-
*/
|
6023 |
-
private function execute_cron( $name, $callable ) {
|
6024 |
-
$this->_logger->entrance( $name );
|
6025 |
-
|
6026 |
-
// Store the last time data sync was executed.
|
6027 |
-
$this->set_cron_execution_timestamp( $name );
|
6028 |
-
|
6029 |
-
// Check if API is temporary down.
|
6030 |
-
if ( FS_Api::is_temporary_down() ) {
|
6031 |
-
return;
|
6032 |
-
}
|
6033 |
-
|
6034 |
-
// @todo Add logic that identifies API latency, and reschedule the next background sync randomly between 8-16 hours.
|
6035 |
-
|
6036 |
-
$users_2_blog_ids = array();
|
6037 |
-
|
6038 |
-
if ( ! is_multisite() ) {
|
6039 |
-
// Add dummy blog.
|
6040 |
-
$users_2_blog_ids[0] = array( 0 );
|
6041 |
-
} else {
|
6042 |
-
$installs = $this->get_blog_install_map();
|
6043 |
-
foreach ( $installs as $blog_id => $install ) {
|
6044 |
-
if ( $this->is_premium() || $install->is_tracking_allowed() ) {
|
6045 |
-
if ( ! isset( $users_2_blog_ids[ $install->user_id ] ) ) {
|
6046 |
-
$users_2_blog_ids[ $install->user_id ] = array();
|
6047 |
-
}
|
6048 |
-
|
6049 |
-
$users_2_blog_ids[ $install->user_id ][] = $blog_id;
|
6050 |
-
}
|
6051 |
-
}
|
6052 |
-
}
|
6053 |
-
|
6054 |
-
$current_blog_id = get_current_blog_id();
|
6055 |
-
|
6056 |
-
foreach ( $users_2_blog_ids as $user_id => $blog_ids ) {
|
6057 |
-
if ( 0 < $blog_ids[0] ) {
|
6058 |
-
$this->switch_to_blog( $blog_ids[0] );
|
6059 |
-
}
|
6060 |
-
|
6061 |
-
call_user_func_array( $callable, array( $blog_ids, ( is_multisite() ? $current_blog_id : null ) ) );
|
6062 |
-
|
6063 |
-
foreach ( $blog_ids as $blog_id ) {
|
6064 |
-
$this->do_action( "after_{$name}_cron", $blog_id );
|
6065 |
-
}
|
6066 |
-
}
|
6067 |
-
|
6068 |
-
if ( is_multisite() ) {
|
6069 |
-
$this->switch_to_blog( $current_blog_id );
|
6070 |
-
|
6071 |
-
$this->do_action( "after_{$name}_cron_multisite" );
|
6072 |
-
}
|
6073 |
-
}
|
6074 |
-
|
6075 |
-
#endregion
|
6076 |
-
|
6077 |
-
#----------------------------------------------------------------------------------
|
6078 |
-
#region Daily Sync Cron
|
6079 |
-
#----------------------------------------------------------------------------------
|
6080 |
-
|
6081 |
-
|
6082 |
-
/**
|
6083 |
-
* @author Vova Feldman (@svovaf)
|
6084 |
-
* @since 2.0.0
|
6085 |
-
*
|
6086 |
-
* @return bool
|
6087 |
-
*/
|
6088 |
-
private function is_sync_cron_scheduled() {
|
6089 |
-
return $this->is_cron_on( 'sync' );
|
6090 |
-
}
|
6091 |
-
|
6092 |
-
/**
|
6093 |
-
* Get the sync cron's executing blog ID.
|
6094 |
-
*
|
6095 |
-
* @author Vova Feldman (@svovaf)
|
6096 |
-
* @since 2.0.0
|
6097 |
-
*
|
6098 |
-
* @return int
|
6099 |
-
*/
|
6100 |
-
private function get_sync_cron_blog_id() {
|
6101 |
-
return $this->get_cron_blog_id( 'sync' );
|
6102 |
-
}
|
6103 |
-
|
6104 |
-
/**
|
6105 |
-
* @author Vova Feldman (@svovaf)
|
6106 |
-
* @since 1.1.7.3
|
6107 |
-
*/
|
6108 |
-
private function run_manual_sync() {
|
6109 |
-
self::require_pluggable_essentials();
|
6110 |
-
|
6111 |
-
if ( ! $this->is_user_admin() ) {
|
6112 |
-
return;
|
6113 |
-
}
|
6114 |
-
|
6115 |
-
// Run manual sync.
|
6116 |
-
$this->_sync_cron();
|
6117 |
-
|
6118 |
-
// Reschedule next cron to run 24 hours from now (performance optimization).
|
6119 |
-
$this->schedule_sync_cron( time() + WP_FS__TIME_24_HOURS_IN_SEC, false );
|
6120 |
-
}
|
6121 |
-
|
6122 |
-
/**
|
6123 |
-
* Data sync cron job. Replaces the background sync non blocking HTTP request
|
6124 |
-
* that doesn't halt page loading.
|
6125 |
-
*
|
6126 |
-
* @author Vova Feldman (@svovaf)
|
6127 |
-
* @since 1.1.7.3
|
6128 |
-
* @since 2.0.0 Consolidate all the data sync into the same cron for performance optimization. The max number of API requests is based on the number of unique opted-in users.
|
6129 |
-
*/
|
6130 |
-
function _sync_cron() {
|
6131 |
-
$this->_logger->entrance();
|
6132 |
-
|
6133 |
-
$this->execute_cron( 'sync', array( &$this, '_sync_cron_method' ) );
|
6134 |
-
}
|
6135 |
-
|
6136 |
-
/**
|
6137 |
-
* The actual data sync cron logic.
|
6138 |
-
*
|
6139 |
-
* @author Vova Feldman (@svovaf)
|
6140 |
-
* @since 2.0.0
|
6141 |
-
*
|
6142 |
-
* @param int[] $blog_ids
|
6143 |
-
* @param int|null $current_blog_id @since 2.2.3. This is passed from the `execute_cron` method and used by the
|
6144 |
-
* `_sync_plugin_license` method in order to switch to the previous blog when sending
|
6145 |
-
* updates for a single site in case `execute_cron` has switched to a different blog.
|
6146 |
-
*/
|
6147 |
-
function _sync_cron_method( array $blog_ids, $current_blog_id = null ) {
|
6148 |
-
if ( $this->is_registered() ) {
|
6149 |
-
if ( $this->has_paid_plan() ) {
|
6150 |
-
// Initiate background plan sync.
|
6151 |
-
$this->_sync_license( true, false, $current_blog_id );
|
6152 |
-
|
6153 |
-
if ( $this->is_paying() ) {
|
6154 |
-
// Check for premium plugin updates.
|
6155 |
-
$this->check_updates( true );
|
6156 |
-
}
|
6157 |
-
} else {
|
6158 |
-
// Sync install(s) (only if something changed locally).
|
6159 |
-
if ( 1 < count( $blog_ids ) ) {
|
6160 |
-
$this->sync_installs();
|
6161 |
-
} else {
|
6162 |
-
$this->sync_install();
|
6163 |
-
}
|
6164 |
-
}
|
6165 |
-
}
|
6166 |
-
}
|
6167 |
-
|
6168 |
-
/**
|
6169 |
-
* Check if sync was executed in the last $period of seconds.
|
6170 |
-
*
|
6171 |
-
* @author Vova Feldman (@svovaf)
|
6172 |
-
* @since 1.1.7.3
|
6173 |
-
*
|
6174 |
-
* @param int $period In seconds
|
6175 |
-
*
|
6176 |
-
* @return bool
|
6177 |
-
*/
|
6178 |
-
private function is_sync_executed( $period = WP_FS__TIME_24_HOURS_IN_SEC ) {
|
6179 |
-
return $this->is_cron_executed( 'sync', $period );
|
6180 |
-
}
|
6181 |
-
|
6182 |
-
/**
|
6183 |
-
* @author Vova Feldman (@svovaf)
|
6184 |
-
* @since 1.1.7.3
|
6185 |
-
*
|
6186 |
-
* @return bool
|
6187 |
-
*/
|
6188 |
-
private function is_sync_cron_on() {
|
6189 |
-
return $this->is_cron_on( 'sync' );
|
6190 |
-
}
|
6191 |
-
|
6192 |
-
/**
|
6193 |
-
* @author Vova Feldman (@svovaf)
|
6194 |
-
* @since 1.1.7.3
|
6195 |
-
*
|
6196 |
-
* @param int $start_at Defaults to now.
|
6197 |
-
* @param bool $randomize_start If true, schedule first job randomly during the next 12 hours. Otherwise, schedule job to start right away.
|
6198 |
-
* @param int $except_blog_id Since 2.0.0 when running in a multisite network environment, the cron execution is consolidated. This param allows excluding excluded specified blog ID from being the cron executor.
|
6199 |
-
*/
|
6200 |
-
private function schedule_sync_cron(
|
6201 |
-
$start_at = WP_FS__SCRIPT_START_TIME,
|
6202 |
-
$randomize_start = true,
|
6203 |
-
$except_blog_id = 0
|
6204 |
-
) {
|
6205 |
-
$this->schedule_cron(
|
6206 |
-
'sync',
|
6207 |
-
'data_sync',
|
6208 |
-
'daily',
|
6209 |
-
$start_at,
|
6210 |
-
$randomize_start,
|
6211 |
-
$except_blog_id
|
6212 |
-
);
|
6213 |
-
}
|
6214 |
-
|
6215 |
-
/**
|
6216 |
-
* Add the actual sync function to the cron job hook.
|
6217 |
-
*
|
6218 |
-
* @author Vova Feldman (@svovaf)
|
6219 |
-
* @since 1.1.7.3
|
6220 |
-
*/
|
6221 |
-
private function hook_callback_to_sync_cron() {
|
6222 |
-
$this->add_action( 'data_sync', array( &$this, '_sync_cron' ) );
|
6223 |
-
}
|
6224 |
-
|
6225 |
-
/**
|
6226 |
-
* @author Vova Feldman (@svovaf)
|
6227 |
-
* @since 1.1.7.3
|
6228 |
-
*
|
6229 |
-
* @param bool $is_network_clear Since 2.0.0 If set to TRUE, clear sync cron even if there are installs that are still connected.
|
6230 |
-
*/
|
6231 |
-
private function clear_sync_cron( $is_network_clear = false ) {
|
6232 |
-
$this->_logger->entrance();
|
6233 |
-
|
6234 |
-
$this->clear_cron( 'sync', 'data_sync', $is_network_clear );
|
6235 |
-
}
|
6236 |
-
|
6237 |
-
/**
|
6238 |
-
* Unix timestamp for next sync cron execution or false if not scheduled.
|
6239 |
-
*
|
6240 |
-
* @author Vova Feldman (@svovaf)
|
6241 |
-
* @since 1.1.7.3
|
6242 |
-
*
|
6243 |
-
* @return int|false
|
6244 |
-
*/
|
6245 |
-
function next_sync_cron() {
|
6246 |
-
return $this->get_next_scheduled_cron( 'sync', 'data_sync' );
|
6247 |
-
}
|
6248 |
-
|
6249 |
-
/**
|
6250 |
-
* Unix timestamp for previous sync cron execution or false if never executed.
|
6251 |
-
*
|
6252 |
-
* @author Vova Feldman (@svovaf)
|
6253 |
-
* @since 1.1.7.3
|
6254 |
-
*
|
6255 |
-
* @return int|false
|
6256 |
-
*/
|
6257 |
-
function last_sync_cron() {
|
6258 |
-
return $this->cron_last_execution( 'sync' );
|
6259 |
-
}
|
6260 |
-
|
6261 |
-
#endregion Daily Sync Cron ------------------------------------------------------------------
|
6262 |
-
|
6263 |
-
#----------------------------------------------------------------------------------
|
6264 |
-
#region Async Install Sync
|
6265 |
-
#----------------------------------------------------------------------------------
|
6266 |
-
|
6267 |
-
/**
|
6268 |
-
* @author Vova Feldman (@svovaf)
|
6269 |
-
* @since 1.1.7.3
|
6270 |
-
*
|
6271 |
-
* @return bool
|
6272 |
-
*/
|
6273 |
-
private function is_install_sync_scheduled() {
|
6274 |
-
return $this->is_cron_on( 'install_sync' );
|
6275 |
-
}
|
6276 |
-
|
6277 |
-
/**
|
6278 |
-
* Get the sync cron's executing blog ID.
|
6279 |
-
*
|
6280 |
-
* @author Vova Feldman (@svovaf)
|
6281 |
-
* @since 2.0.0
|
6282 |
-
*
|
6283 |
-
* @return int
|
6284 |
-
*/
|
6285 |
-
private function get_install_sync_cron_blog_id() {
|
6286 |
-
return $this->get_cron_blog_id( 'install_sync' );
|
6287 |
-
}
|
6288 |
-
|
6289 |
-
/**
|
6290 |
-
* Instead of running blocking install sync event, execute non blocking scheduled wp-cron.
|
6291 |
-
*
|
6292 |
-
* @author Vova Feldman (@svovaf)
|
6293 |
-
* @since 1.1.7.3
|
6294 |
-
*
|
6295 |
-
* @param int $except_blog_id Since 2.0.0 when running in a multisite network environment, the cron execution is consolidated. This param allows excluding excluded specified blog ID from being the cron executor.
|
6296 |
-
*/
|
6297 |
-
private function schedule_install_sync( $except_blog_id = 0 ) {
|
6298 |
-
$this->schedule_cron( 'install_sync', 'install_sync', 'single', WP_FS__SCRIPT_START_TIME, false, $except_blog_id );
|
6299 |
-
}
|
6300 |
-
|
6301 |
-
/**
|
6302 |
-
* Unix timestamp for previous install sync cron execution or false if never executed.
|
6303 |
-
*
|
6304 |
-
* @todo There's some very strange bug that $this->_storage->install_sync_timestamp value is not being updated. But for sure the sync event is working.
|
6305 |
-
*
|
6306 |
-
* @author Vova Feldman (@svovaf)
|
6307 |
-
* @since 1.1.7.3
|
6308 |
-
*
|
6309 |
-
* @return int|false
|
6310 |
-
*/
|
6311 |
-
function last_install_sync() {
|
6312 |
-
return $this->cron_last_execution( 'install_sync' );
|
6313 |
-
}
|
6314 |
-
|
6315 |
-
/**
|
6316 |
-
* Unix timestamp for next install sync cron execution or false if not scheduled.
|
6317 |
-
*
|
6318 |
-
* @author Vova Feldman (@svovaf)
|
6319 |
-
* @since 1.1.7.3
|
6320 |
-
*
|
6321 |
-
* @return int|false
|
6322 |
-
*/
|
6323 |
-
function next_install_sync() {
|
6324 |
-
return $this->get_next_scheduled_cron( 'install_sync', 'install_sync' );
|
6325 |
-
}
|
6326 |
-
|
6327 |
-
/**
|
6328 |
-
* Add the actual install sync function to the cron job hook.
|
6329 |
-
*
|
6330 |
-
* @author Vova Feldman (@svovaf)
|
6331 |
-
* @since 1.1.7.3
|
6332 |
-
*/
|
6333 |
-
private function hook_callback_to_install_sync() {
|
6334 |
-
$this->add_action( 'install_sync', array( &$this, '_run_sync_install' ) );
|
6335 |
-
}
|
6336 |
-
|
6337 |
-
/**
|
6338 |
-
* @author Vova Feldman (@svovaf)
|
6339 |
-
* @since 1.1.7.3
|
6340 |
-
*
|
6341 |
-
* @param bool $is_network_clear Since 2.0.0 If set to TRUE, clear sync cron even if there are installs that are still connected.
|
6342 |
-
*/
|
6343 |
-
private function clear_install_sync_cron( $is_network_clear = false ) {
|
6344 |
-
$this->_logger->entrance();
|
6345 |
-
|
6346 |
-
$this->clear_cron( 'install_sync', 'install_sync', $is_network_clear );
|
6347 |
-
}
|
6348 |
-
|
6349 |
-
/**
|
6350 |
-
* @author Vova Feldman (@svovaf)
|
6351 |
-
* @since 1.1.7.3
|
6352 |
-
* @since 2.0.0 Consolidate all the data sync into the same cron for performance optimization. The max number of API requests is based on the number of unique opted-in users.
|
6353 |
-
*/
|
6354 |
-
public function _run_sync_install() {
|
6355 |
-
$this->_logger->entrance();
|
6356 |
-
|
6357 |
-
$this->execute_cron( 'sync', array( &$this, '_sync_install_cron_method' ) );
|
6358 |
-
}
|
6359 |
-
|
6360 |
-
/**
|
6361 |
-
* The actual install(s) sync cron logic.
|
6362 |
-
*
|
6363 |
-
* @author Vova Feldman (@svovaf)
|
6364 |
-
* @since 2.0.0
|
6365 |
-
*
|
6366 |
-
* @param int[] $blog_ids
|
6367 |
-
* @param int|null $current_blog_id
|
6368 |
-
*/
|
6369 |
-
function _sync_install_cron_method( array $blog_ids, $current_blog_id = null ) {
|
6370 |
-
if ( $this->is_registered() ) {
|
6371 |
-
if ( 1 < count( $blog_ids ) ) {
|
6372 |
-
$this->sync_installs( array(), true );
|
6373 |
-
} else {
|
6374 |
-
$this->sync_install( array(), true );
|
6375 |
-
}
|
6376 |
-
}
|
6377 |
-
}
|
6378 |
-
|
6379 |
-
#endregion Async Install Sync ------------------------------------------------------------------
|
6380 |
-
|
6381 |
-
/**
|
6382 |
-
* Show a notice that activation is currently pending.
|
6383 |
-
*
|
6384 |
-
* @author Vova Feldman (@svovaf)
|
6385 |
-
* @since 1.0.7
|
6386 |
-
*
|
6387 |
-
* @param bool|string $email
|
6388 |
-
* @param bool $is_pending_trial Since 1.2.1.5
|
6389 |
-
*/
|
6390 |
-
function _add_pending_activation_notice( $email = false, $is_pending_trial = false ) {
|
6391 |
-
if ( ! is_string( $email ) ) {
|
6392 |
-
$current_user = self::_get_current_wp_user();
|
6393 |
-
$email = $current_user->user_email;
|
6394 |
-
}
|
6395 |
-
|
6396 |
-
$this->_admin_notices->add_sticky(
|
6397 |
-
sprintf(
|
6398 |
-
$this->get_text_inline( 'You should receive an activation email for %s to your mailbox at %s. Please make sure you click the activation button in that email to %s.', 'pending-activation-message' ),
|
6399 |
-
'<b>' . $this->get_plugin_name() . '</b>',
|
6400 |
-
'<b>' . $email . '</b>',
|
6401 |
-
( $is_pending_trial ?
|
6402 |
-
$this->get_text_inline( 'start the trial', 'start-the-trial' ) :
|
6403 |
-
$this->get_text_inline( 'complete the install', 'complete-the-install' ) )
|
6404 |
-
),
|
6405 |
-
'activation_pending',
|
6406 |
-
'Thanks!'
|
6407 |
-
);
|
6408 |
-
}
|
6409 |
-
|
6410 |
-
/**
|
6411 |
-
* Check if currently in plugin activation.
|
6412 |
-
*
|
6413 |
-
* @author Vova Feldman (@svovaf)
|
6414 |
-
* @since 1.1.4
|
6415 |
-
*
|
6416 |
-
* @return bool
|
6417 |
-
*/
|
6418 |
-
function is_plugin_activation() {
|
6419 |
-
$result = get_transient( "fs_{$this->_module_type}_{$this->_slug}_activated" );
|
6420 |
-
|
6421 |
-
return !empty($result);
|
6422 |
-
}
|
6423 |
-
|
6424 |
-
/**
|
6425 |
-
*
|
6426 |
-
* NOTE: admin_menu action executed before admin_init.
|
6427 |
-
*
|
6428 |
-
* @author Vova Feldman (@svovaf)
|
6429 |
-
* @since 1.0.7
|
6430 |
-
*/
|
6431 |
-
function _admin_init_action() {
|
6432 |
-
/**
|
6433 |
-
* Automatically redirect to connect/activation page after plugin activation.
|
6434 |
-
*
|
6435 |
-
* @since 1.1.7 Do NOT redirect to opt-in when running in network admin mode.
|
6436 |
-
*/
|
6437 |
-
if ( $this->is_plugin_activation() ) {
|
6438 |
-
delete_transient( "fs_{$this->_module_type}_{$this->_slug}_activated" );
|
6439 |
-
|
6440 |
-
if ( isset( $_GET['activate-multi'] ) ) {
|
6441 |
-
/**
|
6442 |
-
* Don't redirect if activating multiple plugins at once (bulk activation).
|
6443 |
-
*/
|
6444 |
-
} else {
|
6445 |
-
$this->_redirect_on_activation_hook();
|
6446 |
-
return;
|
6447 |
-
}
|
6448 |
-
}
|
6449 |
-
|
6450 |
-
if ( fs_request_is_action( $this->get_unique_affix() . '_skip_activation' ) ) {
|
6451 |
-
check_admin_referer( $this->get_unique_affix() . '_skip_activation' );
|
6452 |
-
|
6453 |
-
$this->skip_connection( null, fs_is_network_admin() );
|
6454 |
-
|
6455 |
-
fs_redirect( $this->get_after_activation_url( 'after_skip_url' ) );
|
6456 |
-
}
|
6457 |
-
|
6458 |
-
if ( $this->is_network_activation_mode() &&
|
6459 |
-
fs_request_is_action( $this->get_unique_affix() . '_delegate_activation' )
|
6460 |
-
) {
|
6461 |
-
check_admin_referer( $this->get_unique_affix() . '_delegate_activation' );
|
6462 |
-
|
6463 |
-
$this->delegate_connection();
|
6464 |
-
|
6465 |
-
fs_redirect( $this->get_after_activation_url( 'after_delegation_url' ) );
|
6466 |
-
}
|
6467 |
-
|
6468 |
-
$this->_add_upgrade_action_link();
|
6469 |
-
|
6470 |
-
if ( ! $this->is_addon() &&
|
6471 |
-
! ( ! $this->_is_network_active && fs_is_network_admin() ) &&
|
6472 |
-
(
|
6473 |
-
( true === $this->_storage->require_license_activation ) ||
|
6474 |
-
// Not registered nor anonymous.
|
6475 |
-
( ! $this->is_registered() && ! $this->is_anonymous() ) ||
|
6476 |
-
// OR, network level and in network upgrade mode.
|
6477 |
-
( fs_is_network_admin() && $this->_is_network_active && $this->is_network_upgrade_mode() )
|
6478 |
-
)
|
6479 |
-
) {
|
6480 |
-
if ( ! $this->is_pending_activation() ) {
|
6481 |
-
if ( ! $this->_menu->is_main_settings_page() ) {
|
6482 |
-
/**
|
6483 |
-
* If a user visits any other admin page before activating the premium-only theme with a valid
|
6484 |
-
* license, reactivate the previous theme.
|
6485 |
-
*
|
6486 |
-
* @author Leo Fajardo (@leorw)
|
6487 |
-
* @since 1.2.2
|
6488 |
-
*/
|
6489 |
-
if ( $this->is_theme()
|
6490 |
-
&& ! $this->has_settings_menu()
|
6491 |
-
&& ! isset( $_REQUEST['fs_action'] )
|
6492 |
-
&& $this->can_activate_previous_theme()
|
6493 |
-
) {
|
6494 |
-
if ( $this->is_only_premium() ) {
|
6495 |
-
$this->activate_previous_theme();
|
6496 |
-
return;
|
6497 |
-
}
|
6498 |
-
|
6499 |
-
if ( true === $this->_storage->require_license_activation ) {
|
6500 |
-
$this->_storage->require_license_activation = false;
|
6501 |
-
}
|
6502 |
-
}
|
6503 |
-
|
6504 |
-
if ( ! fs_is_network_admin() &&
|
6505 |
-
$this->is_network_activation_mode() &&
|
6506 |
-
! $this->is_delegated_connection()
|
6507 |
-
) {
|
6508 |
-
return;
|
6509 |
-
}
|
6510 |
-
|
6511 |
-
if ( $this->is_plugin_new_install() || $this->is_only_premium() ) {
|
6512 |
-
if ( ! $this->_anonymous_mode ) {
|
6513 |
-
// Show notice for new plugin installations.
|
6514 |
-
$this->_admin_notices->add(
|
6515 |
-
sprintf(
|
6516 |
-
$this->get_text_inline( 'You are just one step away - %s', 'you-are-step-away' ),
|
6517 |
-
sprintf( '<b><a href="%s">%s</a></b>',
|
6518 |
-
$this->get_activation_url( array(), ! $this->is_delegated_connection() ),
|
6519 |
-
sprintf( $this->get_text_x_inline( 'Complete "%s" Activation Now',
|
6520 |
-
'%s - plugin name. As complete "PluginX" activation now', 'activate-x-now' ), $this->get_plugin_name() )
|
6521 |
-
)
|
6522 |
-
),
|
6523 |
-
'',
|
6524 |
-
'update-nag'
|
6525 |
-
);
|
6526 |
-
}
|
6527 |
-
} else {
|
6528 |
-
if ( $this->should_add_sticky_optin_notice() ) {
|
6529 |
-
$this->add_sticky_optin_admin_notice();
|
6530 |
-
}
|
6531 |
-
|
6532 |
-
if ( $this->has_filter( 'optin_pointer_element' ) ) {
|
6533 |
-
// Don't show admin nag if plugin update.
|
6534 |
-
wp_enqueue_script( 'wp-pointer' );
|
6535 |
-
wp_enqueue_style( 'wp-pointer' );
|
6536 |
-
|
6537 |
-
$this->_enqueue_connect_essentials();
|
6538 |
-
|
6539 |
-
add_action( 'admin_print_footer_scripts', array(
|
6540 |
-
$this,
|
6541 |
-
'_add_connect_pointer_script'
|
6542 |
-
) );
|
6543 |
-
}
|
6544 |
-
}
|
6545 |
-
}
|
6546 |
-
}
|
6547 |
-
|
6548 |
-
if ( $this->is_theme() &&
|
6549 |
-
$this->_menu->is_main_settings_page()
|
6550 |
-
) {
|
6551 |
-
$this->_show_theme_activation_optin_dialog();
|
6552 |
-
}
|
6553 |
-
}
|
6554 |
-
}
|
6555 |
-
|
6556 |
-
/**
|
6557 |
-
* @author Vova Feldman (@svovaf)
|
6558 |
-
* @since 2.0.0
|
6559 |
-
*
|
6560 |
-
* @return bool
|
6561 |
-
*/
|
6562 |
-
private function should_add_sticky_optin_notice() {
|
6563 |
-
if ( fs_is_network_admin() ) {
|
6564 |
-
if ( ! $this->_is_network_active ) {
|
6565 |
-
return false;
|
6566 |
-
}
|
6567 |
-
|
6568 |
-
if ( ! $this->is_network_activation_mode() ) {
|
6569 |
-
return false;
|
6570 |
-
}
|
6571 |
-
|
6572 |
-
return ! isset( $this->_storage->sticky_optin_added_ms );
|
6573 |
-
}
|
6574 |
-
|
6575 |
-
if ( ! $this->is_activation_mode() ) {
|
6576 |
-
return false;
|
6577 |
-
}
|
6578 |
-
|
6579 |
-
// If running from a blog admin and delegated the connection.
|
6580 |
-
return ! isset( $this->_storage->sticky_optin_added );
|
6581 |
-
}
|
6582 |
-
|
6583 |
-
/**
|
6584 |
-
* @author Leo Fajardo (@leorw)
|
6585 |
-
* @since 2.0.0
|
6586 |
-
*/
|
6587 |
-
private function add_sticky_optin_admin_notice() {
|
6588 |
-
if ( ! $this->_is_network_active || ! fs_is_network_admin() ) {
|
6589 |
-
$this->_storage->sticky_optin_added = true;
|
6590 |
-
} else {
|
6591 |
-
$this->_storage->sticky_optin_added_ms = true;
|
6592 |
-
}
|
6593 |
-
|
6594 |
-
// Show notice for new plugin installations.
|
6595 |
-
$this->_admin_notices->add_sticky(
|
6596 |
-
sprintf(
|
6597 |
-
$this->get_text_inline( 'We made a few tweaks to the %s, %s', 'few-plugin-tweaks' ),
|
6598 |
-
$this->_module_type,
|
6599 |
-
sprintf( '<b><a href="%s">%s</a></b>',
|
6600 |
-
$this->get_activation_url(),
|
6601 |
-
sprintf( $this->get_text_inline( 'Opt in to make "%s" better!', 'optin-x-now' ), $this->get_plugin_name() )
|
6602 |
-
)
|
6603 |
-
),
|
6604 |
-
'connect_account',
|
6605 |
-
'',
|
6606 |
-
'update-nag'
|
6607 |
-
);
|
6608 |
-
}
|
6609 |
-
|
6610 |
-
/**
|
6611 |
-
* Enqueue connect requires scripts and styles.
|
6612 |
-
*
|
6613 |
-
* @author Vova Feldman (@svovaf)
|
6614 |
-
* @since 1.1.4
|
6615 |
-
*/
|
6616 |
-
function _enqueue_connect_essentials() {
|
6617 |
-
wp_enqueue_script( 'jquery' );
|
6618 |
-
wp_enqueue_script( 'json2' );
|
6619 |
-
|
6620 |
-
fs_enqueue_local_script( 'postmessage', 'nojquery.ba-postmessage.min.js' );
|
6621 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|