Version Description
Download this release
Release Info
Developer | danieliser |
Plugin | Popup Maker – Popup Forms, Optins & More |
Version | 1.8.2 |
Comparing to | |
See all releases |
Code changes from version 1.8.1 to 1.8.2
- assets/css/admin-theme-editor.css +5 -5
- assets/css/admin-theme-editor.css.map +1 -1
- assets/css/site.css +3 -3
- assets/css/site.css.map +1 -1
- assets/js/site.js +167 -167
- assets/sass/admin-theme-editor.scss +148 -148
- assets/sass/partials/_pum_styles.scss +267 -267
- classes/Abstract/Repository/Posts.php +369 -369
- classes/Extension/Updater.php +579 -579
- classes/Model/Theme.php +499 -499
- classes/Utils/Alerts.php +485 -485
- classes/Utils/I10n.php +2 -2
- includes/deprecated-classes.php +90 -90
- includes/functions/general.php +172 -172
- includes/functions/themes/migrations.php +144 -144
- includes/integrations/class-pum-buddypress-integration.php +248 -248
- popup-maker.php +2 -2
- readme.txt +4 -1
assets/css/admin-theme-editor.css
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
-
/*!******************************************************************************
|
2 |
-
* Copyright (c) 2018, WP Popup Maker
|
3 |
******************************************************************************/
|
4 |
.pum-popup-overlay,
|
5 |
.pum-popup-overlay .pum-popup-container,
|
@@ -53,8 +53,8 @@
|
|
53 |
box-sizing: border-box;
|
54 |
}
|
55 |
|
56 |
-
/**
|
57 |
-
*
|
58 |
*/
|
59 |
.pum-popup-content p {
|
60 |
margin-top: 0;
|
@@ -140,6 +140,6 @@
|
|
140 |
height: 16px;
|
141 |
}
|
142 |
|
143 |
-
/*# sourceMappingURL=data:application/json;charset=utf8;base64,
|
144 |
|
145 |
/*# sourceMappingURL=admin-theme-editor.css.map */
|
1 |
+
/*!******************************************************************************
|
2 |
+
* Copyright (c) 2018, WP Popup Maker
|
3 |
******************************************************************************/
|
4 |
.pum-popup-overlay,
|
5 |
.pum-popup-overlay .pum-popup-container,
|
53 |
box-sizing: border-box;
|
54 |
}
|
55 |
|
56 |
+
/**
|
57 |
+
*
|
58 |
*/
|
59 |
.pum-popup-content p {
|
60 |
margin-top: 0;
|
140 |
height: 16px;
|
141 |
}
|
142 |
|
143 |
+
/*# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWRtaW4tdGhlbWUtZWRpdG9yLmNzcyIsInNvdXJjZXMiOlsiYWRtaW4tdGhlbWUtZWRpdG9yLnNjc3MiXSwic291cmNlc0NvbnRlbnQiOlsiLyohKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqXHJcbiAqIENvcHlyaWdodCAoYykgMjAxOCwgV1AgUG9wdXAgTWFrZXJcclxuICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi9cclxuXHJcbi8vIFJlc2V0XHJcbi5wdW0tcG9wdXAtb3ZlcmxheSxcclxuLnB1bS1wb3B1cC1vdmVybGF5IC5wdW0tcG9wdXAtY29udGFpbmVyLFxyXG4ucHVtLW92ZXJsYXkgLnB1bS1wb3B1cC10aXRsZSxcclxuLnB1bS1vdmVybGF5IC5wdW0tcG9wdXAtY29udGVudCxcclxuLnB1bS1wb3B1cC1vdmVybGF5IC5wdW0tcG9wdXAtY2xvc2UsXHJcbi5wdW0tcG9wdXAtb3ZlcmxheSAucHVtLXBvcHVwLWNsb3NlY2xvc2UtcG9wdXA6aG92ZXIsXHJcbi5wdW0tcG9wdXAtb3ZlcmxheSAucHVtLXBvcHVwLWNsb3NlOmZvY3VzLFxyXG4ucHVtLXBvcHVwLW92ZXJsYXkgLnB1bS1wb3B1cC1jbG9zZTphY3RpdmUge1xyXG4gICAgYmFja2dyb3VuZDogbm9uZTtcclxuICAgIGJvcmRlcjogbm9uZTtcclxuICAgIGJvdHRvbTogYXV0bztcclxuICAgIGNsZWFyOiBub25lO1xyXG4gICAgY3Vyc29yOiBkZWZhdWx0O1xyXG4gICAgLyogZGlkbid0IHJlYWxse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FpbmVyICosXHJcbi5wdW0tcG9wdXAtY29udGFpbmVyICo6YmVmb3JlLFxyXG4ucHVtLXBvcHVwLWNvbnRhaW5lciAqOmFmdGVyIHtcclxuICAgIGJveC1zaXppbmc6IGJvcmRlci1ib3g7XHJcbn1cclxuXHJcbi8qKlxyXG4gKlxyXG4gKi9cclxuLnB1bS1wb3B1cC1jb250ZW50IHAge1xyXG4gICAgbWFyZ2luLXRvcDogMDtcclxufVxyXG5cclxuXHJcbiNwdW1fdGhlbWVfc2V0dGluZ3Mge1xyXG4gICAgLmluc2lkZSB7XHJcbiAgICAgICAgcGFkZGluZzogMDtcclxuICAgICAgICBtYXJnaW46IDA7XHJcbiAgICB9XHJcblxyXG4gICAgLndwLXBpY2tlci1jb250YWluZXIge1xyXG4gICAgICAgIGRpc3BsYXk6IGlubGluZS1ibG9jaztcclxuICAgIH1cclxufVxyXG5cclxuI3B1bV90aGVtZV9wcmV2aWV3IHtcclxuXHJcbiAgICAuaW5zaWRlIHtcclxuICAgICAgICBtYXJnaW4tdG9wOiAwO1xyXG4gICAgICAgIHBhZGRpbmc6IDA7XHJcbiAgICAgICAgYmFja2dyb3VuZDogdXJsKGh0dHBzOi8vcy53b3JkcHJlc3MuY29tL21zaG90cy92MS9odHRwczovL3d3dy53b3JkcHJlc3Mub3JnKSBuby1yZXBlYXQgY2VudGVyIHRvcDtcclxuICAgICAgICBiYWNrZ3JvdW5kLXNpemU6IGNvdmVyO1xyXG4gICAgfVxyXG5cclxuICAgIC5wdW0tdGhlbWUtcHJldmlldyB7XHJcbiAgICAgICAgcGFkZGluZzogNTBweCAyMHB4O1xyXG4gICAgICAgIHBvc2l0aW9uOiByZWxhdGl2ZTtcclxuICAgIH1cclxuXHJcbiAgICAucHVtLXBvcHVwLW92ZXJsYXksXHJcbiAgICAucHVtLXBvcHVwLWNvbnRhaW5lcixcclxuICAgIC5wdW0tcG9wdXAtdGl0bGUsXHJcbiAgICAucHVtLXBvcHVwLWNvbnRlbnQsXHJcbiAgICAucHVtLXBvcHVwLWNsb3NlIHtcclxuICAgICAgICBjdXJzb3I6IHBvaW50ZXI7XHJcbiAgICB9XHJcbn1cclxuXHJcbi5wdW0tdGhlbWUtcHJldmlldyB7XHJcblxyXG4gICAgLnB1bS1wb3B1cC1vdmVybGF5IHtcclxuICAgICAgICBwb3NpdGlvbjogYWJzb2x1dGU7XHJcbiAgICAgICAgZGlzcGxheTogYmxvY2s7XHJcbiAgICAgICAgd2lkdGg6IDEwMCU7XHJcbiAgICAgICAgaGVpZ2h0OiAxMDAlO1xyXG4gICAgICAgIHRvcDogMDtcclxuICAgICAgICBsZWZ0OiAwXHJcbiAgICB9XHJcblxyXG4gICAgLnB1bS1kZXNjLFxyXG4gICAgLnB1bS1wb3B1cC1jb250YWluZXIge1xyXG4gICAgICAgIGRpc3BsYXk6IGJsb2NrO1xyXG4gICAgICAgIHBvc2l0aW9uOiByZWxhdGl2ZTtcclxuICAgICAgICB3aWR0aDogOTUlO1xyXG4gICAgICAgIG1heC13aWR0aDogNDAwcHg7XHJcbiAgICAgICAgbWFyZ2luOiAwIGF1dG87XHJcbiAgICAgICAgZm9udC1zaXplOiAxNnB4O1xyXG4gICAgICAgIHotaW5kZXg6IDk5O1xyXG5cclxuICAgICAgICAucHVtLXBvcHVwLWNsb3NlIHtcclxuICAgICAgICAgICAgdGV4dC1kZWNvcmF0aW9uOiBub25lO1xyXG4gICAgICAgICAgICB0ZXh0LWFsaWduOiBjZW50ZXI7XHJcbiAgICAgICAgICAgIGxpbmUtaGVpZ2h0OiAxO1xyXG4gICAgICAgICAgICBwb3NpdGlvbjogYWJzb2x1dGU7XHJcbiAgICAgICAgICAgIGN1cnNvcjogcG9pbnRlcjtcclxuICAgICAgICAgICAgbWluLXdpZHRoOiAxZW07XHJcbiAgICAgICAgICAgIHotaW5kZXg6IDk5OTk5OTk7XHJcbiAgICAgICAgICAgIGJhY2tncm91bmQtY29sb3I6IHRyYW5zcGFyZW50O1xyXG4gICAgICAgIH1cclxuIC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EACL,6BAAM;UAAN,qBAAM;EACf,cAAA;ECPD,eAAe;EACf,WAAW;AARnB;;AAjCA;EA4CY,eAAe;EACf,WAAW;EACX,YAAY;AAPxB;;AAEA,y3QAAy3Q","file":"admin-theme-editor.css","sourcesContent":["/*!******************************************************************************\r\n * Copyright (c) 2018, WP Popup Maker\r\n ******************************************************************************/\r\n\r\n// Reset\r\n.pum-popup-overlay,\r\n.pum-popup-overlay .pum-popup-container,\r\n.pum-overlay .pum-popup-title,\r\n.pum-overlay .pum-popup-content,\r\n.pum-popup-overlay .pum-popup-close,\r\n.pum-popup-overlay .pum-popup-closeclose-popup:hover,\r\n.pum-popup-overlay .pum-popup-close:focus,\r\n.pum-popup-overlay .pum-popup-close:active {\r\n background: none;\r\n border: none;\r\n bottom: auto;\r\n clear: none;\r\n cursor: default;\r\n /* didn't really know what the default for display should be*/\r\n /*display:inline;*/\r\n float: none;\r\n font-family: Arial, Helvetica, sans-serif;\r\n font-size: medium;\r\n font-style: normal;\r\n font-weight: normal;\r\n height: auto;\r\n left: auto;\r\n letter-spacing: normal;\r\n line-height: normal;\r\n max-height: none;\r\n max-width: none;\r\n min-height: 0;\r\n min-width: 0;\r\n overflow: visible;\r\n position: static;\r\n right: auto;\r\n text-align: left;\r\n text-decoration: none;\r\n text-indent: 0;\r\n text-transform: none;\r\n top: auto;\r\n visibility: visible;\r\n white-space: normal;\r\n width: auto;\r\n z-index: auto;\r\n}\r\n\r\n.pum-popup-container,\r\n.pum-popup-container:before,\r\n.pum-popup-container:after,\r\n.pum-popup-container *,\r\n.pum-popup-container *:before,\r\n.pum-popup-container *:after {\r\n box-sizing: border-box;\r\n}\r\n\r\n/**\r\n *\r\n */\r\n.pum-popup-content p {\r\n margin-top: 0;\r\n}\r\n\r\n\r\n#pum_theme_settings {\r\n .inside {\r\n padding: 0;\r\n margin: 0;\r\n }\r\n\r\n .wp-picker-container {\r\n display: inline-block;\r\n }\r\n}\r\n\r\n#pum_theme_preview {\r\n\r\n .inside {\r\n margin-top: 0;\r\n padding: 0;\r\n background: url(https://s.wordpress.com/mshots/v1/https://www.wordpress.org) no-repeat center top;\r\n background-size: cover;\r\n }\r\n\r\n .pum-theme-preview {\r\n padding: 50px 20px;\r\n position: relative;\r\n }\r\n\r\n .pum-popup-overlay,\r\n .pum-popup-container,\r\n .pum-popup-title,\r\n .pum-popup-content,\r\n .pum-popup-close {\r\n cursor: pointer;\r\n }\r\n}\r\n\r\n.pum-theme-preview {\r\n\r\n .pum-popup-overlay {\r\n position: absolute;\r\n display: block;\r\n width: 100%;\r\n height: 100%;\r\n top: 0;\r\n left: 0\r\n }\r\n\r\n .pum-desc,\r\n .pum-popup-container {\r\n display: block;\r\n position: relative;\r\n width: 95%;\r\n max-width: 400px;\r\n margin: 0 auto;\r\n font-size: 16px;\r\n z-index: 99;\r\n\r\n .pum-popup-close {\r\n text-decoration: none;\r\n text-align: center;\r\n line-height: 1;\r\n position: absolute;\r\n cursor: pointer;\r\n min-width: 1em;\r\n z-index: 9999999;\r\n background-color: transparent;\r\n }\r\n }\r\n\r\n .pum-desc {\r\n box-sizing: border-box;\r\n margin: 10px auto 0;\r\n background-color: #fff;\r\n border: 1px solid;\r\n box-shadow: 0 2px 2px;\r\n padding: .75em;\r\n font-size: 11px;\r\n z-index: 10;\r\n\r\n .dashicons {\r\n font-size: 16px;\r\n width: 16px;\r\n height: 16px;\r\n }\r\n }\r\n}\r\n","/*!******************************************************************************\r\n * Copyright (c) 2018, WP Popup Maker\r\n ******************************************************************************/\r\n\r\n// Reset\r\n.pum-popup-overlay,\r\n.pum-popup-overlay .pum-popup-container,\r\n.pum-overlay .pum-popup-title,\r\n.pum-overlay .pum-popup-content,\r\n.pum-popup-overlay .pum-popup-close,\r\n.pum-popup-overlay .pum-popup-closeclose-popup:hover,\r\n.pum-popup-overlay .pum-popup-close:focus,\r\n.pum-popup-overlay .pum-popup-close:active {\r\n background: none;\r\n border: none;\r\n bottom: auto;\r\n clear: none;\r\n cursor: default;\r\n /* didn't really know what the default for display should be*/\r\n /*display:inline;*/\r\n float: none;\r\n font-family: Arial, Helvetica, sans-serif;\r\n font-size: medium;\r\n font-style: normal;\r\n font-weight: normal;\r\n height: auto;\r\n left: auto;\r\n letter-spacing: normal;\r\n line-height: normal;\r\n max-height: none;\r\n max-width: none;\r\n min-height: 0;\r\n min-width: 0;\r\n overflow: visible;\r\n position: static;\r\n right: auto;\r\n text-align: left;\r\n text-decoration: none;\r\n text-indent: 0;\r\n text-transform: none;\r\n top: auto;\r\n visibility: visible;\r\n white-space: normal;\r\n width: auto;\r\n z-index: auto;\r\n}\r\n\r\n.pum-popup-container,\r\n.pum-popup-container:before,\r\n.pum-popup-container:after,\r\n.pum-popup-container *,\r\n.pum-popup-container *:before,\r\n.pum-popup-container *:after {\r\n box-sizing: border-box;\r\n}\r\n\r\n/**\r\n *\r\n */\r\n.pum-popup-content p {\r\n margin-top: 0;\r\n}\r\n\r\n\r\n#pum_theme_settings {\r\n .inside {\r\n padding: 0;\r\n margin: 0;\r\n }\r\n\r\n .wp-picker-container {\r\n display: inline-block;\r\n }\r\n}\r\n\r\n#pum_theme_preview {\r\n\r\n .inside {\r\n margin-top: 0;\r\n padding: 0;\r\n background: url(https://s.wordpress.com/mshots/v1/https://www.wordpress.org) no-repeat center top;\r\n background-size: cover;\r\n }\r\n\r\n .pum-theme-preview {\r\n padding: 50px 20px;\r\n position: relative;\r\n }\r\n\r\n .pum-popup-overlay,\r\n .pum-popup-container,\r\n .pum-popup-title,\r\n .pum-popup-content,\r\n .pum-popup-close {\r\n cursor: pointer;\r\n }\r\n}\r\n\r\n.pum-theme-preview {\r\n\r\n .pum-popup-overlay {\r\n position: absolute;\r\n display: block;\r\n width: 100%;\r\n height: 100%;\r\n top: 0;\r\n left: 0\r\n }\r\n\r\n .pum-desc,\r\n .pum-popup-container {\r\n display: block;\r\n position: relative;\r\n width: 95%;\r\n max-width: 400px;\r\n margin: 0 auto;\r\n font-size: 16px;\r\n z-index: 99;\r\n\r\n .pum-popup-close {\r\n text-decoration: none;\r\n text-align: center;\r\n line-height: 1;\r\n position: absolute;\r\n cursor: pointer;\r\n min-width: 1em;\r\n z-index: 9999999;\r\n background-color: transparent;\r\n }\r\n }\r\n\r\n .pum-desc {\r\n box-sizing: border-box;\r\n margin: 10px auto 0;\r\n background-color: #fff;\r\n border: 1px solid;\r\n box-shadow: 0 2px 2px;\r\n padding: .75em;\r\n font-size: 11px;\r\n z-index: 10;\r\n\r\n .dashicons {\r\n font-size: 16px;\r\n width: 16px;\r\n height: 16px;\r\n }\r\n }\r\n}\r\n"]}
|
assets/css/site.css
CHANGED
@@ -109,8 +109,8 @@
|
|
109 |
display: none;
|
110 |
-webkit-transition: all .15s ease-in-out;
|
111 |
transition: all .15s ease-in-out;
|
112 |
-
/**
|
113 |
-
* Use border-box for all popup content. Providing more precise sizing.
|
114 |
*/
|
115 |
}
|
116 |
|
@@ -546,6 +546,6 @@ body div#ui-datepicker-div[style] {
|
|
546 |
z-index: 9999999999 !important;
|
547 |
}
|
548 |
|
549 |
-
/*# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2l0ZS5jc3MiLCJzb3VyY2VzIjpbInNpdGUuc2NzcyIsInBhcnRpYWxzL3NpdGUvX2FuaW1hdGlvbnMuc2NzcyIsInBhcnRpYWxzL19wdW1fc3R5bGVzLnNjc3MiLCJwYXJ0aWFscy9zaXRlL2Zvcm0vX2dlbmVyYWwuc2NzcyIsInBhcnRpYWxzL3NpdGUvZm9ybS9fYWxpZ25tZW50cy5zY3NzIiwicGFydGlhbHMvc2l0ZS9mb3JtL2xheW91dC9fc3RhbmRhcmQuc2NzcyIsInBhcnRpYWxzL3NpdGUvZm9ybS9sYXlvdXQvX2lubGluZS5zY3NzIiwicGFydGlhbHMvc2l0ZS9mb3JtL2xheW91dC9fYmxvY2suc2NzcyIsInBhcnRpYWxzL3NpdGUvZm9ybS9zdHlsZS9fZGVmYXVsdC5zY3NzIiwicGFydGl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biAgICBkaXNwbGF5OiBub25lO1xuICAgIHRyYW5zaXRpb246IGFsbCAuMTVzIGVhc2UtaW4tb3V0O1xuXG4gICAgJi5wdW0tcHJldmlldyxcbiAgICAmLnB1bS1mb3JtLXN1Ym1pc3Npb24tZGV0ZWN0ZWQge1xuICAgICAgICBkaXNwbGF5OiBibG9jaztcbiAgICB9XG5cbiAgICAvKipcbiAgICAqIFVzZSBib3JkZXItYm94IGZvciBhbGwgcG9wdXAgY29udGVudC4gUHJvdmlkaW5nIG1vcmUgcHJlY2lzZSBzaXppbmcuXG4gICAgKi9cbiAgICAmLCAmOmJlZm9yZSwgJjphZnRlcixcbiAgICAmICosICYgKjpiZWZvcmUsICYgKjphZnRlciB7XG4gICAgICAgIC13ZWJraXQtYm94LXNpemluZzogYm9yZGVyLWJveDsgLyogU2FmYXJpL0Nocm9tZSwgb3RoZXIgV2ViS2l0ICovXG4gICAgICAgIC1tb3otYm94LXNpemluZzogYm9yZGVyLWJveDsgLyogRmlyZWZveCwgb3RoZXIgR2Vja28gKi9cbiAgICAgICAgYm94LXNpemluZzogYm9yZGVyLWJveDtcbiAgICB9XG5cbn1cblxuLnB1bS1jb250YWluZXIge1xuICAgIHRvcDogMTAwcHg7XG4gICAgcG9zaXRpb246IGFic29sdXRlO1xuICAgIG1hcmdpbi1ib3R0b206IDNlbTtcbiAgICB6LWluZGV4OiAxOTk5OTk5OTk5O1xuXG4gICAgJi5wdW0tcmVzcG9uc2l2ZSB7XG5cbiAgICAgICAgbGVmdDogNTAlO1xuICAgICAgICBtYXJnaW4tbGVmdDogLTQ3LjUlO1xuICAgICAgICB3aWR0aDogOTUlO1xuICAgICAgICBoZWlnaHQ6IGF1dG87XG4gICAgICAgIG92ZXJmbG93OiB2aXNpYmxlO1xuXG4gICAgICAgIC8vIEFkZCBSZXNwb25zaXZlIEltYWdlIEhhbmRsaW5nLlxuICAgICAgICBpbWcge1xuICAgICAgICAgICAgbWF4LXdpZHRoOiAxMDAlO1xuICAgICAgICAgICAgaGVpZ2h0OiBhdXRvO1xuICAgICAgICB9XG5cbiAgICAgICAgQG1lZGlhIG9ubHkgc2NyZWVuIGFuZCAobWluLXdpZHRoOiAxMDI0cHgpIHtcbiAgICAgICAgICAgICYucHVtLXJlc3BvbnNpdmUtbmFubyB7XG4gICAgICAgICAgICAgICAgbWFyZ2luLWxlZnQ6IC01JTtcbiAgICAgICAgICAgICAgICB3aWR0aDogMTAlO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAmLnB1bS1yZXNwb25zaXZlLW1pY3JvIHtcbiAgICAgICAgICAgICAgICBtYXJnaW4tbGVmdDogLTEwJTtcbiAgICAgICAgICAgICAgICB3aWR0aDogMjAlO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAmLnB1bS1yZXNwb25zaXZlLXRpbnkge1xuICAgICAgICAgICAgICAgIG1hcmdpbi1sZWZ0OiAtMTUlO1xuICAgICAgICAgICAgICAgIHdpZHRoOiAzMCU7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICYucHVtLXJlc3BvbnNpdmUtc21hbGwge1xuICAgICAgICAgICAgICAgIG1hcmdpbi1sZWZ0OiAtMjAlO1xuICAgICAgICAgICAgICAgIHdpZHRoOiA0MCU7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICYucHVtLXJlc3BvbnNpdmUtbWVkaXVtIHtcbiAgICAgICAgICAgICAgICBtYXJnaW4tbGVmdDogLTMwJTtcbiAgICAgICAgICAgICAgICB3aWR0aDogNjAlO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAmLnB1bS1yZXNwb25zaXZlLW5vcm1hbCB7XG4gICAgICAgICAgICAgICAgbWFyZ2luLWxlZnQ6IC0zMCU7XG4gICAgICAgICAgICAgICAgd2lkdGg6IDcwJTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgJi5wdW0tcmVzcG9uc2l2ZS1sYXJnZSB7XG4gICAgICAgICAgICAgICAgbWFyZ2luLWxlZnQ6IC0zNSU7XG4gICAgICAgICAgICAgICAgd2lkdGg6IDgwJTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgJi5wdW0tcmVzcG9uc2l2ZS14bGFyZ2Uge1xuICAgICAgICAgICAgICAgIG1hcmdpbi1sZWZ0OiAtNDcuNSU7XG4gICAgICAgICAgICAgICAgd2lkdGg6IDk1JTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgJi5wdW0tcG9zaXRpb24tZml4ZWQge1xuICAgICAgICAgICAgICAgIHBvc2l0aW9uOiBmaXhlZDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIEBtZWRpYSBvbmx5IHNjcmVlbiBhbmQgKG1heC13aWR0aDogMTAyNHB4KSB7XG4gICAgICAgICAgICAmLnB1bS1wb3NpdGlvbi1maXhlZCB7XG4gICAgICAgICAgICAgICAgcG9zaXRpb246IGFic29sdXRlO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICB9XG5cbiAgICAmLmN1c3RvbS1wb3NpdGlvbiB7XG4gICAgICAgIGxlZnQ6IGF1dG87XG4gICAgICAgIHRvcDogYXV0bztcbiAgICAgICAgbWFyZ2luLWxlZnQ6IGluaGVyaXQ7XG4gICAgfVxuXG4gICAgLnB1bS10aXRsZSB7XG4gICAgfVxuXG4gICAgLnB1bS1jb250ZW50IHtcblxuICAgICAgICA+IDpsYXN0LWNoaWxkIHtcbiAgICAgICAgICAgIG1hcmdpbi1ib3R0b206IDA7XG4gICAgICAgIH1cblxuICAgICAgICArIC5wdW0tY2xvc2Uge1xuICAgICAgICAgICAgdGV4dC1kZWNvcmF0aW9uOiBub25lO1xuICAgICAgICAgICAgdGV4dC1hbGlnbjogY2VudGVyO1xuICAgICAgICAgICAgbGluZS1oZWlnaHQ6IDE7XG4gICAgICAgICAgICBwb3NpdGlvbjogYWJzb2x1dGU7XG4gICAgICAgICAgICBjdXJzb3I6IHBvaW50ZXI7XG4gICAgICAgICAgICBtaW4td2lkdGg6IDFlbTtcbiAgICAgICAgICAgIHotaW5kZXg6IDI7XG4gICAgICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiB0cmFuc3BhcmVudDtcblxuICAgICAgICAgICAgPiBzcGFuIHtcbiAgICAgICAgICAgICAgICBwb3NpdGlvbjogcmVsYXRpdmU7XG4gICAgICAgICAgICAgICAgei1pbmRleDogMTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgICYucHVtLXNjcm9sbGFibGUge1xuXG4gICAgICAgIC5wdW0tY29udGVudCB7XG5cbiAgICAgICAgICAgIG92ZXJmbG93OiBhdXRvO1xuICAgICAgICAgICAgb3ZlcmZsb3cteTogc2Nyb2xsO1xuICAgICAgICAgICAgbWF4LWhlaWdodDogOTUlO1xuXG4gICAgICAgIH1cblxuICAgIH1cblxufVxuXG4ucHVtLW92ZXJsYXkucHVtLW92ZXJsYXktZGlzYWJsZWQge1xuICAgIHZpc2liaWxpdHk6IGhpZGRlbjtcblxuICAgICY6Oi13ZWJraXQtc2Nyb2xsYmFyIHtcbiAgICAgICAgZGlzcGxheTogYmxvY2s7XG4gICAgfVxuXG4gICAgLnB1bS1jb250YWluZXIge1xuICAgICAgICB2aXNpYmlsaXR5OiB2aXNpYmxlO1xuICAgIH1cbn1cblxuLnB1bS1vdmVybGF5LnB1bS1jbGljay10by1jbG9zZSB7XG4gICAgLyogSGFjayBmb3IgaU9TIGRldmljZXMgc28gdGhleSBwcm9wZXJseSB0cmVhdCBpdCBhcyBhIGNsaWNrYWJsZSBlbGVtZW50ICovXG4gICAgY3Vyc29yOiBwb2ludGVyO1xufVxuXG5odG1sLnB1bS1vcGVuIHtcblxuICAgICYucHVtLW9wZW4tb3ZlcmxheSB7XG4gICAgICAgIG92ZXJmbG93OiBoaWRkZW47XG5cbiAgICAgICAgJi5wdW0tb3Blbi1maXhlZCB7XG5cbiAgICAgICAgICAgIC5wdW0tb3ZlcmxheSB7XG4gICAgICAgICAgICAgICAgb3ZlcmZsb3c6IGhpZGRlbjtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgLnB1bS1jb250YWluZXIge1xuICAgICAgICAgICAgICAgIHBvc2l0aW9uOiBmaXhlZDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgICYucHVtLW9wZW4tc2Nyb2xsYWJsZSB7XG5cbiAgICAgICAgICAgIGJvZHkgPiAqW2FyaWEtaGlkZGVuXSB7XG4gICAgICAgICAgICAgICAgcGFkZGluZy1yaWdodDogMTVweDtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgLnB1bS1vdmVybGF5LnB1bS1hY3RpdmUge1xuICAgICAgICAgICAgICAgIG92ZXJmbG93LXk6IHNjcm9sbDtcbiAgICAgICAgICAgICAgICAtd2Via2l0LW92ZXJmbG93LXNjcm9sbGluZzogdG91Y2g7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgfVxuXG4gICAgfVxuXG4gICAgJi5wdW0tb3Blbi1vdmVybGF5LWRpc2FibGVkIHtcblxuICAgICAgICAmLnB1bS1vcGVuLWZpeGVkIHtcbiAgICAgICAgICAgIC5wdW0tY29udGFpbmVyIHtcbiAgICAgICAgICAgICAgICBwb3NpdGlvbjogZml4ZWQ7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICAmLnB1bS1vcGVuLXNjcm9sbGFibGUge1xuICAgICAgICAgICAgLnB1bS1vdmVybGF5LnB1bS1hY3RpdmUge1xuICAgICAgICAgICAgICAgIHBvc2l0aW9uOiBzdGF0aWM7XG4gICAgICAgICAgICAgICAgaGVpZ2h0OiBhdXRvO1xuICAgICAgICAgICAgICAgIHdpZHRoOiBhdXRvO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICB9XG5cbn1cbiIsIi8qISoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKlxyXG4gKiBD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OiBncmVlbjtcclxufVxyXG5cclxuLnB1bS1mb3JtLS1sb2FkaW5nIHtcclxuICBvcGFjaXR5OiAwLjU7XHJcbn1cclxuXHJcbiIsIi8qISoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKlxyXG4gKiBDb3B5cmlnaHQgKGMpIDIwMTgsIFdQIFBvcHVwIE1ha2VyXHJcbiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovXHJcblxyXG4ucHVtLWFsaWdubWVudC1sZWZ0IHtcclxuICB0ZXh0LWFsaWduOiBsZWZ0O1xyXG59XHJcblxyXG4ucHVtLWFsaWdubWVudC1jZW50ZXIge1xyXG4gIHRleHQtYWxpZ246IGNlbnRlcjtcclxufVxyXG5cclxuLnB1bS1hbGlnbm1lbnQtcmlnaHQge1xyXG4gIHRleHQtYWxpZ246IHJpZ2h0O1xyXG59XHJcblxyXG5cclxuLypcclxuICogRm9ybSBBbGlnbm1lbnRzXHJcbiAqL1xyXG4ucHVtLWZvcm0tLWFsaWdubWVudC1sZWZ0IHtcclxuICB0ZXh0LWFsaWduOiBsZWZ0O1xyXG59XHJcblxyXG4ucHVtLWZvcm0tLWFsaWdubWVudC1jZW50ZXIge1xyXG4gIHRleHQtYWxpZ246IGNlbnRlcjtcclxufVxyXG5cclxuLnB1bS1mb3JtLS1hbGlnbm1lbnQtcmlnaHQge1xyXG4gIHRleHQtYWxpZ246IHJpZ2h0O1xyXG59XHJcbiIsIi8qISoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKlxyXG4gKiBDb3B5cmlnaHQgKGMpIDIwMTgsIFdQIFBvcHVwIE1ha2VyXHJcbiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovXHJcblxyXG4ucHVtLWZvcm0tLWxheW91dC1zdGFuZGFyZCB7XHJcbiAgLnB1bS1mb3JtX19maWVsZCB7XHJcbiAgICA+IGxhYmVsIHtcclxuICAgICAgbWFyZ2luLWJvdHRvbTogLjI1ZW07XHJcbiAgICAgIGRpc3BsYXk6IGJsb2NrO1xyXG4gICAgfVxyXG4gIH1cclxufSIsIi8qISoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKlxyXG4gKiBDb3B5cmlnaHQgKGMpIDIwMTgsIFdQIFBvcHVwIE1ha2VyXHJcbiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovXHJcblxyXG4ucHVtLWZvcm0tLWxheW91dC1pbmxpbmUge1xyXG4gIC5wdW0tZm9ybV9fZmllbGQge1xyXG4gICAgZGlzcGxheTogaW5saW5lLWJsb2NrO1xyXG4gIH1cclxufSIsIi8qISoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKlxyXG4gKiBDb3B5cmlnaHQgKGMpIDIwMTgsIFdQIFBvcHVwIE1ha2VyXHJcbiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovXHJcblxyXG4ucHVtLWZvcm0tLWxheW91dC1ibG9jayB7XHJcbiAgLnB1bS1mb3JtX19maWVsZCxcclxuICBkaXYsIGlucHV0LCBidXR0b24ge1xyXG4gICAgZGlzcGxheTogYmxvY2s7XHJcbiAgICB3aWR0aDogMTAwJTtcclxuICB9XHJcbn0iLCIvKlxyXG4gKiBGb3JtIFN0eWxlc1xyXG4gKi9cclxuLyohKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqXHJcbiAqIENvcHlyaWdodCAoYykgMjAxOCwgV1AgUG9wdXAgTWFrZXJcclxuICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi9cclxuXHJcbi5wdW0tZm9ybS0tc3R5bGUtZGVmYXVsdCB7XHJcbiAgbGFiZWwge1xyXG4gICAgZm9udC1zaXplOiAxNHB4O1xyXG4gICAgZm9udC13ZWlnaHQ6IGJvbGQ7XHJcbiAgfVxyXG5cclxuICBpbnB1dFt0eXBlPXRleHRdLFxyXG4gIGlucHV0W3R5cGU9ZW1haWxdIHtcclxuICAgIGJhY2tncm91bmQtY29sb3I6ICNmOGY3Zjc7XHJcbiAgICBtYXJnaW4tYm90dG9tOiA1cHg7XHJcbiAgICBmb250LXNpemU6IDE0cHg7XHJcbiAgICBwYWRkaW5nOiAxMHB4IDhweDtcclxuICB9XHJcblxyXG4gIGJ1dHRvbiB7XHJcbiAgICBmb250LXNpemU6IDE4cHg7XHJcbiAgICBtYXJnaW46IDEwcHggMCAwO1xyXG4gICAgcGFkZGluZzogMTBweCA1cHg7XHJcbiAgICBjdXJzb3I6IHBvaW50ZXI7XHJcbiAgfVxyXG59IiwiLyohKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqXHJcbiAqIENvcHlyaWdodCAoYykgMjAxOCwgV1AgUG9wdXAgTWFrZXJcclxuICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi9cclxuXHJcbi5wdW0tc3ViLWZvcm0ge1xyXG4gIC5wdW0tc3ViLWZvcm0tbG9hZGluZyB7XHJcbiAgICBvcGFjaXR5OiAwLjU7XH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yXG4gICAgdGV4dC1pbmRlbnQ6IDEwMCU7XHJcbiAgfVxyXG5cclxufVxyXG4iLCIvKiEqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKipcclxuICogQ29weXJpZ2h0IChjKSAyMDE4LCBXUCBQb3B1cCBNYWtlclxyXG4gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqL1xyXG5cclxuLnB1bS1mb3JtX19maWVsZC0tY29uc2VudCB7XHJcbiAgdGV4dC1hbGlnbjogbGVmdDtcclxuXHJcbiAgJi5wdW0tZm9ybV9fZmllbGQtLWNoZWNrYm94IHtcclxuICAgIGxhYmVsIHtcclxuICAgICAgZGlzcGxheTogaW5saW5lLWJsb2NrO1xyXG4gICAgICB2ZXJ0aWNhbC1hbGlnbjogbWlkZGxlO1xyXG5cclxuICAgICAgaW5wdXQge1xyXG4gICAgICAgIGRpc3BsYXk6IGlubGluZS1ibG9jaztcclxuICAgICAgICB3aWR0aDogaW5oZXJpdDtcclxuICAgICAgICBtYXJnaW46IDA7XHJcbiAgICAgICAgdmVydGljYWwtYWxpZ246IG1pZGRsZTtcclxuICAgICAgfVxyXG4gICAgfVxyXG5cclxuICB9XHJcblxyXG4gICYucHVtLWZvcm1fX2ZpZWxkLS1yYWRpbyB7XHJcblxyXG4gICAgLnB1bS1mb3JtX19jb25zZW50LXJhZGlvcyB7XHJcblxyXG4gICAgICAmLnB1bS1mb3JtX19jb25zZW50LXJhZGlvcy0taW5saW5lIHtcclxuICAgICAgICBsYWJlbCB7XHJcbiAgICAgICAgICBkaXNwbGF5OiBpbmxpbmUtYmxvY2s7XHJcbiAgICAgICAgICB2ZXJ0aWNhbC1hbGlnbjogbWlkZGxlO1xyXG5cclxuICAgICAgICAgIGlucHV0IHtcclxuICAgICAgICAgICAgZGlzcGxheTogaW5saW5lLWJsb2NrO1xyXG4gICAgICAgICAgICB3aWR0aDogaW5oZXJpdDtcclxuICAgICAgICAgICAgbWFyZ2luOiAwO1xyXG4gICAgICAgICAgICB2ZXJ0aWNhbC1hbGlnbjogbWlkZGxlO1xyXG4gICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgbGFiZWwgKyBsYWJlbCB7XHJcbiAgICAgICAgICBtYXJnaW4tbGVmdDogMWVtO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgIH1cclxuXHJcbiAgICAgICYucHVtLWZvcm1fX2NvbnNlbnQtcmFkaW9zLS1zdGFja2VkIHtcclxuXHJcbiAgICAgICAgbGFiZWwge1xyXG4gICAgICAgICAgZGlzcGxheTogYmxvY2s7XHJcbiAgICAgICAgICB2ZXJ0aWNhbC1hbGlnbjogbWlkZGxlO1xyXG5cclxuICAgICAgICAgIGlucHV0IHtcclxuICAgICAgICAgICAgZGlzcGxheTogaW5saW5lLWJsb2NrO1xyXG4gICAgICAgICAgICB3aWR0aDogaW5oZXJpdDtcclxuICAgICAgICAgICAgbWFyZ2luOiAwO1xyXG4gICAgICAgICAgICB2ZXJ0aWNhbC1hbGlnbjogbWlkZGxlO1xyXG4gICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgfVxyXG5cclxuICAgIH1cclxuXHJcbiAgfVxyXG59IiwiLyoqIEJhY2t3YXJkIENvbXBhdGliaWxpdHkgKi9cclxuLnBvcG1ha2UtY2xvc2Uge1xyXG4gIGN1cnNvcjogcG9pbnRlcjtcclxufVxyXG5cclxuLyogRm9ybWlkYWJsZSBmb3JtcyBmaXggKi9cclxuLnB1bS1jb250YWluZXIge1xyXG4gIGlmcmFtZS5mb3JtaWRhYmxlIHtcclxuICAgIHdpZHRoOiAxMDAlO1xyXG4gICAgb3ZlcmZsb3c6IHZpc2libGU7XHJcbiAgfVxyXG59XHJcblxyXG4vLyBqUXVlcnkgVUkgRGF0ZXBpY2tlciBzaG93cyB1cCBiZWh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NLEVBQUUsQ0FBQztFQUNULGNBQWMsRUFBRSxNQUFNO0NBQ3ZCOztBVjNDWCwwQ0FBMEM7QVdiMUMsNkJBQTZCO0FBQzdCLEFBQUEsY0FBYyxDQUFDO0VBQ2IsTUFBTSxFQUFFLE9BQU87Q0FDaEI7O0FBRUQsMEJBQTBCO0FBQzFCLEFBQ0UsY0FEWSxDQUNaLE1BQU0sQUFBQSxXQUFXLENBQUM7RUFDaEIsS0FBSyxFQUFFLElBQUk7RUFDWCxRQUFRLEVBQUUsT0FBTztDQUNsQjs7QUFJSCxBQUFBLElBQUksQ0FBQyxHQUFHLEFBQUEsa0JBQWtCLENBQUEsQUFBQSxLQUFDLEFBQUEsRUFBTztFQUNoQyxPQUFPLEVBQUUscUJBQXFCO0NBQy9COztBQUVELHVCQUF1QjtBQUN2QixBQUFBLFlBQVksQ0FBQztFQUNYLE9BQU8sRUFBRSxxQkFBcUI7Q0FDL0IifQ== */
|
550 |
|
551 |
/*# sourceMappingURL=site.css.map */
|
109 |
display: none;
|
110 |
-webkit-transition: all .15s ease-in-out;
|
111 |
transition: all .15s ease-in-out;
|
112 |
+
/**
|
113 |
+
* Use border-box for all popup content. Providing more precise sizing.
|
114 |
*/
|
115 |
}
|
116 |
|
546 |
z-index: 9999999999 !important;
|
547 |
}
|
548 |
|
549 |
+
/*# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2l0ZS5jc3MiLCJzb3VyY2VzIjpbInNpdGUuc2NzcyIsInBhcnRpYWxzL3NpdGUvX2FuaW1hdGlvbnMuc2NzcyIsInBhcnRpYWxzL19wdW1fc3R5bGVzLnNjc3MiLCJwYXJ0aWFscy9zaXRlL2Zvcm0vX2dlbmVyYWwuc2NzcyIsInBhcnRpYWxzL3NpdGUvZm9ybS9fYWxpZ25tZW50cy5zY3NzIiwicGFydGlhbHMvc2l0ZS9mb3JtL2xheW91dC9fc3RhbmRhcmQuc2NzcyIsInBhcnRpYWxzL3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XRpYmlsaXR5JztcclxuIiwiLyohKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqXHJcbiAqIENvcHlyaWdodCAoYykgMjAxOCwgV1AgUG9wdXAgTWFrZXJcclxuICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi9cclxuXHJcbkBrZXlmcmFtZXMgcm90YXRlLWZvcmV2ZXIge1xyXG4gIDAlIHtcclxuICAgIHRyYW5zZm9ybTogcm90YXRlKDBkZWcpO1xyXG4gIH1cclxuICAxMDAlIHtcclxuICAgIHRyYW5zZm9ybTogcm90YXRlKDM2MGRlZyk7XHJcbiAgfVxyXG59XHJcblxyXG5Aa2V5ZnJhbWVzIHNwaW5uZXItbG9hZGVyIHtcclxuICAwJSB7XHJcbiAgICB0cmFuc2Zvcm06IHJvdGF0ZSgwZGVnKTtcclxuICB9XHJcbiAgMTAwJSB7XHJcbiAgICB0cmFuc2Zvcm06IHJvdGF0ZSgzNjBkZWcpO1xyXG4gIH1cclxufVxyXG4iLCIvKiBSZXNldCBPdmVybGF5LCBDb250YWluZXIsIFRpdGxlLCBDb250ZW50KGRpdikgJiBDbG9zZSBidXR0b24gKi9cclxuLnB1bS1vdmVybGF5LFxyXG4ucHVtLWNvbnRhaW5lcixcclxuLnB1bS10aXRsZSxcclxuLnB1bS1jb250ZW50LFxyXG4ucHVtLWNvbnRlbnQgKyAucHVtLWNsb3NlLFxyXG4ucHVtLWNvbnRlbnQgKyAucHVtLWNsb3NlOmhvdmVyLFxyXG4ucHVtLWNvbnRlbnQgKyAucHVtLWNsb3NlOmZvY3VzLFxyXG4ucHVtLWNvbnRlbnQgKyAucHVtLWNsb3NlOmFjdGl2ZSB7XHJcbiAgICBiYWNrZ3JvdW5kOiBub25lO1xyXG4gICAgYm9yZGVyOiBub25lO1xyXG4gICAgYm90dG9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HJcbiAgICBwb3NpdGlvbjogYWJzb2x1dGU7XHJcbiAgICBtYXJnaW4tYm90dG9tOiAzZW07XHJcbiAgICB6LWluZGV4OiAxOTk5OTk5OTk5O1xyXG5cclxuICAgICYucHVtLXJlc3BvbnNpdmUge1xyXG5cclxuICAgICAgICBsZWZ0OiA1MCU7XHJcbiAgICAgICAgbWFyZ2luLWxlZnQ6IC00Ny41JTtcclxuICAgICAgICB3aWR0aDogOTUlO1xyXG4gICAgICAgIGhlaWdodDogYXV0bztcclxuICAgICAgICBvdmVyZmxvdzogdmlzaWJsZTtcclxuXHJcbiAgICAgICAgLy8gQWRkIFJlc3BvbnNpdmUgSW1hZ2UgSGFuZGxpbmcuXHJcbiAgICAgICAgaW1nIHtcclxuICAgICAgICAgICAgbWF4LXdpZHRoOiAxMDAlO1xyXG4gICAgICAgICAgICBoZWlnaHQ6IGF1dG87XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBAbWVkaWEgb25seSBzY3JlZW4gYW5kIChtaW4td2lkdGg6IDEwMjRweCkge1xyXG4gICAgICAgICAgICAmLnB1bS1yZXNwb25zaXZlLW5hbm8ge1xyXG4gICAgICAgICAgICAgICAgbWFyZ2luLWxlZnQ6IC01JTtcclxuICAgICAgICAgICAgICAgIHdpZHRoOiAxMCU7XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICYucHVtLXJlc3BvbnNpdmUtbWljcm8ge1xyXG4gICAgICAgICAgICAgICAgbWFyZ2luLWxlZnQ6IC0xMCU7XHJcbiAgICAgICAgICAgICAgICB3aWR0aDogMjAlO1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAmLnB1bS1yZXNwb25zaXZlLXRpbnkge1xyXG4gICAgICAgICAgICAgICAgbWFyZ2luLWxlZnQ6IC0xNSU7XHJcbiAgICAgICAgICAgICAgICB3aWR0aDogMzAlO1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAmLnB1bS1yZXNwb25zaXZlLXNtYWxsIHtcclxuICAgICAgICAgICAgICAgIG1hcmdpbi1sZWZ0OiAtMjAlO1xyXG4gICAgICAgICAgICAgICAgd2lkdGg6IDQwJTtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgJi5wdW0tcmVzcG9uc2l2ZS1tZWRpdW0ge1xyXG4gICAgICAgICAgICAgICAgbWFyZ2luLWxlZnQ6IC0zMCU7XHJcbiAgICAgICAgICAgICAgICB3aWR0aDogNjAlO1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAmLnB1bS1yZXNwb25zaXZlLW5vcm1hbCB7XHJcbiAgICAgICAgICAgICAgICBtYXJnaW4tbGVmdDogLTMwJTtcclxuICAgICAgICAgICAgICAgIHdpZHRoOiA3MCU7XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICYucHVtLXJlc3BvbnNpdmUtbGFyZ2Uge1xyXG4gICAgICAgICAgICAgICAgbWFyZ2luLWxlZnQ6IC0zNSU7XHJcbiAgICAgICAgICAgICAgICB3aWR0aDogODAlO1xyXG4gICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAmLnB1bS1yZXNwb25zaXZlLXhsYXJnZSB7XHJcbiAgICAgICAgICAgICAgICBtYXJnaW4tbGVmdDogLTQ3LjUlO1xyXG4gICAgICAgICAgICAgICAgd2lkdGg6IDk1JTtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgJi5wdW0tcG9zaXRpb24tZml4ZWQge1xyXG4gICAgICAgICAgICAgICAgcG9zaXRpb246IGZpeGVkO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBAbWVkaWEgb25seSBzY3JlZW4gYW5kIChtYXgtd2lkdGg6IDEwMjRweCkge1xyXG4gICAgICAgICAgICAmLnB1bS1wb3NpdGlvbi1maXhlZCB7XHJcbiAgICAgICAgICAgICAgICBwb3NpdGlvbjogYWJzb2x1dGU7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcblxyXG4gICAgfVxyXG5cclxuICAgICYuY3VzdG9tLXBvc2l0aW9uIHtcclxuICAgICAgICBsZWZ0OiBhdXRvO1xyXG4gICAgICAgIHRvcDogYXV0bztcclxuICAgICAgICBtYXJnaW4tbGVmdDogaW5oZXJpdDtcclxuICAgIH1cclxuXHJcbiAgICAucHVtLXRpdGxlIHtcclxuICAgIH1cclxuXHJcbiAgICAucHVtLWNvbnRlbnQge1xyXG5cclxuICAgICAgICA+IDpsYXN0LWNoaWxkIHtcclxuICAgICAgICAgICAgbWFyZ2luLWJvdHRvbTogMDtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgICsgLnB1bS1jbG9zZSB7XHJcbiAgICAgICAgICAgIHRleHQtZGVjb3JhdGlvbjogbm9uZTtcclxuICAgICAgICAgICAgdGV4dC1hbGlnbjogY2VudGVyO1xyXG4gICAgICAgICAgICBsaW5lLWhlaWdodDogMTtcclxuICAgICAgICAgICAgcG9zaXRpb246IGFic29sdXRlO1xyXG4gICAgICAgICAgICBjdXJzb3I6IHBvaW50ZXI7XHJcbiAgICAgICAgICAgIG1pbi13aWR0aDogMWVtO1xyXG4gICAgICAgICAgICB6LWluZGV4OiAyO1xyXG4gICAgICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiB0cmFuc3BhcmVudDtcclxuXHJcbiAgICAgICAgICAgID4gc3BhbiB7XHJcbiAgICAgICAgICAgICAgICBwb3NpdGlvbjogcmVsYXRpdmU7XHJcbiAgICAgICAgICAgICAgICB6LWluZGV4OiAxO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgICYucHVtLXNjcm9sbGFibGUge1xyXG5cclxuICAgICAgICAucHVtLWNvbnRlbnQge1xyXG5cclxuICAgICAgICAgICAgb3ZlcmZsb3c6IGF1dG87XHJcbiAgICAgICAgICAgIG92ZXJmbG93LXk6IHNjcm9sbDtcclxuICAgICAgICAgICAgbWF4LWhlaWdodDogOTUlO1xyXG5cclxuICAgICAgICB9XHJcblxyXG4gICAgfVxyXG5cclxufVxyXG5cclxuLnB1bS1vdmVybGF5LnB1bS1vdmVybGF5LWRpc2FibGVkIHtcclxuICAgIHZpc2liaWxpdHk6IGhpZGRlbjtcclxuXHJcbiAgICAmOjotd2Via2l0LXNjcm9sbGJhciB7XHJcbiAgICAgICAgZGlzcGxheTogYmxvY2s7XHJcbiAgICB9XHJcblxyXG4gICAgLnB1bS1jb250YWluZXIge1xyXG4gICAgICAgIHZpc2liaWxpdHk6IHZpc2libGU7XHJcbiAgICB9XHJcbn1cclxuXHJcbi5wdW0tb3ZlcmxheS5wdW0tY2xpY2stdG8tY2xvc2Uge1xyXG4gICAgLyogSGFjayBmb3IgaU9TIGRldmljZXMgc28gdGhleSBwcm9wZXJseSB0cmVhdCBpdCBhcyBhIGNsaWNrYWJsZSBlbGVtZW50ICovXHJcbiAgICBjdXJzb3I6IHBvaW50ZXI7XHJcbn1cclxuXHJcbmh0bWwucHVtLW9wZW4ge1xyXG5cclxuICAgICYucHVtLW9wZW4tb3ZlcmxheSB7XHJcbiAgICAgICAgb3ZlcmZsb3c6IGhpZGRlbjtcclxuXHJcbiAgICAgICAgJi5wdW0tb3Blbi1maXhlZCB7XHJcblxyXG4gICAgICAgICAgICAucHVtLW92ZXJsYXkge1xyXG4gICAgICAgICAgICAgICAgb3ZlcmZsb3c6IGhpZGRlbjtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgLnB1bS1jb250YWluZXIge1xyXG4gICAgICAgICAgICAgICAgcG9zaXRpb246IGZpeGVkO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAmLnB1bS1vcGVuLXNjcm9sbGFibGUge1xyXG5cclxuICAgICAgICAgICAgYm9keSA+ICpbYXJpYS1oaWRkZW5dIHtcclxuICAgICAgICAgICAgICAgIHBhZGRpbmctcmlnaHQ6IDE1cHg7XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIC5wdW0tb3ZlcmxheS5wdW0tYWN0aXZlIHtcclxuICAgICAgICAgICAgICAgIG92ZXJmbG93LXk6IHNjcm9sbDtcclxuICAgICAgICAgICAgICAgIC13ZWJraXQtb3ZlcmZsb3ctc2Nyb2xsaW5nOiB0b3VjaDtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICB9XHJcblxyXG4gICAgfVxyXG5cclxuICAgICYucHVtLW9wZW4tb3ZlcmxheS1kaXNhYmxlZCB7XHJcblxyXG4gICAgICAgICYucHVtLW9wZW4tZml4ZWQge1xyXG4gICAgICAgICAgICAucHVtLWNvbnRhaW5lciB7XHJcbiAgICAgICAgICAgICAgICBwb3NpdGlvbjogZml4ZWQ7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcblxyXG4gICAgICAgICYucHVtLW9wZW4tc2Nyb2xsYWJsZSB7XHJcbiAgICAgICAgICAgIC5wdW0tb3ZlcmxheS5wdW0tYWN0aXZlIHtcclxuICAgICAgICAgICAgICAgIHBvc2l0aW9uOiBzdGF0aWM7XHJcbiAgICAgICAgICAgICAgICBoZWlnaHQ6IGF1dG87XHJcbiAgICAgICAgICAgICAgICB3aWR0aDogYXV0bztcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuXHJcbiAgICB9XHJcblxyXG59XHJcbiIsIi8qISoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKlxyXG4gKiBDb3B5cmlnaHQgKGMpIDIwMTgsIFdQIFBvcHVwIE1ha2VyXHJcbiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovXHJcblxyXG4ucHVtLWZvcm0ge1xyXG4gIG1hcmdpbjogMCBhdXRvIDE2cHg7XHJcbn1cclxuXHJc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IDIwMTgsIFdQIFBvcHVwIE1ha2VyXHJcbiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovXHJcblxyXG4ucHVtLWFsaWdubWVudC1sZWZ0IHtcclxuICB0ZXh0LWFsaWduOiBsZWZ0O1xyXG59XHJcblxyXG4ucHVtLWFsaWdubWVudC1jZW50ZXIge1xyXG4gIHRleHQtYWxpZ246IGNlbnRlcjtcclxufVxyXG5cclxuLnB1bS1hbGlnbm1lbnQtcmlnaHQge1xyXG4gIHRleHQtYWxpZ246IHJpZ2h0O1xyXG59XHJcblxyXG5cclxuLypcclxuICogRm9ybSBBbGlnbm1lbnRzXHJcbiAqL1xyXG4ucHVtLWZvcm0tLWFsaWdubWVudC1sZWZ0IHtcclxuICB0ZXh0LWFsaWduOiBsZWZ0O1xyXG59XHJcblxyXG4ucHVtLWZvcm0tLWFsaWdubWVudC1jZW50ZXIge1xyXG4gIHRleHQtYWxpZ246IGNlbnRlcjtcclxufVxyXG5cclxuLnB1bS1mb3JtLS1hbGlnbm1lbnQtcmlnaHQge1xyXG4gIHRleHQtYWxpZ246IHJpZ2h0O1xyXG59XHJcbiIsIi8qISoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKlxyXG4gKiBDb3B5cmlnaHQgKGMpIDIwMTgsIFdQIFBvcHVwIE1ha2VyXHJcbiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovXHJcblxyXG4ucHVtLWZvcm0tLWxheW91dC1zdGFuZGFyZCB7XHJcbiAgLnB1bS1mb3JtX19maWVsZCB7XHJcbiAgICA+IGxhYmVsIHtcclxuICAgICAgbWFyZ2luLWJvdHRvbTogLjI1ZW07XHJcbiAgICAgIGRpc3BsYXk6IGJsb2NrO1xyXG4gICAgfVxyXG4gIH1cclxufSIsIi8qISoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKlxyXG4gKiBDb3B5cmlnaHQgKGMpIDIwMTgsIFdQIFBvcHVwIE1ha2VyXHJcbiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovXHJcblxyXG4ucHVtLWZvcm0tLWxheW91dC1pbmxpbmUge1xyXG4gIC5wdW0tZm9ybV9fZmllbGQge1xyXG4gICAgZGlzcGxheTogaW5saW5lLWJsb2NrO1xyXG4gIH1cclxufSIsIi8qISoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKlxyXG4gKiBDb3B5cmlnaHQgKGMpIDIwMTgsIFdQIFBvcHVwIE1ha2VyXHJcbiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovXHJcblxyXG4ucHVtLWZvcm0tLWxheW91dC1ibG9jayB7XHJcbiAgLnB1bS1mb3JtX19maWVsZCxcclxuICBkaXYsIGlucHV0LCBidXR0b24ge1xyXG4gICAgZGlzcGxheTogYmxvY2s7XHJcbiAgICB3aWR0aDogMTAwJTtcclxuICB9XHJcbn0iLCIvKlxyXG4gKiBGb3JtIFN0eWxlc1xyXG4gKi9cclxuLyohKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqXHJcbiAqIENvcHlyaWdodCAoYykgMjAxOCwgV1AgUG9wdXAgTWFrZXJcclxuICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi9cclxuXHJcbi5wdW0tZm9ybS0tc3R5bGUtZGVmYXVsdCB7XHJcbiAgbGFiZWwge1xyXG4gICAgZm9udC1zaXplOiAxNHB4O1xyXG4gICAgZm9udC13ZWlnaHQ6IGJvbGQ7XHJcbiAgfVxyXG5cclxuICBpbnB1dFt0eXBlPXRleHRdLFxyXG4gIGlucHV0W3R5cGU9ZW1haWxdIHtcclxuICAgIGJhY2tncm91bmQtY29sb3I6ICNmOGY3Zjc7XHJcbiAgICBtYXJnaW4tYm90dG9tOiA1cHg7XHJcbiAgICBmb250LXNpemU6IDE0cHg7XHJcbiAgICBwYWRkaW5nOiAxMHB4IDhweDtcclxuICB9XHJcblxyXG4gIGJ1dHRvbiB7XHJcbiAgICBmb250LXNpemU6IDE4cHg7XHJcbiAgICBtYXJnaW46IDEwcHggMCAwO1xyXG4gICAgcGFkZGluZzogMTBweCA1cHg7XHJcbiAgICBjdXJzb3I6IHBvaW50ZXI7XHJcbiAgfVxyXG59IiwiLyohKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqXHJcbiAqIENvcHlyaWdodCAoYykgMjAxOCwgV1AgUG9wdXAgTWFrZXJcclxuICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi9cclxuXHJcbi5wdW0tc3ViLWZvcm0ge1xyXG4gIC5wdW0tc3ViLWZvcm0tbG9hZGluZyB7XHJcbiAgICBvcGFjaXR5OiAwLjU7XHJcbiAgfVxyXG5cclxuICBwLnB1bS1uZXdzbGV0dGVyLWVycm9yLW1zZyB7XHJcbiAgICBtYXJnaW46IDA7XHJcbiAgfVxyXG5cclxuICAuc3Bpbm5lci1sb2FkZXIge1xyXG4gICAgcmlnaHQ6IDUwJTtcclxuICAgIHBvc2l0aW9uOiBhYnNvbHV0ZTtcclxuICAgIGJvdHRvbTogNDAlO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KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqL1xyXG5cclxuLnB1bS1mb3JtX19maWVsZC0tY29uc2VudCB7XHJcbiAgdGV4dC1hbGlnbjogbGVmdDtcclxuXHJcbiAgJi5wdW0tZm9ybV9fZmllbGQtLWNoZWNrYm94IHtcclxuICAgIGxhYmVsIHtcclxuICAgICAgZGlzcGxheTogaW5saW5lLWJsb2NrO1xyXG4gICAgICB2ZXJ0aWNhbC1hbGlnbjogbWlkZGxlO1xyXG5cclxuICAgICAgaW5wdXQge1xyXG4gICAgICAgIGRpc3BsYXk6IGlubGluZS1ibG9jaztcclxuICAgICAgICB3aWR0aDogaW5oZXJpdDtcclxuICAgICAgICBtYXJnaW46IDA7XHJcbiAgICAgICAgdmVydGljYWwtYWxpZ246IG1pZGRsZTtcclxuICAgICAgfVxyXG4gICAgfVxyXG5cclxuICB9XHJcblxyXG4gICYucHVtLWZvcm1fX2ZpZWxkLS1yYWRpbyB7XHJcblxyXG4gICAgLnB1bS1mb3JtX19jb25zZW50LXJhZGlvcyB7XHJcblxyXG4gICAgICAmLnB1bS1mb3JtX19jb25zZW50LXJhZGlvcy0taW5saW5lIHtcclxuICAgICAgICBsYWJlbCB7XHJcbiAgICAgICAgICBkaXNwbGF5OiBpbmxpbmUtYmxvY2s7XHJcbiAgICAgICAgICB2ZXJ0aWNhbC1hbGlnbjogbWlkZGxlO1xyXG5cclxuICAgICAgICAgIGlucHV0IHtcclxuICAgICAgICAgICAgZGlzcGxheTogaW5saW5lLWJsb2NrO1xyXG4gICAgICAgICAgICB3aWR0aDogaW5oZXJpdDtcclxuICAgICAgICAgICAgbWFyZ2luOiAwO1xyXG4gICAgICAgICAgICB2ZXJ0aWNhbC1hbGlnbjogbWlkZGxlO1xyXG4gICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgbGFiZWwgKyBsYWJlbCB7XHJcbiAgICAg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sQUFBQSxXQUFXLENBQUM7RUFDaEIsS0FBSyxFQUFFLElBQUk7RUFDWCxRQUFRLEVBQUUsT0FBTztDQUNsQjs7QUFJSCxBQUFBLElBQUksQ0FBQyxHQUFHLEFBQUEsa0JBQWtCLENBQUEsQUFBQSxLQUFDLEFBQUEsRUFBTztFQUNoQyxPQUFPLEVBQUUscUJBQXFCO0NBQy9COztBQUVELHVCQUF1QjtBQUN2QixBQUFBLFlBQVksQ0FBQztFQUNYLE9BQU8sRUFBRSxxQkFBcUI7Q0FDL0IifQ== */
|
550 |
|
551 |
/*# sourceMappingURL=site.css.map */
|
assets/css/site.css.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"sources":["site.scss","site.css","partials/site/_animations.scss","partials/_pum_styles.scss","partials/site/form/_general.scss"],"names":[],"mappings":"AAAA,eAAA;AAAA;;+ECG+E;ACC/E;EACE;IACE,+BAAuB;YAAvB,uBAAuB;EDCzB;ECCA;IACE,iCAAyB;YAAzB,yBAAyB;EDC3B;AACF;ACPA;EACE;IACE,+BAAuB;YAAvB,uBAAuB;EDCzB;ECCA;IACE,iCAAyB;YAAzB,yBAAyB;EDC3B;AACF;;ACEA;EACE;IACE,+BAAuB;YAAvB,uBAAuB;EDCzB;ECCA;IACE,iCAAyB;YAAzB,yBAAyB;EDC3B;AACF;;ACPA;EACE;IACE,+BAAuB;YAAvB,uBAAuB;EDCzB;ECCA;IACE,iCAAyB;YAAzB,yBAAyB;EDC3B;AACF;;AAlBA,sBAAA;ADFA,iEAAA;AEAA;;;;;;;;EASI,gBAAW;EDCX,YAAY;EACZ,YAAY;EACZ,WAAW;ECCf,eAAA;EACI,6DAAA;EACA,kBAAA;EDCA,WAAW;ECCb,oBAAI;EACF,iBAAW;EDCX,kBAAkB;EAClB,mBAAmB;EACnB,YAAY;EDnBhB,UAAA;EGFA,sBAAA;EACA,mBAAY;EACZ,gBAAc;EACd,eAAU;EACV,aAAY;EACZ,YAAe;EACf,iBAAe;EACf,gBAA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A+B;AFid/B;;ACndA;ECKc,qBAAM;EACR,cAAI;EACJ,SAAI;EACL,sBAAI;AFkdf;;AC1dA;ECaI,gBAAoB;AFidxB;;AC9dA;ECqBI,cAAgB;EAChB,sBAAe;AF6cnB;;ACneA;ECyBc,qBAAO;EACP,cAAM;EACT,SAAI;EACD,sBAAM;AF8cpB;;ACjeA,yCAAA;AFbA,4BAAA;AEAA;EDEE,eAAe;AAkfjB;;AA/eA,yBAAA;AACA;ECEE,WAAI;EACF,iBAAW;ADiff;;AA5eA;EACE,8BCAyB;AD+e3B;;AA5eA,sBAAA;AACA;EACE,8BAA8B;AA+ehC;;AAEA,y79BAAy79B","file":"site.css","sourcesContent":["/* Animations */\r\n@import 'partials/site/animations';\r\n/* Popup Core Styles */\r\n@import 'partials/pum_styles';\r\n/* PM Forms */\r\n@import 'partials/site/form/general';\r\n@import 'partials/site/form/alignments';\r\n@import 'partials/site/form/layout/standard';\r\n@import 'partials/site/form/layout/inline';\r\n@import 'partials/site/form/layout/block';\r\n@import 'partials/site/form/style/default';\r\n@import 'partials/site/form/sub_form';\r\n@import 'partials/site/form/privacy';\r\n/* 3rd Party Plugin Compatibility Fixes */\r\n@import 'partials/compatibility';\r\n","/* Animations */\r\n@import 'partials/site/animations';\r\n/* Popup Core Styles */\r\n@import 'partials/pum_styles';\r\n/* PM Forms */\r\n@import 'partials/site/form/general';\r\n@import 'partials/site/form/alignments';\r\n@import 'partials/site/form/layout/standard';\r\n@import 'partials/site/form/layout/inline';\r\n@import 'partials/site/form/layout/block';\r\n@import 'partials/site/form/style/default';\r\n@import 'partials/site/form/sub_form';\r\n@import 'partials/site/form/privacy';\r\n/* 3rd Party Plugin Compatibility Fixes */\r\n@import 'partials/compatibility';\r\n","/*!******************************************************************************\r\n * Copyright (c) 2018, WP Popup Maker\r\n ******************************************************************************/\r\n\r\n@keyframes rotate-forever {\r\n 0% {\r\n transform: rotate(0deg);\r\n }\r\n 100% {\r\n transform: rotate(360deg);\r\n }\r\n}\r\n\r\n@keyframes spinner-loader {\r\n 0% {\r\n transform: rotate(0deg);\r\n }\r\n 100% {\r\n transform: rotate(360deg);\r\n }\r\n}\r\n","/* Reset Overlay, Container, Title, Content(div) & Close button */\n.pum-overlay,\n.pum-container,\n.pum-title,\n.pum-content,\n.pum-content + .pum-close,\n.pum-content + .pum-close:hover,\n.pum-content + .pum-close:focus,\n.pum-content + .pum-close:active {\n background: none;\n border: none;\n bottom: auto;\n clear: none;\n cursor: default;\n /* didn't really know what the default for display should be*/\n /*display:inline;*/\n float: none;\n font-family: inherit;\n font-size: medium;\n font-style: normal;\n font-weight: normal;\n height: auto;\n left: auto;\n letter-spacing: normal;\n line-height: normal;\n max-height: none;\n max-width: none;\n min-height: 0;\n min-width: 0;\n overflow: visible;\n position: static;\n right: auto;\n text-align: left;\n text-decoration: none;\n text-indent: 0;\n text-transform: none;\n top: auto;\n visibility: visible;\n white-space: normal;\n width: auto;\n z-index: auto;\n}\n\n.pum-title,\n.pum-content {\n position: relative;\n z-index: 1;\n}\n\n.pum-overlay {\n position: fixed;\n height: 100%;\n width: 100%;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 1999999999;\n overflow: auto;\n overflow: initial;\n display: none;\n transition: all .15s ease-in-out;\n\n &.pum-preview,\n &.pum-form-submission-detected {\n display: block;\n }\n\n /**\n * Use border-box for all popup content. Providing more precise sizing.\n */\n &, &:before, &:after,\n & *, & *:before, & *:after {\n -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */\n -moz-box-sizing: border-box; /* Firefox, other Gecko */\n box-sizing: border-box;\n }\n\n}\n\n.pum-container {\n top: 100px;\n position: absolute;\n margin-bottom: 3em;\n z-index: 1999999999;\n\n &.pum-responsive {\n\n left: 50%;\n margin-left: -47.5%;\n width: 95%;\n height: auto;\n overflow: visible;\n\n // Add Responsive Image Handling.\n img {\n max-width: 100%;\n height: auto;\n }\n\n @media only screen and (min-width: 1024px) {\n &.pum-responsive-nano {\n margin-left: -5%;\n width: 10%;\n }\n\n &.pum-responsive-micro {\n margin-left: -10%;\n width: 20%;\n }\n\n &.pum-responsive-tiny {\n margin-left: -15%;\n width: 30%;\n }\n\n &.pum-responsive-small {\n margin-left: -20%;\n width: 40%;\n }\n\n &.pum-responsive-medium {\n margin-left: -30%;\n width: 60%;\n }\n\n &.pum-responsive-normal {\n margin-left: -30%;\n width: 70%;\n }\n\n &.pum-responsive-large {\n margin-left: -35%;\n width: 80%;\n }\n\n &.pum-responsive-xlarge {\n margin-left: -47.5%;\n width: 95%;\n }\n\n &.pum-position-fixed {\n position: fixed;\n }\n }\n\n @media only screen and (max-width: 1024px) {\n &.pum-position-fixed {\n position: absolute;\n }\n }\n\n }\n\n &.custom-position {\n left: auto;\n top: auto;\n margin-left: inherit;\n }\n\n .pum-title {\n }\n\n .pum-content {\n\n > :last-child {\n margin-bottom: 0;\n }\n\n + .pum-close {\n text-decoration: none;\n text-align: center;\n line-height: 1;\n position: absolute;\n cursor: pointer;\n min-width: 1em;\n z-index: 2;\n background-color: transparent;\n\n > span {\n position: relative;\n z-index: 1;\n }\n }\n }\n\n &.pum-scrollable {\n\n .pum-content {\n\n overflow: auto;\n overflow-y: scroll;\n max-height: 95%;\n\n }\n\n }\n\n}\n\n.pum-overlay.pum-overlay-disabled {\n visibility: hidden;\n\n &::-webkit-scrollbar {\n display: block;\n }\n\n .pum-container {\n visibility: visible;\n }\n}\n\n.pum-overlay.pum-click-to-close {\n /* Hack for iOS devices so they properly treat it as a clickable element */\n cursor: pointer;\n}\n\nhtml.pum-open {\n\n &.pum-open-overlay {\n overflow: hidden;\n\n &.pum-open-fixed {\n\n .pum-overlay {\n overflow: hidden;\n }\n\n .pum-container {\n position: fixed;\n }\n }\n\n &.pum-open-scrollable {\n\n body > *[aria-hidden] {\n padding-right: 15px;\n }\n\n .pum-overlay.pum-active {\n overflow-y: scroll;\n -webkit-overflow-scrolling: touch;\n }\n\n }\n\n }\n\n &.pum-open-overlay-disabled {\n\n &.pum-open-fixed {\n .pum-container {\n position: fixed;\n }\n }\n\n &.pum-open-scrollable {\n .pum-overlay.pum-active {\n position: static;\n height: auto;\n width: auto;\n }\n }\n\n }\n\n}\n","/*!******************************************************************************\r\n * Copyright (c) 2018, WP Popup Maker\r\n ******************************************************************************/\r\n\r\n.pum-form {\r\n margin: 0 auto 16px;\r\n}\r\n\r\n.pum-form--loading {\r\n opacity: 0.5;\r\n}\r\n\r\n.pum-form__field {\r\n margin-bottom: 1em;\r\n\r\n label {\r\n font-weight: bold;\r\n }\r\n\r\n select,\r\n input[type=\"date\"] {\r\n margin: 0 auto;\r\n font-size: 18px;\r\n line-height: 26px;\r\n text-align: center;\r\n padding: 3px;\r\n vertical-align: middle;\r\n }\r\n\r\n select {\r\n padding: 5px 3px;\r\n }\r\n}\r\n\r\n.pum-form__loader {\r\n font-size: 2em;\r\n animation-duration: 0.75s;\r\n animation-iteration-count: infinite;\r\n animation-name: rotate-forever;\r\n animation-timing-function: linear;\r\n height: .75em;\r\n width: .75em;\r\n border: 0.25em solid rgba(0, 0, 0, 0.5);\r\n border-right-color: transparent;\r\n border-radius: 50%;\r\n display: inline-block;\r\n}\r\n\r\n.pum-form__submit {\r\n position: relative;\r\n\r\n .pum-form__loader {\r\n margin-left: .5em;\r\n border: 0.25em solid rgba(255, 255, 255, 0.5);\r\n border-right-color: transparent;\r\n }\r\n}\r\n\r\n.pum-form__messages {\r\n display: none;\r\n border: 1px solid rgba(0, 0, 0, 0.25);\r\n margin-bottom: .5em;\r\n padding: 1em;\r\n position: relative;\r\n}\r\n\r\n.pum-form__message {\r\n margin-bottom: .5em;\r\n\r\n &:last-child {\r\n margin-bottom: 0;\r\n }\r\n}\r\n\r\n.pum-form__message--error {\r\n color: red !important;\r\n border-color: red;\r\n}\r\n\r\n.pum-form__message--success {\r\n color: green !important;\r\n border-color: green;\r\n}\r\n\r\n.pum-form--loading {\r\n opacity: 0.5;\r\n}\r\n\r\n"]}
|
1 |
+
{"version":3,"sources":["site.scss","site.css","partials/site/_animations.scss","partials/_pum_styles.scss","partials/site/form/_general.scss"],"names":[],"mappings":"AAAA,eAAA;AAAA;;+ECG+E;ACC/E;EACE;IACE,+BAAuB;YAAvB,uBAAuB;EDCzB;ECCA;IACE,iCAAyB;YAAzB,yBAAyB;EDC3B;AACF;ACPA;EACE;IACE,+BAAuB;YAAvB,uBAAuB;EDCzB;ECCA;IACE,iCAAyB;YAAzB,yBAAyB;EDC3B;AACF;;ACEA;EACE;IACE,+BAAuB;YAAvB,uBAAuB;EDCzB;ECCA;IACE,iCAAyB;YAAzB,yBAAyB;EDC3B;AACF;;ACPA;EACE;IACE,+BAAuB;YAAvB,uBAAuB;EDCzB;ECCA;IACE,iCAAyB;YAAzB,yBAAyB;EDC3B;AACF;;AAlBA,sBAAA;ADFA,iEAAA;AEAA;;;;;;;;EASI,gBAAW;EDCX,YAAY;EACZ,YAAY;EACZ,WAAW;ECCf,eAAA;EACI,6DAAA;EACA,kBAAA;EDCA,WAAW;ECCb,oBAAI;EACF,iBAAW;EDCX,kBAAkB;EAClB,mBAAmB;EACnB,YAAY;EDnBhB,UAAA;EGFA,sBAAA;EACA,mBAAY;EACZ,gBAAc;EACd,eAAU;EACV,aAAY;EACZ,YAAe;EACf,iBAAe;EACf,gBAAe;EACf,WAAe;EACX,gBAAgB;EAChB,qBAAY;EACZ,cAAY;EACZ,oBAAW;EACX,SAAQ;EACR,mBAAA;EACA,mBAAmB;EACnB,WAAW;EACX,aAAa;AF+CjB;;AArBA;;EErBI,kBAAU;EACV,UAAA;AF+CJ;;AArBA;EEtBI,eAAa;EACb,YAAY;EACZ,WAAU;EACV,MAAQ;EACR,OAAO;EACP,QAAU;EACV,SAAA;EACA,mBAAc;EACd,cAAgB;EAChB,iBAAS;EACT,aAAY;EACZ,wCAAmB;EAAnB,gCAAmB;EAOnB;;KF0CC;AACL;;AAvCA;EAgBQ,cAAc;AA2BtB;;AA3CA;;EECI,8BAAe;EAAA,gCAAA;EACH,yBAAA;EACP,sBAAM;AFiDf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n/* Popup Core Styles */\r\n@import 'partials/pum_styles';\r\n/* PM Forms */\r\n@import 'partials/site/form/general';\r\n@import 'partials/site/form/alignments';\r\n@import 'partials/site/form/layout/standard';\r\n@import 'partials/site/form/layout/inline';\r\n@import 'partials/site/form/layout/block';\r\n@import 'partials/site/form/style/default';\r\n@import 'partials/site/form/sub_form';\r\n@import 'partials/site/form/privacy';\r\n/* 3rd Party Plugin Compatibility Fixes */\r\n@import 'partials/compatibility';\r\n","/* Animations */\r\n@import 'partials/site/animations';\r\n/* Popup Core Styles */\r\n@import 'partials/pum_styles';\r\n/* PM Forms */\r\n@import 'partials/site/form/general';\r\n@import 'partials/site/form/alignments';\r\n@import 'partials/site/form/layout/standard';\r\n@import 'partials/site/form/layout/inline';\r\n@import 'partials/site/form/layout/block';\r\n@import 'partials/site/form/style/default';\r\n@import 'partials/site/form/sub_form';\r\n@import 'partials/site/form/privacy';\r\n/* 3rd Party Plugin Compatibility Fixes */\r\n@import 'partials/compatibility';\r\n","/*!******************************************************************************\r\n * Copyright (c) 2018, WP Popup Maker\r\n ******************************************************************************/\r\n\r\n@keyframes rotate-forever {\r\n 0% {\r\n transform: rotate(0deg);\r\n }\r\n 100% {\r\n transform: rotate(360deg);\r\n }\r\n}\r\n\r\n@keyframes spinner-loader {\r\n 0% {\r\n transform: rotate(0deg);\r\n }\r\n 100% {\r\n transform: rotate(360deg);\r\n }\r\n}\r\n","/* Reset Overlay, Container, Title, Content(div) & Close button */\r\n.pum-overlay,\r\n.pum-container,\r\n.pum-title,\r\n.pum-content,\r\n.pum-content + .pum-close,\r\n.pum-content + .pum-close:hover,\r\n.pum-content + .pum-close:focus,\r\n.pum-content + .pum-close:active {\r\n background: none;\r\n border: none;\r\n bottom: auto;\r\n clear: none;\r\n cursor: default;\r\n /* didn't really know what the default for display should be*/\r\n /*display:inline;*/\r\n float: none;\r\n font-family: inherit;\r\n font-size: medium;\r\n font-style: normal;\r\n font-weight: normal;\r\n height: auto;\r\n left: auto;\r\n letter-spacing: normal;\r\n line-height: normal;\r\n max-height: none;\r\n max-width: none;\r\n min-height: 0;\r\n min-width: 0;\r\n overflow: visible;\r\n position: static;\r\n right: auto;\r\n text-align: left;\r\n text-decoration: none;\r\n text-indent: 0;\r\n text-transform: none;\r\n top: auto;\r\n visibility: visible;\r\n white-space: normal;\r\n width: auto;\r\n z-index: auto;\r\n}\r\n\r\n.pum-title,\r\n.pum-content {\r\n position: relative;\r\n z-index: 1;\r\n}\r\n\r\n.pum-overlay {\r\n position: fixed;\r\n height: 100%;\r\n width: 100%;\r\n top: 0;\r\n left: 0;\r\n right: 0;\r\n bottom: 0;\r\n z-index: 1999999999;\r\n overflow: auto;\r\n overflow: initial;\r\n display: none;\r\n transition: all .15s ease-in-out;\r\n\r\n &.pum-preview,\r\n &.pum-form-submission-detected {\r\n display: block;\r\n }\r\n\r\n /**\r\n * Use border-box for all popup content. Providing more precise sizing.\r\n */\r\n &, &:before, &:after,\r\n & *, & *:before, & *:after {\r\n -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */\r\n -moz-box-sizing: border-box; /* Firefox, other Gecko */\r\n box-sizing: border-box;\r\n }\r\n\r\n}\r\n\r\n.pum-container {\r\n top: 100px;\r\n position: absolute;\r\n margin-bottom: 3em;\r\n z-index: 1999999999;\r\n\r\n &.pum-responsive {\r\n\r\n left: 50%;\r\n margin-left: -47.5%;\r\n width: 95%;\r\n height: auto;\r\n overflow: visible;\r\n\r\n // Add Responsive Image Handling.\r\n img {\r\n max-width: 100%;\r\n height: auto;\r\n }\r\n\r\n @media only screen and (min-width: 1024px) {\r\n &.pum-responsive-nano {\r\n margin-left: -5%;\r\n width: 10%;\r\n }\r\n\r\n &.pum-responsive-micro {\r\n margin-left: -10%;\r\n width: 20%;\r\n }\r\n\r\n &.pum-responsive-tiny {\r\n margin-left: -15%;\r\n width: 30%;\r\n }\r\n\r\n &.pum-responsive-small {\r\n margin-left: -20%;\r\n width: 40%;\r\n }\r\n\r\n &.pum-responsive-medium {\r\n margin-left: -30%;\r\n width: 60%;\r\n }\r\n\r\n &.pum-responsive-normal {\r\n margin-left: -30%;\r\n width: 70%;\r\n }\r\n\r\n &.pum-responsive-large {\r\n margin-left: -35%;\r\n width: 80%;\r\n }\r\n\r\n &.pum-responsive-xlarge {\r\n margin-left: -47.5%;\r\n width: 95%;\r\n }\r\n\r\n &.pum-position-fixed {\r\n position: fixed;\r\n }\r\n }\r\n\r\n @media only screen and (max-width: 1024px) {\r\n &.pum-position-fixed {\r\n position: absolute;\r\n }\r\n }\r\n\r\n }\r\n\r\n &.custom-position {\r\n left: auto;\r\n top: auto;\r\n margin-left: inherit;\r\n }\r\n\r\n .pum-title {\r\n }\r\n\r\n .pum-content {\r\n\r\n > :last-child {\r\n margin-bottom: 0;\r\n }\r\n\r\n + .pum-close {\r\n text-decoration: none;\r\n text-align: center;\r\n line-height: 1;\r\n position: absolute;\r\n cursor: pointer;\r\n min-width: 1em;\r\n z-index: 2;\r\n background-color: transparent;\r\n\r\n > span {\r\n position: relative;\r\n z-index: 1;\r\n }\r\n }\r\n }\r\n\r\n &.pum-scrollable {\r\n\r\n .pum-content {\r\n\r\n overflow: auto;\r\n overflow-y: scroll;\r\n max-height: 95%;\r\n\r\n }\r\n\r\n }\r\n\r\n}\r\n\r\n.pum-overlay.pum-overlay-disabled {\r\n visibility: hidden;\r\n\r\n &::-webkit-scrollbar {\r\n display: block;\r\n }\r\n\r\n .pum-container {\r\n visibility: visible;\r\n }\r\n}\r\n\r\n.pum-overlay.pum-click-to-close {\r\n /* Hack for iOS devices so they properly treat it as a clickable element */\r\n cursor: pointer;\r\n}\r\n\r\nhtml.pum-open {\r\n\r\n &.pum-open-overlay {\r\n overflow: hidden;\r\n\r\n &.pum-open-fixed {\r\n\r\n .pum-overlay {\r\n overflow: hidden;\r\n }\r\n\r\n .pum-container {\r\n position: fixed;\r\n }\r\n }\r\n\r\n &.pum-open-scrollable {\r\n\r\n body > *[aria-hidden] {\r\n padding-right: 15px;\r\n }\r\n\r\n .pum-overlay.pum-active {\r\n overflow-y: scroll;\r\n -webkit-overflow-scrolling: touch;\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n &.pum-open-overlay-disabled {\r\n\r\n &.pum-open-fixed {\r\n .pum-container {\r\n position: fixed;\r\n }\r\n }\r\n\r\n &.pum-open-scrollable {\r\n .pum-overlay.pum-active {\r\n position: static;\r\n height: auto;\r\n width: auto;\r\n }\r\n }\r\n\r\n }\r\n\r\n}\r\n","/*!******************************************************************************\r\n * Copyright (c) 2018, WP Popup Maker\r\n ******************************************************************************/\r\n\r\n.pum-form {\r\n margin: 0 auto 16px;\r\n}\r\n\r\n.pum-form--loading {\r\n opacity: 0.5;\r\n}\r\n\r\n.pum-form__field {\r\n margin-bottom: 1em;\r\n\r\n label {\r\n font-weight: bold;\r\n }\r\n\r\n select,\r\n input[type=\"date\"] {\r\n margin: 0 auto;\r\n font-size: 18px;\r\n line-height: 26px;\r\n text-align: center;\r\n padding: 3px;\r\n vertical-align: middle;\r\n }\r\n\r\n select {\r\n padding: 5px 3px;\r\n }\r\n}\r\n\r\n.pum-form__loader {\r\n font-size: 2em;\r\n animation-duration: 0.75s;\r\n animation-iteration-count: infinite;\r\n animation-name: rotate-forever;\r\n animation-timing-function: linear;\r\n height: .75em;\r\n width: .75em;\r\n border: 0.25em solid rgba(0, 0, 0, 0.5);\r\n border-right-color: transparent;\r\n border-radius: 50%;\r\n display: inline-block;\r\n}\r\n\r\n.pum-form__submit {\r\n position: relative;\r\n\r\n .pum-form__loader {\r\n margin-left: .5em;\r\n border: 0.25em solid rgba(255, 255, 255, 0.5);\r\n border-right-color: transparent;\r\n }\r\n}\r\n\r\n.pum-form__messages {\r\n display: none;\r\n border: 1px solid rgba(0, 0, 0, 0.25);\r\n margin-bottom: .5em;\r\n padding: 1em;\r\n position: relative;\r\n}\r\n\r\n.pum-form__message {\r\n margin-bottom: .5em;\r\n\r\n &:last-child {\r\n margin-bottom: 0;\r\n }\r\n}\r\n\r\n.pum-form__message--error {\r\n color: red !important;\r\n border-color: red;\r\n}\r\n\r\n.pum-form__message--success {\r\n color: green !important;\r\n border-color: green;\r\n}\r\n\r\n.pum-form--loading {\r\n opacity: 0.5;\r\n}\r\n\r\n"]}
|
assets/js/site.js
CHANGED
@@ -950,173 +950,173 @@ var PUM_Analytics;
|
|
950 |
});
|
951 |
}
|
952 |
}(jQuery));
|
953 |
-
/**
|
954 |
-
* Defines the core $.popmake animations.
|
955 |
-
* Version 1.4
|
956 |
-
*/
|
957 |
-
(function ($, document, undefined) {
|
958 |
-
"use strict";
|
959 |
-
|
960 |
-
$.fn.popmake.methods.animate_overlay = function (style, duration, callback) {
|
961 |
-
// Method calling logic
|
962 |
-
var settings = PUM.getPopup(this).popmake('getSettings');
|
963 |
-
|
964 |
-
if (settings.overlay_disabled) {
|
965 |
-
return $.fn.popmake.overlay_animations.none.apply(this, [duration, callback]);
|
966 |
-
}
|
967 |
-
|
968 |
-
if ($.fn.popmake.overlay_animations[style]) {
|
969 |
-
return $.fn.popmake.overlay_animations[style].apply(this, [duration, callback]);
|
970 |
-
}
|
971 |
-
|
972 |
-
if (window.console) {
|
973 |
-
console.warn('Animation style ' + style + ' does not exist.');
|
974 |
-
}
|
975 |
-
return this;
|
976 |
-
};
|
977 |
-
|
978 |
-
$.fn.popmake.methods.animate = function (style) {
|
979 |
-
// Method calling logic
|
980 |
-
if ($.fn.popmake.animations[style]) {
|
981 |
-
return $.fn.popmake.animations[style].apply(this, Array.prototype.slice.call(arguments, 1));
|
982 |
-
}
|
983 |
-
if (window.console) {
|
984 |
-
console.warn('Animation style ' + style + ' does not exist.');
|
985 |
-
}
|
986 |
-
return this;
|
987 |
-
};
|
988 |
-
|
989 |
-
$.fn.popmake.animations = {
|
990 |
-
none: function (callback) {
|
991 |
-
var $popup = PUM.getPopup(this);
|
992 |
-
|
993 |
-
// Ensure the container is visible immediately.
|
994 |
-
$popup.popmake('getContainer').css({opacity: 1, display: "block"}),
|
995 |
-
|
996 |
-
$popup.popmake('animate_overlay', 'none', 0, function () {
|
997 |
-
// Fire user passed callback.
|
998 |
-
if (callback !== undefined) {
|
999 |
-
callback();
|
1000 |
-
// TODO Test this new method. Then remove the above.
|
1001 |
-
//callback.apply(this);
|
1002 |
-
}
|
1003 |
-
});
|
1004 |
-
return this;
|
1005 |
-
},
|
1006 |
-
slide: function (callback) {
|
1007 |
-
var $popup = PUM.getPopup(this),
|
1008 |
-
$container = $popup.popmake('getContainer'),
|
1009 |
-
settings = $popup.popmake('getSettings'),
|
1010 |
-
speed = settings.animation_speed / 2,
|
1011 |
-
start = $popup.popmake('animation_origin', settings.animation_origin);
|
1012 |
-
|
1013 |
-
// Make the overlay and container visible so they can be positioned & sized prior to display.
|
1014 |
-
$popup.css({display: "block"});
|
1015 |
-
// Position the opaque container offscreen then update its opacity.
|
1016 |
-
$container.css({display: "block"})
|
1017 |
-
.position(start)
|
1018 |
-
.css({opacity: 1});
|
1019 |
-
|
1020 |
-
$popup
|
1021 |
-
.popmake('animate_overlay', 'fade', speed, function () {
|
1022 |
-
$container.popmake('reposition', function (position) {
|
1023 |
-
$container.animate(position, speed, 'swing', function () {
|
1024 |
-
// Fire user passed callback.
|
1025 |
-
if (callback !== undefined) {
|
1026 |
-
callback();
|
1027 |
-
// TODO Test this new method. Then remove the above.
|
1028 |
-
//callback.apply(this);
|
1029 |
-
}
|
1030 |
-
});
|
1031 |
-
});
|
1032 |
-
});
|
1033 |
-
return this;
|
1034 |
-
},
|
1035 |
-
fade: function (callback) {
|
1036 |
-
var $popup = PUM.getPopup(this),
|
1037 |
-
$container = $popup.popmake('getContainer').css({opacity: 0, display: "block"}),
|
1038 |
-
settings = $popup.popmake('getSettings'),
|
1039 |
-
speed = settings.animation_speed / 2;
|
1040 |
-
|
1041 |
-
$popup
|
1042 |
-
.popmake('animate_overlay', 'fade', speed, function () {
|
1043 |
-
$container.animate({opacity: 1}, speed, 'swing', function () {
|
1044 |
-
// Fire user passed callback.
|
1045 |
-
if (callback !== undefined) {
|
1046 |
-
callback();
|
1047 |
-
// TODO Test this new method. Then remove the above.
|
1048 |
-
//callback.apply(this);
|
1049 |
-
}
|
1050 |
-
});
|
1051 |
-
});
|
1052 |
-
return this;
|
1053 |
-
},
|
1054 |
-
fadeAndSlide: function (callback) {
|
1055 |
-
var $popup = PUM.getPopup(this),
|
1056 |
-
$container = $popup.popmake('getContainer'),
|
1057 |
-
settings = $popup.popmake('getSettings'),
|
1058 |
-
speed = settings.animation_speed / 2,
|
1059 |
-
start = $popup.popmake('animation_origin', settings.animation_origin);
|
1060 |
-
|
1061 |
-
// Make the overlay and container visible so they can be positioned & sized prior to display.
|
1062 |
-
$popup.css({display: "block"});
|
1063 |
-
// Position the opaque container offscreen then update its opacity.
|
1064 |
-
$container.css({display: "block"})
|
1065 |
-
.position(start);
|
1066 |
-
|
1067 |
-
$popup
|
1068 |
-
.popmake('animate_overlay', 'fade', speed, function () {
|
1069 |
-
$container.popmake('reposition', function (position) {
|
1070 |
-
$container.css({opacity: 0});
|
1071 |
-
position.opacity = 1;
|
1072 |
-
$container.animate(position, speed, 'swing', function () {
|
1073 |
-
// Fire user passed callback.
|
1074 |
-
if (callback !== undefined) {
|
1075 |
-
callback();
|
1076 |
-
// TODO Test this new method. Then remove the above.
|
1077 |
-
//callback.apply(this);
|
1078 |
-
}
|
1079 |
-
});
|
1080 |
-
|
1081 |
-
});
|
1082 |
-
});
|
1083 |
-
return this;
|
1084 |
-
},
|
1085 |
-
/**
|
1086 |
-
* TODO: Remove these and let import script replace them.
|
1087 |
-
* @deprecated
|
1088 |
-
* @returns {$.fn.popmake.animations}
|
1089 |
-
*/
|
1090 |
-
grow: function (callback) {
|
1091 |
-
return $.fn.popmake.animations.fade.apply(this, arguments);
|
1092 |
-
},
|
1093 |
-
/**
|
1094 |
-
* @deprecated
|
1095 |
-
* @returns {$.fn.popmake.animations}
|
1096 |
-
*/
|
1097 |
-
growAndSlide: function (callback) {
|
1098 |
-
return $.fn.popmake.animations.fadeAndSlide.apply(this, arguments);
|
1099 |
-
}
|
1100 |
-
};
|
1101 |
-
|
1102 |
-
$.fn.popmake.overlay_animations = {
|
1103 |
-
none: function (duration, callback) {
|
1104 |
-
PUM.getPopup(this).css({opacity: 1, display: "block"});
|
1105 |
-
|
1106 |
-
if (typeof callback === "function") {
|
1107 |
-
callback();
|
1108 |
-
}
|
1109 |
-
},
|
1110 |
-
fade: function (duration, callback) {
|
1111 |
-
PUM.getPopup(this)
|
1112 |
-
.css({opacity: 0, display: "block"})
|
1113 |
-
.animate({opacity: 1}, duration, 'swing', callback);
|
1114 |
-
},
|
1115 |
-
slide: function (duration, callback) {
|
1116 |
-
PUM.getPopup(this).slideDown(duration, callback);
|
1117 |
-
}
|
1118 |
-
};
|
1119 |
-
|
1120 |
}(jQuery, document));
|
1121 |
/**
|
1122 |
* Defines the core $.popmake binds.
|
950 |
});
|
951 |
}
|
952 |
}(jQuery));
|
953 |
+
/**
|
954 |
+
* Defines the core $.popmake animations.
|
955 |
+
* Version 1.4
|
956 |
+
*/
|
957 |
+
(function ($, document, undefined) {
|
958 |
+
"use strict";
|
959 |
+
|
960 |
+
$.fn.popmake.methods.animate_overlay = function (style, duration, callback) {
|
961 |
+
// Method calling logic
|
962 |
+
var settings = PUM.getPopup(this).popmake('getSettings');
|
963 |
+
|
964 |
+
if (settings.overlay_disabled) {
|
965 |
+
return $.fn.popmake.overlay_animations.none.apply(this, [duration, callback]);
|
966 |
+
}
|
967 |
+
|
968 |
+
if ($.fn.popmake.overlay_animations[style]) {
|
969 |
+
return $.fn.popmake.overlay_animations[style].apply(this, [duration, callback]);
|
970 |
+
}
|
971 |
+
|
972 |
+
if (window.console) {
|
973 |
+
console.warn('Animation style ' + style + ' does not exist.');
|
974 |
+
}
|
975 |
+
return this;
|
976 |
+
};
|
977 |
+
|
978 |
+
$.fn.popmake.methods.animate = function (style) {
|
979 |
+
// Method calling logic
|
980 |
+
if ($.fn.popmake.animations[style]) {
|
981 |
+
return $.fn.popmake.animations[style].apply(this, Array.prototype.slice.call(arguments, 1));
|
982 |
+
}
|
983 |
+
if (window.console) {
|
984 |
+
console.warn('Animation style ' + style + ' does not exist.');
|
985 |
+
}
|
986 |
+
return this;
|
987 |
+
};
|
988 |
+
|
989 |
+
$.fn.popmake.animations = {
|
990 |
+
none: function (callback) {
|
991 |
+
var $popup = PUM.getPopup(this);
|
992 |
+
|
993 |
+
// Ensure the container is visible immediately.
|
994 |
+
$popup.popmake('getContainer').css({opacity: 1, display: "block"}),
|
995 |
+
|
996 |
+
$popup.popmake('animate_overlay', 'none', 0, function () {
|
997 |
+
// Fire user passed callback.
|
998 |
+
if (callback !== undefined) {
|
999 |
+
callback();
|
1000 |
+
// TODO Test this new method. Then remove the above.
|
1001 |
+
//callback.apply(this);
|
1002 |
+
}
|
1003 |
+
});
|
1004 |
+
return this;
|
1005 |
+
},
|
1006 |
+
slide: function (callback) {
|
1007 |
+
var $popup = PUM.getPopup(this),
|
1008 |
+
$container = $popup.popmake('getContainer'),
|
1009 |
+
settings = $popup.popmake('getSettings'),
|
1010 |
+
speed = settings.animation_speed / 2,
|
1011 |
+
start = $popup.popmake('animation_origin', settings.animation_origin);
|
1012 |
+
|
1013 |
+
// Make the overlay and container visible so they can be positioned & sized prior to display.
|
1014 |
+
$popup.css({display: "block"});
|
1015 |
+
// Position the opaque container offscreen then update its opacity.
|
1016 |
+
$container.css({display: "block"})
|
1017 |
+
.position(start)
|
1018 |
+
.css({opacity: 1});
|
1019 |
+
|
1020 |
+
$popup
|
1021 |
+
.popmake('animate_overlay', 'fade', speed, function () {
|
1022 |
+
$container.popmake('reposition', function (position) {
|
1023 |
+
$container.animate(position, speed, 'swing', function () {
|
1024 |
+
// Fire user passed callback.
|
1025 |
+
if (callback !== undefined) {
|
1026 |
+
callback();
|
1027 |
+
// TODO Test this new method. Then remove the above.
|
1028 |
+
//callback.apply(this);
|
1029 |
+
}
|
1030 |
+
});
|
1031 |
+
});
|
1032 |
+
});
|
1033 |
+
return this;
|
1034 |
+
},
|
1035 |
+
fade: function (callback) {
|
1036 |
+
var $popup = PUM.getPopup(this),
|
1037 |
+
$container = $popup.popmake('getContainer').css({opacity: 0, display: "block"}),
|
1038 |
+
settings = $popup.popmake('getSettings'),
|
1039 |
+
speed = settings.animation_speed / 2;
|
1040 |
+
|
1041 |
+
$popup
|
1042 |
+
.popmake('animate_overlay', 'fade', speed, function () {
|
1043 |
+
$container.animate({opacity: 1}, speed, 'swing', function () {
|
1044 |
+
// Fire user passed callback.
|
1045 |
+
if (callback !== undefined) {
|
1046 |
+
callback();
|
1047 |
+
// TODO Test this new method. Then remove the above.
|
1048 |
+
//callback.apply(this);
|
1049 |
+
}
|
1050 |
+
});
|
1051 |
+
});
|
1052 |
+
return this;
|
1053 |
+
},
|
1054 |
+
fadeAndSlide: function (callback) {
|
1055 |
+
var $popup = PUM.getPopup(this),
|
1056 |
+
$container = $popup.popmake('getContainer'),
|
1057 |
+
settings = $popup.popmake('getSettings'),
|
1058 |
+
speed = settings.animation_speed / 2,
|
1059 |
+
start = $popup.popmake('animation_origin', settings.animation_origin);
|
1060 |
+
|
1061 |
+
// Make the overlay and container visible so they can be positioned & sized prior to display.
|
1062 |
+
$popup.css({display: "block"});
|
1063 |
+
// Position the opaque container offscreen then update its opacity.
|
1064 |
+
$container.css({display: "block"})
|
1065 |
+
.position(start);
|
1066 |
+
|
1067 |
+
$popup
|
1068 |
+
.popmake('animate_overlay', 'fade', speed, function () {
|
1069 |
+
$container.popmake('reposition', function (position) {
|
1070 |
+
$container.css({opacity: 0});
|
1071 |
+
position.opacity = 1;
|
1072 |
+
$container.animate(position, speed, 'swing', function () {
|
1073 |
+
// Fire user passed callback.
|
1074 |
+
if (callback !== undefined) {
|
1075 |
+
callback();
|
1076 |
+
// TODO Test this new method. Then remove the above.
|
1077 |
+
//callback.apply(this);
|
1078 |
+
}
|
1079 |
+
});
|
1080 |
+
|
1081 |
+
});
|
1082 |
+
});
|
1083 |
+
return this;
|
1084 |
+
},
|
1085 |
+
/**
|
1086 |
+
* TODO: Remove these and let import script replace them.
|
1087 |
+
* @deprecated
|
1088 |
+
* @returns {$.fn.popmake.animations}
|
1089 |
+
*/
|
1090 |
+
grow: function (callback) {
|
1091 |
+
return $.fn.popmake.animations.fade.apply(this, arguments);
|
1092 |
+
},
|
1093 |
+
/**
|
1094 |
+
* @deprecated
|
1095 |
+
* @returns {$.fn.popmake.animations}
|
1096 |
+
*/
|
1097 |
+
growAndSlide: function (callback) {
|
1098 |
+
return $.fn.popmake.animations.fadeAndSlide.apply(this, arguments);
|
1099 |
+
}
|
1100 |
+
};
|
1101 |
+
|
1102 |
+
$.fn.popmake.overlay_animations = {
|
1103 |
+
none: function (duration, callback) {
|
1104 |
+
PUM.getPopup(this).css({opacity: 1, display: "block"});
|
1105 |
+
|
1106 |
+
if (typeof callback === "function") {
|
1107 |
+
callback();
|
1108 |
+
}
|
1109 |
+
},
|
1110 |
+
fade: function (duration, callback) {
|
1111 |
+
PUM.getPopup(this)
|
1112 |
+
.css({opacity: 0, display: "block"})
|
1113 |
+
.animate({opacity: 1}, duration, 'swing', callback);
|
1114 |
+
},
|
1115 |
+
slide: function (duration, callback) {
|
1116 |
+
PUM.getPopup(this).slideDown(duration, callback);
|
1117 |
+
}
|
1118 |
+
};
|
1119 |
+
|
1120 |
}(jQuery, document));
|
1121 |
/**
|
1122 |
* Defines the core $.popmake binds.
|
assets/sass/admin-theme-editor.scss
CHANGED
@@ -1,148 +1,148 @@
|
|
1 |
-
/*!******************************************************************************
|
2 |
-
* Copyright (c) 2018, WP Popup Maker
|
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 |
-
}
|
1 |
+
/*!******************************************************************************
|
2 |
+
* Copyright (c) 2018, WP Popup Maker
|
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/partials/_pum_styles.scss
CHANGED
@@ -1,267 +1,267 @@
|
|
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 |
-
}
|
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 |
+
}
|
classes/Abstract/Repository/Posts.php
CHANGED
@@ -1,369 +1,369 @@
|
|
1 |
-
<?php
|
2 |
-
/*******************************************************************************
|
3 |
-
* Copyright (c) 2018, WP Popup Maker
|
4 |
-
******************************************************************************/
|
5 |
-
|
6 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
-
exit;
|
8 |
-
}
|
9 |
-
|
10 |
-
/**
|
11 |
-
* Class PUM_Abstract_Repository_Posts
|
12 |
-
*
|
13 |
-
* Interface between WP_Query and our data needs. Essentially a query factory.
|
14 |
-
*/
|
15 |
-
abstract class PUM_Abstract_Repository_Posts implements PUM_Interface_Repository {
|
16 |
-
|
17 |
-
/**
|
18 |
-
* WordPress query object.
|
19 |
-
*
|
20 |
-
* @var WP_Query
|
21 |
-
*/
|
22 |
-
protected $query;
|
23 |
-
|
24 |
-
/**
|
25 |
-
* @var string
|
26 |
-
*/
|
27 |
-
protected $model;
|
28 |
-
|
29 |
-
/**
|
30 |
-
* Should return a valid post type to test against.
|
31 |
-
*
|
32 |
-
* @return string
|
33 |
-
*/
|
34 |
-
protected function get_post_type() {
|
35 |
-
return 'post';
|
36 |
-
}
|
37 |
-
|
38 |
-
/**
|
39 |
-
* Initialize the repository.
|
40 |
-
*/
|
41 |
-
protected function init() {
|
42 |
-
$this->query = new WP_Query;
|
43 |
-
$this->reset_strict_query_args();
|
44 |
-
}
|
45 |
-
|
46 |
-
public function __construct() {
|
47 |
-
$this->init();
|
48 |
-
}
|
49 |
-
|
50 |
-
/**
|
51 |
-
* @return array
|
52 |
-
*/
|
53 |
-
public function default_query_args() {
|
54 |
-
return array();
|
55 |
-
}
|
56 |
-
|
57 |
-
/**
|
58 |
-
* @var array
|
59 |
-
*/
|
60 |
-
protected $strict_query_args = array();
|
61 |
-
|
62 |
-
/**
|
63 |
-
* Returns an array of default strict query args that can't be over ridden, such as post type.
|
64 |
-
*
|
65 |
-
* @return array
|
66 |
-
*/
|
67 |
-
protected function default_strict_query_args() {
|
68 |
-
return array(
|
69 |
-
'post_type' => $this->get_post_type(),
|
70 |
-
);
|
71 |
-
}
|
72 |
-
|
73 |
-
/**
|
74 |
-
* Returns an array of enforced query args that can't be over ridden, such as post type.
|
75 |
-
*
|
76 |
-
* @return array
|
77 |
-
*/
|
78 |
-
protected function get_strict_query_args() {
|
79 |
-
return $this->strict_query_args;
|
80 |
-
}
|
81 |
-
|
82 |
-
/**
|
83 |
-
* Sets a specific query arg to a strict value.
|
84 |
-
*
|
85 |
-
* @param $key
|
86 |
-
* @param null $value
|
87 |
-
*/
|
88 |
-
protected function set_strict_query_arg( $key, $value = null ) {
|
89 |
-
$this->strict_query_args[ $key ] = $value;
|
90 |
-
}
|
91 |
-
|
92 |
-
/**
|
93 |
-
* Returns an array of enforced query args that can't be over ridden, such as post type.
|
94 |
-
*
|
95 |
-
* @return array
|
96 |
-
*/
|
97 |
-
protected function reset_strict_query_args() {
|
98 |
-
$this->strict_query_args = $this->default_strict_query_args();
|
99 |
-
|
100 |
-
return $this->strict_query_args;
|
101 |
-
}
|
102 |
-
|
103 |
-
/**
|
104 |
-
* @param array $args
|
105 |
-
*
|
106 |
-
* @return array
|
107 |
-
*/
|
108 |
-
protected function _build_wp_query_args( $args = array() ) {
|
109 |
-
$args = wp_parse_args( $args, $this->default_query_args() );
|
110 |
-
|
111 |
-
$args = $this->build_wp_query_args( $args );
|
112 |
-
|
113 |
-
return array_merge( $args, $this->get_strict_query_args() );
|
114 |
-
}
|
115 |
-
|
116 |
-
/**
|
117 |
-
* @param array $args
|
118 |
-
*
|
119 |
-
* @return array
|
120 |
-
*/
|
121 |
-
protected function build_wp_query_args( $args = array() ) {
|
122 |
-
return $args;
|
123 |
-
}
|
124 |
-
|
125 |
-
/**
|
126 |
-
* @param int $id
|
127 |
-
*
|
128 |
-
* @return WP_Post|PUM_Abstract_Model_Post
|
129 |
-
* @throws \InvalidArgumentException
|
130 |
-
*/
|
131 |
-
public function get_item( $id ) {
|
132 |
-
if ( ! $this->has_item( $id ) ) {
|
133 |
-
throw new InvalidArgumentException( sprintf( __( 'No %s found with id %d.', 'forumwp' ), $this->get_post_type(), $id ) );
|
134 |
-
}
|
135 |
-
|
136 |
-
return $this->get_model( get_post( $id ) );
|
137 |
-
}
|
138 |
-
|
139 |
-
/**
|
140 |
-
* @param $field
|
141 |
-
* @param $value
|
142 |
-
*
|
143 |
-
* @return PUM_Abstract_Model_Post|\WP_Post
|
144 |
-
*/
|
145 |
-
public function get_item_by( $field, $value ) {
|
146 |
-
global $wpdb;
|
147 |
-
|
148 |
-
$id = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE %s = %s", $field, $value ) );
|
149 |
-
|
150 |
-
if ( ! $id || ! $this->has_item( $id ) ) {
|
151 |
-
throw new InvalidArgumentException( sprintf( __( 'No user found with %s %s.', 'forumwp' ), $field, $value ) );
|
152 |
-
}
|
153 |
-
|
154 |
-
return $this->get_model( get_post( $id ) );
|
155 |
-
}
|
156 |
-
|
157 |
-
/**
|
158 |
-
* @param int $id
|
159 |
-
*
|
160 |
-
* @return bool
|
161 |
-
*/
|
162 |
-
public function has_item( $id ) {
|
163 |
-
return get_post_type( $id ) === $this->get_post_type();
|
164 |
-
}
|
165 |
-
|
166 |
-
/**
|
167 |
-
* @param array $args
|
168 |
-
*
|
169 |
-
* @return WP_Post[]|PUM_Abstract_Model_Post[]
|
170 |
-
*/
|
171 |
-
public function get_items( $args = array() ) {
|
172 |
-
/** Reset default strict query args. */
|
173 |
-
$this->reset_strict_query_args();
|
174 |
-
|
175 |
-
$args = $this->_build_wp_query_args( $args );
|
176 |
-
|
177 |
-
/**
|
178 |
-
* Initialize a new query and return it.
|
179 |
-
*
|
180 |
-
* This also keeps the query cached for potential later usage via $this->get_last_query();
|
181 |
-
*/
|
182 |
-
$this->query->query( $args );
|
183 |
-
|
184 |
-
/** @var array $posts */
|
185 |
-
$posts = (array) $this->query->posts;
|
186 |
-
|
187 |
-
/**
|
188 |
-
* Only convert to models if the model set is valid and not the WP_Post default.
|
189 |
-
*/
|
190 |
-
foreach ( $posts as $key => $post ) {
|
191 |
-
$posts[ $key ] = $this->get_model( $post );
|
192 |
-
}
|
193 |
-
|
194 |
-
return $posts;
|
195 |
-
}
|
196 |
-
|
197 |
-
/**
|
198 |
-
* @param array $args
|
199 |
-
*
|
200 |
-
* @return int
|
201 |
-
*/
|
202 |
-
public function count_items( $args = array() ) {
|
203 |
-
/** Reset default strict query args. */
|
204 |
-
$this->reset_strict_query_args();
|
205 |
-
|
206 |
-
/** Set several strict query arg overrides, no matter what args were passed. */
|
207 |
-
$this->set_strict_query_arg( 'fields', 'ids' );
|
208 |
-
$this->set_strict_query_arg( 'posts_per_page', 1 );
|
209 |
-
|
210 |
-
/** We don't use $this->query here to avoid returning count queries via $this->>get_last_query(); */
|
211 |
-
$query = new WP_Query( $this->_build_wp_query_args( $args ) );
|
212 |
-
|
213 |
-
return (int) $query->found_posts;
|
214 |
-
}
|
215 |
-
|
216 |
-
/**
|
217 |
-
* @return \WP_Query
|
218 |
-
*/
|
219 |
-
public function get_last_query() {
|
220 |
-
return $this->query;
|
221 |
-
}
|
222 |
-
|
223 |
-
/**
|
224 |
-
* Assert that data is valid.
|
225 |
-
*
|
226 |
-
* @param array $data
|
227 |
-
*
|
228 |
-
* @throws InvalidArgumentException
|
229 |
-
*
|
230 |
-
* TODO Add better Exceptions via these guides:
|
231 |
-
* - https://www.brandonsavage.net/using-interfaces-for-exceptions/
|
232 |
-
* - https://www.alainschlesser.com/structuring-php-exceptions/
|
233 |
-
*
|
234 |
-
* if ( isset( $data['subject'] ) && ! $data['subject'] ) {
|
235 |
-
* throw new InvalidArgumentException( 'The subject is required.' );
|
236 |
-
* }
|
237 |
-
*/
|
238 |
-
abstract protected function assert_data( $data );
|
239 |
-
|
240 |
-
/**
|
241 |
-
* @param array $data
|
242 |
-
*
|
243 |
-
* @return WP_Post|PUM_Abstract_Model_Post
|
244 |
-
* @throws InvalidArgumentException
|
245 |
-
*/
|
246 |
-
public function create_item( $data ) {
|
247 |
-
|
248 |
-
$data = wp_parse_args( $data, array(
|
249 |
-
'content' => '',
|
250 |
-
'title' => '',
|
251 |
-
'meta_input' => array(),
|
252 |
-
) );
|
253 |
-
|
254 |
-
$this->assert_data( $data );
|
255 |
-
|
256 |
-
$post_id = wp_insert_post( array(
|
257 |
-
'post_type' => $this->get_post_type(),
|
258 |
-
'post_status' => 'publish',
|
259 |
-
'post_title' => $data['title'],
|
260 |
-
'post_content' => $data['content'],
|
261 |
-
'meta_input' => $data['meta_input'],
|
262 |
-
), true );
|
263 |
-
|
264 |
-
if ( is_wp_error( $post_id ) ) {
|
265 |
-
throw new InvalidArgumentException( $post_id->get_error_message() );
|
266 |
-
}
|
267 |
-
|
268 |
-
return $this->get_item( $post_id );
|
269 |
-
}
|
270 |
-
|
271 |
-
/**
|
272 |
-
* @param int $id
|
273 |
-
* @param array $data
|
274 |
-
*
|
275 |
-
* @return WP_Post|PUM_Abstract_Model_Post
|
276 |
-
* @throws Exception
|
277 |
-
*/
|
278 |
-
public function update_item( $id, $data ) {
|
279 |
-
|
280 |
-
$this->assert_data( $data );
|
281 |
-
|
282 |
-
/** @var WP_Post|PUM_Abstract_Model_Post $original */
|
283 |
-
$original = $this->get_item( $id );
|
284 |
-
|
285 |
-
$post_update = array();
|
286 |
-
|
287 |
-
foreach ( $data as $key => $value ) {
|
288 |
-
if ( $original->$key === $value ) {
|
289 |
-
continue;
|
290 |
-
}
|
291 |
-
|
292 |
-
switch ( $key ) {
|
293 |
-
default:
|
294 |
-
$post_update[ $key ] = $value;
|
295 |
-
break;
|
296 |
-
case 'title':
|
297 |
-
$post_update['post_title'] = $value;
|
298 |
-
break;
|
299 |
-
case 'content':
|
300 |
-
$post_update['post_content'] = $value;
|
301 |
-
break;
|
302 |
-
|
303 |
-
case 'custom_meta_key':
|
304 |
-
update_post_meta( $id, '_custom_meta_key', $value );
|
305 |
-
}
|
306 |
-
}
|
307 |
-
|
308 |
-
if ( count( $post_update ) ) {
|
309 |
-
$post_update['ID'] = $id;
|
310 |
-
wp_update_post( $post_update );
|
311 |
-
}
|
312 |
-
|
313 |
-
return $this->get_item( $id );
|
314 |
-
}
|
315 |
-
|
316 |
-
/**
|
317 |
-
* @param $post
|
318 |
-
*
|
319 |
-
* @return WP_Post|PUM_Abstract_Model_Post
|
320 |
-
*/
|
321 |
-
protected function get_model( $post ) {
|
322 |
-
/**
|
323 |
-
* Only convert to models if the model set is valid and not the WP_Post default.
|
324 |
-
*/
|
325 |
-
$model = $this->model;
|
326 |
-
if ( isset( $model ) && $model !== 'WP_Post' && class_exists( $model ) && ! is_a( $post, $model ) ) {
|
327 |
-
$post = new $model( $post );
|
328 |
-
}
|
329 |
-
|
330 |
-
return $post;
|
331 |
-
}
|
332 |
-
|
333 |
-
/**
|
334 |
-
* @param int $id
|
335 |
-
*
|
336 |
-
* @return bool
|
337 |
-
*/
|
338 |
-
public function delete_item( $id ) {
|
339 |
-
return EMPTY_TRASH_DAYS && (bool) wp_trash_post( $id );
|
340 |
-
}
|
341 |
-
|
342 |
-
/**
|
343 |
-
* @param int $id
|
344 |
-
*
|
345 |
-
* @return bool
|
346 |
-
*/
|
347 |
-
public function is_item_trashed( $id ) {
|
348 |
-
return get_post_status( $id ) === 'trash';
|
349 |
-
}
|
350 |
-
|
351 |
-
/**
|
352 |
-
* @param int $id
|
353 |
-
*
|
354 |
-
* @return bool
|
355 |
-
*/
|
356 |
-
public function untrash_item( $id ) {
|
357 |
-
return (bool) wp_untrash_post( $id );
|
358 |
-
}
|
359 |
-
|
360 |
-
/**
|
361 |
-
* @param int $id
|
362 |
-
*
|
363 |
-
* @return bool
|
364 |
-
*/
|
365 |
-
public function force_delete_item( $id ) {
|
366 |
-
return (bool) wp_delete_post( $id, true );
|
367 |
-
}
|
368 |
-
|
369 |
-
}
|
1 |
+
<?php
|
2 |
+
/*******************************************************************************
|
3 |
+
* Copyright (c) 2018, WP Popup Maker
|
4 |
+
******************************************************************************/
|
5 |
+
|
6 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
+
exit;
|
8 |
+
}
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Class PUM_Abstract_Repository_Posts
|
12 |
+
*
|
13 |
+
* Interface between WP_Query and our data needs. Essentially a query factory.
|
14 |
+
*/
|
15 |
+
abstract class PUM_Abstract_Repository_Posts implements PUM_Interface_Repository {
|
16 |
+
|
17 |
+
/**
|
18 |
+
* WordPress query object.
|
19 |
+
*
|
20 |
+
* @var WP_Query
|
21 |
+
*/
|
22 |
+
protected $query;
|
23 |
+
|
24 |
+
/**
|
25 |
+
* @var string
|
26 |
+
*/
|
27 |
+
protected $model;
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Should return a valid post type to test against.
|
31 |
+
*
|
32 |
+
* @return string
|
33 |
+
*/
|
34 |
+
protected function get_post_type() {
|
35 |
+
return 'post';
|
36 |
+
}
|
37 |
+
|
38 |
+
/**
|
39 |
+
* Initialize the repository.
|
40 |
+
*/
|
41 |
+
protected function init() {
|
42 |
+
$this->query = new WP_Query;
|
43 |
+
$this->reset_strict_query_args();
|
44 |
+
}
|
45 |
+
|
46 |
+
public function __construct() {
|
47 |
+
$this->init();
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* @return array
|
52 |
+
*/
|
53 |
+
public function default_query_args() {
|
54 |
+
return array();
|
55 |
+
}
|
56 |
+
|
57 |
+
/**
|
58 |
+
* @var array
|
59 |
+
*/
|
60 |
+
protected $strict_query_args = array();
|
61 |
+
|
62 |
+
/**
|
63 |
+
* Returns an array of default strict query args that can't be over ridden, such as post type.
|
64 |
+
*
|
65 |
+
* @return array
|
66 |
+
*/
|
67 |
+
protected function default_strict_query_args() {
|
68 |
+
return array(
|
69 |
+
'post_type' => $this->get_post_type(),
|
70 |
+
);
|
71 |
+
}
|
72 |
+
|
73 |
+
/**
|
74 |
+
* Returns an array of enforced query args that can't be over ridden, such as post type.
|
75 |
+
*
|
76 |
+
* @return array
|
77 |
+
*/
|
78 |
+
protected function get_strict_query_args() {
|
79 |
+
return $this->strict_query_args;
|
80 |
+
}
|
81 |
+
|
82 |
+
/**
|
83 |
+
* Sets a specific query arg to a strict value.
|
84 |
+
*
|
85 |
+
* @param $key
|
86 |
+
* @param null $value
|
87 |
+
*/
|
88 |
+
protected function set_strict_query_arg( $key, $value = null ) {
|
89 |
+
$this->strict_query_args[ $key ] = $value;
|
90 |
+
}
|
91 |
+
|
92 |
+
/**
|
93 |
+
* Returns an array of enforced query args that can't be over ridden, such as post type.
|
94 |
+
*
|
95 |
+
* @return array
|
96 |
+
*/
|
97 |
+
protected function reset_strict_query_args() {
|
98 |
+
$this->strict_query_args = $this->default_strict_query_args();
|
99 |
+
|
100 |
+
return $this->strict_query_args;
|
101 |
+
}
|
102 |
+
|
103 |
+
/**
|
104 |
+
* @param array $args
|
105 |
+
*
|
106 |
+
* @return array
|
107 |
+
*/
|
108 |
+
protected function _build_wp_query_args( $args = array() ) {
|
109 |
+
$args = wp_parse_args( $args, $this->default_query_args() );
|
110 |
+
|
111 |
+
$args = $this->build_wp_query_args( $args );
|
112 |
+
|
113 |
+
return array_merge( $args, $this->get_strict_query_args() );
|
114 |
+
}
|
115 |
+
|
116 |
+
/**
|
117 |
+
* @param array $args
|
118 |
+
*
|
119 |
+
* @return array
|
120 |
+
*/
|
121 |
+
protected function build_wp_query_args( $args = array() ) {
|
122 |
+
return $args;
|
123 |
+
}
|
124 |
+
|
125 |
+
/**
|
126 |
+
* @param int $id
|
127 |
+
*
|
128 |
+
* @return WP_Post|PUM_Abstract_Model_Post
|
129 |
+
* @throws \InvalidArgumentException
|
130 |
+
*/
|
131 |
+
public function get_item( $id ) {
|
132 |
+
if ( ! $this->has_item( $id ) ) {
|
133 |
+
throw new InvalidArgumentException( sprintf( __( 'No %s found with id %d.', 'forumwp' ), $this->get_post_type(), $id ) );
|
134 |
+
}
|
135 |
+
|
136 |
+
return $this->get_model( get_post( $id ) );
|
137 |
+
}
|
138 |
+
|
139 |
+
/**
|
140 |
+
* @param $field
|
141 |
+
* @param $value
|
142 |
+
*
|
143 |
+
* @return PUM_Abstract_Model_Post|\WP_Post
|
144 |
+
*/
|
145 |
+
public function get_item_by( $field, $value ) {
|
146 |
+
global $wpdb;
|
147 |
+
|
148 |
+
$id = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE %s = %s", $field, $value ) );
|
149 |
+
|
150 |
+
if ( ! $id || ! $this->has_item( $id ) ) {
|
151 |
+
throw new InvalidArgumentException( sprintf( __( 'No user found with %s %s.', 'forumwp' ), $field, $value ) );
|
152 |
+
}
|
153 |
+
|
154 |
+
return $this->get_model( get_post( $id ) );
|
155 |
+
}
|
156 |
+
|
157 |
+
/**
|
158 |
+
* @param int $id
|
159 |
+
*
|
160 |
+
* @return bool
|
161 |
+
*/
|
162 |
+
public function has_item( $id ) {
|
163 |
+
return get_post_type( $id ) === $this->get_post_type();
|
164 |
+
}
|
165 |
+
|
166 |
+
/**
|
167 |
+
* @param array $args
|
168 |
+
*
|
169 |
+
* @return WP_Post[]|PUM_Abstract_Model_Post[]
|
170 |
+
*/
|
171 |
+
public function get_items( $args = array() ) {
|
172 |
+
/** Reset default strict query args. */
|
173 |
+
$this->reset_strict_query_args();
|
174 |
+
|
175 |
+
$args = $this->_build_wp_query_args( $args );
|
176 |
+
|
177 |
+
/**
|
178 |
+
* Initialize a new query and return it.
|
179 |
+
*
|
180 |
+
* This also keeps the query cached for potential later usage via $this->get_last_query();
|
181 |
+
*/
|
182 |
+
$this->query->query( $args );
|
183 |
+
|
184 |
+
/** @var array $posts */
|
185 |
+
$posts = (array) $this->query->posts;
|
186 |
+
|
187 |
+
/**
|
188 |
+
* Only convert to models if the model set is valid and not the WP_Post default.
|
189 |
+
*/
|
190 |
+
foreach ( $posts as $key => $post ) {
|
191 |
+
$posts[ $key ] = $this->get_model( $post );
|
192 |
+
}
|
193 |
+
|
194 |
+
return $posts;
|
195 |
+
}
|
196 |
+
|
197 |
+
/**
|
198 |
+
* @param array $args
|
199 |
+
*
|
200 |
+
* @return int
|
201 |
+
*/
|
202 |
+
public function count_items( $args = array() ) {
|
203 |
+
/** Reset default strict query args. */
|
204 |
+
$this->reset_strict_query_args();
|
205 |
+
|
206 |
+
/** Set several strict query arg overrides, no matter what args were passed. */
|
207 |
+
$this->set_strict_query_arg( 'fields', 'ids' );
|
208 |
+
$this->set_strict_query_arg( 'posts_per_page', 1 );
|
209 |
+
|
210 |
+
/** We don't use $this->query here to avoid returning count queries via $this->>get_last_query(); */
|
211 |
+
$query = new WP_Query( $this->_build_wp_query_args( $args ) );
|
212 |
+
|
213 |
+
return (int) $query->found_posts;
|
214 |
+
}
|
215 |
+
|
216 |
+
/**
|
217 |
+
* @return \WP_Query
|
218 |
+
*/
|
219 |
+
public function get_last_query() {
|
220 |
+
return $this->query;
|
221 |
+
}
|
222 |
+
|
223 |
+
/**
|
224 |
+
* Assert that data is valid.
|
225 |
+
*
|
226 |
+
* @param array $data
|
227 |
+
*
|
228 |
+
* @throws InvalidArgumentException
|
229 |
+
*
|
230 |
+
* TODO Add better Exceptions via these guides:
|
231 |
+
* - https://www.brandonsavage.net/using-interfaces-for-exceptions/
|
232 |
+
* - https://www.alainschlesser.com/structuring-php-exceptions/
|
233 |
+
*
|
234 |
+
* if ( isset( $data['subject'] ) && ! $data['subject'] ) {
|
235 |
+
* throw new InvalidArgumentException( 'The subject is required.' );
|
236 |
+
* }
|
237 |
+
*/
|
238 |
+
abstract protected function assert_data( $data );
|
239 |
+
|
240 |
+
/**
|
241 |
+
* @param array $data
|
242 |
+
*
|
243 |
+
* @return WP_Post|PUM_Abstract_Model_Post
|
244 |
+
* @throws InvalidArgumentException
|
245 |
+
*/
|
246 |
+
public function create_item( $data ) {
|
247 |
+
|
248 |
+
$data = wp_parse_args( $data, array(
|
249 |
+
'content' => '',
|
250 |
+
'title' => '',
|
251 |
+
'meta_input' => array(),
|
252 |
+
) );
|
253 |
+
|
254 |
+
$this->assert_data( $data );
|
255 |
+
|
256 |
+
$post_id = wp_insert_post( array(
|
257 |
+
'post_type' => $this->get_post_type(),
|
258 |
+
'post_status' => 'publish',
|
259 |
+
'post_title' => $data['title'],
|
260 |
+
'post_content' => $data['content'],
|
261 |
+
'meta_input' => $data['meta_input'],
|
262 |
+
), true );
|
263 |
+
|
264 |
+
if ( is_wp_error( $post_id ) ) {
|
265 |
+
throw new InvalidArgumentException( $post_id->get_error_message() );
|
266 |
+
}
|
267 |
+
|
268 |
+
return $this->get_item( $post_id );
|
269 |
+
}
|
270 |
+
|
271 |
+
/**
|
272 |
+
* @param int $id
|
273 |
+
* @param array $data
|
274 |
+
*
|
275 |
+
* @return WP_Post|PUM_Abstract_Model_Post
|
276 |
+
* @throws Exception
|
277 |
+
*/
|
278 |
+
public function update_item( $id, $data ) {
|
279 |
+
|
280 |
+
$this->assert_data( $data );
|
281 |
+
|
282 |
+
/** @var WP_Post|PUM_Abstract_Model_Post $original */
|
283 |
+
$original = $this->get_item( $id );
|
284 |
+
|
285 |
+
$post_update = array();
|
286 |
+
|
287 |
+
foreach ( $data as $key => $value ) {
|
288 |
+
if ( $original->$key === $value ) {
|
289 |
+
continue;
|
290 |
+
}
|
291 |
+
|
292 |
+
switch ( $key ) {
|
293 |
+
default:
|
294 |
+
$post_update[ $key ] = $value;
|
295 |
+
break;
|
296 |
+
case 'title':
|
297 |
+
$post_update['post_title'] = $value;
|
298 |
+
break;
|
299 |
+
case 'content':
|
300 |
+
$post_update['post_content'] = $value;
|
301 |
+
break;
|
302 |
+
|
303 |
+
case 'custom_meta_key':
|
304 |
+
update_post_meta( $id, '_custom_meta_key', $value );
|
305 |
+
}
|
306 |
+
}
|
307 |
+
|
308 |
+
if ( count( $post_update ) ) {
|
309 |
+
$post_update['ID'] = $id;
|
310 |
+
wp_update_post( $post_update );
|
311 |
+
}
|
312 |
+
|
313 |
+
return $this->get_item( $id );
|
314 |
+
}
|
315 |
+
|
316 |
+
/**
|
317 |
+
* @param $post
|
318 |
+
*
|
319 |
+
* @return WP_Post|PUM_Abstract_Model_Post
|
320 |
+
*/
|
321 |
+
protected function get_model( $post ) {
|
322 |
+
/**
|
323 |
+
* Only convert to models if the model set is valid and not the WP_Post default.
|
324 |
+
*/
|
325 |
+
$model = $this->model;
|
326 |
+
if ( isset( $model ) && $model !== 'WP_Post' && class_exists( $model ) && ! is_a( $post, $model ) ) {
|
327 |
+
$post = new $model( $post );
|
328 |
+
}
|
329 |
+
|
330 |
+
return $post;
|
331 |
+
}
|
332 |
+
|
333 |
+
/**
|
334 |
+
* @param int $id
|
335 |
+
*
|
336 |
+
* @return bool
|
337 |
+
*/
|
338 |
+
public function delete_item( $id ) {
|
339 |
+
return EMPTY_TRASH_DAYS && (bool) wp_trash_post( $id );
|
340 |
+
}
|
341 |
+
|
342 |
+
/**
|
343 |
+
* @param int $id
|
344 |
+
*
|
345 |
+
* @return bool
|
346 |
+
*/
|
347 |
+
public function is_item_trashed( $id ) {
|
348 |
+
return get_post_status( $id ) === 'trash';
|
349 |
+
}
|
350 |
+
|
351 |
+
/**
|
352 |
+
* @param int $id
|
353 |
+
*
|
354 |
+
* @return bool
|
355 |
+
*/
|
356 |
+
public function untrash_item( $id ) {
|
357 |
+
return (bool) wp_untrash_post( $id );
|
358 |
+
}
|
359 |
+
|
360 |
+
/**
|
361 |
+
* @param int $id
|
362 |
+
*
|
363 |
+
* @return bool
|
364 |
+
*/
|
365 |
+
public function force_delete_item( $id ) {
|
366 |
+
return (bool) wp_delete_post( $id, true );
|
367 |
+
}
|
368 |
+
|
369 |
+
}
|
classes/Extension/Updater.php
CHANGED
@@ -1,579 +1,579 @@
|
|
1 |
-
<?php
|
2 |
-
/*******************************************************************************
|
3 |
-
* Copyright (c) 2018, WP Popup Maker
|
4 |
-
******************************************************************************/
|
5 |
-
|
6 |
-
// Exit if accessed directly
|
7 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
8 |
-
exit;
|
9 |
-
}
|
10 |
-
|
11 |
-
/**
|
12 |
-
* Allows paid/commercial extensions to update from our own servers.
|
13 |
-
*
|
14 |
-
* Note for wordpress.org admins. This is not called in the free hosted version and is simply used for hooking in addons to one update system rather than including it in each plugin.
|
15 |
-
*
|
16 |
-
* @author Easy Digital Downloads
|
17 |
-
* @version 1.6.18
|
18 |
-
*/
|
19 |
-
class PUM_Extension_Updater {
|
20 |
-
|
21 |
-
private $api_url = '';
|
22 |
-
private $api_data = array();
|
23 |
-
private $name = '';
|
24 |
-
private $slug = '';
|
25 |
-
private $version = '';
|
26 |
-
private $wp_override = false;
|
27 |
-
private $cache_key = '';
|
28 |
-
|
29 |
-
private $health_check_timeout = 5;
|
30 |
-
|
31 |
-
/**
|
32 |
-
* Class constructor.
|
33 |
-
*
|
34 |
-
* @uses plugin_basename()
|
35 |
-
* @uses hook()
|
36 |
-
*
|
37 |
-
* @param string $_api_url The URL pointing to the custom API endpoint.
|
38 |
-
* @param string $_plugin_file Path to the plugin file.
|
39 |
-
* @param array $_api_data Optional data to send with API calls.
|
40 |
-
*/
|
41 |
-
public function __construct( $_api_url, $_plugin_file, $_api_data = null ) {
|
42 |
-
|
43 |
-
global $edd_plugin_data;
|
44 |
-
|
45 |
-
$this->api_url = trailingslashit( $_api_url );
|
46 |
-
$this->api_data = $_api_data;
|
47 |
-
$this->name = plugin_basename( $_plugin_file );
|
48 |
-
$this->slug = basename( $_plugin_file, '.php' );
|
49 |
-
$this->version = $_api_data['version'];
|
50 |
-
$this->wp_override = isset( $_api_data['wp_override'] ) ? (bool) $_api_data['wp_override'] : false;
|
51 |
-
$this->beta = ! empty( $this->api_data['beta'] ) ? true : false;
|
52 |
-
$this->cache_key = 'edd_sl_' . md5( serialize( $this->slug . $this->api_data['license'] . $this->beta ) );
|
53 |
-
|
54 |
-
$edd_plugin_data[ $this->slug ] = $this->api_data;
|
55 |
-
|
56 |
-
/**
|
57 |
-
* Fires after the $edd_plugin_data is setup.
|
58 |
-
*
|
59 |
-
* @since x.x.x
|
60 |
-
*
|
61 |
-
* @param array $edd_plugin_data Array of EDD SL plugin data.
|
62 |
-
*/
|
63 |
-
do_action( 'post_edd_sl_plugin_updater_setup', $edd_plugin_data );
|
64 |
-
|
65 |
-
// Set up hooks.
|
66 |
-
$this->init();
|
67 |
-
|
68 |
-
}
|
69 |
-
|
70 |
-
/**
|
71 |
-
* Set up WordPress filters to hook into WP's update process.
|
72 |
-
*
|
73 |
-
* @uses add_filter()
|
74 |
-
*
|
75 |
-
* @return void
|
76 |
-
*/
|
77 |
-
public function init() {
|
78 |
-
|
79 |
-
add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_update' ) );
|
80 |
-
add_filter( 'plugins_api', array( $this, 'plugins_api_filter' ), 10, 3 );
|
81 |
-
remove_action( 'after_plugin_row_' . $this->name, 'wp_plugin_update_row', 10 );
|
82 |
-
add_action( 'after_plugin_row_' . $this->name, array( $this, 'show_update_notification' ), 10, 2 );
|
83 |
-
add_action( 'admin_init', array( $this, 'show_changelog' ) );
|
84 |
-
|
85 |
-
}
|
86 |
-
|
87 |
-
/**
|
88 |
-
* Check for Updates at the defined API endpoint and modify the update array.
|
89 |
-
*
|
90 |
-
* This function dives into the update API just when WordPress creates its update array,
|
91 |
-
* then adds a custom API call and injects the custom plugin data retrieved from the API.
|
92 |
-
* It is reassembled from parts of the native WordPress plugin update code.
|
93 |
-
* See wp-includes/update.php line 121 for the original wp_update_plugins() function.
|
94 |
-
*
|
95 |
-
* @uses api_request()
|
96 |
-
*
|
97 |
-
* @param array $_transient_data Update array build by WordPress.
|
98 |
-
* @return array Modified update array with custom plugin data.
|
99 |
-
*/
|
100 |
-
public function check_update( $_transient_data ) {
|
101 |
-
|
102 |
-
global $pagenow;
|
103 |
-
|
104 |
-
if ( ! is_object( $_transient_data ) ) {
|
105 |
-
$_transient_data = new stdClass;
|
106 |
-
}
|
107 |
-
|
108 |
-
if ( 'plugins.php' == $pagenow && is_multisite() ) {
|
109 |
-
return $_transient_data;
|
110 |
-
}
|
111 |
-
|
112 |
-
if ( ! empty( $_transient_data->response ) && ! empty( $_transient_data->response[ $this->name ] ) && false === $this->wp_override ) {
|
113 |
-
return $_transient_data;
|
114 |
-
}
|
115 |
-
|
116 |
-
$version_info = $this->get_cached_version_info();
|
117 |
-
|
118 |
-
if ( false === $version_info ) {
|
119 |
-
$version_info = $this->api_request( 'plugin_latest_version', array( 'slug' => $this->slug, 'beta' => $this->beta ) );
|
120 |
-
|
121 |
-
$this->set_version_info_cache( $version_info );
|
122 |
-
|
123 |
-
}
|
124 |
-
|
125 |
-
if ( false !== $version_info && is_object( $version_info ) && isset( $version_info->new_version ) ) {
|
126 |
-
|
127 |
-
if ( version_compare( $this->version, $version_info->new_version, '<' ) ) {
|
128 |
-
|
129 |
-
$_transient_data->response[ $this->name ] = $version_info;
|
130 |
-
|
131 |
-
// Make sure the plugin property is set to the plugin's name/location. See issue 1463 on Software Licensing's GitHub repo.
|
132 |
-
$_transient_data->response[ $this->name ]->plugin = $this->name;
|
133 |
-
|
134 |
-
}
|
135 |
-
|
136 |
-
$_transient_data->last_checked = time();
|
137 |
-
$_transient_data->checked[ $this->name ] = $this->version;
|
138 |
-
|
139 |
-
}
|
140 |
-
|
141 |
-
return $_transient_data;
|
142 |
-
}
|
143 |
-
|
144 |
-
/**
|
145 |
-
* show update nofication row -- needed for multisite subsites, because WP won't tell you otherwise!
|
146 |
-
*
|
147 |
-
* @param string $file
|
148 |
-
* @param array $plugin
|
149 |
-
*/
|
150 |
-
public function show_update_notification( $file, $plugin ) {
|
151 |
-
|
152 |
-
if ( is_network_admin() ) {
|
153 |
-
return;
|
154 |
-
}
|
155 |
-
|
156 |
-
if( ! current_user_can( 'update_plugins' ) ) {
|
157 |
-
return;
|
158 |
-
}
|
159 |
-
|
160 |
-
if( ! is_multisite() ) {
|
161 |
-
return;
|
162 |
-
}
|
163 |
-
|
164 |
-
if ( $this->name != $file ) {
|
165 |
-
return;
|
166 |
-
}
|
167 |
-
|
168 |
-
// Remove our filter on the site transient
|
169 |
-
remove_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_update' ), 10 );
|
170 |
-
|
171 |
-
$update_cache = get_site_transient( 'update_plugins' );
|
172 |
-
|
173 |
-
$update_cache = is_object( $update_cache ) ? $update_cache : new stdClass();
|
174 |
-
|
175 |
-
if ( empty( $update_cache->response ) || empty( $update_cache->response[ $this->name ] ) ) {
|
176 |
-
|
177 |
-
$version_info = $this->get_cached_version_info();
|
178 |
-
|
179 |
-
if ( false === $version_info ) {
|
180 |
-
$version_info = $this->api_request( 'plugin_latest_version', array( 'slug' => $this->slug, 'beta' => $this->beta ) );
|
181 |
-
|
182 |
-
// Since we disabled our filter for the transient, we aren't running our object conversion on banners, sections, or icons. Do this now:
|
183 |
-
if ( isset( $version_info->banners ) && ! is_array( $version_info->banners ) ) {
|
184 |
-
$version_info->banners = $this->convert_object_to_array( $version_info->banners );
|
185 |
-
}
|
186 |
-
|
187 |
-
if ( isset( $version_info->sections ) && ! is_array( $version_info->sections ) ) {
|
188 |
-
$version_info->sections = $this->convert_object_to_array( $version_info->sections );
|
189 |
-
}
|
190 |
-
|
191 |
-
if ( isset( $version_info->icons ) && ! is_array( $version_info->icons ) ) {
|
192 |
-
$version_info->icons = $this->convert_object_to_array( $version_info->icons );
|
193 |
-
}
|
194 |
-
|
195 |
-
$this->set_version_info_cache( $version_info );
|
196 |
-
}
|
197 |
-
|
198 |
-
if ( ! is_object( $version_info ) ) {
|
199 |
-
return;
|
200 |
-
}
|
201 |
-
|
202 |
-
if ( version_compare( $this->version, $version_info->new_version, '<' ) ) {
|
203 |
-
|
204 |
-
$update_cache->response[ $this->name ] = $version_info;
|
205 |
-
|
206 |
-
}
|
207 |
-
|
208 |
-
$update_cache->last_checked = time();
|
209 |
-
$update_cache->checked[ $this->name ] = $this->version;
|
210 |
-
|
211 |
-
set_site_transient( 'update_plugins', $update_cache );
|
212 |
-
|
213 |
-
} else {
|
214 |
-
|
215 |
-
$version_info = $update_cache->response[ $this->name ];
|
216 |
-
|
217 |
-
}
|
218 |
-
|
219 |
-
// Restore our filter
|
220 |
-
add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_update' ) );
|
221 |
-
|
222 |
-
if ( ! empty( $update_cache->response[ $this->name ] ) && version_compare( $this->version, $version_info->new_version, '<' ) ) {
|
223 |
-
|
224 |
-
// build a plugin list row, with update notification
|
225 |
-
$wp_list_table = _get_list_table( 'WP_Plugins_List_Table' );
|
226 |
-
# <tr class="plugin-update-tr"><td colspan="' . $wp_list_table->get_column_count() . '" class="plugin-update colspanchange">
|
227 |
-
echo '<tr class="plugin-update-tr" id="' . $this->slug . '-update" data-slug="' . $this->slug . '" data-plugin="' . $this->slug . '/' . $file . '">';
|
228 |
-
echo '<td colspan="3" class="plugin-update colspanchange">';
|
229 |
-
echo '<div class="update-message notice inline notice-warning notice-alt">';
|
230 |
-
|
231 |
-
$changelog_link = self_admin_url( 'index.php?edd_sl_action=view_plugin_changelog&plugin=' . $this->name . '&slug=' . $this->slug . '&TB_iframe=true&width=772&height=911' );
|
232 |
-
|
233 |
-
if ( empty( $version_info->download_link ) ) {
|
234 |
-
printf(
|
235 |
-
__( 'There is a new version of %1$s available. %2$sView version %3$s details%4$s.', 'popup-maker' ),
|
236 |
-
esc_html( $version_info->name ),
|
237 |
-
'<a target="_blank" class="thickbox" href="' . esc_url( $changelog_link ) . '">',
|
238 |
-
esc_html( $version_info->new_version ),
|
239 |
-
'</a>'
|
240 |
-
);
|
241 |
-
} else {
|
242 |
-
printf(
|
243 |
-
__( 'There is a new version of %1$s available. %2$sView version %3$s details%4$s or %5$supdate now%6$s.', 'popup-maker' ),
|
244 |
-
esc_html( $version_info->name ),
|
245 |
-
'<a target="_blank" class="thickbox" href="' . esc_url( $changelog_link ) . '">',
|
246 |
-
esc_html( $version_info->new_version ),
|
247 |
-
'</a>',
|
248 |
-
'<a href="' . esc_url( wp_nonce_url( self_admin_url( 'update.php?action=upgrade-plugin&plugin=' ) . $this->name, 'upgrade-plugin_' . $this->name ) ) .'">',
|
249 |
-
'</a>'
|
250 |
-
);
|
251 |
-
}
|
252 |
-
|
253 |
-
do_action( "in_plugin_update_message-{$file}", $plugin, $version_info );
|
254 |
-
|
255 |
-
echo '</div></td></tr>';
|
256 |
-
}
|
257 |
-
}
|
258 |
-
|
259 |
-
/**
|
260 |
-
* Updates information on the "View version x.x details" page with custom data.
|
261 |
-
*
|
262 |
-
* @uses api_request()
|
263 |
-
*
|
264 |
-
* @param mixed $_data
|
265 |
-
* @param string $_action
|
266 |
-
* @param object $_args
|
267 |
-
* @return object $_data
|
268 |
-
*/
|
269 |
-
public function plugins_api_filter( $_data, $_action = '', $_args = null ) {
|
270 |
-
|
271 |
-
if ( $_action != 'plugin_information' ) {
|
272 |
-
|
273 |
-
return $_data;
|
274 |
-
|
275 |
-
}
|
276 |
-
|
277 |
-
if ( ! isset( $_args->slug ) || ( $_args->slug != $this->slug ) ) {
|
278 |
-
|
279 |
-
return $_data;
|
280 |
-
|
281 |
-
}
|
282 |
-
|
283 |
-
$to_send = array(
|
284 |
-
'slug' => $this->slug,
|
285 |
-
'is_ssl' => is_ssl(),
|
286 |
-
'fields' => array(
|
287 |
-
'banners' => array(),
|
288 |
-
'reviews' => false,
|
289 |
-
'icons' => array(),
|
290 |
-
)
|
291 |
-
);
|
292 |
-
|
293 |
-
$cache_key = 'edd_api_request_' . md5( serialize( $this->slug . $this->api_data['license'] . $this->beta ) );
|
294 |
-
|
295 |
-
// Get the transient where we store the api request for this plugin for 24 hours
|
296 |
-
$edd_api_request_transient = $this->get_cached_version_info( $cache_key );
|
297 |
-
|
298 |
-
//If we have no transient-saved value, run the API, set a fresh transient with the API value, and return that value too right now.
|
299 |
-
if ( empty( $edd_api_request_transient ) ) {
|
300 |
-
|
301 |
-
$api_response = $this->api_request( 'plugin_information', $to_send );
|
302 |
-
|
303 |
-
// Expires in 3 hours
|
304 |
-
$this->set_version_info_cache( $api_response, $cache_key );
|
305 |
-
|
306 |
-
if ( false !== $api_response ) {
|
307 |
-
$_data = $api_response;
|
308 |
-
}
|
309 |
-
|
310 |
-
} else {
|
311 |
-
$_data = $edd_api_request_transient;
|
312 |
-
}
|
313 |
-
|
314 |
-
// Convert sections into an associative array, since we're getting an object, but Core expects an array.
|
315 |
-
if ( isset( $_data->sections ) && ! is_array( $_data->sections ) ) {
|
316 |
-
$_data->sections = $this->convert_object_to_array( $_data->sections );
|
317 |
-
}
|
318 |
-
|
319 |
-
// Convert banners into an associative array, since we're getting an object, but Core expects an array.
|
320 |
-
if ( isset( $_data->banners ) && ! is_array( $_data->banners ) ) {
|
321 |
-
$_data->banners = $this->convert_object_to_array( $_data->banners );
|
322 |
-
}
|
323 |
-
|
324 |
-
// Convert icons into an associative array, since we're getting an object, but Core expects an array.
|
325 |
-
if ( isset( $_data->icons ) && ! is_array( $_data->icons ) ) {
|
326 |
-
$_data->icons = $this->convert_object_to_array( $_data->icons );
|
327 |
-
}
|
328 |
-
|
329 |
-
if( ! isset( $_data->plugin ) ) {
|
330 |
-
$_data->plugin = $this->name;
|
331 |
-
}
|
332 |
-
|
333 |
-
return $_data;
|
334 |
-
}
|
335 |
-
|
336 |
-
/**
|
337 |
-
* Convert some objects to arrays when injecting data into the update API
|
338 |
-
*
|
339 |
-
* Some data like sections, banners, and icons are expected to be an associative array, however due to the JSON
|
340 |
-
* decoding, they are objects. This method allows us to pass in the object and return an associative array.
|
341 |
-
*
|
342 |
-
* @since 3.6.5
|
343 |
-
*
|
344 |
-
* @param stdClass $data
|
345 |
-
*
|
346 |
-
* @return array
|
347 |
-
*/
|
348 |
-
private function convert_object_to_array( $data ) {
|
349 |
-
$new_data = array();
|
350 |
-
foreach ( $data as $key => $value ) {
|
351 |
-
$new_data[ $key ] = $value;
|
352 |
-
}
|
353 |
-
|
354 |
-
return $new_data;
|
355 |
-
}
|
356 |
-
|
357 |
-
/**
|
358 |
-
* Disable SSL verification in order to prevent download update failures
|
359 |
-
*
|
360 |
-
* @param array $args
|
361 |
-
* @param string $url
|
362 |
-
* @return object $array
|
363 |
-
*/
|
364 |
-
public function http_request_args( $args, $url ) {
|
365 |
-
|
366 |
-
$verify_ssl = $this->verify_ssl();
|
367 |
-
if ( strpos( $url, 'https://' ) !== false && strpos( $url, 'edd_action=package_download' ) ) {
|
368 |
-
$args['sslverify'] = $verify_ssl;
|
369 |
-
}
|
370 |
-
return $args;
|
371 |
-
|
372 |
-
}
|
373 |
-
|
374 |
-
/**
|
375 |
-
* Calls the API and, if successfull, returns the object delivered by the API.
|
376 |
-
*
|
377 |
-
* @uses get_bloginfo()
|
378 |
-
* @uses wp_remote_post()
|
379 |
-
* @uses is_wp_error()
|
380 |
-
*
|
381 |
-
* @param string $_action The requested action.
|
382 |
-
* @param array $_data Parameters for the API action.
|
383 |
-
* @return false|object
|
384 |
-
*/
|
385 |
-
private function api_request( $_action, $_data ) {
|
386 |
-
|
387 |
-
global $wp_version, $edd_plugin_url_available;
|
388 |
-
|
389 |
-
$verify_ssl = $this->verify_ssl();
|
390 |
-
|
391 |
-
// Do a quick status check on this domain if we haven't already checked it.
|
392 |
-
$store_hash = md5( $this->api_url );
|
393 |
-
if ( ! is_array( $edd_plugin_url_available ) || ! isset( $edd_plugin_url_available[ $store_hash ] ) ) {
|
394 |
-
$test_url_parts = parse_url( $this->api_url );
|
395 |
-
|
396 |
-
$scheme = ! empty( $test_url_parts['scheme'] ) ? $test_url_parts['scheme'] : 'http';
|
397 |
-
$host = ! empty( $test_url_parts['host'] ) ? $test_url_parts['host'] : '';
|
398 |
-
$port = ! empty( $test_url_parts['port'] ) ? ':' . $test_url_parts['port'] : '';
|
399 |
-
|
400 |
-
if ( empty( $host ) ) {
|
401 |
-
$edd_plugin_url_available[ $store_hash ] = false;
|
402 |
-
} else {
|
403 |
-
$test_url = $scheme . '://' . $host . $port;
|
404 |
-
$response = wp_remote_get( $test_url, array( 'timeout' => $this->health_check_timeout, 'sslverify' => $verify_ssl ) );
|
405 |
-
$edd_plugin_url_available[ $store_hash ] = is_wp_error( $response ) ? false : true;
|
406 |
-
}
|
407 |
-
}
|
408 |
-
|
409 |
-
if ( false === $edd_plugin_url_available[ $store_hash ] ) {
|
410 |
-
return;
|
411 |
-
}
|
412 |
-
|
413 |
-
$data = array_merge( $this->api_data, $_data );
|
414 |
-
|
415 |
-
if ( $data['slug'] != $this->slug ) {
|
416 |
-
return;
|
417 |
-
}
|
418 |
-
|
419 |
-
if( $this->api_url == trailingslashit ( home_url() ) ) {
|
420 |
-
return false; // Don't allow a plugin to ping itself
|
421 |
-
}
|
422 |
-
|
423 |
-
$api_params = array(
|
424 |
-
'edd_action' => 'get_version',
|
425 |
-
'license' => ! empty( $data['license'] ) ? $data['license'] : '',
|
426 |
-
'item_name' => isset( $data['item_name'] ) ? $data['item_name'] : false,
|
427 |
-
'item_id' => isset( $data['item_id'] ) ? $data['item_id'] : false,
|
428 |
-
'version' => isset( $data['version'] ) ? $data['version'] : false,
|
429 |
-
'slug' => $data['slug'],
|
430 |
-
'author' => $data['author'],
|
431 |
-
'url' => home_url(),
|
432 |
-
'beta' => ! empty( $data['beta'] ),
|
433 |
-
);
|
434 |
-
|
435 |
-
$request = wp_remote_post( $this->api_url, array( 'timeout' => 15, 'sslverify' => $verify_ssl, 'body' => $api_params ) );
|
436 |
-
|
437 |
-
if ( ! is_wp_error( $request ) ) {
|
438 |
-
$request = json_decode( wp_remote_retrieve_body( $request ) );
|
439 |
-
}
|
440 |
-
|
441 |
-
if ( $request && isset( $request->sections ) ) {
|
442 |
-
$request->sections = maybe_unserialize( $request->sections );
|
443 |
-
} else {
|
444 |
-
$request = false;
|
445 |
-
}
|
446 |
-
|
447 |
-
if ( $request && isset( $request->banners ) ) {
|
448 |
-
$request->banners = maybe_unserialize( $request->banners );
|
449 |
-
}
|
450 |
-
|
451 |
-
if ( $request && isset( $request->icons ) ) {
|
452 |
-
$request->icons = maybe_unserialize( $request->icons );
|
453 |
-
}
|
454 |
-
|
455 |
-
if( ! empty( $request->sections ) ) {
|
456 |
-
foreach( $request->sections as $key => $section ) {
|
457 |
-
$request->$key = (array) $section;
|
458 |
-
}
|
459 |
-
}
|
460 |
-
|
461 |
-
return $request;
|
462 |
-
}
|
463 |
-
|
464 |
-
public function show_changelog() {
|
465 |
-
|
466 |
-
global $edd_plugin_data;
|
467 |
-
|
468 |
-
if( empty( $_REQUEST['edd_sl_action'] ) || 'view_plugin_changelog' != $_REQUEST['edd_sl_action'] ) {
|
469 |
-
return;
|
470 |
-
}
|
471 |
-
|
472 |
-
if( empty( $_REQUEST['plugin'] ) ) {
|
473 |
-
return;
|
474 |
-
}
|
475 |
-
|
476 |
-
if( empty( $_REQUEST['slug'] ) ) {
|
477 |
-
return;
|
478 |
-
}
|
479 |
-
|
480 |
-
if( ! current_user_can( 'update_plugins' ) ) {
|
481 |
-
wp_die( __( 'You do not have permission to install plugin updates', 'popup-maker' ), __( 'Error', 'popup-maker' ), array( 'response' => 403 ) );
|
482 |
-
}
|
483 |
-
|
484 |
-
$data = $edd_plugin_data[ $_REQUEST['slug'] ];
|
485 |
-
$beta = ! empty( $data['beta'] ) ? true : false;
|
486 |
-
$cache_key = md5( 'edd_plugin_' . sanitize_key( $_REQUEST['plugin'] ) . '_' . $beta . '_version_info' );
|
487 |
-
$version_info = $this->get_cached_version_info( $cache_key );
|
488 |
-
|
489 |
-
if( false === $version_info ) {
|
490 |
-
|
491 |
-
$api_params = array(
|
492 |
-
'edd_action' => 'get_version',
|
493 |
-
'item_name' => isset( $data['item_name'] ) ? $data['item_name'] : false,
|
494 |
-
'item_id' => isset( $data['item_id'] ) ? $data['item_id'] : false,
|
495 |
-
'slug' => $_REQUEST['slug'],
|
496 |
-
'author' => $data['author'],
|
497 |
-
'url' => home_url(),
|
498 |
-
'beta' => ! empty( $data['beta'] )
|
499 |
-
);
|
500 |
-
|
501 |
-
$verify_ssl = $this->verify_ssl();
|
502 |
-
$request = wp_remote_post( $this->api_url, array( 'timeout' => 15, 'sslverify' => $verify_ssl, 'body' => $api_params ) );
|
503 |
-
|
504 |
-
if ( ! is_wp_error( $request ) ) {
|
505 |
-
$version_info = json_decode( wp_remote_retrieve_body( $request ) );
|
506 |
-
}
|
507 |
-
|
508 |
-
|
509 |
-
if ( ! empty( $version_info ) && isset( $version_info->sections ) ) {
|
510 |
-
$version_info->sections = maybe_unserialize( $version_info->sections );
|
511 |
-
} else {
|
512 |
-
$version_info = false;
|
513 |
-
}
|
514 |
-
|
515 |
-
if( ! empty( $version_info ) ) {
|
516 |
-
foreach( $version_info->sections as $key => $section ) {
|
517 |
-
$version_info->$key = (array) $section;
|
518 |
-
}
|
519 |
-
}
|
520 |
-
|
521 |
-
$this->set_version_info_cache( $version_info, $cache_key );
|
522 |
-
|
523 |
-
}
|
524 |
-
|
525 |
-
if( ! empty( $version_info ) && isset( $version_info->sections['changelog'] ) ) {
|
526 |
-
echo '<div style="background:#fff;padding:10px;">' . $version_info->sections['changelog'] . '</div>';
|
527 |
-
}
|
528 |
-
|
529 |
-
exit;
|
530 |
-
}
|
531 |
-
|
532 |
-
public function get_cached_version_info( $cache_key = '' ) {
|
533 |
-
|
534 |
-
if( empty( $cache_key ) ) {
|
535 |
-
$cache_key = $this->cache_key;
|
536 |
-
}
|
537 |
-
|
538 |
-
$cache = get_option( $cache_key );
|
539 |
-
|
540 |
-
if( empty( $cache['timeout'] ) || time() > $cache['timeout'] ) {
|
541 |
-
return false; // Cache is expired
|
542 |
-
}
|
543 |
-
|
544 |
-
// We need to turn the icons into an array, thanks to WP Core forcing these into an object at some point.
|
545 |
-
$cache['value'] = json_decode( $cache['value'] );
|
546 |
-
if ( ! empty( $cache['value']->icons ) ) {
|
547 |
-
$cache['value']->icons = (array) $cache['value']->icons;
|
548 |
-
}
|
549 |
-
|
550 |
-
return $cache['value'];
|
551 |
-
|
552 |
-
}
|
553 |
-
|
554 |
-
public function set_version_info_cache( $value = '', $cache_key = '' ) {
|
555 |
-
|
556 |
-
if( empty( $cache_key ) ) {
|
557 |
-
$cache_key = $this->cache_key;
|
558 |
-
}
|
559 |
-
|
560 |
-
$data = array(
|
561 |
-
'timeout' => strtotime( '+3 hours', time() ),
|
562 |
-
'value' => json_encode( $value )
|
563 |
-
);
|
564 |
-
|
565 |
-
update_option( $cache_key, $data, 'no' );
|
566 |
-
|
567 |
-
}
|
568 |
-
|
569 |
-
/**
|
570 |
-
* Returns if the SSL of the store should be verified.
|
571 |
-
*
|
572 |
-
* @since 1.6.13
|
573 |
-
* @return bool
|
574 |
-
*/
|
575 |
-
private function verify_ssl() {
|
576 |
-
return (bool) apply_filters( 'edd_sl_api_request_verify_ssl', true, $this );
|
577 |
-
}
|
578 |
-
|
579 |
-
}
|
1 |
+
<?php
|
2 |
+
/*******************************************************************************
|
3 |
+
* Copyright (c) 2018, WP Popup Maker
|
4 |
+
******************************************************************************/
|
5 |
+
|
6 |
+
// Exit if accessed directly
|
7 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
8 |
+
exit;
|
9 |
+
}
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Allows paid/commercial extensions to update from our own servers.
|
13 |
+
*
|
14 |
+
* Note for wordpress.org admins. This is not called in the free hosted version and is simply used for hooking in addons to one update system rather than including it in each plugin.
|
15 |
+
*
|
16 |
+
* @author Easy Digital Downloads
|
17 |
+
* @version 1.6.18
|
18 |
+
*/
|
19 |
+
class PUM_Extension_Updater {
|
20 |
+
|
21 |
+
private $api_url = '';
|
22 |
+
private $api_data = array();
|
23 |
+
private $name = '';
|
24 |
+
private $slug = '';
|
25 |
+
private $version = '';
|
26 |
+
private $wp_override = false;
|
27 |
+
private $cache_key = '';
|
28 |
+
|
29 |
+
private $health_check_timeout = 5;
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Class constructor.
|
33 |
+
*
|
34 |
+
* @uses plugin_basename()
|
35 |
+
* @uses hook()
|
36 |
+
*
|
37 |
+
* @param string $_api_url The URL pointing to the custom API endpoint.
|
38 |
+
* @param string $_plugin_file Path to the plugin file.
|
39 |
+
* @param array $_api_data Optional data to send with API calls.
|
40 |
+
*/
|
41 |
+
public function __construct( $_api_url, $_plugin_file, $_api_data = null ) {
|
42 |
+
|
43 |
+
global $edd_plugin_data;
|
44 |
+
|
45 |
+
$this->api_url = trailingslashit( $_api_url );
|
46 |
+
$this->api_data = $_api_data;
|
47 |
+
$this->name = plugin_basename( $_plugin_file );
|
48 |
+
$this->slug = basename( $_plugin_file, '.php' );
|
49 |
+
$this->version = $_api_data['version'];
|
50 |
+
$this->wp_override = isset( $_api_data['wp_override'] ) ? (bool) $_api_data['wp_override'] : false;
|
51 |
+
$this->beta = ! empty( $this->api_data['beta'] ) ? true : false;
|
52 |
+
$this->cache_key = 'edd_sl_' . md5( serialize( $this->slug . $this->api_data['license'] . $this->beta ) );
|
53 |
+
|
54 |
+
$edd_plugin_data[ $this->slug ] = $this->api_data;
|
55 |
+
|
56 |
+
/**
|
57 |
+
* Fires after the $edd_plugin_data is setup.
|
58 |
+
*
|
59 |
+
* @since x.x.x
|
60 |
+
*
|
61 |
+
* @param array $edd_plugin_data Array of EDD SL plugin data.
|
62 |
+
*/
|
63 |
+
do_action( 'post_edd_sl_plugin_updater_setup', $edd_plugin_data );
|
64 |
+
|
65 |
+
// Set up hooks.
|
66 |
+
$this->init();
|
67 |
+
|
68 |
+
}
|
69 |
+
|
70 |
+
/**
|
71 |
+
* Set up WordPress filters to hook into WP's update process.
|
72 |
+
*
|
73 |
+
* @uses add_filter()
|
74 |
+
*
|
75 |
+
* @return void
|
76 |
+
*/
|
77 |
+
public function init() {
|
78 |
+
|
79 |
+
add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_update' ) );
|
80 |
+
add_filter( 'plugins_api', array( $this, 'plugins_api_filter' ), 10, 3 );
|
81 |
+
remove_action( 'after_plugin_row_' . $this->name, 'wp_plugin_update_row', 10 );
|
82 |
+
add_action( 'after_plugin_row_' . $this->name, array( $this, 'show_update_notification' ), 10, 2 );
|
83 |
+
add_action( 'admin_init', array( $this, 'show_changelog' ) );
|
84 |
+
|
85 |
+
}
|
86 |
+
|
87 |
+
/**
|
88 |
+
* Check for Updates at the defined API endpoint and modify the update array.
|
89 |
+
*
|
90 |
+
* This function dives into the update API just when WordPress creates its update array,
|
91 |
+
* then adds a custom API call and injects the custom plugin data retrieved from the API.
|
92 |
+
* It is reassembled from parts of the native WordPress plugin update code.
|
93 |
+
* See wp-includes/update.php line 121 for the original wp_update_plugins() function.
|
94 |
+
*
|
95 |
+
* @uses api_request()
|
96 |
+
*
|
97 |
+
* @param array $_transient_data Update array build by WordPress.
|
98 |
+
* @return array Modified update array with custom plugin data.
|
99 |
+
*/
|
100 |
+
public function check_update( $_transient_data ) {
|
101 |
+
|
102 |
+
global $pagenow;
|
103 |
+
|
104 |
+
if ( ! is_object( $_transient_data ) ) {
|
105 |
+
$_transient_data = new stdClass;
|
106 |
+
}
|
107 |
+
|
108 |
+
if ( 'plugins.php' == $pagenow && is_multisite() ) {
|
109 |
+
return $_transient_data;
|
110 |
+
}
|
111 |
+
|
112 |
+
if ( ! empty( $_transient_data->response ) && ! empty( $_transient_data->response[ $this->name ] ) && false === $this->wp_override ) {
|
113 |
+
return $_transient_data;
|
114 |
+
}
|
115 |
+
|
116 |
+
$version_info = $this->get_cached_version_info();
|
117 |
+
|
118 |
+
if ( false === $version_info ) {
|
119 |
+
$version_info = $this->api_request( 'plugin_latest_version', array( 'slug' => $this->slug, 'beta' => $this->beta ) );
|
120 |
+
|
121 |
+
$this->set_version_info_cache( $version_info );
|
122 |
+
|
123 |
+
}
|
124 |
+
|
125 |
+
if ( false !== $version_info && is_object( $version_info ) && isset( $version_info->new_version ) ) {
|
126 |
+
|
127 |
+
if ( version_compare( $this->version, $version_info->new_version, '<' ) ) {
|
128 |
+
|
129 |
+
$_transient_data->response[ $this->name ] = $version_info;
|
130 |
+
|
131 |
+
// Make sure the plugin property is set to the plugin's name/location. See issue 1463 on Software Licensing's GitHub repo.
|
132 |
+
$_transient_data->response[ $this->name ]->plugin = $this->name;
|
133 |
+
|
134 |
+
}
|
135 |
+
|
136 |
+
$_transient_data->last_checked = time();
|
137 |
+
$_transient_data->checked[ $this->name ] = $this->version;
|
138 |
+
|
139 |
+
}
|
140 |
+
|
141 |
+
return $_transient_data;
|
142 |
+
}
|
143 |
+
|
144 |
+
/**
|
145 |
+
* show update nofication row -- needed for multisite subsites, because WP won't tell you otherwise!
|
146 |
+
*
|
147 |
+
* @param string $file
|
148 |
+
* @param array $plugin
|
149 |
+
*/
|
150 |
+
public function show_update_notification( $file, $plugin ) {
|
151 |
+
|
152 |
+
if ( is_network_admin() ) {
|
153 |
+
return;
|
154 |
+
}
|
155 |
+
|
156 |
+
if( ! current_user_can( 'update_plugins' ) ) {
|
157 |
+
return;
|
158 |
+
}
|
159 |
+
|
160 |
+
if( ! is_multisite() ) {
|
161 |
+
return;
|
162 |
+
}
|
163 |
+
|
164 |
+
if ( $this->name != $file ) {
|
165 |
+
return;
|
166 |
+
}
|
167 |
+
|
168 |
+
// Remove our filter on the site transient
|
169 |
+
remove_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_update' ), 10 );
|
170 |
+
|
171 |
+
$update_cache = get_site_transient( 'update_plugins' );
|
172 |
+
|
173 |
+
$update_cache = is_object( $update_cache ) ? $update_cache : new stdClass();
|
174 |
+
|
175 |
+
if ( empty( $update_cache->response ) || empty( $update_cache->response[ $this->name ] ) ) {
|
176 |
+
|
177 |
+
$version_info = $this->get_cached_version_info();
|
178 |
+
|
179 |
+
if ( false === $version_info ) {
|
180 |
+
$version_info = $this->api_request( 'plugin_latest_version', array( 'slug' => $this->slug, 'beta' => $this->beta ) );
|
181 |
+
|
182 |
+
// Since we disabled our filter for the transient, we aren't running our object conversion on banners, sections, or icons. Do this now:
|
183 |
+
if ( isset( $version_info->banners ) && ! is_array( $version_info->banners ) ) {
|
184 |
+
$version_info->banners = $this->convert_object_to_array( $version_info->banners );
|
185 |
+
}
|
186 |
+
|
187 |
+
if ( isset( $version_info->sections ) && ! is_array( $version_info->sections ) ) {
|
188 |
+
$version_info->sections = $this->convert_object_to_array( $version_info->sections );
|
189 |
+
}
|
190 |
+
|
191 |
+
if ( isset( $version_info->icons ) && ! is_array( $version_info->icons ) ) {
|
192 |
+
$version_info->icons = $this->convert_object_to_array( $version_info->icons );
|
193 |
+
}
|
194 |
+
|
195 |
+
$this->set_version_info_cache( $version_info );
|
196 |
+
}
|
197 |
+
|
198 |
+
if ( ! is_object( $version_info ) ) {
|
199 |
+
return;
|
200 |
+
}
|
201 |
+
|
202 |
+
if ( version_compare( $this->version, $version_info->new_version, '<' ) ) {
|
203 |
+
|
204 |
+
$update_cache->response[ $this->name ] = $version_info;
|
205 |
+
|
206 |
+
}
|
207 |
+
|
208 |
+
$update_cache->last_checked = time();
|
209 |
+
$update_cache->checked[ $this->name ] = $this->version;
|
210 |
+
|
211 |
+
set_site_transient( 'update_plugins', $update_cache );
|
212 |
+
|
213 |
+
} else {
|
214 |
+
|
215 |
+
$version_info = $update_cache->response[ $this->name ];
|
216 |
+
|
217 |
+
}
|
218 |
+
|
219 |
+
// Restore our filter
|
220 |
+
add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'check_update' ) );
|
221 |
+
|
222 |
+
if ( ! empty( $update_cache->response[ $this->name ] ) && version_compare( $this->version, $version_info->new_version, '<' ) ) {
|
223 |
+
|
224 |
+
// build a plugin list row, with update notification
|
225 |
+
$wp_list_table = _get_list_table( 'WP_Plugins_List_Table' );
|
226 |
+
# <tr class="plugin-update-tr"><td colspan="' . $wp_list_table->get_column_count() . '" class="plugin-update colspanchange">
|
227 |
+
echo '<tr class="plugin-update-tr" id="' . $this->slug . '-update" data-slug="' . $this->slug . '" data-plugin="' . $this->slug . '/' . $file . '">';
|
228 |
+
echo '<td colspan="3" class="plugin-update colspanchange">';
|
229 |
+
echo '<div class="update-message notice inline notice-warning notice-alt">';
|
230 |
+
|
231 |
+
$changelog_link = self_admin_url( 'index.php?edd_sl_action=view_plugin_changelog&plugin=' . $this->name . '&slug=' . $this->slug . '&TB_iframe=true&width=772&height=911' );
|
232 |
+
|
233 |
+
if ( empty( $version_info->download_link ) ) {
|
234 |
+
printf(
|
235 |
+
__( 'There is a new version of %1$s available. %2$sView version %3$s details%4$s.', 'popup-maker' ),
|
236 |
+
esc_html( $version_info->name ),
|
237 |
+
'<a target="_blank" class="thickbox" href="' . esc_url( $changelog_link ) . '">',
|
238 |
+
esc_html( $version_info->new_version ),
|
239 |
+
'</a>'
|
240 |
+
);
|
241 |
+
} else {
|
242 |
+
printf(
|
243 |
+
__( 'There is a new version of %1$s available. %2$sView version %3$s details%4$s or %5$supdate now%6$s.', 'popup-maker' ),
|
244 |
+
esc_html( $version_info->name ),
|
245 |
+
'<a target="_blank" class="thickbox" href="' . esc_url( $changelog_link ) . '">',
|
246 |
+
esc_html( $version_info->new_version ),
|
247 |
+
'</a>',
|
248 |
+
'<a href="' . esc_url( wp_nonce_url( self_admin_url( 'update.php?action=upgrade-plugin&plugin=' ) . $this->name, 'upgrade-plugin_' . $this->name ) ) .'">',
|
249 |
+
'</a>'
|
250 |
+
);
|
251 |
+
}
|
252 |
+
|
253 |
+
do_action( "in_plugin_update_message-{$file}", $plugin, $version_info );
|
254 |
+
|
255 |
+
echo '</div></td></tr>';
|
256 |
+
}
|
257 |
+
}
|
258 |
+
|
259 |
+
/**
|
260 |
+
* Updates information on the "View version x.x details" page with custom data.
|
261 |
+
*
|
262 |
+
* @uses api_request()
|
263 |
+
*
|
264 |
+
* @param mixed $_data
|
265 |
+
* @param string $_action
|
266 |
+
* @param object $_args
|
267 |
+
* @return object $_data
|
268 |
+
*/
|
269 |
+
public function plugins_api_filter( $_data, $_action = '', $_args = null ) {
|
270 |
+
|
271 |
+
if ( $_action != 'plugin_information' ) {
|
272 |
+
|
273 |
+
return $_data;
|
274 |
+
|
275 |
+
}
|
276 |
+
|
277 |
+
if ( ! isset( $_args->slug ) || ( $_args->slug != $this->slug ) ) {
|
278 |
+
|
279 |
+
return $_data;
|
280 |
+
|
281 |
+
}
|
282 |
+
|
283 |
+
$to_send = array(
|
284 |
+
'slug' => $this->slug,
|
285 |
+
'is_ssl' => is_ssl(),
|
286 |
+
'fields' => array(
|
287 |
+
'banners' => array(),
|
288 |
+
'reviews' => false,
|
289 |
+
'icons' => array(),
|
290 |
+
)
|
291 |
+
);
|
292 |
+
|
293 |
+
$cache_key = 'edd_api_request_' . md5( serialize( $this->slug . $this->api_data['license'] . $this->beta ) );
|
294 |
+
|
295 |
+
// Get the transient where we store the api request for this plugin for 24 hours
|
296 |
+
$edd_api_request_transient = $this->get_cached_version_info( $cache_key );
|
297 |
+
|
298 |
+
//If we have no transient-saved value, run the API, set a fresh transient with the API value, and return that value too right now.
|
299 |
+
if ( empty( $edd_api_request_transient ) ) {
|
300 |
+
|
301 |
+
$api_response = $this->api_request( 'plugin_information', $to_send );
|
302 |
+
|
303 |
+
// Expires in 3 hours
|
304 |
+
$this->set_version_info_cache( $api_response, $cache_key );
|
305 |
+
|
306 |
+
if ( false !== $api_response ) {
|
307 |
+
$_data = $api_response;
|
308 |
+
}
|
309 |
+
|
310 |
+
} else {
|
311 |
+
$_data = $edd_api_request_transient;
|
312 |
+
}
|
313 |
+
|
314 |
+
// Convert sections into an associative array, since we're getting an object, but Core expects an array.
|
315 |
+
if ( isset( $_data->sections ) && ! is_array( $_data->sections ) ) {
|
316 |
+
$_data->sections = $this->convert_object_to_array( $_data->sections );
|
317 |
+
}
|
318 |
+
|
319 |
+
// Convert banners into an associative array, since we're getting an object, but Core expects an array.
|
320 |
+
if ( isset( $_data->banners ) && ! is_array( $_data->banners ) ) {
|
321 |
+
$_data->banners = $this->convert_object_to_array( $_data->banners );
|
322 |
+
}
|
323 |
+
|
324 |
+
// Convert icons into an associative array, since we're getting an object, but Core expects an array.
|
325 |
+
if ( isset( $_data->icons ) && ! is_array( $_data->icons ) ) {
|
326 |
+
$_data->icons = $this->convert_object_to_array( $_data->icons );
|
327 |
+
}
|
328 |
+
|
329 |
+
if( ! isset( $_data->plugin ) ) {
|
330 |
+
$_data->plugin = $this->name;
|
331 |
+
}
|
332 |
+
|
333 |
+
return $_data;
|
334 |
+
}
|
335 |
+
|
336 |
+
/**
|
337 |
+
* Convert some objects to arrays when injecting data into the update API
|
338 |
+
*
|
339 |
+
* Some data like sections, banners, and icons are expected to be an associative array, however due to the JSON
|
340 |
+
* decoding, they are objects. This method allows us to pass in the object and return an associative array.
|
341 |
+
*
|
342 |
+
* @since 3.6.5
|
343 |
+
*
|
344 |
+
* @param stdClass $data
|
345 |
+
*
|
346 |
+
* @return array
|
347 |
+
*/
|
348 |
+
private function convert_object_to_array( $data ) {
|
349 |
+
$new_data = array();
|
350 |
+
foreach ( $data as $key => $value ) {
|
351 |
+
$new_data[ $key ] = $value;
|
352 |
+
}
|
353 |
+
|
354 |
+
return $new_data;
|
355 |
+
}
|
356 |
+
|
357 |
+
/**
|
358 |
+
* Disable SSL verification in order to prevent download update failures
|
359 |
+
*
|
360 |
+
* @param array $args
|
361 |
+
* @param string $url
|
362 |
+
* @return object $array
|
363 |
+
*/
|
364 |
+
public function http_request_args( $args, $url ) {
|
365 |
+
|
366 |
+
$verify_ssl = $this->verify_ssl();
|
367 |
+
if ( strpos( $url, 'https://' ) !== false && strpos( $url, 'edd_action=package_download' ) ) {
|
368 |
+
$args['sslverify'] = $verify_ssl;
|
369 |
+
}
|
370 |
+
return $args;
|
371 |
+
|
372 |
+
}
|
373 |
+
|
374 |
+
/**
|
375 |
+
* Calls the API and, if successfull, returns the object delivered by the API.
|
376 |
+
*
|
377 |
+
* @uses get_bloginfo()
|
378 |
+
* @uses wp_remote_post()
|
379 |
+
* @uses is_wp_error()
|
380 |
+
*
|
381 |
+
* @param string $_action The requested action.
|
382 |
+
* @param array $_data Parameters for the API action.
|
383 |
+
* @return false|object
|
384 |
+
*/
|
385 |
+
private function api_request( $_action, $_data ) {
|
386 |
+
|
387 |
+
global $wp_version, $edd_plugin_url_available;
|
388 |
+
|
389 |
+
$verify_ssl = $this->verify_ssl();
|
390 |
+
|
391 |
+
// Do a quick status check on this domain if we haven't already checked it.
|
392 |
+
$store_hash = md5( $this->api_url );
|
393 |
+
if ( ! is_array( $edd_plugin_url_available ) || ! isset( $edd_plugin_url_available[ $store_hash ] ) ) {
|
394 |
+
$test_url_parts = parse_url( $this->api_url );
|
395 |
+
|
396 |
+
$scheme = ! empty( $test_url_parts['scheme'] ) ? $test_url_parts['scheme'] : 'http';
|
397 |
+
$host = ! empty( $test_url_parts['host'] ) ? $test_url_parts['host'] : '';
|
398 |
+
$port = ! empty( $test_url_parts['port'] ) ? ':' . $test_url_parts['port'] : '';
|
399 |
+
|
400 |
+
if ( empty( $host ) ) {
|
401 |
+
$edd_plugin_url_available[ $store_hash ] = false;
|
402 |
+
} else {
|
403 |
+
$test_url = $scheme . '://' . $host . $port;
|
404 |
+
$response = wp_remote_get( $test_url, array( 'timeout' => $this->health_check_timeout, 'sslverify' => $verify_ssl ) );
|
405 |
+
$edd_plugin_url_available[ $store_hash ] = is_wp_error( $response ) ? false : true;
|
406 |
+
}
|
407 |
+
}
|
408 |
+
|
409 |
+
if ( false === $edd_plugin_url_available[ $store_hash ] ) {
|
410 |
+
return;
|
411 |
+
}
|
412 |
+
|
413 |
+
$data = array_merge( $this->api_data, $_data );
|
414 |
+
|
415 |
+
if ( $data['slug'] != $this->slug ) {
|
416 |
+
return;
|
417 |
+
}
|
418 |
+
|
419 |
+
if( $this->api_url == trailingslashit ( home_url() ) ) {
|
420 |
+
return false; // Don't allow a plugin to ping itself
|
421 |
+
}
|
422 |
+
|
423 |
+
$api_params = array(
|
424 |
+
'edd_action' => 'get_version',
|
425 |
+
'license' => ! empty( $data['license'] ) ? $data['license'] : '',
|
426 |
+
'item_name' => isset( $data['item_name'] ) ? $data['item_name'] : false,
|
427 |
+
'item_id' => isset( $data['item_id'] ) ? $data['item_id'] : false,
|
428 |
+
'version' => isset( $data['version'] ) ? $data['version'] : false,
|
429 |
+
'slug' => $data['slug'],
|
430 |
+
'author' => $data['author'],
|
431 |
+
'url' => home_url(),
|
432 |
+
'beta' => ! empty( $data['beta'] ),
|
433 |
+
);
|
434 |
+
|
435 |
+
$request = wp_remote_post( $this->api_url, array( 'timeout' => 15, 'sslverify' => $verify_ssl, 'body' => $api_params ) );
|
436 |
+
|
437 |
+
if ( ! is_wp_error( $request ) ) {
|
438 |
+
$request = json_decode( wp_remote_retrieve_body( $request ) );
|
439 |
+
}
|
440 |
+
|
441 |
+
if ( $request && isset( $request->sections ) ) {
|
442 |
+
$request->sections = maybe_unserialize( $request->sections );
|
443 |
+
} else {
|
444 |
+
$request = false;
|
445 |
+
}
|
446 |
+
|
447 |
+
if ( $request && isset( $request->banners ) ) {
|
448 |
+
$request->banners = maybe_unserialize( $request->banners );
|
449 |
+
}
|
450 |
+
|
451 |
+
if ( $request && isset( $request->icons ) ) {
|
452 |
+
$request->icons = maybe_unserialize( $request->icons );
|
453 |
+
}
|
454 |
+
|
455 |
+
if( ! empty( $request->sections ) ) {
|
456 |
+
foreach( $request->sections as $key => $section ) {
|
457 |
+
$request->$key = (array) $section;
|
458 |
+
}
|
459 |
+
}
|
460 |
+
|
461 |
+
return $request;
|
462 |
+
}
|
463 |
+
|
464 |
+
public function show_changelog() {
|
465 |
+
|
466 |
+
global $edd_plugin_data;
|
467 |
+
|
468 |
+
if( empty( $_REQUEST['edd_sl_action'] ) || 'view_plugin_changelog' != $_REQUEST['edd_sl_action'] ) {
|
469 |
+
return;
|
470 |
+
}
|
471 |
+
|
472 |
+
if( empty( $_REQUEST['plugin'] ) ) {
|
473 |
+
return;
|
474 |
+
}
|
475 |
+
|
476 |
+
if( empty( $_REQUEST['slug'] ) ) {
|
477 |
+
return;
|
478 |
+
}
|
479 |
+
|
480 |
+
if( ! current_user_can( 'update_plugins' ) ) {
|
481 |
+
wp_die( __( 'You do not have permission to install plugin updates', 'popup-maker' ), __( 'Error', 'popup-maker' ), array( 'response' => 403 ) );
|
482 |
+
}
|
483 |
+
|
484 |
+
$data = $edd_plugin_data[ $_REQUEST['slug'] ];
|
485 |
+
$beta = ! empty( $data['beta'] ) ? true : false;
|
486 |
+
$cache_key = md5( 'edd_plugin_' . sanitize_key( $_REQUEST['plugin'] ) . '_' . $beta . '_version_info' );
|
487 |
+
$version_info = $this->get_cached_version_info( $cache_key );
|
488 |
+
|
489 |
+
if( false === $version_info ) {
|
490 |
+
|
491 |
+
$api_params = array(
|
492 |
+
'edd_action' => 'get_version',
|
493 |
+
'item_name' => isset( $data['item_name'] ) ? $data['item_name'] : false,
|
494 |
+
'item_id' => isset( $data['item_id'] ) ? $data['item_id'] : false,
|
495 |
+
'slug' => $_REQUEST['slug'],
|
496 |
+
'author' => $data['author'],
|
497 |
+
'url' => home_url(),
|
498 |
+
'beta' => ! empty( $data['beta'] )
|
499 |
+
);
|
500 |
+
|
501 |
+
$verify_ssl = $this->verify_ssl();
|
502 |
+
$request = wp_remote_post( $this->api_url, array( 'timeout' => 15, 'sslverify' => $verify_ssl, 'body' => $api_params ) );
|
503 |
+
|
504 |
+
if ( ! is_wp_error( $request ) ) {
|
505 |
+
$version_info = json_decode( wp_remote_retrieve_body( $request ) );
|
506 |
+
}
|
507 |
+
|
508 |
+
|
509 |
+
if ( ! empty( $version_info ) && isset( $version_info->sections ) ) {
|
510 |
+
$version_info->sections = maybe_unserialize( $version_info->sections );
|
511 |
+
} else {
|
512 |
+
$version_info = false;
|
513 |
+
}
|
514 |
+
|
515 |
+
if( ! empty( $version_info ) ) {
|
516 |
+
foreach( $version_info->sections as $key => $section ) {
|
517 |
+
$version_info->$key = (array) $section;
|
518 |
+
}
|
519 |
+
}
|
520 |
+
|
521 |
+
$this->set_version_info_cache( $version_info, $cache_key );
|
522 |
+
|
523 |
+
}
|
524 |
+
|
525 |
+
if( ! empty( $version_info ) && isset( $version_info->sections['changelog'] ) ) {
|
526 |
+
echo '<div style="background:#fff;padding:10px;">' . $version_info->sections['changelog'] . '</div>';
|
527 |
+
}
|
528 |
+
|
529 |
+
exit;
|
530 |
+
}
|
531 |
+
|
532 |
+
public function get_cached_version_info( $cache_key = '' ) {
|
533 |
+
|
534 |
+
if( empty( $cache_key ) ) {
|
535 |
+
$cache_key = $this->cache_key;
|
536 |
+
}
|
537 |
+
|
538 |
+
$cache = get_option( $cache_key );
|
539 |
+
|
540 |
+
if( empty( $cache['timeout'] ) || time() > $cache['timeout'] ) {
|
541 |
+
return false; // Cache is expired
|
542 |
+
}
|
543 |
+
|
544 |
+
// We need to turn the icons into an array, thanks to WP Core forcing these into an object at some point.
|
545 |
+
$cache['value'] = json_decode( $cache['value'] );
|
546 |
+
if ( ! empty( $cache['value']->icons ) ) {
|
547 |
+
$cache['value']->icons = (array) $cache['value']->icons;
|
548 |
+
}
|
549 |
+
|
550 |
+
return $cache['value'];
|
551 |
+
|
552 |
+
}
|
553 |
+
|
554 |
+
public function set_version_info_cache( $value = '', $cache_key = '' ) {
|
555 |
+
|
556 |
+
if( empty( $cache_key ) ) {
|
557 |
+
$cache_key = $this->cache_key;
|
558 |
+
}
|
559 |
+
|
560 |
+
$data = array(
|
561 |
+
'timeout' => strtotime( '+3 hours', time() ),
|
562 |
+
'value' => json_encode( $value )
|
563 |
+
);
|
564 |
+
|
565 |
+
update_option( $cache_key, $data, 'no' );
|
566 |
+
|
567 |
+
}
|
568 |
+
|
569 |
+
/**
|
570 |
+
* Returns if the SSL of the store should be verified.
|
571 |
+
*
|
572 |
+
* @since 1.6.13
|
573 |
+
* @return bool
|
574 |
+
*/
|
575 |
+
private function verify_ssl() {
|
576 |
+
return (bool) apply_filters( 'edd_sl_api_request_verify_ssl', true, $this );
|
577 |
+
}
|
578 |
+
|
579 |
+
}
|
classes/Model/Theme.php
CHANGED
@@ -1,499 +1,499 @@
|
|
1 |
-
<?php
|
2 |
-
/*******************************************************************************
|
3 |
-
* Copyright (c) 2018, WP Popup Maker
|
4 |
-
******************************************************************************/
|
5 |
-
|
6 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
-
exit;
|
8 |
-
}
|
9 |
-
|
10 |
-
/**
|
11 |
-
* Class PUM_Model_Theme
|
12 |
-
*
|
13 |
-
* @since 1.8
|
14 |
-
*/
|
15 |
-
class PUM_Model_Theme extends PUM_Abstract_Model_Post {
|
16 |
-
|
17 |
-
/** @var string */
|
18 |
-
protected $required_post_type = 'popup_theme';
|
19 |
-
|
20 |
-
/** @var array */
|
21 |
-
public $settings;
|
22 |
-
|
23 |
-
/** @var bool */
|
24 |
-
public $doing_passive_migration = false;
|
25 |
-
|
26 |
-
/**
|
27 |
-
* The current model version.
|
28 |
-
*
|
29 |
-
* 1 - v1.0.0
|
30 |
-
* 2 - v1.3.0
|
31 |
-
* 3 - v1.8.0
|
32 |
-
*
|
33 |
-
* @var int
|
34 |
-
*/
|
35 |
-
public $model_version = 3;
|
36 |
-
|
37 |
-
/**
|
38 |
-
* The version of the data currently stored for the current item.
|
39 |
-
*
|
40 |
-
* 1 - v1.0.0
|
41 |
-
* 2 - v1.3.0
|
42 |
-
* 3 - v1.8.0
|
43 |
-
*
|
44 |
-
* @var int
|
45 |
-
*/
|
46 |
-
public $data_version;
|
47 |
-
|
48 |
-
/**
|
49 |
-
* Returns array of all theme settings.
|
50 |
-
*
|
51 |
-
* @return array
|
52 |
-
*/
|
53 |
-
public function get_settings() {
|
54 |
-
$this->settings = $this->get_meta( 'popup_theme_settings' );
|
55 |
-
|
56 |
-
if ( ! is_array( $this->settings ) ) {
|
57 |
-
$this->settings = array();
|
58 |
-
}
|
59 |
-
|
60 |
-
return apply_filters( 'pum_theme_settings', $this->settings, $this->ID );
|
61 |
-
}
|
62 |
-
|
63 |
-
/**
|
64 |
-
* Returns a specific theme setting with optional default value when not found.
|
65 |
-
*
|
66 |
-
* @param $key
|
67 |
-
* @param bool $default
|
68 |
-
*
|
69 |
-
* @return bool|mixed
|
70 |
-
*/
|
71 |
-
public function get_setting( $key, $default = false ) {
|
72 |
-
$settings = $this->get_settings();
|
73 |
-
|
74 |
-
return isset( $settings[ $key ] ) ? $settings[ $key ] : $default;
|
75 |
-
}
|
76 |
-
|
77 |
-
/**
|
78 |
-
* @param string $key
|
79 |
-
* @param mixed $value
|
80 |
-
*
|
81 |
-
* @return bool|int
|
82 |
-
*/
|
83 |
-
public function update_setting( $key, $value ) {
|
84 |
-
$settings = $this->get_settings();
|
85 |
-
|
86 |
-
$settings[ $key ] = $value;
|
87 |
-
|
88 |
-
return $this->update_meta( 'popup_theme_settings', $settings );
|
89 |
-
}
|
90 |
-
|
91 |
-
/**
|
92 |
-
* @param array $merge_settings
|
93 |
-
*
|
94 |
-
* @return bool|int
|
95 |
-
*/
|
96 |
-
public function update_settings( $merge_settings = array() ) {
|
97 |
-
$settings = $this->get_settings();
|
98 |
-
|
99 |
-
foreach ( $merge_settings as $key => $value ) {
|
100 |
-
$settings[ $key ] = $value;
|
101 |
-
}
|
102 |
-
|
103 |
-
return $this->update_meta( 'popup_theme_settings', $settings );
|
104 |
-
}
|
105 |
-
|
106 |
-
/**
|
107 |
-
* Returns array of all google font variations used for this theme.
|
108 |
-
*
|
109 |
-
* @return array
|
110 |
-
*/
|
111 |
-
public function get_google_fonts_used() {
|
112 |
-
$fonts_used = array();
|
113 |
-
|
114 |
-
$settings = $this->get_settings();
|
115 |
-
|
116 |
-
$google_fonts = PUM_Integration_GoogleFonts::fetch_fonts();
|
117 |
-
|
118 |
-
if ( ! empty( $settings['title_font_family'] ) && is_string( $settings['title_font_family'] ) && array_key_exists( $settings['title_font_family'], $google_fonts ) ) {
|
119 |
-
$variant = ! empty( $settings['title_font_weight'] ) && $settings['title_font_weight'] != 'normal' ? $settings['title_font_weight'] : '';
|
120 |
-
if ( isset( $settings['title_font_style'] ) && $settings['title_font_style'] == 'italic' ) {
|
121 |
-
$variant .= 'italic';
|
122 |
-
}
|
123 |
-
$fonts_used[ $settings['title_font_family'] ][ $variant ] = $variant;
|
124 |
-
}
|
125 |
-
if ( ! empty( $settings['content_font_family'] ) && is_string( $settings['content_font_family'] ) && array_key_exists( $settings['content_font_family'], $google_fonts ) ) {
|
126 |
-
$variant = ! empty( $settings['content_font_weight'] ) && $settings['content_font_weight'] != 'normal' ? $settings['content_font_weight'] : '';
|
127 |
-
if ( isset( $settings['content_font_style'] ) && $settings['content_font_style'] == 'italic' ) {
|
128 |
-
$variant .= 'italic';
|
129 |
-
}
|
130 |
-
$fonts_used[ $settings['content_font_family'] ][ $variant ] = $variant;
|
131 |
-
}
|
132 |
-
if ( ! empty( $settings['close_font_family'] ) && is_string( $settings['close_font_family'] ) && array_key_exists( $settings['close_font_family'], $google_fonts ) ) {
|
133 |
-
$variant = ! empty( $settings['close_font_weight'] ) && $settings['close_font_weight'] != 'normal' ? $settings['close_font_weight'] : '';
|
134 |
-
if ( isset( $settings['close_font_style'] ) && $settings['close_font_style'] == 'italic' ) {
|
135 |
-
$variant .= 'italic';
|
136 |
-
}
|
137 |
-
$fonts_used[ $settings['close_font_family'] ][ $variant ] = $variant;
|
138 |
-
}
|
139 |
-
|
140 |
-
return $fonts_used;
|
141 |
-
}
|
142 |
-
|
143 |
-
/**
|
144 |
-
* @return array
|
145 |
-
*/
|
146 |
-
public function get_generated_styles() {
|
147 |
-
|
148 |
-
$styles = array(
|
149 |
-
'overlay' => array(),
|
150 |
-
'container' => array(),
|
151 |
-
'title' => array(),
|
152 |
-
'content' => array(),
|
153 |
-
'close' => array(),
|
154 |
-
);
|
155 |
-
|
156 |
-
/*
|
157 |
-
* Overlay Styles
|
158 |
-
*/
|
159 |
-
if ( $this->get_setting( 'overlay_background_color' ) ) {
|
160 |
-
$styles['overlay']['background-color'] = PUM_Utils_CSS::hex2rgba( $this->get_setting( 'overlay_background_color' ), $this->get_setting( 'overlay_background_opacity' ) );
|
161 |
-
}
|
162 |
-
|
163 |
-
/*
|
164 |
-
* Container Styles
|
165 |
-
*/
|
166 |
-
$styles['container'] = array(
|
167 |
-
'padding' => "{$this->get_setting('container_padding')}px",
|
168 |
-
'border-radius' => "{$this->get_setting('container_border_radius')}px",
|
169 |
-
'border' => PUM_Utils_CSS::border_style( $this->get_setting( 'container_border_width' ), $this->get_setting( 'container_border_style' ), $this->get_setting( 'container_border_color' ) ),
|
170 |
-
'box-shadow' => PUM_Utils_CSS::box_shadow_style( $this->get_setting( 'container_boxshadow_horizontal' ), $this->get_setting( 'container_boxshadow_vertical' ), $this->get_setting( 'container_boxshadow_blur' ), $this->get_setting( 'container_boxshadow_spread' ), $this->get_setting( 'container_boxshadow_color' ), $this->get_setting( 'container_boxshadow_opacity' ), $this->get_setting( 'container_boxshadow_inset' ) ),
|
171 |
-
);
|
172 |
-
|
173 |
-
if ( $this->get_setting( 'container_background_color' ) ) {
|
174 |
-
$styles['container']['background-color'] = PUM_Utils_CSS::hex2rgba( $this->get_setting( 'container_background_color' ), $this->get_setting( 'container_background_opacity' ) );
|
175 |
-
}
|
176 |
-
|
177 |
-
/*
|
178 |
-
* Title Styles
|
179 |
-
*/
|
180 |
-
$styles['title'] = array(
|
181 |
-
'color' => $this->get_setting( 'title_font_color' ),
|
182 |
-
'text-align' => $this->get_setting( 'title_text_align' ),
|
183 |
-
'text-shadow' => PUM_Utils_CSS::text_shadow_style( $this->get_setting( 'title_textshadow_horizontal' ), $this->get_setting( 'title_textshadow_vertical' ), $this->get_setting( 'title_textshadow_blur' ), $this->get_setting( 'title_textshadow_color' ), $this->get_setting( 'title_textshadow_opacity' ) ),
|
184 |
-
'font-family' => $this->get_setting( 'title_font_family' ),
|
185 |
-
'font-weight' => $this->get_setting( 'title_font_weight' ),
|
186 |
-
'font-size' => "{$this->get_setting( 'title_font_size' )}px",
|
187 |
-
'font-style' => $this->get_setting( 'title_font_style' ),
|
188 |
-
'line-height' => "{$this->get_setting( 'title_line_height' )}px",
|
189 |
-
);
|
190 |
-
|
191 |
-
/*
|
192 |
-
* Content Styles
|
193 |
-
*/
|
194 |
-
$styles['content'] = array(
|
195 |
-
'color' => $this->get_setting( 'content_font_color' ),
|
196 |
-
'font-family' => $this->get_setting( 'content_font_family' ),
|
197 |
-
'font-weight' => $this->get_setting( 'content_font_weight' ),
|
198 |
-
'font-style' => $this->get_setting( 'content_font_style' ),
|
199 |
-
);
|
200 |
-
|
201 |
-
/*
|
202 |
-
* Close Styles
|
203 |
-
*/
|
204 |
-
$styles['close'] = array(
|
205 |
-
'position' => $this->get_setting( 'close_position_outside' ) ? 'fixed' : 'absolute',
|
206 |
-
'height' => ! $this->get_setting( 'close_height' ) || $this->get_setting( 'close_height' ) <= 0 ? 'auto' : "{$this->get_setting('close_height')}px",
|
207 |
-
'width' => ! $this->get_setting( 'close_width' ) || $this->get_setting( 'close_width' ) <= 0 ? 'auto' : "{$this->get_setting('close_width')}px",
|
208 |
-
'left' => 'auto',
|
209 |
-
'right' => 'auto',
|
210 |
-
'bottom' => 'auto',
|
211 |
-
'top' => 'auto',
|
212 |
-
'padding' => "{$this->get_setting('close_padding')}px",
|
213 |
-
'color' => $this->get_setting( 'close_font_color' ),
|
214 |
-
'font-family' => $this->get_setting( 'close_font_family' ),
|
215 |
-
'font-weight' => $this->get_setting( 'close_font_weight' ),
|
216 |
-
'font-size' => "{$this->get_setting('close_font_size')}px",
|
217 |
-
'font-style' => $this->get_setting( 'close_font_style' ),
|
218 |
-
'line-height' => "{$this->get_setting('close_line_height')}px",
|
219 |
-
'border' => PUM_Utils_CSS::border_style( $this->get_setting( 'close_border_width' ), $this->get_setting( 'close_border_style' ), $this->get_setting( 'close_border_color' ) ),
|
220 |
-
'border-radius' => "{$this->get_setting('close_border_radius')}px",
|
221 |
-
'box-shadow' => PUM_Utils_CSS::box_shadow_style( $this->get_setting( 'close_boxshadow_horizontal' ), $this->get_setting( 'close_boxshadow_vertical' ), $this->get_setting( 'close_boxshadow_blur' ), $this->get_setting( 'close_boxshadow_spread' ), $this->get_setting( 'close_boxshadow_color' ), $this->get_setting( 'close_boxshadow_opacity' ), $this->get_setting( 'close_boxshadow_inset' ) ),
|
222 |
-
'text-shadow' => PUM_Utils_CSS::text_shadow_style( $this->get_setting( 'close_textshadow_horizontal' ), $this->get_setting( 'close_textshadow_vertical' ), $this->get_setting( 'close_textshadow_blur' ), $this->get_setting( 'close_textshadow_color' ), $this->get_setting( 'close_textshadow_opacity' ) ),
|
223 |
-
);
|
224 |
-
|
225 |
-
if ( $this->get_setting( 'close_background_color' ) ) {
|
226 |
-
$styles['close']['background-color'] = PUM_Utils_CSS::hex2rgba( $this->get_setting( 'close_background_color' ), $this->get_setting( 'close_background_opacity' ) );
|
227 |
-
}
|
228 |
-
|
229 |
-
$top = "{$this->get_setting('close_position_top')}px";
|
230 |
-
$left = "{$this->get_setting('close_position_left')}px";
|
231 |
-
$right = "{$this->get_setting('close_position_right')}px";
|
232 |
-
$bottom = "{$this->get_setting('close_position_bottom')}px";
|
233 |
-
|
234 |
-
switch ( $this->get_setting( 'close_location' ) ) {
|
235 |
-
case "topleft":
|
236 |
-
$styles['close']['top'] = $top;
|
237 |
-
$styles['close']['left'] = $left;
|
238 |
-
break;
|
239 |
-
case "topcenter":
|
240 |
-
$styles['close']['top'] = $top;
|
241 |
-
$styles['close']['left'] = "50%";
|
242 |
-
$styles['close']['transform'] = "translateX(-50%)";
|
243 |
-
break;
|
244 |
-
case "topright":
|
245 |
-
$styles['close']['top'] = $top;
|
246 |
-
$styles['close']['right'] = $right;
|
247 |
-
break;
|
248 |
-
case 'middleleft':
|
249 |
-
$styles['close']['top'] = "50%";
|
250 |
-
$styles['close']['left'] = $left;
|
251 |
-
$styles['close']['transform'] = "translate(0, -50%)";
|
252 |
-
break;
|
253 |
-
case 'middleright':
|
254 |
-
$styles['close']['top'] = "50%";
|
255 |
-
$styles['close']['right'] = $right;
|
256 |
-
$styles['close']['transform'] = "translate(0, -50%)";
|
257 |
-
break;
|
258 |
-
case "bottomleft":
|
259 |
-
$styles['close']['bottom'] = $bottom;
|
260 |
-
$styles['close']['left'] = $left;
|
261 |
-
break;
|
262 |
-
case "bottomcenter":
|
263 |
-
$styles['close']['bottom'] = $bottom;
|
264 |
-
$styles['close']['left'] = "50%";
|
265 |
-
$styles['close']['transform'] = "translateX(-50%)";
|
266 |
-
break;
|
267 |
-
case "bottomright":
|
268 |
-
$styles['close']['bottom'] = $bottom;
|
269 |
-
$styles['close']['right'] = $right;
|
270 |
-
break;
|
271 |
-
}
|
272 |
-
|
273 |
-
/** @deprecated 1.8.0 filter */
|
274 |
-
$styles = (array) apply_filters( 'popmake_generate_theme_styles', (array) $styles, $this->ID, $this->get_deprecated_settings() );
|
275 |
-
|
276 |
-
return (array) apply_filters( 'pum_theme_get_generated_styles', (array) $styles, $this->ID );
|
277 |
-
}
|
278 |
-
|
279 |
-
public function get_deprecated_settings() {
|
280 |
-
return array(
|
281 |
-
'overlay' => $this->_dep_get_settings_group( 'overlay' ),
|
282 |
-
'container' => $this->_dep_get_settings_group( 'container' ),
|
283 |
-
'title' => $this->_dep_get_settings_group( 'title' ),
|
284 |
-
'content' => $this->_dep_get_settings_group( 'content' ),
|
285 |
-
'close' => $this->_dep_get_settings_group( 'close' ),
|
286 |
-
);
|
287 |
-
}
|
288 |
-
|
289 |
-
/**
|
290 |
-
* Retrieve settings in the form of deprecated grouped arrays.
|
291 |
-
*
|
292 |
-
* @param $group
|
293 |
-
* @param null $key
|
294 |
-
*
|
295 |
-
* @return mixed
|
296 |
-
*/
|
297 |
-
public function _dep_get_settings_group( $group, $key = null ) {
|
298 |
-
if ( ! isset( $this->$group ) ) {
|
299 |
-
/**
|
300 |
-
* Remap old meta settings to new settings location for v1.7. This acts as a passive migration when needed.
|
301 |
-
*/
|
302 |
-
$remapped_keys = $this->remapped_meta_settings_keys( $group );
|
303 |
-
|
304 |
-
// This will only return data from extensions as core data has been migrated already.
|
305 |
-
$group_values = $this->get_meta( "popup_theme_$group" );
|
306 |
-
|
307 |
-
if ( ! $group_values || ! is_array( $group_values ) ) {
|
308 |
-
$group_values = array();
|
309 |
-
}
|
310 |
-
|
311 |
-
// Data manipulation begins here. We don't want any of this saved, only returned for backward compatibility.
|
312 |
-
foreach ( $remapped_keys as $old_key => $new_key ) {
|
313 |
-
$group_values[ $old_key ] = $this->get_setting( $new_key );
|
314 |
-
}
|
315 |
-
|
316 |
-
$deprecated_values = pum_get_theme_v1_meta( $group, $this->ID );
|
317 |
-
|
318 |
-
if ( ! empty( $deprecated_values ) ) {
|
319 |
-
foreach ( $deprecated_values as $old_key => $value ) {
|
320 |
-
|
321 |
-
if ( ! isset( $group_values[ $old_key ] ) ) {
|
322 |
-
$group_values[ $old_key ] = $value;
|
323 |
-
}
|
324 |
-
|
325 |
-
}
|
326 |
-
}
|
327 |
-
|
328 |
-
|
329 |
-
$this->$group = $group_values;
|
330 |
-
}
|
331 |
-
|
332 |
-
$values = apply_filters( "pum_theme_get_$group", $this->$group, $this->ID );
|
333 |
-
|
334 |
-
if ( ! $key ) {
|
335 |
-
return $values;
|
336 |
-
}
|
337 |
-
|
338 |
-
$value = isset ( $values[ $key ] ) ? $values[ $key ] : null;
|
339 |
-
|
340 |
-
if ( ! isset( $value ) ) {
|
341 |
-
$value = $this->get_meta( "popup_theme_{$group}_{$key}" );
|
342 |
-
}
|
343 |
-
|
344 |
-
return apply_filters( "pum_theme_get_{$group}_" . $key, $value, $this->ID );
|
345 |
-
}
|
346 |
-
|
347 |
-
/**
|
348 |
-
* @param $group
|
349 |
-
*
|
350 |
-
* @return array|mixed
|
351 |
-
*/
|
352 |
-
public function remapped_meta_settings_keys( $group ) {
|
353 |
-
$remapped_meta_settings_keys = array(
|
354 |
-
'overlay' => array(
|
355 |
-
'background_color' => 'overlay_background_color',
|
356 |
-
'background_opacity' => 'overlay_background_opacity',
|
357 |
-
),
|
358 |
-
'container' => array(
|
359 |
-
'padding' => 'container_padding',
|
360 |
-
'background_color' => 'container_background_color',
|
361 |
-
'background_opacity' => 'container_background_opacity',
|
362 |
-
'border_style' => 'container_border_style',
|
363 |
-
'border_color' => 'container_border_color',
|
364 |
-
'border_width' => 'container_border_width',
|
365 |
-
'border_radius' => 'container_border_radius',
|
366 |
-
'boxshadow_inset' => 'container_boxshadow_inset',
|
367 |
-
'boxshadow_horizontal' => 'container_boxshadow_horizontal',
|
368 |
-
'boxshadow_vertical' => 'container_boxshadow_vertical',
|
369 |
-
'boxshadow_blur' => 'container_boxshadow_blur',
|
370 |
-
'boxshadow_spread' => 'container_boxshadow_spread',
|
371 |
-
'boxshadow_color' => 'container_boxshadow_color',
|
372 |
-
'boxshadow_opacity' => 'container_boxshadow_opacity',
|
373 |
-
),
|
374 |
-
'title' => array(
|
375 |
-
'font_color' => 'title_font_color',
|
376 |
-
'line_height' => 'title_line_height',
|
377 |
-
'font_size' => 'title_font_size',
|
378 |
-
'font_family' => 'title_font_family',
|
379 |
-
'font_weight' => 'title_font_weight',
|
380 |
-
'font_style' => 'title_font_style',
|
381 |
-
'text_align' => 'title_text_align',
|
382 |
-
'textshadow_horizontal' => 'title_textshadow_horizontal',
|
383 |
-
'textshadow_vertical' => 'title_textshadow_vertical',
|
384 |
-
'textshadow_blur' => 'title_textshadow_blur',
|
385 |
-
'textshadow_color' => 'title_textshadow_color',
|
386 |
-
'textshadow_opacity' => 'title_textshadow_opacity',
|
387 |
-
),
|
388 |
-
'content' => array(
|
389 |
-
'font_color' => 'content_font_color',
|
390 |
-
'font_family' => 'content_font_family',
|
391 |
-
'font_weight' => 'content_font_weight',
|
392 |
-
'font_style' => 'content_font_style',
|
393 |
-
),
|
394 |
-
'close' => array(
|
395 |
-
'text' => 'close_text',
|
396 |
-
'location' => 'close_location',
|
397 |
-
'position_top' => 'close_position_top',
|
398 |
-
'position_left' => 'close_position_left',
|
399 |
-
'position_bottom' => 'close_position_bottom',
|
400 |
-
'position_right' => 'close_position_right',
|
401 |
-
'padding' => 'close_padding',
|
402 |
-
'height' => 'close_height',
|
403 |
-
'width' => 'close_width',
|
404 |
-
'background_color' => 'close_background_color',
|
405 |
-
'background_opacity' => 'close_background_opacity',
|
406 |
-
'font_color' => 'close_font_color',
|
407 |
-
'line_height' => 'close_line_height',
|
408 |
-
'font_size' => 'close_font_size',
|
409 |
-
'font_family' => 'close_font_family',
|
410 |
-
'font_weight' => 'close_font_weight',
|
411 |
-
'font_style' => 'close_font_style',
|
412 |
-
'border_style' => 'close_border_style',
|
413 |
-
'border_color' => 'close_border_color',
|
414 |
-
'border_width' => 'close_border_width',
|
415 |
-
'border_radius' => 'close_border_radius',
|
416 |
-
'boxshadow_inset' => 'close_boxshadow_inset',
|
417 |
-
'boxshadow_horizontal' => 'close_boxshadow_horizontal',
|
418 |
-
'boxshadow_vertical' => 'close_boxshadow_vertical',
|
419 |
-
'boxshadow_blur' => 'close_boxshadow_blur',
|
420 |
-
'boxshadow_spread' => 'close_boxshadow_spread',
|
421 |
-
'boxshadow_color' => 'close_boxshadow_color',
|
422 |
-
'boxshadow_opacity' => 'close_boxshadow_opacity',
|
423 |
-
'textshadow_horizontal' => 'close_textshadow_horizontal',
|
424 |
-
'textshadow_vertical' => 'close_textshadow_vertical',
|
425 |
-
'textshadow_blur' => 'close_textshadow_blur',
|
426 |
-
'textshadow_color' => 'close_textshadow_color',
|
427 |
-
'textshadow_opacity' => 'close_textshadow_opacity',
|
428 |
-
),
|
429 |
-
);
|
430 |
-
|
431 |
-
return isset( $remapped_meta_settings_keys[ $group ] ) ? $remapped_meta_settings_keys[ $group ] : array();
|
432 |
-
}
|
433 |
-
|
434 |
-
/**
|
435 |
-
* @param WP_Post $post
|
436 |
-
*/
|
437 |
-
public function setup( $post ) {
|
438 |
-
parent::setup( $post );
|
439 |
-
|
440 |
-
if ( ! $this->is_valid() ) {
|
441 |
-
return;
|
442 |
-
}
|
443 |
-
|
444 |
-
if ( $this->ID === 5 ) {
|
445 |
-
$test = '1';
|
446 |
-
}
|
447 |
-
|
448 |
-
if ( ! isset( $this->data_version ) ) {
|
449 |
-
$this->data_version = (int) $this->get_meta( 'popup_theme_data_version' );
|
450 |
-
|
451 |
-
if ( ! $this->data_version ) {
|
452 |
-
$theme_overlay_v1 = $this->get_meta( 'popup_theme_overlay_background_color' );
|
453 |
-
$theme_overlay_v2 = $this->get_meta( 'popup_theme_overlay' );
|
454 |
-
|
455 |
-
// If there are existing settings set the data version to 1/2 so they can be updated.
|
456 |
-
// Otherwise set to the current version as this is a new popup.
|
457 |
-
if ( ! empty( $theme_overlay_v1 ) ) {
|
458 |
-
$this->data_version = 1;
|
459 |
-
} else if ( ! empty( $theme_overlay_v2 ) && is_array( $theme_overlay_v2 ) ) {
|
460 |
-
$this->data_version = 2;
|
461 |
-
} else {
|
462 |
-
$this->data_version = $this->model_version;
|
463 |
-
}
|
464 |
-
|
465 |
-
$this->update_meta( 'popup_theme_data_version', $this->data_version );
|
466 |
-
}
|
467 |
-
}
|
468 |
-
|
469 |
-
if ( $this->data_version < $this->model_version && pum_passive_theme_upgrades_enabled() ) {
|
470 |
-
/**
|
471 |
-
* Process passive settings migration as each popup is loaded. The will only run each migration routine once for each popup.
|
472 |
-
*/
|
473 |
-
$this->passive_migration();
|
474 |
-
}
|
475 |
-
}
|
476 |
-
|
477 |
-
/**
|
478 |
-
* Allows for passive migration routines based on the current data version.
|
479 |
-
*/
|
480 |
-
public function passive_migration() {
|
481 |
-
$this->doing_passive_migration = true;
|
482 |
-
|
483 |
-
for ( $i = $this->data_version; $this->data_version < $this->model_version; $i ++ ) {
|
484 |
-
// Process migration for current version. ex. current version is 2, runs pum_theme_passive_migration_2.
|
485 |
-
do_action_ref_array( 'pum_theme_passive_migration_' . $this->data_version, array( &$this ) );
|
486 |
-
$this->data_version ++;
|
487 |
-
|
488 |
-
/**
|
489 |
-
* Update the themes data version.
|
490 |
-
*/
|
491 |
-
$this->update_meta( 'popup_theme_data_version', $this->data_version );
|
492 |
-
}
|
493 |
-
|
494 |
-
do_action_ref_array( 'pum_theme_passive_migration', array( &$this, $this->data_version ) );
|
495 |
-
|
496 |
-
$this->doing_passive_migration = false;
|
497 |
-
}
|
498 |
-
}
|
499 |
-
|
1 |
+
<?php
|
2 |
+
/*******************************************************************************
|
3 |
+
* Copyright (c) 2018, WP Popup Maker
|
4 |
+
******************************************************************************/
|
5 |
+
|
6 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
+
exit;
|
8 |
+
}
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Class PUM_Model_Theme
|
12 |
+
*
|
13 |
+
* @since 1.8
|
14 |
+
*/
|
15 |
+
class PUM_Model_Theme extends PUM_Abstract_Model_Post {
|
16 |
+
|
17 |
+
/** @var string */
|
18 |
+
protected $required_post_type = 'popup_theme';
|
19 |
+
|
20 |
+
/** @var array */
|
21 |
+
public $settings;
|
22 |
+
|
23 |
+
/** @var bool */
|
24 |
+
public $doing_passive_migration = false;
|
25 |
+
|
26 |
+
/**
|
27 |
+
* The current model version.
|
28 |
+
*
|
29 |
+
* 1 - v1.0.0
|
30 |
+
* 2 - v1.3.0
|
31 |
+
* 3 - v1.8.0
|
32 |
+
*
|
33 |
+
* @var int
|
34 |
+
*/
|
35 |
+
public $model_version = 3;
|
36 |
+
|
37 |
+
/**
|
38 |
+
* The version of the data currently stored for the current item.
|
39 |
+
*
|
40 |
+
* 1 - v1.0.0
|
41 |
+
* 2 - v1.3.0
|
42 |
+
* 3 - v1.8.0
|
43 |
+
*
|
44 |
+
* @var int
|
45 |
+
*/
|
46 |
+
public $data_version;
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Returns array of all theme settings.
|
50 |
+
*
|
51 |
+
* @return array
|
52 |
+
*/
|
53 |
+
public function get_settings() {
|
54 |
+
$this->settings = $this->get_meta( 'popup_theme_settings' );
|
55 |
+
|
56 |
+
if ( ! is_array( $this->settings ) ) {
|
57 |
+
$this->settings = array();
|
58 |
+
}
|
59 |
+
|
60 |
+
return apply_filters( 'pum_theme_settings', $this->settings, $this->ID );
|
61 |
+
}
|
62 |
+
|
63 |
+
/**
|
64 |
+
* Returns a specific theme setting with optional default value when not found.
|
65 |
+
*
|
66 |
+
* @param $key
|
67 |
+
* @param bool $default
|
68 |
+
*
|
69 |
+
* @return bool|mixed
|
70 |
+
*/
|
71 |
+
public function get_setting( $key, $default = false ) {
|
72 |
+
$settings = $this->get_settings();
|
73 |
+
|
74 |
+
return isset( $settings[ $key ] ) ? $settings[ $key ] : $default;
|
75 |
+
}
|
76 |
+
|
77 |
+
/**
|
78 |
+
* @param string $key
|
79 |
+
* @param mixed $value
|
80 |
+
*
|
81 |
+
* @return bool|int
|
82 |
+
*/
|
83 |
+
public function update_setting( $key, $value ) {
|
84 |
+
$settings = $this->get_settings();
|
85 |
+
|
86 |
+
$settings[ $key ] = $value;
|
87 |
+
|
88 |
+
return $this->update_meta( 'popup_theme_settings', $settings );
|
89 |
+
}
|
90 |
+
|
91 |
+
/**
|
92 |
+
* @param array $merge_settings
|
93 |
+
*
|
94 |
+
* @return bool|int
|
95 |
+
*/
|
96 |
+
public function update_settings( $merge_settings = array() ) {
|
97 |
+
$settings = $this->get_settings();
|
98 |
+
|
99 |
+
foreach ( $merge_settings as $key => $value ) {
|
100 |
+
$settings[ $key ] = $value;
|
101 |
+
}
|
102 |
+
|
103 |
+
return $this->update_meta( 'popup_theme_settings', $settings );
|
104 |
+
}
|
105 |
+
|
106 |
+
/**
|
107 |
+
* Returns array of all google font variations used for this theme.
|
108 |
+
*
|
109 |
+
* @return array
|
110 |
+
*/
|
111 |
+
public function get_google_fonts_used() {
|
112 |
+
$fonts_used = array();
|
113 |
+
|
114 |
+
$settings = $this->get_settings();
|
115 |
+
|
116 |
+
$google_fonts = PUM_Integration_GoogleFonts::fetch_fonts();
|
117 |
+
|
118 |
+
if ( ! empty( $settings['title_font_family'] ) && is_string( $settings['title_font_family'] ) && array_key_exists( $settings['title_font_family'], $google_fonts ) ) {
|
119 |
+
$variant = ! empty( $settings['title_font_weight'] ) && $settings['title_font_weight'] != 'normal' ? $settings['title_font_weight'] : '';
|
120 |
+
if ( isset( $settings['title_font_style'] ) && $settings['title_font_style'] == 'italic' ) {
|
121 |
+
$variant .= 'italic';
|
122 |
+
}
|
123 |
+
$fonts_used[ $settings['title_font_family'] ][ $variant ] = $variant;
|
124 |
+
}
|
125 |
+
if ( ! empty( $settings['content_font_family'] ) && is_string( $settings['content_font_family'] ) && array_key_exists( $settings['content_font_family'], $google_fonts ) ) {
|
126 |
+
$variant = ! empty( $settings['content_font_weight'] ) && $settings['content_font_weight'] != 'normal' ? $settings['content_font_weight'] : '';
|
127 |
+
if ( isset( $settings['content_font_style'] ) && $settings['content_font_style'] == 'italic' ) {
|
128 |
+
$variant .= 'italic';
|
129 |
+
}
|
130 |
+
$fonts_used[ $settings['content_font_family'] ][ $variant ] = $variant;
|
131 |
+
}
|
132 |
+
if ( ! empty( $settings['close_font_family'] ) && is_string( $settings['close_font_family'] ) && array_key_exists( $settings['close_font_family'], $google_fonts ) ) {
|
133 |
+
$variant = ! empty( $settings['close_font_weight'] ) && $settings['close_font_weight'] != 'normal' ? $settings['close_font_weight'] : '';
|
134 |
+
if ( isset( $settings['close_font_style'] ) && $settings['close_font_style'] == 'italic' ) {
|
135 |
+
$variant .= 'italic';
|
136 |
+
}
|
137 |
+
$fonts_used[ $settings['close_font_family'] ][ $variant ] = $variant;
|
138 |
+
}
|
139 |
+
|
140 |
+
return $fonts_used;
|
141 |
+
}
|
142 |
+
|
143 |
+
/**
|
144 |
+
* @return array
|
145 |
+
*/
|
146 |
+
public function get_generated_styles() {
|
147 |
+
|
148 |
+
$styles = array(
|
149 |
+
'overlay' => array(),
|
150 |
+
'container' => array(),
|
151 |
+
'title' => array(),
|
152 |
+
'content' => array(),
|
153 |
+
'close' => array(),
|
154 |
+
);
|
155 |
+
|
156 |
+
/*
|
157 |
+
* Overlay Styles
|
158 |
+
*/
|
159 |
+
if ( $this->get_setting( 'overlay_background_color' ) ) {
|
160 |
+
$styles['overlay']['background-color'] = PUM_Utils_CSS::hex2rgba( $this->get_setting( 'overlay_background_color' ), $this->get_setting( 'overlay_background_opacity' ) );
|
161 |
+
}
|
162 |
+
|
163 |
+
/*
|
164 |
+
* Container Styles
|
165 |
+
*/
|
166 |
+
$styles['container'] = array(
|
167 |
+
'padding' => "{$this->get_setting('container_padding')}px",
|
168 |
+
'border-radius' => "{$this->get_setting('container_border_radius')}px",
|
169 |
+
'border' => PUM_Utils_CSS::border_style( $this->get_setting( 'container_border_width' ), $this->get_setting( 'container_border_style' ), $this->get_setting( 'container_border_color' ) ),
|
170 |
+
'box-shadow' => PUM_Utils_CSS::box_shadow_style( $this->get_setting( 'container_boxshadow_horizontal' ), $this->get_setting( 'container_boxshadow_vertical' ), $this->get_setting( 'container_boxshadow_blur' ), $this->get_setting( 'container_boxshadow_spread' ), $this->get_setting( 'container_boxshadow_color' ), $this->get_setting( 'container_boxshadow_opacity' ), $this->get_setting( 'container_boxshadow_inset' ) ),
|
171 |
+
);
|
172 |
+
|
173 |
+
if ( $this->get_setting( 'container_background_color' ) ) {
|
174 |
+
$styles['container']['background-color'] = PUM_Utils_CSS::hex2rgba( $this->get_setting( 'container_background_color' ), $this->get_setting( 'container_background_opacity' ) );
|
175 |
+
}
|
176 |
+
|
177 |
+
/*
|
178 |
+
* Title Styles
|
179 |
+
*/
|
180 |
+
$styles['title'] = array(
|
181 |
+
'color' => $this->get_setting( 'title_font_color' ),
|
182 |
+
'text-align' => $this->get_setting( 'title_text_align' ),
|
183 |
+
'text-shadow' => PUM_Utils_CSS::text_shadow_style( $this->get_setting( 'title_textshadow_horizontal' ), $this->get_setting( 'title_textshadow_vertical' ), $this->get_setting( 'title_textshadow_blur' ), $this->get_setting( 'title_textshadow_color' ), $this->get_setting( 'title_textshadow_opacity' ) ),
|
184 |
+
'font-family' => $this->get_setting( 'title_font_family' ),
|
185 |
+
'font-weight' => $this->get_setting( 'title_font_weight' ),
|
186 |
+
'font-size' => "{$this->get_setting( 'title_font_size' )}px",
|
187 |
+
'font-style' => $this->get_setting( 'title_font_style' ),
|
188 |
+
'line-height' => "{$this->get_setting( 'title_line_height' )}px",
|
189 |
+
);
|
190 |
+
|
191 |
+
/*
|
192 |
+
* Content Styles
|
193 |
+
*/
|
194 |
+
$styles['content'] = array(
|
195 |
+
'color' => $this->get_setting( 'content_font_color' ),
|
196 |
+
'font-family' => $this->get_setting( 'content_font_family' ),
|
197 |
+
'font-weight' => $this->get_setting( 'content_font_weight' ),
|
198 |
+
'font-style' => $this->get_setting( 'content_font_style' ),
|
199 |
+
);
|
200 |
+
|
201 |
+
/*
|
202 |
+
* Close Styles
|
203 |
+
*/
|
204 |
+
$styles['close'] = array(
|
205 |
+
'position' => $this->get_setting( 'close_position_outside' ) ? 'fixed' : 'absolute',
|
206 |
+
'height' => ! $this->get_setting( 'close_height' ) || $this->get_setting( 'close_height' ) <= 0 ? 'auto' : "{$this->get_setting('close_height')}px",
|
207 |
+
'width' => ! $this->get_setting( 'close_width' ) || $this->get_setting( 'close_width' ) <= 0 ? 'auto' : "{$this->get_setting('close_width')}px",
|
208 |
+
'left' => 'auto',
|
209 |
+
'right' => 'auto',
|
210 |
+
'bottom' => 'auto',
|
211 |
+
'top' => 'auto',
|
212 |
+
'padding' => "{$this->get_setting('close_padding')}px",
|
213 |
+
'color' => $this->get_setting( 'close_font_color' ),
|
214 |
+
'font-family' => $this->get_setting( 'close_font_family' ),
|
215 |
+
'font-weight' => $this->get_setting( 'close_font_weight' ),
|
216 |
+
'font-size' => "{$this->get_setting('close_font_size')}px",
|
217 |
+
'font-style' => $this->get_setting( 'close_font_style' ),
|
218 |
+
'line-height' => "{$this->get_setting('close_line_height')}px",
|
219 |
+
'border' => PUM_Utils_CSS::border_style( $this->get_setting( 'close_border_width' ), $this->get_setting( 'close_border_style' ), $this->get_setting( 'close_border_color' ) ),
|
220 |
+
'border-radius' => "{$this->get_setting('close_border_radius')}px",
|
221 |
+
'box-shadow' => PUM_Utils_CSS::box_shadow_style( $this->get_setting( 'close_boxshadow_horizontal' ), $this->get_setting( 'close_boxshadow_vertical' ), $this->get_setting( 'close_boxshadow_blur' ), $this->get_setting( 'close_boxshadow_spread' ), $this->get_setting( 'close_boxshadow_color' ), $this->get_setting( 'close_boxshadow_opacity' ), $this->get_setting( 'close_boxshadow_inset' ) ),
|
222 |
+
'text-shadow' => PUM_Utils_CSS::text_shadow_style( $this->get_setting( 'close_textshadow_horizontal' ), $this->get_setting( 'close_textshadow_vertical' ), $this->get_setting( 'close_textshadow_blur' ), $this->get_setting( 'close_textshadow_color' ), $this->get_setting( 'close_textshadow_opacity' ) ),
|
223 |
+
);
|
224 |
+
|
225 |
+
if ( $this->get_setting( 'close_background_color' ) ) {
|
226 |
+
$styles['close']['background-color'] = PUM_Utils_CSS::hex2rgba( $this->get_setting( 'close_background_color' ), $this->get_setting( 'close_background_opacity' ) );
|
227 |
+
}
|
228 |
+
|
229 |
+
$top = "{$this->get_setting('close_position_top')}px";
|
230 |
+
$left = "{$this->get_setting('close_position_left')}px";
|
231 |
+
$right = "{$this->get_setting('close_position_right')}px";
|
232 |
+
$bottom = "{$this->get_setting('close_position_bottom')}px";
|
233 |
+
|
234 |
+
switch ( $this->get_setting( 'close_location' ) ) {
|
235 |
+
case "topleft":
|
236 |
+
$styles['close']['top'] = $top;
|
237 |
+
$styles['close']['left'] = $left;
|
238 |
+
break;
|
239 |
+
case "topcenter":
|
240 |
+
$styles['close']['top'] = $top;
|
241 |
+
$styles['close']['left'] = "50%";
|
242 |
+
$styles['close']['transform'] = "translateX(-50%)";
|
243 |
+
break;
|
244 |
+
case "topright":
|
245 |
+
$styles['close']['top'] = $top;
|
246 |
+
$styles['close']['right'] = $right;
|
247 |
+
break;
|
248 |
+
case 'middleleft':
|
249 |
+
$styles['close']['top'] = "50%";
|
250 |
+
$styles['close']['left'] = $left;
|
251 |
+
$styles['close']['transform'] = "translate(0, -50%)";
|
252 |
+
break;
|
253 |
+
case 'middleright':
|
254 |
+
$styles['close']['top'] = "50%";
|
255 |
+
$styles['close']['right'] = $right;
|
256 |
+
$styles['close']['transform'] = "translate(0, -50%)";
|
257 |
+
break;
|
258 |
+
case "bottomleft":
|
259 |
+
$styles['close']['bottom'] = $bottom;
|
260 |
+
$styles['close']['left'] = $left;
|
261 |
+
break;
|
262 |
+
case "bottomcenter":
|
263 |
+
$styles['close']['bottom'] = $bottom;
|
264 |
+
$styles['close']['left'] = "50%";
|
265 |
+
$styles['close']['transform'] = "translateX(-50%)";
|
266 |
+
break;
|
267 |
+
case "bottomright":
|
268 |
+
$styles['close']['bottom'] = $bottom;
|
269 |
+
$styles['close']['right'] = $right;
|
270 |
+
break;
|
271 |
+
}
|
272 |
+
|
273 |
+
/** @deprecated 1.8.0 filter */
|
274 |
+
$styles = (array) apply_filters( 'popmake_generate_theme_styles', (array) $styles, $this->ID, $this->get_deprecated_settings() );
|
275 |
+
|
276 |
+
return (array) apply_filters( 'pum_theme_get_generated_styles', (array) $styles, $this->ID );
|
277 |
+
}
|
278 |
+
|
279 |
+
public function get_deprecated_settings() {
|
280 |
+
return array(
|
281 |
+
'overlay' => $this->_dep_get_settings_group( 'overlay' ),
|
282 |
+
'container' => $this->_dep_get_settings_group( 'container' ),
|
283 |
+
'title' => $this->_dep_get_settings_group( 'title' ),
|
284 |
+
'content' => $this->_dep_get_settings_group( 'content' ),
|
285 |
+
'close' => $this->_dep_get_settings_group( 'close' ),
|
286 |
+
);
|
287 |
+
}
|
288 |
+
|
289 |
+
/**
|
290 |
+
* Retrieve settings in the form of deprecated grouped arrays.
|
291 |
+
*
|
292 |
+
* @param $group
|
293 |
+
* @param null $key
|
294 |
+
*
|
295 |
+
* @return mixed
|
296 |
+
*/
|
297 |
+
public function _dep_get_settings_group( $group, $key = null ) {
|
298 |
+
if ( ! isset( $this->$group ) ) {
|
299 |
+
/**
|
300 |
+
* Remap old meta settings to new settings location for v1.7. This acts as a passive migration when needed.
|
301 |
+
*/
|
302 |
+
$remapped_keys = $this->remapped_meta_settings_keys( $group );
|
303 |
+
|
304 |
+
// This will only return data from extensions as core data has been migrated already.
|
305 |
+
$group_values = $this->get_meta( "popup_theme_$group" );
|
306 |
+
|
307 |
+
if ( ! $group_values || ! is_array( $group_values ) ) {
|
308 |
+
$group_values = array();
|
309 |
+
}
|
310 |
+
|
311 |
+
// Data manipulation begins here. We don't want any of this saved, only returned for backward compatibility.
|
312 |
+
foreach ( $remapped_keys as $old_key => $new_key ) {
|
313 |
+
$group_values[ $old_key ] = $this->get_setting( $new_key );
|
314 |
+
}
|
315 |
+
|
316 |
+
$deprecated_values = pum_get_theme_v1_meta( $group, $this->ID );
|
317 |
+
|
318 |
+
if ( ! empty( $deprecated_values ) ) {
|
319 |
+
foreach ( $deprecated_values as $old_key => $value ) {
|
320 |
+
|
321 |
+
if ( ! isset( $group_values[ $old_key ] ) ) {
|
322 |
+
$group_values[ $old_key ] = $value;
|
323 |
+
}
|
324 |
+
|
325 |
+
}
|
326 |
+
}
|
327 |
+
|
328 |
+
|
329 |
+
$this->$group = $group_values;
|
330 |
+
}
|
331 |
+
|
332 |
+
$values = apply_filters( "pum_theme_get_$group", $this->$group, $this->ID );
|
333 |
+
|
334 |
+
if ( ! $key ) {
|
335 |
+
return $values;
|
336 |
+
}
|
337 |
+
|
338 |
+
$value = isset ( $values[ $key ] ) ? $values[ $key ] : null;
|
339 |
+
|
340 |
+
if ( ! isset( $value ) ) {
|
341 |
+
$value = $this->get_meta( "popup_theme_{$group}_{$key}" );
|
342 |
+
}
|
343 |
+
|
344 |
+
return apply_filters( "pum_theme_get_{$group}_" . $key, $value, $this->ID );
|
345 |
+
}
|
346 |
+
|
347 |
+
/**
|
348 |
+
* @param $group
|
349 |
+
*
|
350 |
+
* @return array|mixed
|
351 |
+
*/
|
352 |
+
public function remapped_meta_settings_keys( $group ) {
|
353 |
+
$remapped_meta_settings_keys = array(
|
354 |
+
'overlay' => array(
|
355 |
+
'background_color' => 'overlay_background_color',
|
356 |
+
'background_opacity' => 'overlay_background_opacity',
|
357 |
+
),
|
358 |
+
'container' => array(
|
359 |
+
'padding' => 'container_padding',
|
360 |
+
'background_color' => 'container_background_color',
|
361 |
+
'background_opacity' => 'container_background_opacity',
|
362 |
+
'border_style' => 'container_border_style',
|
363 |
+
'border_color' => 'container_border_color',
|
364 |
+
'border_width' => 'container_border_width',
|
365 |
+
'border_radius' => 'container_border_radius',
|
366 |
+
'boxshadow_inset' => 'container_boxshadow_inset',
|
367 |
+
'boxshadow_horizontal' => 'container_boxshadow_horizontal',
|
368 |
+
'boxshadow_vertical' => 'container_boxshadow_vertical',
|
369 |
+
'boxshadow_blur' => 'container_boxshadow_blur',
|
370 |
+
'boxshadow_spread' => 'container_boxshadow_spread',
|
371 |
+
'boxshadow_color' => 'container_boxshadow_color',
|
372 |
+
'boxshadow_opacity' => 'container_boxshadow_opacity',
|
373 |
+
),
|
374 |
+
'title' => array(
|
375 |
+
'font_color' => 'title_font_color',
|
376 |
+
'line_height' => 'title_line_height',
|
377 |
+
'font_size' => 'title_font_size',
|
378 |
+
'font_family' => 'title_font_family',
|
379 |
+
'font_weight' => 'title_font_weight',
|
380 |
+
'font_style' => 'title_font_style',
|
381 |
+
'text_align' => 'title_text_align',
|
382 |
+
'textshadow_horizontal' => 'title_textshadow_horizontal',
|
383 |
+
'textshadow_vertical' => 'title_textshadow_vertical',
|
384 |
+
'textshadow_blur' => 'title_textshadow_blur',
|
385 |
+
'textshadow_color' => 'title_textshadow_color',
|
386 |
+
'textshadow_opacity' => 'title_textshadow_opacity',
|
387 |
+
),
|
388 |
+
'content' => array(
|
389 |
+
'font_color' => 'content_font_color',
|
390 |
+
'font_family' => 'content_font_family',
|
391 |
+
'font_weight' => 'content_font_weight',
|
392 |
+
'font_style' => 'content_font_style',
|
393 |
+
),
|
394 |
+
'close' => array(
|
395 |
+
'text' => 'close_text',
|
396 |
+
'location' => 'close_location',
|
397 |
+
'position_top' => 'close_position_top',
|
398 |
+
'position_left' => 'close_position_left',
|
399 |
+
'position_bottom' => 'close_position_bottom',
|
400 |
+
'position_right' => 'close_position_right',
|
401 |
+
'padding' => 'close_padding',
|
402 |
+
'height' => 'close_height',
|
403 |
+
'width' => 'close_width',
|
404 |
+
'background_color' => 'close_background_color',
|
405 |
+
'background_opacity' => 'close_background_opacity',
|
406 |
+
'font_color' => 'close_font_color',
|
407 |
+
'line_height' => 'close_line_height',
|
408 |
+
'font_size' => 'close_font_size',
|
409 |
+
'font_family' => 'close_font_family',
|
410 |
+
'font_weight' => 'close_font_weight',
|
411 |
+
'font_style' => 'close_font_style',
|
412 |
+
'border_style' => 'close_border_style',
|
413 |
+
'border_color' => 'close_border_color',
|
414 |
+
'border_width' => 'close_border_width',
|
415 |
+
'border_radius' => 'close_border_radius',
|
416 |
+
'boxshadow_inset' => 'close_boxshadow_inset',
|
417 |
+
'boxshadow_horizontal' => 'close_boxshadow_horizontal',
|
418 |
+
'boxshadow_vertical' => 'close_boxshadow_vertical',
|
419 |
+
'boxshadow_blur' => 'close_boxshadow_blur',
|
420 |
+
'boxshadow_spread' => 'close_boxshadow_spread',
|
421 |
+
'boxshadow_color' => 'close_boxshadow_color',
|
422 |
+
'boxshadow_opacity' => 'close_boxshadow_opacity',
|
423 |
+
'textshadow_horizontal' => 'close_textshadow_horizontal',
|
424 |
+
'textshadow_vertical' => 'close_textshadow_vertical',
|
425 |
+
'textshadow_blur' => 'close_textshadow_blur',
|
426 |
+
'textshadow_color' => 'close_textshadow_color',
|
427 |
+
'textshadow_opacity' => 'close_textshadow_opacity',
|
428 |
+
),
|
429 |
+
);
|
430 |
+
|
431 |
+
return isset( $remapped_meta_settings_keys[ $group ] ) ? $remapped_meta_settings_keys[ $group ] : array();
|
432 |
+
}
|
433 |
+
|
434 |
+
/**
|
435 |
+
* @param WP_Post $post
|
436 |
+
*/
|
437 |
+
public function setup( $post ) {
|
438 |
+
parent::setup( $post );
|
439 |
+
|
440 |
+
if ( ! $this->is_valid() ) {
|
441 |
+
return;
|
442 |
+
}
|
443 |
+
|
444 |
+
if ( $this->ID === 5 ) {
|
445 |
+
$test = '1';
|
446 |
+
}
|
447 |
+
|
448 |
+
if ( ! isset( $this->data_version ) ) {
|
449 |
+
$this->data_version = (int) $this->get_meta( 'popup_theme_data_version' );
|
450 |
+
|
451 |
+
if ( ! $this->data_version ) {
|
452 |
+
$theme_overlay_v1 = $this->get_meta( 'popup_theme_overlay_background_color' );
|
453 |
+
$theme_overlay_v2 = $this->get_meta( 'popup_theme_overlay' );
|
454 |
+
|
455 |
+
// If there are existing settings set the data version to 1/2 so they can be updated.
|
456 |
+
// Otherwise set to the current version as this is a new popup.
|
457 |
+
if ( ! empty( $theme_overlay_v1 ) ) {
|
458 |
+
$this->data_version = 1;
|
459 |
+
} else if ( ! empty( $theme_overlay_v2 ) && is_array( $theme_overlay_v2 ) ) {
|
460 |
+
$this->data_version = 2;
|
461 |
+
} else {
|
462 |
+
$this->data_version = $this->model_version;
|
463 |
+
}
|
464 |
+
|
465 |
+
$this->update_meta( 'popup_theme_data_version', $this->data_version );
|
466 |
+
}
|
467 |
+
}
|
468 |
+
|
469 |
+
if ( $this->data_version < $this->model_version && pum_passive_theme_upgrades_enabled() ) {
|
470 |
+
/**
|
471 |
+
* Process passive settings migration as each popup is loaded. The will only run each migration routine once for each popup.
|
472 |
+
*/
|
473 |
+
$this->passive_migration();
|
474 |
+
}
|
475 |
+
}
|
476 |
+
|
477 |
+
/**
|
478 |
+
* Allows for passive migration routines based on the current data version.
|
479 |
+
*/
|
480 |
+
public function passive_migration() {
|
481 |
+
$this->doing_passive_migration = true;
|
482 |
+
|
483 |
+
for ( $i = $this->data_version; $this->data_version < $this->model_version; $i ++ ) {
|
484 |
+
// Process migration for current version. ex. current version is 2, runs pum_theme_passive_migration_2.
|
485 |
+
do_action_ref_array( 'pum_theme_passive_migration_' . $this->data_version, array( &$this ) );
|
486 |
+
$this->data_version ++;
|
487 |
+
|
488 |
+
/**
|
489 |
+
* Update the themes data version.
|
490 |
+
*/
|
491 |
+
$this->update_meta( 'popup_theme_data_version', $this->data_version );
|
492 |
+
}
|
493 |
+
|
494 |
+
do_action_ref_array( 'pum_theme_passive_migration', array( &$this, $this->data_version ) );
|
495 |
+
|
496 |
+
$this->doing_passive_migration = false;
|
497 |
+
}
|
498 |
+
}
|
499 |
+
|
classes/Utils/Alerts.php
CHANGED
@@ -1,485 +1,485 @@
|
|
1 |
-
<?php
|
2 |
-
/*******************************************************************************
|
3 |
-
* Copyright (c) 2019, WP Popup Maker
|
4 |
-
******************************************************************************/
|
5 |
-
|
6 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
-
exit;
|
8 |
-
}
|
9 |
-
|
10 |
-
/**
|
11 |
-
* Class PUM_Utils_Alerts
|
12 |
-
*/
|
13 |
-
class PUM_Utils_Alerts {
|
14 |
-
|
15 |
-
/**
|
16 |
-
*
|
17 |
-
*/
|
18 |
-
public static function init() {
|
19 |
-
add_action( 'admin_init', array( __CLASS__, 'hooks' ) );
|
20 |
-
add_action( 'wp_ajax_pum_alerts_action', array( __CLASS__, 'ajax_handler' ) );
|
21 |
-
add_filter( 'pum_alert_list', array( __CLASS__, 'whats_new_alerts' ), 0 );
|
22 |
-
add_filter( 'pum_alert_list', array( __CLASS__, 'integration_alerts' ), 5 );
|
23 |
-
add_filter( 'pum_alert_list', array( __CLASS__, 'translation_request' ), 10 );
|
24 |
-
add_action( 'admin_menu', array( __CLASS__, 'append_alert_count' ), 999 );
|
25 |
-
}
|
26 |
-
|
27 |
-
/**
|
28 |
-
* Gets a count of current alerts.
|
29 |
-
*
|
30 |
-
* @return int
|
31 |
-
*/
|
32 |
-
public static function alert_count() {
|
33 |
-
return count( self::get_alerts() );
|
34 |
-
}
|
35 |
-
|
36 |
-
/**
|
37 |
-
* Append alert count to Popup Maker menu item.
|
38 |
-
*/
|
39 |
-
public static function append_alert_count() {
|
40 |
-
global $menu;
|
41 |
-
$count = self::alert_count();
|
42 |
-
foreach ( $menu as $key => $item ) {
|
43 |
-
if ( $item[2] == 'edit.php?post_type=popup' ) {
|
44 |
-
$menu[ $key ][0] .= $count ? ' <span class="update-plugins count-' . $count . '"><span class="plugin-count pum-alert-count" aria-hidden="true">' . $count . '</span></span>' : '';
|
45 |
-
}
|
46 |
-
}
|
47 |
-
}
|
48 |
-
|
49 |
-
/**
|
50 |
-
* @param array $alerts
|
51 |
-
*
|
52 |
-
* @return array
|
53 |
-
*/
|
54 |
-
public static function translation_request( $alerts = array() ) {
|
55 |
-
|
56 |
-
$version = explode( '.', Popup_Maker::$VER );
|
57 |
-
// Get only the major.minor version exclude the point releases.
|
58 |
-
$version = $version[0] . '.' . $version[1];
|
59 |
-
|
60 |
-
$code = 'translation_request_' . $version;
|
61 |
-
|
62 |
-
// Bail Early if they have already dismissed.
|
63 |
-
if ( self::has_dismissed_alert( $code ) ) {
|
64 |
-
return $alerts;
|
65 |
-
}
|
66 |
-
|
67 |
-
// Get locales based on the HTTP accept language header.
|
68 |
-
$locales_from_header = PUM_Utils_I10n::get_http_locales();
|
69 |
-
|
70 |
-
// Abort early if no locales in header.
|
71 |
-
if ( empty( $locales_from_header ) ) {
|
72 |
-
return $alerts;
|
73 |
-
}
|
74 |
-
|
75 |
-
// Get acceptable non EN WordPress locales based on the HTTP accept language header.
|
76 |
-
// Used when the current locale is EN only I believe.
|
77 |
-
$non_en_locales_from_header = PUM_Utils_I10n::get_non_en_accepted_wp_locales_from_header();
|
78 |
-
|
79 |
-
// If no additional languages are supported abort
|
80 |
-
if ( empty( $non_en_locales_from_header ) ) {
|
81 |
-
return $alerts;
|
82 |
-
}
|
83 |
-
|
84 |
-
/**
|
85 |
-
* Assume all at this point are possible polyglots.
|
86 |
-
*
|
87 |
-
* Viewing in English!
|
88 |
-
* -- Translation available in one additional language!
|
89 |
-
* ---- Show notice that there other language is available and we need help translating.
|
90 |
-
* -- Translation available in more than one language!
|
91 |
-
* ---- Show notice that their other languages are available and need help translating.
|
92 |
-
* -- Translation not available!
|
93 |
-
* ---- Show notice that plugin is not translated and we need help.
|
94 |
-
* Else If translation for their language(s) exists, but isn't up to date!
|
95 |
-
* -- Show notice that their language is available, but out of date and need help translating.
|
96 |
-
* Else If translations for their language doesn't exist!
|
97 |
-
* -- Show notice that plugin is not translated and we need help.
|
98 |
-
*/
|
99 |
-
$current_locale = function_exists( 'get_user_locale' ) ? get_user_locale() : get_locale();
|
100 |
-
|
101 |
-
// Get the active language packs of the plugin.
|
102 |
-
$translation_status = PUM_Utils_I10n::translation_status();
|
103 |
-
// Retrieve all the WordPress locales in which the plugin is translated.
|
104 |
-
$locales_with_translations = wp_list_pluck( $translation_status, 'language' );
|
105 |
-
$locale_translation_versions = wp_list_pluck( $translation_status, 'version' );
|
106 |
-
|
107 |
-
// Suggests existing langpacks
|
108 |
-
$suggested_locales_with_langpack = array_values( array_intersect( $non_en_locales_from_header, $locales_with_translations ) );
|
109 |
-
$current_locale_is_suggested = in_array( $current_locale, $suggested_locales_with_langpack );
|
110 |
-
$current_locale_is_translated = in_array( $current_locale, $locales_with_translations );
|
111 |
-
|
112 |
-
// Last chance to abort early before querying all available languages.
|
113 |
-
// We abort here if the user is already using a translated language that is up to date!
|
114 |
-
if ( $current_locale_is_suggested && $current_locale_is_translated && version_compare( $locale_translation_versions[ $current_locale ], Popup_Maker::$VER, '>=' ) ) {
|
115 |
-
return $alerts;
|
116 |
-
}
|
117 |
-
|
118 |
-
// Retrieve all the WordPress locales.
|
119 |
-
$locales_supported_by_wordpress = PUM_Utils_I10n::available_locales();
|
120 |
-
|
121 |
-
// Get the native language names of the locales.
|
122 |
-
$suggest_translated_locale_names = array();
|
123 |
-
foreach ( $suggested_locales_with_langpack as $locale ) {
|
124 |
-
$suggest_translated_locale_names[ $locale ] = $locales_supported_by_wordpress[ $locale ]['native_name'];
|
125 |
-
}
|
126 |
-
|
127 |
-
$suggest_string = '';
|
128 |
-
|
129 |
-
// If we get this far, they clearly have multiple language available
|
130 |
-
// If current locale is english but they have others available, they are likely polyglots.
|
131 |
-
$currently_in_english = strpos( $current_locale, 'en' ) === 0;
|
132 |
-
|
133 |
-
// Currently in English.
|
134 |
-
if ( $currently_in_english ) {
|
135 |
-
|
136 |
-
// Only one locale suggestion.
|
137 |
-
if ( 1 === count( $suggest_translated_locale_names ) ) {
|
138 |
-
$language = current( $suggest_translated_locale_names );
|
139 |
-
|
140 |
-
$suggest_string = sprintf( /* translators: %s: native language name. */
|
141 |
-
__( 'This plugin is also available in %1$s. <a href="%2$s" target="_blank">Help improve the translation!</a>', 'popup-maker' ), $language, esc_url( 'https://translate.wordpress.org/projects/wp-plugins/popup-maker' ) );
|
142 |
-
|
143 |
-
// Multiple locale suggestions.
|
144 |
-
} elseif ( ! empty( $suggest_translated_locale_names ) ) {
|
145 |
-
$primary_language = current( $suggest_translated_locale_names );
|
146 |
-
array_shift( $suggest_translated_locale_names );
|
147 |
-
|
148 |
-
$other_suggest = '';
|
149 |
-
foreach ( $suggest_translated_locale_names as $language ) {
|
150 |
-
$other_suggest .= $language . ', ';
|
151 |
-
}
|
152 |
-
|
153 |
-
$suggest_string = sprintf( /* translators: 1: native language name, 2: other native language names, comma separated */
|
154 |
-
__( 'This plugin is also available in %1$s (also: %2$s). <a href="%3$s" target="_blank">Help improve the translation!</a>', 'popup-maker' ), $primary_language, trim( $other_suggest, ' ,' ), esc_url( 'https://translate.wordpress.org/projects/wp-plugins/popup-maker' ) );
|
155 |
-
|
156 |
-
// Non-English locale in header, no translations.
|
157 |
-
} elseif ( ! empty( $non_en_locales_from_header ) ) {
|
158 |
-
|
159 |
-
if ( 1 === count( $non_en_locales_from_header ) ) {
|
160 |
-
$locale = reset( $non_en_locales_from_header );
|
161 |
-
|
162 |
-
$suggest_string = sprintf( /* translators: 1: native language name, 2: URL to translate.wordpress.org */
|
163 |
-
__( 'This plugin is not translated into %1$s yet. <a href="%2$s" target="_blank">Help translate it!</a>', 'popup-maker' ), $locales_supported_by_wordpress[ $locale ]['native_name'], esc_url( 'https://translate.wordpress.org/projects/wp-plugins/popup-maker' ) );
|
164 |
-
} else {
|
165 |
-
$primary_locale = reset( $non_en_locales_from_header );
|
166 |
-
$primary_language = $locales_supported_by_wordpress[ $primary_locale ]['native_name'];
|
167 |
-
array_shift( $non_en_locales_from_header );
|
168 |
-
|
169 |
-
$other_suggest = '';
|
170 |
-
foreach ( $non_en_locales_from_header as $locale ) {
|
171 |
-
$other_suggest .= $locales_supported_by_wordpress[ $locale ]['native_name'] . ', ';
|
172 |
-
}
|
173 |
-
|
174 |
-
$suggest_string = sprintf( /* translators: 1: native language name, 2: other native language names, comma separated */
|
175 |
-
__( 'This plugin is also available in %1$s (also: %2$s). <a href="%3$s" target="_blank">Help improve the translation!</a>', 'popup-maker' ), $primary_language, trim( $other_suggest, ' ,' ), esc_url( 'https://translate.wordpress.org/projects/wp-plugins/popup-maker' ) );
|
176 |
-
}
|
177 |
-
}
|
178 |
-
|
179 |
-
// The plugin has no translation for the current locale.
|
180 |
-
} elseif ( ! $current_locale_is_suggested && ! $current_locale_is_translated ) {
|
181 |
-
$suggest_string = sprintf( __( 'This plugin is not translated into %1$s yet. <a href="%2$s" target="_blank">Help translate it!</a>', 'popup-maker' ), $locales_supported_by_wordpress[ $current_locale ]['native_name'], esc_url( 'https://translate.wordpress.org/projects/wp-plugins/popup-maker' ) );
|
182 |
-
// The plugin has translations for current locale, but they are out of date.
|
183 |
-
} elseif ( $current_locale_is_suggested && $current_locale_is_translated && version_compare( $locale_translation_versions[ $current_locale ], Popup_Maker::$VER, '<' ) ) {
|
184 |
-
$suggest_string = sprintf( /* translators: %s: native language name. */
|
185 |
-
__( 'This plugin\'s translation for %1$s is out of date. <a href="%2$s" target="_blank">Help improve the translation!</a>', 'popup-maker' ), $locales_supported_by_wordpress[ $current_locale ]['native_name'], esc_url( 'https://translate.wordpress.org/projects/wp-plugins/popup-maker' ) );
|
186 |
-
}
|
187 |
-
|
188 |
-
|
189 |
-
if ( ! empty( $suggest_string ) ) {
|
190 |
-
$alerts[] = array(
|
191 |
-
'code' => $code,
|
192 |
-
'message' => $suggest_string,
|
193 |
-
'type' => 'info',
|
194 |
-
);
|
195 |
-
}
|
196 |
-
|
197 |
-
return $alerts;
|
198 |
-
}
|
199 |
-
|
200 |
-
/**
|
201 |
-
* @param array $alerts
|
202 |
-
*
|
203 |
-
* @return array
|
204 |
-
*/
|
205 |
-
public static function whats_new_alerts( $alerts = array() ) {
|
206 |
-
|
207 |
-
$upgraded_from = PUM_Utils_Upgrades::$upgraded_from;
|
208 |
-
|
209 |
-
if ( version_compare( $upgraded_from, '0.0.0', '>' ) ) {
|
210 |
-
|
211 |
-
if ( version_compare( $upgraded_from, '1.8.0', '<' ) ) {
|
212 |
-
$alerts[] = array(
|
213 |
-
'code' => 'whats_new_1_8_0',
|
214 |
-
'type' => 'success',
|
215 |
-
'message' => sprintf( '<strong>' . __( 'See whats new in v%s - (%sview all changes%s)', 'popup-maker' ) . '</strong>', '1.8.0', '<a href="' . add_query_arg( array(
|
216 |
-
'tab' => 'plugin-information',
|
217 |
-
'plugin' => 'popup-maker',
|
218 |
-
'section' => 'changelog',
|
219 |
-
'TB_iframe' => true,
|
220 |
-
'width' => 722,
|
221 |
-
'height' => 949,
|
222 |
-
), admin_url( 'plugin-install.php' ) ) . '" target="_blank">', '</a>' ),
|
223 |
-
'html' => "<ul class='ul-disc'>" . "<li>" . 'New UX for the Popup Theme editor.' . "</li>" . "<li>" . 'New close button positions: top center, bottom center, middle left & middle right.' . "</li>" . "<li>" . 'New option to position close button outside of popup.' . "</li>" . "</ul>",
|
224 |
-
'priority' => 100,
|
225 |
-
);
|
226 |
-
}
|
227 |
-
|
228 |
-
}
|
229 |
-
|
230 |
-
return $alerts;
|
231 |
-
}
|
232 |
-
|
233 |
-
/**
|
234 |
-
* @param array $alerts
|
235 |
-
*
|
236 |
-
* @return array
|
237 |
-
*/
|
238 |
-
public static function integration_alerts( $alerts = array() ) {
|
239 |
-
|
240 |
-
$integrations = array(
|
241 |
-
'buddypress' => array(
|
242 |
-
'label' => __( 'BuddyPress', 'buddypress' ),
|
243 |
-
'learn_more_url' => 'https://wppopupmaker.com/works-with/buddypress/',
|
244 |
-
'conditions' => ! class_exists( 'PUM_BuddyPress' ) && ( function_exists( 'buddypress' ) || class_exists( 'BuddyPress' ) ),
|
245 |
-
'slug' => 'popup-maker-buddypress-integration',
|
246 |
-
'name' => 'Popup Maker - BuddyPress Integration',
|
247 |
-
'free' => true,
|
248 |
-
),
|
249 |
-
);
|
250 |
-
|
251 |
-
foreach ( $integrations as $key => $integration ) {
|
252 |
-
|
253 |
-
if ( $integration['conditions'] ) {
|
254 |
-
|
255 |
-
$path = "{$integration['slug']}/{$integration['slug']}.php";
|
256 |
-
$plugin_data = file_exists( WP_PLUGIN_DIR . '/' . $path ) ? get_plugin_data( WP_PLUGIN_DIR . '/' . $path, false, false ) : false;
|
257 |
-
|
258 |
-
$installed = $plugin_data && ! empty( $plugin_data['Name'] ) && $plugin_data['Name'] === $integration['name'];
|
259 |
-
|
260 |
-
$text = $installed ? __( 'activate it now', 'popup-maker' ) : __( 'install it now', 'popup-maker' );
|
261 |
-
$url = $installed ? esc_url( wp_nonce_url( admin_url( 'plugins.php?action=activate&plugin=' . $path ), 'activate-plugin_' . $path ) ) : esc_url( wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=popup-maker-buddypress-integration' ), 'install-plugin_popup-maker-buddypress-integration' ) );
|
262 |
-
|
263 |
-
$alerts[] = array(
|
264 |
-
'code' => $key . '_integration_available',
|
265 |
-
'message' => sprintf( __( '%sDid you know:%s Popup Maker has custom integrations with %s, %slearn more%s or %s%s%s!', 'popup-maker' ), '<strong>', '</strong>', $integration['label'], '<a href="' . $integration['learn_more_url'] . '" target="_blank">', '</a>', '<a href="' . $url . '">', $text, '</a>' ),
|
266 |
-
'dismissible' => true,
|
267 |
-
'global' => false,
|
268 |
-
'type' => $installed ? 'warning' : 'info',
|
269 |
-
);
|
270 |
-
|
271 |
-
}
|
272 |
-
|
273 |
-
}
|
274 |
-
|
275 |
-
return $alerts;
|
276 |
-
}
|
277 |
-
|
278 |
-
/**
|
279 |
-
* Hook into relevant WP actions.
|
280 |
-
*/
|
281 |
-
public static function hooks() {
|
282 |
-
if ( is_admin() && current_user_can( 'edit_posts' ) ) {
|
283 |
-
add_action( 'admin_notices', array( __CLASS__, 'admin_notices' ) );
|
284 |
-
add_action( 'network_admin_notices', array( __CLASS__, 'admin_notices' ) );
|
285 |
-
add_action( 'user_admin_notices', array( __CLASS__, 'admin_notices' ) );
|
286 |
-
}
|
287 |
-
}
|
288 |
-
|
289 |
-
/**
|
290 |
-
* @return bool
|
291 |
-
*/
|
292 |
-
public static function should_show_alerts() {
|
293 |
-
return in_array( true, array(
|
294 |
-
pum_is_admin_page(),
|
295 |
-
count( self::get_global_alerts() ) > 0,
|
296 |
-
) );
|
297 |
-
}
|
298 |
-
|
299 |
-
/**
|
300 |
-
* Render admin alerts if available.
|
301 |
-
*/
|
302 |
-
public static function admin_notices() {
|
303 |
-
if ( ! self::should_show_alerts() ) {
|
304 |
-
return;
|
305 |
-
}
|
306 |
-
|
307 |
-
$global_only = ! pum_is_admin_page();
|
308 |
-
|
309 |
-
$alerts = $global_only ? self::get_global_alerts() : self::get_alerts();
|
310 |
-
|
311 |
-
$count = count( $alerts );
|
312 |
-
|
313 |
-
if ( ! $count ) {
|
314 |
-
return;
|
315 |
-
}
|
316 |
-
|
317 |
-
wp_enqueue_script( 'pum-admin-general' );
|
318 |
-
wp_enqueue_style( 'pum-admin-general' );
|
319 |
-
|
320 |
-
?>
|
321 |
-
|
322 |
-
<script type="text/javascript">
|
323 |
-
window.pum_alerts_nonce = '<?php echo wp_create_nonce( 'pum_alerts_action' ); ?>';
|
324 |
-
</script>
|
325 |
-
|
326 |
-
<div class="pum-alerts">
|
327 |
-
|
328 |
-
<h3>
|
329 |
-
<img alt="" class="logo" width="30" src="<?php echo Popup_Maker::$URL; ?>assets/images/logo.png" /> <?php printf( '%s%s (%s)', ( $global_only ? __( 'Popup Maker', 'popup-maker' ) . ' ' : '' ), __( 'Notifications', 'popup-maker' ), '<span class="pum-alert-count">' . $count . '</span>' ); ?>
|
330 |
-
</h3>
|
331 |
-
|
332 |
-
<p><?php __( 'Check out the following notifications from Popup Maker.', 'popup-maker' ); ?></p>
|
333 |
-
|
334 |
-
<?php foreach ( $alerts as $alert ) : ?>
|
335 |
-
|
336 |
-
<div class="pum-alert-holder" data-code="<?php echo $alert['code']; ?>" class="<?php echo $alert['dismissible'] ? 'is-dismissible' : ''; ?>" data-dismissible="<?php esc_attr_e( $alert['dismissible'] ); ?>">
|
337 |
-
|
338 |
-
<div class="pum-alert <?php echo $alert['type'] != '' ? 'pum-alert__' . $alert['type'] : ''; ?>">
|
339 |
-
|
340 |
-
<?php if ( ! empty( $alert['message'] ) ) : ?>
|
341 |
-
<p><?php echo $alert['message']; ?></p>
|
342 |
-
<?php endif; ?>
|
343 |
-
|
344 |
-
<?php if ( ! empty( $alert['html'] ) ) : ?>
|
345 |
-
<?php echo wp_encode_emoji( $alert['html'] ); ?>
|
346 |
-
<?php endif; ?>
|
347 |
-
|
348 |
-
</div>
|
349 |
-
|
350 |
-
<?php if ( $alert['dismissible'] ) : ?>
|
351 |
-
|
352 |
-
<button type="button" class="button dismiss pum-dismiss">
|
353 |
-
<span class="screen-reader-text"><?php _e( 'Dismiss this item.', 'popup-maker' ); ?></span> <span class="dashicons dashicons-no-alt"></span>
|
354 |
-
</button>
|
355 |
-
|
356 |
-
<?php endif; ?>
|
357 |
-
|
358 |
-
</div>
|
359 |
-
|
360 |
-
<?php endforeach; ?>
|
361 |
-
|
362 |
-
</div>
|
363 |
-
|
364 |
-
<?php
|
365 |
-
}
|
366 |
-
|
367 |
-
/**
|
368 |
-
* @return array
|
369 |
-
*/
|
370 |
-
public static function get_global_alerts() {
|
371 |
-
$alerts = self::get_alerts();
|
372 |
-
|
373 |
-
$global_alerts = array();
|
374 |
-
|
375 |
-
foreach ( $alerts as $alert ) {
|
376 |
-
if ( $alert['global'] ) {
|
377 |
-
$global_alerts[] = $alert;
|
378 |
-
}
|
379 |
-
}
|
380 |
-
|
381 |
-
return $global_alerts;
|
382 |
-
}
|
383 |
-
|
384 |
-
/**
|
385 |
-
* @return array
|
386 |
-
*/
|
387 |
-
public static function get_alerts() {
|
388 |
-
|
389 |
-
static $alert_list;
|
390 |
-
|
391 |
-
if ( ! isset( $alert_list ) ) {
|
392 |
-
$alert_list = apply_filters( 'pum_alert_list', array() );
|
393 |
-
}
|
394 |
-
|
395 |
-
$alerts = array();
|
396 |
-
|
397 |
-
foreach ( $alert_list as $alert ) {
|
398 |
-
|
399 |
-
// Ignore dismissed alerts.
|
400 |
-
if ( self::has_dismissed_alert( $alert['code'] ) ) {
|
401 |
-
continue;
|
402 |
-
}
|
403 |
-
|
404 |
-
$alerts[] = wp_parse_args( $alert, array(
|
405 |
-
'code' => 'default',
|
406 |
-
'priority' => 10,
|
407 |
-
'message' => '',
|
408 |
-
'type' => 'info',
|
409 |
-
'html' => '',
|
410 |
-
'dismissible' => true,
|
411 |
-
'global' => false,
|
412 |
-
) );
|
413 |
-
|
414 |
-
}
|
415 |
-
|
416 |
-
// Sort alerts by priority, highest to lowest.
|
417 |
-
$alerts = PUM_Utils_Array::sort( $alerts, 'priority', true );
|
418 |
-
|
419 |
-
return $alerts;
|
420 |
-
}
|
421 |
-
|
422 |
-
|
423 |
-
/**
|
424 |
-
*
|
425 |
-
*/
|
426 |
-
public static function ajax_handler() {
|
427 |
-
$args = wp_parse_args( $_REQUEST, array(
|
428 |
-
'code' => '',
|
429 |
-
'expires' => '',
|
430 |
-
) );
|
431 |
-
|
432 |
-
if ( ! wp_verify_nonce( $_REQUEST['nonce'], 'pum_alerts_action' ) ) {
|
433 |
-
wp_send_json_error();
|
434 |
-
}
|
435 |
-
|
436 |
-
try {
|
437 |
-
$dismissed_alerts = self::dismissed_alerts();
|
438 |
-
$dismissed_alerts[ $args['code'] ] = ! empty( $args['expires'] ) ? strtotime( '+' . $args['expires'] ) : true;
|
439 |
-
|
440 |
-
$user_id = get_current_user_id();
|
441 |
-
update_user_meta( $user_id, '_pum_dismissed_alerts', $dismissed_alerts );
|
442 |
-
wp_send_json_success();
|
443 |
-
|
444 |
-
} catch ( Exception $e ) {
|
445 |
-
wp_send_json_error( $e );
|
446 |
-
}
|
447 |
-
}
|
448 |
-
|
449 |
-
/**
|
450 |
-
* @param string $code
|
451 |
-
*
|
452 |
-
* @return bool
|
453 |
-
*/
|
454 |
-
public static function has_dismissed_alert( $code = '' ) {
|
455 |
-
$dimissed_alerts = self::dismissed_alerts();
|
456 |
-
|
457 |
-
$alert_dismissed = array_key_exists( $code, $dimissed_alerts );
|
458 |
-
|
459 |
-
// If the alert was dismissed and has a non true type value, it is an expiry time.
|
460 |
-
if ( $alert_dismissed && true !== $dimissed_alerts[ $code ] ) {
|
461 |
-
return strtotime( 'now' ) < $dimissed_alerts[ $code ];
|
462 |
-
}
|
463 |
-
|
464 |
-
return $alert_dismissed;
|
465 |
-
}
|
466 |
-
|
467 |
-
/**
|
468 |
-
* Returns an array of dismissed alert groups.
|
469 |
-
*
|
470 |
-
* @return array
|
471 |
-
*/
|
472 |
-
public static function dismissed_alerts() {
|
473 |
-
$user_id = get_current_user_id();
|
474 |
-
|
475 |
-
$dismissed_alerts = get_user_meta( $user_id, '_pum_dismissed_alerts', true );
|
476 |
-
|
477 |
-
if ( ! is_array( $dismissed_alerts ) ) {
|
478 |
-
$dismissed_alerts = array();
|
479 |
-
update_user_meta( $user_id, '_pum_dismissed_alerts', $dismissed_alerts );
|
480 |
-
}
|
481 |
-
|
482 |
-
return $dismissed_alerts;
|
483 |
-
}
|
484 |
-
|
485 |
-
}
|
1 |
+
<?php
|
2 |
+
/*******************************************************************************
|
3 |
+
* Copyright (c) 2019, WP Popup Maker
|
4 |
+
******************************************************************************/
|
5 |
+
|
6 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
7 |
+
exit;
|
8 |
+
}
|
9 |
+
|
10 |
+
/**
|
11 |
+
* Class PUM_Utils_Alerts
|
12 |
+
*/
|
13 |
+
class PUM_Utils_Alerts {
|
14 |
+
|
15 |
+
/**
|
16 |
+
*
|
17 |
+
*/
|
18 |
+
public static function init() {
|
19 |
+
add_action( 'admin_init', array( __CLASS__, 'hooks' ) );
|
20 |
+
add_action( 'wp_ajax_pum_alerts_action', array( __CLASS__, 'ajax_handler' ) );
|
21 |
+
add_filter( 'pum_alert_list', array( __CLASS__, 'whats_new_alerts' ), 0 );
|
22 |
+
add_filter( 'pum_alert_list', array( __CLASS__, 'integration_alerts' ), 5 );
|
23 |
+
add_filter( 'pum_alert_list', array( __CLASS__, 'translation_request' ), 10 );
|
24 |
+
add_action( 'admin_menu', array( __CLASS__, 'append_alert_count' ), 999 );
|
25 |
+
}
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Gets a count of current alerts.
|
29 |
+
*
|
30 |
+
* @return int
|
31 |
+
*/
|
32 |
+
public static function alert_count() {
|
33 |
+
return count( self::get_alerts() );
|
34 |
+
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Append alert count to Popup Maker menu item.
|
38 |
+
*/
|
39 |
+
public static function append_alert_count() {
|
40 |
+
global $menu;
|
41 |
+
$count = self::alert_count();
|
42 |
+
foreach ( $menu as $key => $item ) {
|
43 |
+
if ( $item[2] == 'edit.php?post_type=popup' ) {
|
44 |
+
$menu[ $key ][0] .= $count ? ' <span class="update-plugins count-' . $count . '"><span class="plugin-count pum-alert-count" aria-hidden="true">' . $count . '</span></span>' : '';
|
45 |
+
}
|
46 |
+
}
|
47 |
+
}
|
48 |
+
|
49 |
+
/**
|
50 |
+
* @param array $alerts
|
51 |
+
*
|
52 |
+
* @return array
|
53 |
+
*/
|
54 |
+
public static function translation_request( $alerts = array() ) {
|
55 |
+
|
56 |
+
$version = explode( '.', Popup_Maker::$VER );
|
57 |
+
// Get only the major.minor version exclude the point releases.
|
58 |
+
$version = $version[0] . '.' . $version[1];
|
59 |
+
|
60 |
+
$code = 'translation_request_' . $version;
|
61 |
+
|
62 |
+
// Bail Early if they have already dismissed.
|
63 |
+
if ( self::has_dismissed_alert( $code ) ) {
|
64 |
+
return $alerts;
|
65 |
+
}
|
66 |
+
|
67 |
+
// Get locales based on the HTTP accept language header.
|
68 |
+
$locales_from_header = PUM_Utils_I10n::get_http_locales();
|
69 |
+
|
70 |
+
// Abort early if no locales in header.
|
71 |
+
if ( empty( $locales_from_header ) ) {
|
72 |
+
return $alerts;
|
73 |
+
}
|
74 |
+
|
75 |
+
// Get acceptable non EN WordPress locales based on the HTTP accept language header.
|
76 |
+
// Used when the current locale is EN only I believe.
|
77 |
+
$non_en_locales_from_header = PUM_Utils_I10n::get_non_en_accepted_wp_locales_from_header();
|
78 |
+
|
79 |
+
// If no additional languages are supported abort
|
80 |
+
if ( empty( $non_en_locales_from_header ) ) {
|
81 |
+
return $alerts;
|
82 |
+
}
|
83 |
+
|
84 |
+
/**
|
85 |
+
* Assume all at this point are possible polyglots.
|
86 |
+
*
|
87 |
+
* Viewing in English!
|
88 |
+
* -- Translation available in one additional language!
|
89 |
+
* ---- Show notice that there other language is available and we need help translating.
|
90 |
+
* -- Translation available in more than one language!
|
91 |
+
* ---- Show notice that their other languages are available and need help translating.
|
92 |
+
* -- Translation not available!
|
93 |
+
* ---- Show notice that plugin is not translated and we need help.
|
94 |
+
* Else If translation for their language(s) exists, but isn't up to date!
|
95 |
+
* -- Show notice that their language is available, but out of date and need help translating.
|
96 |
+
* Else If translations for their language doesn't exist!
|
97 |
+
* -- Show notice that plugin is not translated and we need help.
|
98 |
+
*/
|
99 |
+
$current_locale = function_exists( 'get_user_locale' ) ? get_user_locale() : get_locale();
|
100 |
+
|
101 |
+
// Get the active language packs of the plugin.
|
102 |
+
$translation_status = PUM_Utils_I10n::translation_status();
|
103 |
+
// Retrieve all the WordPress locales in which the plugin is translated.
|
104 |
+
$locales_with_translations = wp_list_pluck( $translation_status, 'language' );
|
105 |
+
$locale_translation_versions = wp_list_pluck( $translation_status, 'version' );
|
106 |
+
|
107 |
+
// Suggests existing langpacks
|
108 |
+
$suggested_locales_with_langpack = array_values( array_intersect( $non_en_locales_from_header, $locales_with_translations ) );
|
109 |
+
$current_locale_is_suggested = in_array( $current_locale, $suggested_locales_with_langpack );
|
110 |
+
$current_locale_is_translated = in_array( $current_locale, $locales_with_translations );
|
111 |
+
|
112 |
+
// Last chance to abort early before querying all available languages.
|
113 |
+
// We abort here if the user is already using a translated language that is up to date!
|
114 |
+
if ( $current_locale_is_suggested && $current_locale_is_translated && version_compare( $locale_translation_versions[ $current_locale ], Popup_Maker::$VER, '>=' ) ) {
|
115 |
+
return $alerts;
|
116 |
+
}
|
117 |
+
|
118 |
+
// Retrieve all the WordPress locales.
|
119 |
+
$locales_supported_by_wordpress = PUM_Utils_I10n::available_locales();
|
120 |
+
|
121 |
+
// Get the native language names of the locales.
|
122 |
+
$suggest_translated_locale_names = array();
|
123 |
+
foreach ( $suggested_locales_with_langpack as $locale ) {
|
124 |
+
$suggest_translated_locale_names[ $locale ] = $locales_supported_by_wordpress[ $locale ]['native_name'];
|
125 |
+
}
|
126 |
+
|
127 |
+
$suggest_string = '';
|
128 |
+
|
129 |
+
// If we get this far, they clearly have multiple language available
|
130 |
+
// If current locale is english but they have others available, they are likely polyglots.
|
131 |
+
$currently_in_english = strpos( $current_locale, 'en' ) === 0;
|
132 |
+
|
133 |
+
// Currently in English.
|
134 |
+
if ( $currently_in_english ) {
|
135 |
+
|
136 |
+
// Only one locale suggestion.
|
137 |
+
if ( 1 === count( $suggest_translated_locale_names ) ) {
|
138 |
+
$language = current( $suggest_translated_locale_names );
|
139 |
+
|
140 |
+
$suggest_string = sprintf( /* translators: %s: native language name. */
|
141 |
+
__( 'This plugin is also available in %1$s. <a href="%2$s" target="_blank">Help improve the translation!</a>', 'popup-maker' ), $language, esc_url( 'https://translate.wordpress.org/projects/wp-plugins/popup-maker' ) );
|
142 |
+
|
143 |
+
// Multiple locale suggestions.
|
144 |
+
} elseif ( ! empty( $suggest_translated_locale_names ) ) {
|
145 |
+
$primary_language = current( $suggest_translated_locale_names );
|
146 |
+
array_shift( $suggest_translated_locale_names );
|
147 |
+
|
148 |
+
$other_suggest = '';
|
149 |
+
foreach ( $suggest_translated_locale_names as $language ) {
|
150 |
+
$other_suggest .= $language . ', ';
|
151 |
+
}
|
152 |
+
|
153 |
+
$suggest_string = sprintf( /* translators: 1: native language name, 2: other native language names, comma separated */
|
154 |
+
__( 'This plugin is also available in %1$s (also: %2$s). <a href="%3$s" target="_blank">Help improve the translation!</a>', 'popup-maker' ), $primary_language, trim( $other_suggest, ' ,' ), esc_url( 'https://translate.wordpress.org/projects/wp-plugins/popup-maker' ) );
|
155 |
+
|
156 |
+
// Non-English locale in header, no translations.
|
157 |
+
} elseif ( ! empty( $non_en_locales_from_header ) ) {
|
158 |
+
|
159 |
+
if ( 1 === count( $non_en_locales_from_header ) ) {
|
160 |
+
$locale = reset( $non_en_locales_from_header );
|
161 |
+
|
162 |
+
$suggest_string = sprintf( /* translators: 1: native language name, 2: URL to translate.wordpress.org */
|
163 |
+
__( 'This plugin is not translated into %1$s yet. <a href="%2$s" target="_blank">Help translate it!</a>', 'popup-maker' ), $locales_supported_by_wordpress[ $locale ]['native_name'], esc_url( 'https://translate.wordpress.org/projects/wp-plugins/popup-maker' ) );
|
164 |
+
} else {
|
165 |
+
$primary_locale = reset( $non_en_locales_from_header );
|
166 |
+
$primary_language = $locales_supported_by_wordpress[ $primary_locale ]['native_name'];
|
167 |
+
array_shift( $non_en_locales_from_header );
|
168 |
+
|
169 |
+
$other_suggest = '';
|
170 |
+
foreach ( $non_en_locales_from_header as $locale ) {
|
171 |
+
$other_suggest .= $locales_supported_by_wordpress[ $locale ]['native_name'] . ', ';
|
172 |
+
}
|
173 |
+
|
174 |
+
$suggest_string = sprintf( /* translators: 1: native language name, 2: other native language names, comma separated */
|
175 |
+
__( 'This plugin is also available in %1$s (also: %2$s). <a href="%3$s" target="_blank">Help improve the translation!</a>', 'popup-maker' ), $primary_language, trim( $other_suggest, ' ,' ), esc_url( 'https://translate.wordpress.org/projects/wp-plugins/popup-maker' ) );
|
176 |
+
}
|
177 |
+
}
|
178 |
+
|
179 |
+
// The plugin has no translation for the current locale.
|
180 |
+
} elseif ( ! $current_locale_is_suggested && ! $current_locale_is_translated ) {
|
181 |
+
$suggest_string = sprintf( __( 'This plugin is not translated into %1$s yet. <a href="%2$s" target="_blank">Help translate it!</a>', 'popup-maker' ), $locales_supported_by_wordpress[ $current_locale ]['native_name'], esc_url( 'https://translate.wordpress.org/projects/wp-plugins/popup-maker' ) );
|
182 |
+
// The plugin has translations for current locale, but they are out of date.
|
183 |
+
} elseif ( $current_locale_is_suggested && $current_locale_is_translated && version_compare( $locale_translation_versions[ $current_locale ], Popup_Maker::$VER, '<' ) ) {
|
184 |
+
$suggest_string = sprintf( /* translators: %s: native language name. */
|
185 |
+
__( 'This plugin\'s translation for %1$s is out of date. <a href="%2$s" target="_blank">Help improve the translation!</a>', 'popup-maker' ), $locales_supported_by_wordpress[ $current_locale ]['native_name'], esc_url( 'https://translate.wordpress.org/projects/wp-plugins/popup-maker' ) );
|
186 |
+
}
|
187 |
+
|
188 |
+
|
189 |
+
if ( ! empty( $suggest_string ) ) {
|
190 |
+
$alerts[] = array(
|
191 |
+
'code' => $code,
|
192 |
+
'message' => $suggest_string,
|
193 |
+
'type' => 'info',
|
194 |
+
);
|
195 |
+
}
|
196 |
+
|
197 |
+
return $alerts;
|
198 |
+
}
|
199 |
+
|
200 |
+
/**
|
201 |
+
* @param array $alerts
|
202 |
+
*
|
203 |
+
* @return array
|
204 |
+
*/
|
205 |
+
public static function whats_new_alerts( $alerts = array() ) {
|
206 |
+
|
207 |
+
$upgraded_from = PUM_Utils_Upgrades::$upgraded_from;
|
208 |
+
|
209 |
+
if ( version_compare( $upgraded_from, '0.0.0', '>' ) ) {
|
210 |
+
|
211 |
+
if ( version_compare( $upgraded_from, '1.8.0', '<' ) ) {
|
212 |
+
$alerts[] = array(
|
213 |
+
'code' => 'whats_new_1_8_0',
|
214 |
+
'type' => 'success',
|
215 |
+
'message' => sprintf( '<strong>' . __( 'See whats new in v%s - (%sview all changes%s)', 'popup-maker' ) . '</strong>', '1.8.0', '<a href="' . add_query_arg( array(
|
216 |
+
'tab' => 'plugin-information',
|
217 |
+
'plugin' => 'popup-maker',
|
218 |
+
'section' => 'changelog',
|
219 |
+
'TB_iframe' => true,
|
220 |
+
'width' => 722,
|
221 |
+
'height' => 949,
|
222 |
+
), admin_url( 'plugin-install.php' ) ) . '" target="_blank">', '</a>' ),
|
223 |
+
'html' => "<ul class='ul-disc'>" . "<li>" . 'New UX for the Popup Theme editor.' . "</li>" . "<li>" . 'New close button positions: top center, bottom center, middle left & middle right.' . "</li>" . "<li>" . 'New option to position close button outside of popup.' . "</li>" . "</ul>",
|
224 |
+
'priority' => 100,
|
225 |
+
);
|
226 |
+
}
|
227 |
+
|
228 |
+
}
|
229 |
+
|
230 |
+
return $alerts;
|
231 |
+
}
|
232 |
+
|
233 |
+
/**
|
234 |
+
* @param array $alerts
|
235 |
+
*
|
236 |
+
* @return array
|
237 |
+
*/
|
238 |
+
public static function integration_alerts( $alerts = array() ) {
|
239 |
+
|
240 |
+
$integrations = array(
|
241 |
+
'buddypress' => array(
|
242 |
+
'label' => __( 'BuddyPress', 'buddypress' ),
|
243 |
+
'learn_more_url' => 'https://wppopupmaker.com/works-with/buddypress/',
|
244 |
+
'conditions' => ! class_exists( 'PUM_BuddyPress' ) && ( function_exists( 'buddypress' ) || class_exists( 'BuddyPress' ) ),
|
245 |
+
'slug' => 'popup-maker-buddypress-integration',
|
246 |
+
'name' => 'Popup Maker - BuddyPress Integration',
|
247 |
+
'free' => true,
|
248 |
+
),
|
249 |
+
);
|
250 |
+
|
251 |
+
foreach ( $integrations as $key => $integration ) {
|
252 |
+
|
253 |
+
if ( $integration['conditions'] ) {
|
254 |
+
|
255 |
+
$path = "{$integration['slug']}/{$integration['slug']}.php";
|
256 |
+
$plugin_data = file_exists( WP_PLUGIN_DIR . '/' . $path ) ? get_plugin_data( WP_PLUGIN_DIR . '/' . $path, false, false ) : false;
|
257 |
+
|
258 |
+
$installed = $plugin_data && ! empty( $plugin_data['Name'] ) && $plugin_data['Name'] === $integration['name'];
|
259 |
+
|
260 |
+
$text = $installed ? __( 'activate it now', 'popup-maker' ) : __( 'install it now', 'popup-maker' );
|
261 |
+
$url = $installed ? esc_url( wp_nonce_url( admin_url( 'plugins.php?action=activate&plugin=' . $path ), 'activate-plugin_' . $path ) ) : esc_url( wp_nonce_url( self_admin_url( 'update.php?action=install-plugin&plugin=popup-maker-buddypress-integration' ), 'install-plugin_popup-maker-buddypress-integration' ) );
|
262 |
+
|
263 |
+
$alerts[] = array(
|
264 |
+
'code' => $key . '_integration_available',
|
265 |
+
'message' => sprintf( __( '%sDid you know:%s Popup Maker has custom integrations with %s, %slearn more%s or %s%s%s!', 'popup-maker' ), '<strong>', '</strong>', $integration['label'], '<a href="' . $integration['learn_more_url'] . '" target="_blank">', '</a>', '<a href="' . $url . '">', $text, '</a>' ),
|
266 |
+
'dismissible' => true,
|
267 |
+
'global' => false,
|
268 |
+
'type' => $installed ? 'warning' : 'info',
|
269 |
+
);
|
270 |
+
|
271 |
+
}
|
272 |
+
|
273 |
+
}
|
274 |
+
|
275 |
+
return $alerts;
|
276 |
+
}
|
277 |
+
|
278 |
+
/**
|
279 |
+
* Hook into relevant WP actions.
|
280 |
+
*/
|
281 |
+
public static function hooks() {
|
282 |
+
if ( is_admin() && current_user_can( 'edit_posts' ) ) {
|
283 |
+
add_action( 'admin_notices', array( __CLASS__, 'admin_notices' ) );
|
284 |
+
add_action( 'network_admin_notices', array( __CLASS__, 'admin_notices' ) );
|
285 |
+
add_action( 'user_admin_notices', array( __CLASS__, 'admin_notices' ) );
|
286 |
+
}
|
287 |
+
}
|
288 |
+
|
289 |
+
/**
|
290 |
+
* @return bool
|
291 |
+
*/
|
292 |
+
public static function should_show_alerts() {
|
293 |
+
return in_array( true, array(
|
294 |
+
pum_is_admin_page(),
|
295 |
+
count( self::get_global_alerts() ) > 0,
|
296 |
+
) );
|
297 |
+
}
|
298 |
+
|
299 |
+
/**
|
300 |
+
* Render admin alerts if available.
|
301 |
+
*/
|
302 |
+
public static function admin_notices() {
|
303 |
+
if ( ! self::should_show_alerts() ) {
|
304 |
+
return;
|
305 |
+
}
|
306 |
+
|
307 |
+
$global_only = ! pum_is_admin_page();
|
308 |
+
|
309 |
+
$alerts = $global_only ? self::get_global_alerts() : self::get_alerts();
|
310 |
+
|
311 |
+
$count = count( $alerts );
|
312 |
+
|
313 |
+
if ( ! $count ) {
|
314 |
+
return;
|
315 |
+
}
|
316 |
+
|
317 |
+
wp_enqueue_script( 'pum-admin-general' );
|
318 |
+
wp_enqueue_style( 'pum-admin-general' );
|
319 |
+
|
320 |
+
?>
|
321 |
+
|
322 |
+
<script type="text/javascript">
|
323 |
+
window.pum_alerts_nonce = '<?php echo wp_create_nonce( 'pum_alerts_action' ); ?>';
|
324 |
+
</script>
|
325 |
+
|
326 |
+
<div class="pum-alerts">
|
327 |
+
|
328 |
+
<h3>
|
329 |
+
<img alt="" class="logo" width="30" src="<?php echo Popup_Maker::$URL; ?>assets/images/logo.png" /> <?php printf( '%s%s (%s)', ( $global_only ? __( 'Popup Maker', 'popup-maker' ) . ' ' : '' ), __( 'Notifications', 'popup-maker' ), '<span class="pum-alert-count">' . $count . '</span>' ); ?>
|
330 |
+
</h3>
|
331 |
+
|
332 |
+
<p><?php __( 'Check out the following notifications from Popup Maker.', 'popup-maker' ); ?></p>
|
333 |
+
|
334 |
+
<?php foreach ( $alerts as $alert ) : ?>
|
335 |
+
|
336 |
+
<div class="pum-alert-holder" data-code="<?php echo $alert['code']; ?>" class="<?php echo $alert['dismissible'] ? 'is-dismissible' : ''; ?>" data-dismissible="<?php esc_attr_e( $alert['dismissible'] ); ?>">
|
337 |
+
|
338 |
+
<div class="pum-alert <?php echo $alert['type'] != '' ? 'pum-alert__' . $alert['type'] : ''; ?>">
|
339 |
+
|
340 |
+
<?php if ( ! empty( $alert['message'] ) ) : ?>
|
341 |
+
<p><?php echo $alert['message']; ?></p>
|
342 |
+
<?php endif; ?>
|
343 |
+
|
344 |
+
<?php if ( ! empty( $alert['html'] ) ) : ?>
|
345 |
+
<?php echo wp_encode_emoji( $alert['html'] ); ?>
|
346 |
+
<?php endif; ?>
|
347 |
+
|
348 |
+
</div>
|
349 |
+
|
350 |
+
<?php if ( $alert['dismissible'] ) : ?>
|
351 |
+
|
352 |
+
<button type="button" class="button dismiss pum-dismiss">
|
353 |
+
<span class="screen-reader-text"><?php _e( 'Dismiss this item.', 'popup-maker' ); ?></span> <span class="dashicons dashicons-no-alt"></span>
|
354 |
+
</button>
|
355 |
+
|
356 |
+
<?php endif; ?>
|
357 |
+
|
358 |
+
</div>
|
359 |
+
|
360 |
+
<?php endforeach; ?>
|
361 |
+
|
362 |
+
</div>
|
363 |
+
|
364 |
+
<?php
|
365 |
+
}
|
366 |
+
|
367 |
+
/**
|
368 |
+
* @return array
|
369 |
+
*/
|
370 |
+
public static function get_global_alerts() {
|
371 |
+
$alerts = self::get_alerts();
|
372 |
+
|
373 |
+
$global_alerts = array();
|
374 |
+
|
375 |
+
foreach ( $alerts as $alert ) {
|
376 |
+
if ( $alert['global'] ) {
|
377 |
+
$global_alerts[] = $alert;
|
378 |
+
}
|
379 |
+
}
|
380 |
+
|
381 |
+
return $global_alerts;
|
382 |
+
}
|
383 |
+
|
384 |
+
/**
|
385 |
+
* @return array
|
386 |
+
*/
|
387 |
+
public static function get_alerts() {
|
388 |
+
|
389 |
+
static $alert_list;
|
390 |
+
|
391 |
+
if ( ! isset( $alert_list ) ) {
|
392 |
+
$alert_list = apply_filters( 'pum_alert_list', array() );
|
393 |
+
}
|
394 |
+
|
395 |
+
$alerts = array();
|
396 |
+
|
397 |
+
foreach ( $alert_list as $alert ) {
|
398 |
+
|
399 |
+
// Ignore dismissed alerts.
|
400 |
+
if ( self::has_dismissed_alert( $alert['code'] ) ) {
|
401 |
+
continue;
|
402 |
+
}
|
403 |
+
|
404 |
+
$alerts[] = wp_parse_args( $alert, array(
|
405 |
+
'code' => 'default',
|
406 |
+
'priority' => 10,
|
407 |
+
'message' => '',
|
408 |
+
'type' => 'info',
|
409 |
+
'html' => '',
|
410 |
+
'dismissible' => true,
|
411 |
+
'global' => false,
|
412 |
+
) );
|
413 |
+
|
414 |
+
}
|
415 |
+
|
416 |
+
// Sort alerts by priority, highest to lowest.
|
417 |
+
$alerts = PUM_Utils_Array::sort( $alerts, 'priority', true );
|
418 |
+
|
419 |
+
return $alerts;
|
420 |
+
}
|
421 |
+
|
422 |
+
|
423 |
+
/**
|
424 |
+
*
|
425 |
+
*/
|
426 |
+
public static function ajax_handler() {
|
427 |
+
$args = wp_parse_args( $_REQUEST, array(
|
428 |
+
'code' => '',
|
429 |
+
'expires' => '',
|
430 |
+
) );
|
431 |
+
|
432 |
+
if ( ! wp_verify_nonce( $_REQUEST['nonce'], 'pum_alerts_action' ) ) {
|
433 |
+
wp_send_json_error();
|
434 |
+
}
|
435 |
+
|
436 |
+
try {
|
437 |
+
$dismissed_alerts = self::dismissed_alerts();
|
438 |
+
$dismissed_alerts[ $args['code'] ] = ! empty( $args['expires'] ) ? strtotime( '+' . $args['expires'] ) : true;
|
439 |
+
|
440 |
+
$user_id = get_current_user_id();
|
441 |
+
update_user_meta( $user_id, '_pum_dismissed_alerts', $dismissed_alerts );
|
442 |
+
wp_send_json_success();
|
443 |
+
|
444 |
+
} catch ( Exception $e ) {
|
445 |
+
wp_send_json_error( $e );
|
446 |
+
}
|
447 |
+
}
|
448 |
+
|
449 |
+
/**
|
450 |
+
* @param string $code
|
451 |
+
*
|
452 |
+
* @return bool
|
453 |
+
*/
|
454 |
+
public static function has_dismissed_alert( $code = '' ) {
|
455 |
+
$dimissed_alerts = self::dismissed_alerts();
|
456 |
+
|
457 |
+
$alert_dismissed = array_key_exists( $code, $dimissed_alerts );
|
458 |
+
|
459 |
+
// If the alert was dismissed and has a non true type value, it is an expiry time.
|
460 |
+
if ( $alert_dismissed && true !== $dimissed_alerts[ $code ] ) {
|
461 |
+
return strtotime( 'now' ) < $dimissed_alerts[ $code ];
|
462 |
+
}
|
463 |
+
|
464 |
+
return $alert_dismissed;
|
465 |
+
}
|
466 |
+
|
467 |
+
/**
|
468 |
+
* Returns an array of dismissed alert groups.
|
469 |
+
*
|
470 |
+
* @return array
|
471 |
+
*/
|
472 |
+
public static function dismissed_alerts() {
|
473 |
+
$user_id = get_current_user_id();
|
474 |
+
|
475 |
+
$dismissed_alerts = get_user_meta( $user_id, '_pum_dismissed_alerts', true );
|
476 |
+
|
477 |
+
if ( ! is_array( $dismissed_alerts ) ) {
|
478 |
+
$dismissed_alerts = array();
|
479 |
+
update_user_meta( $user_id, '_pum_dismissed_alerts', $dismissed_alerts );
|
480 |
+
}
|
481 |
+
|
482 |
+
return $dismissed_alerts;
|
483 |
+
}
|
484 |
+
|
485 |
+
}
|
classes/Utils/I10n.php
CHANGED
@@ -158,9 +158,9 @@ class PUM_Utils_I10n {
|
|
158 |
if ( preg_match_all( "/$locale_re/i", $_SERVER['HTTP_ACCEPT_LANGUAGE'], $matches ) ) {
|
159 |
return $matches[0];
|
160 |
} else {
|
161 |
-
return
|
162 |
}
|
163 |
}
|
164 |
|
165 |
|
166 |
-
}
|
158 |
if ( preg_match_all( "/$locale_re/i", $_SERVER['HTTP_ACCEPT_LANGUAGE'], $matches ) ) {
|
159 |
return $matches[0];
|
160 |
} else {
|
161 |
+
return array();
|
162 |
}
|
163 |
}
|
164 |
|
165 |
|
166 |
+
}
|
includes/deprecated-classes.php
CHANGED
@@ -1,90 +1,90 @@
|
|
1 |
-
<?php
|
2 |
-
/*******************************************************************************
|
3 |
-
* Copyright (c) 2018, WP Popup Maker
|
4 |
-
******************************************************************************/
|
5 |
-
|
6 |
-
// Exit if accessed directly
|
7 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
8 |
-
exit;
|
9 |
-
}
|
10 |
-
|
11 |
-
/**
|
12 |
-
* PopMake_License Class
|
13 |
-
*
|
14 |
-
* @deprecated 1.5.0
|
15 |
-
*
|
16 |
-
* Use PUM_Extension_License instead.
|
17 |
-
*/
|
18 |
-
class PopMake_License extends PUM_Extension_License {}
|
19 |
-
|
20 |
-
/**
|
21 |
-
* PopupMaker_Plugin_Updater
|
22 |
-
*
|
23 |
-
* @deprecated 1.5.0 Use PUM_Extension_Updater.
|
24 |
-
*/
|
25 |
-
class PopupMaker_Plugin_Updater extends PUM_Extension_Updater {}
|
26 |
-
|
27 |
-
/**
|
28 |
-
* Popmake_Cron Class
|
29 |
-
*
|
30 |
-
* This class handles scheduled events
|
31 |
-
*
|
32 |
-
* @since 1.3.0
|
33 |
-
* @deprecated 1.8.0
|
34 |
-
*/
|
35 |
-
class Popmake_Cron extends PUM_Utils_Cron {}
|
36 |
-
|
37 |
-
/**
|
38 |
-
* Class PUM_Popup_Query
|
39 |
-
*
|
40 |
-
* @deprecated 1.8.0
|
41 |
-
*/
|
42 |
-
class PUM_Popup_Query {
|
43 |
-
|
44 |
-
/**
|
45 |
-
* The args to pass to the pum_get_popups() query
|
46 |
-
*
|
47 |
-
* @var array
|
48 |
-
* @access public
|
49 |
-
*/
|
50 |
-
public $args = array();
|
51 |
-
|
52 |
-
/**
|
53 |
-
* Default query arguments.
|
54 |
-
*
|
55 |
-
* Not all of these are valid arguments that can be passed to WP_Query. The ones that are not, are modified before
|
56 |
-
* the query is run to convert them to the proper syntax.
|
57 |
-
*
|
58 |
-
* @param array $args The array of arguments that can be passed in and used for setting up this popup query.
|
59 |
-
*/
|
60 |
-
public function __construct( $args = array() ) {
|
61 |
-
$this->args = $args;
|
62 |
-
}
|
63 |
-
|
64 |
-
/**
|
65 |
-
* Retrieve popups.
|
66 |
-
*
|
67 |
-
* The query can be modified in two ways; either the action before the
|
68 |
-
* query is run, or the filter on the arguments (existing mainly for backwards
|
69 |
-
* compatibility).
|
70 |
-
*
|
71 |
-
* @access public
|
72 |
-
* @return object
|
73 |
-
*/
|
74 |
-
public function get_popups() {
|
75 |
-
return pum_get_popups( $this->args );
|
76 |
-
}
|
77 |
-
|
78 |
-
}
|
79 |
-
|
80 |
-
/**
|
81 |
-
* Class PUM
|
82 |
-
*
|
83 |
-
* @deprecated 1.8.0 - Don't use this. Use Popup_Maker instead.
|
84 |
-
*/
|
85 |
-
class PUM {
|
86 |
-
const DB_VER = null;
|
87 |
-
const VER = null;
|
88 |
-
static $DB_VER = null;
|
89 |
-
static $VER = null;
|
90 |
-
}
|
1 |
+
<?php
|
2 |
+
/*******************************************************************************
|
3 |
+
* Copyright (c) 2018, WP Popup Maker
|
4 |
+
******************************************************************************/
|
5 |
+
|
6 |
+
// Exit if accessed directly
|
7 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
8 |
+
exit;
|
9 |
+
}
|
10 |
+
|
11 |
+
/**
|
12 |
+
* PopMake_License Class
|
13 |
+
*
|
14 |
+
* @deprecated 1.5.0
|
15 |
+
*
|
16 |
+
* Use PUM_Extension_License instead.
|
17 |
+
*/
|
18 |
+
class PopMake_License extends PUM_Extension_License {}
|
19 |
+
|
20 |
+
/**
|
21 |
+
* PopupMaker_Plugin_Updater
|
22 |
+
*
|
23 |
+
* @deprecated 1.5.0 Use PUM_Extension_Updater.
|
24 |
+
*/
|
25 |
+
class PopupMaker_Plugin_Updater extends PUM_Extension_Updater {}
|
26 |
+
|
27 |
+
/**
|
28 |
+
* Popmake_Cron Class
|
29 |
+
*
|
30 |
+
* This class handles scheduled events
|
31 |
+
*
|
32 |
+
* @since 1.3.0
|
33 |
+
* @deprecated 1.8.0
|
34 |
+
*/
|
35 |
+
class Popmake_Cron extends PUM_Utils_Cron {}
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Class PUM_Popup_Query
|
39 |
+
*
|
40 |
+
* @deprecated 1.8.0
|
41 |
+
*/
|
42 |
+
class PUM_Popup_Query {
|
43 |
+
|
44 |
+
/**
|
45 |
+
* The args to pass to the pum_get_popups() query
|
46 |
+
*
|
47 |
+
* @var array
|
48 |
+
* @access public
|
49 |
+
*/
|
50 |
+
public $args = array();
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Default query arguments.
|
54 |
+
*
|
55 |
+
* Not all of these are valid arguments that can be passed to WP_Query. The ones that are not, are modified before
|
56 |
+
* the query is run to convert them to the proper syntax.
|
57 |
+
*
|
58 |
+
* @param array $args The array of arguments that can be passed in and used for setting up this popup query.
|
59 |
+
*/
|
60 |
+
public function __construct( $args = array() ) {
|
61 |
+
$this->args = $args;
|
62 |
+
}
|
63 |
+
|
64 |
+
/**
|
65 |
+
* Retrieve popups.
|
66 |
+
*
|
67 |
+
* The query can be modified in two ways; either the action before the
|
68 |
+
* query is run, or the filter on the arguments (existing mainly for backwards
|
69 |
+
* compatibility).
|
70 |
+
*
|
71 |
+
* @access public
|
72 |
+
* @return object
|
73 |
+
*/
|
74 |
+
public function get_popups() {
|
75 |
+
return pum_get_popups( $this->args );
|
76 |
+
}
|
77 |
+
|
78 |
+
}
|
79 |
+
|
80 |
+
/**
|
81 |
+
* Class PUM
|
82 |
+
*
|
83 |
+
* @deprecated 1.8.0 - Don't use this. Use Popup_Maker instead.
|
84 |
+
*/
|
85 |
+
class PUM {
|
86 |
+
const DB_VER = null;
|
87 |
+
const VER = null;
|
88 |
+
static $DB_VER = null;
|
89 |
+
static $VER = null;
|
90 |
+
}
|
includes/functions/general.php
CHANGED
@@ -1,172 +1,172 @@
|
|
1 |
-
<?php
|
2 |
-
/*******************************************************************************
|
3 |
-
* Copyright (c) 2018, WP Popup Maker
|
4 |
-
******************************************************************************/
|
5 |
-
|
6 |
-
// Exit if accessed directly
|
7 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
8 |
-
exit;
|
9 |
-
}
|
10 |
-
|
11 |
-
/**
|
12 |
-
* Get the current blog db_ver.
|
13 |
-
*
|
14 |
-
* @return mixed
|
15 |
-
*/
|
16 |
-
function pum_get_db_ver() {
|
17 |
-
return get_option( 'pum_db_ver', false );
|
18 |
-
}
|
19 |
-
|
20 |
-
/**
|
21 |
-
* Returns the default theme_id from global settings.
|
22 |
-
*
|
23 |
-
* Returns false if none set.
|
24 |
-
*
|
25 |
-
* @since 1.8.0
|
26 |
-
*
|
27 |
-
* @return int|false
|
28 |
-
*/
|
29 |
-
function pum_get_default_theme_id() {
|
30 |
-
$default_theme_id = pum_get_option( 'default_theme_id' );
|
31 |
-
|
32 |
-
if ( false === $default_theme_id ) {
|
33 |
-
$default_theme_id = get_option( 'popmake_default_theme' );
|
34 |
-
|
35 |
-
if ( false === $default_theme_id ) {
|
36 |
-
$default_theme_id = pum_install_default_theme();
|
37 |
-
if ( pum_update_option( 'default_theme_id', $default_theme_id ) ) {
|
38 |
-
// Self cleanup old version.
|
39 |
-
delete_option( 'popmake_default_theme' );
|
40 |
-
}
|
41 |
-
}
|
42 |
-
}
|
43 |
-
|
44 |
-
return absint( $default_theme_id );
|
45 |
-
}
|
46 |
-
|
47 |
-
/**
|
48 |
-
* Gets the cache close_text of a theme from wp_options to prevent un-needed queries on the front end.
|
49 |
-
*
|
50 |
-
* @since 1.8.0
|
51 |
-
*
|
52 |
-
* @param int $theme_id
|
53 |
-
*
|
54 |
-
* @return string
|
55 |
-
*/
|
56 |
-
function pum_get_theme_close_text( $theme_id = 0 ) {
|
57 |
-
$close_texts = pum_get_all_themes_close_text();
|
58 |
-
|
59 |
-
return isset( $close_texts[ $theme_id ] ) ? $close_texts[ $theme_id ] : '';
|
60 |
-
}
|
61 |
-
|
62 |
-
/**
|
63 |
-
* Gets the cache of theme close text from wp_options to prevent un-needed queries on the front end.
|
64 |
-
*
|
65 |
-
* @since 1.8.0
|
66 |
-
*
|
67 |
-
* @return array|mixed
|
68 |
-
*/
|
69 |
-
function pum_get_all_themes_close_text() {
|
70 |
-
$all_themes_close_text = get_option( 'pum_all_theme_close_text_cache' );
|
71 |
-
|
72 |
-
if ( false === $all_themes_close_text ) {
|
73 |
-
$all_themes_close_text = pum_update_all_themes_close_text_cache();
|
74 |
-
}
|
75 |
-
|
76 |
-
return $all_themes_close_text;
|
77 |
-
}
|
78 |
-
|
79 |
-
/**
|
80 |
-
* Updates the cache of theme close text to prevent un-needed queries on the front end.
|
81 |
-
*
|
82 |
-
* @since 1.8.0
|
83 |
-
*
|
84 |
-
* @return array
|
85 |
-
*/
|
86 |
-
function pum_update_all_themes_close_text_cache() {
|
87 |
-
$all_themes_close_text = array();
|
88 |
-
|
89 |
-
$themes = pum_get_all_themes();
|
90 |
-
|
91 |
-
foreach( $themes as $theme ) {
|
92 |
-
$all_themes_close_text[ $theme->ID ] = $theme->get_setting( 'close_text', '' );
|
93 |
-
}
|
94 |
-
|
95 |
-
update_option( 'pum_all_theme_close_text_cache', $all_themes_close_text );
|
96 |
-
|
97 |
-
return $all_themes_close_text;
|
98 |
-
}
|
99 |
-
|
100 |
-
add_action( 'pum_save_theme', 'pum_update_all_themes_close_text_cache', 100 );
|
101 |
-
|
102 |
-
/**
|
103 |
-
* @param string $path
|
104 |
-
*
|
105 |
-
* @return string
|
106 |
-
*/
|
107 |
-
function pum_asset_path( $path = '' ) {
|
108 |
-
return Popup_Maker::$DIR . 'assets/' . ltrim( $path,'/' );
|
109 |
-
}
|
110 |
-
|
111 |
-
/**
|
112 |
-
* @param string $path
|
113 |
-
*
|
114 |
-
* @return string
|
115 |
-
*/
|
116 |
-
function pum_asset_url( $path = '' ) {
|
117 |
-
return Popup_Maker::$URL . 'assets/' . ltrim( $path,'/' );
|
118 |
-
}
|
119 |
-
|
120 |
-
/**
|
121 |
-
* Resets both asset cached files & transient CSS storage to be regenerated.
|
122 |
-
*
|
123 |
-
* @since 1.8.0
|
124 |
-
*/
|
125 |
-
function pum_reset_assets() {
|
126 |
-
// Reset/regenerate asset cache.
|
127 |
-
PUM_AssetCache::reset_cache();
|
128 |
-
// Reset/regenerate stored theme CSS styles.
|
129 |
-
delete_transient( 'popmake_theme_styles' );
|
130 |
-
}
|
131 |
-
|
132 |
-
/**
|
133 |
-
* Returns array key from dot notated array key..
|
134 |
-
*
|
135 |
-
* @since 1.0
|
136 |
-
*
|
137 |
-
* @deprecated 1.8.0
|
138 |
-
*
|
139 |
-
* @param array $a is the array you are searching.
|
140 |
-
* @param string $path is the dot notated path.
|
141 |
-
* @param string $default is the default returned if key empty or not found.
|
142 |
-
*
|
143 |
-
* @return mixed results of lookup
|
144 |
-
*/
|
145 |
-
function popmake_resolve( array $a, $path, $default = null ) {
|
146 |
-
$current = $a;
|
147 |
-
$p = strtok( $path, '.' );
|
148 |
-
while ( $p !== false ) {
|
149 |
-
if ( ! isset( $current[ $p ] ) ) {
|
150 |
-
return $default;
|
151 |
-
}
|
152 |
-
$current = $current[ $p ];
|
153 |
-
$p = strtok( '.' );
|
154 |
-
}
|
155 |
-
|
156 |
-
return $current;
|
157 |
-
}
|
158 |
-
|
159 |
-
/**
|
160 |
-
* Checks whether function is disabled.
|
161 |
-
*
|
162 |
-
* @since 1.4
|
163 |
-
*
|
164 |
-
* @param string $function Name of the function.
|
165 |
-
*
|
166 |
-
* @return bool Whether or not function is disabled.
|
167 |
-
*/
|
168 |
-
function pum_is_func_disabled( $function ) {
|
169 |
-
$disabled = explode( ',', ini_get( 'disable_functions' ) );
|
170 |
-
|
171 |
-
return in_array( $function, $disabled );
|
172 |
-
}
|
1 |
+
<?php
|
2 |
+
/*******************************************************************************
|
3 |
+
* Copyright (c) 2018, WP Popup Maker
|
4 |
+
******************************************************************************/
|
5 |
+
|
6 |
+
// Exit if accessed directly
|
7 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
8 |
+
exit;
|
9 |
+
}
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Get the current blog db_ver.
|
13 |
+
*
|
14 |
+
* @return mixed
|
15 |
+
*/
|
16 |
+
function pum_get_db_ver() {
|
17 |
+
return get_option( 'pum_db_ver', false );
|
18 |
+
}
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Returns the default theme_id from global settings.
|
22 |
+
*
|
23 |
+
* Returns false if none set.
|
24 |
+
*
|
25 |
+
* @since 1.8.0
|
26 |
+
*
|
27 |
+
* @return int|false
|
28 |
+
*/
|
29 |
+
function pum_get_default_theme_id() {
|
30 |
+
$default_theme_id = pum_get_option( 'default_theme_id' );
|
31 |
+
|
32 |
+
if ( false === $default_theme_id ) {
|
33 |
+
$default_theme_id = get_option( 'popmake_default_theme' );
|
34 |
+
|
35 |
+
if ( false === $default_theme_id ) {
|
36 |
+
$default_theme_id = pum_install_default_theme();
|
37 |
+
if ( pum_update_option( 'default_theme_id', $default_theme_id ) ) {
|
38 |
+
// Self cleanup old version.
|
39 |
+
delete_option( 'popmake_default_theme' );
|
40 |
+
}
|
41 |
+
}
|
42 |
+
}
|
43 |
+
|
44 |
+
return absint( $default_theme_id );
|
45 |
+
}
|
46 |
+
|
47 |
+
/**
|
48 |
+
* Gets the cache close_text of a theme from wp_options to prevent un-needed queries on the front end.
|
49 |
+
*
|
50 |
+
* @since 1.8.0
|
51 |
+
*
|
52 |
+
* @param int $theme_id
|
53 |
+
*
|
54 |
+
* @return string
|
55 |
+
*/
|
56 |
+
function pum_get_theme_close_text( $theme_id = 0 ) {
|
57 |
+
$close_texts = pum_get_all_themes_close_text();
|
58 |
+
|
59 |
+
return isset( $close_texts[ $theme_id ] ) ? $close_texts[ $theme_id ] : '';
|
60 |
+
}
|
61 |
+
|
62 |
+
/**
|
63 |
+
* Gets the cache of theme close text from wp_options to prevent un-needed queries on the front end.
|
64 |
+
*
|
65 |
+
* @since 1.8.0
|
66 |
+
*
|
67 |
+
* @return array|mixed
|
68 |
+
*/
|
69 |
+
function pum_get_all_themes_close_text() {
|
70 |
+
$all_themes_close_text = get_option( 'pum_all_theme_close_text_cache' );
|
71 |
+
|
72 |
+
if ( false === $all_themes_close_text ) {
|
73 |
+
$all_themes_close_text = pum_update_all_themes_close_text_cache();
|
74 |
+
}
|
75 |
+
|
76 |
+
return $all_themes_close_text;
|
77 |
+
}
|
78 |
+
|
79 |
+
/**
|
80 |
+
* Updates the cache of theme close text to prevent un-needed queries on the front end.
|
81 |
+
*
|
82 |
+
* @since 1.8.0
|
83 |
+
*
|
84 |
+
* @return array
|
85 |
+
*/
|
86 |
+
function pum_update_all_themes_close_text_cache() {
|
87 |
+
$all_themes_close_text = array();
|
88 |
+
|
89 |
+
$themes = pum_get_all_themes();
|
90 |
+
|
91 |
+
foreach( $themes as $theme ) {
|
92 |
+
$all_themes_close_text[ $theme->ID ] = $theme->get_setting( 'close_text', '' );
|
93 |
+
}
|
94 |
+
|
95 |
+
update_option( 'pum_all_theme_close_text_cache', $all_themes_close_text );
|
96 |
+
|
97 |
+
return $all_themes_close_text;
|
98 |
+
}
|
99 |
+
|
100 |
+
add_action( 'pum_save_theme', 'pum_update_all_themes_close_text_cache', 100 );
|
101 |
+
|
102 |
+
/**
|
103 |
+
* @param string $path
|
104 |
+
*
|
105 |
+
* @return string
|
106 |
+
*/
|
107 |
+
function pum_asset_path( $path = '' ) {
|
108 |
+
return Popup_Maker::$DIR . 'assets/' . ltrim( $path,'/' );
|
109 |
+
}
|
110 |
+
|
111 |
+
/**
|
112 |
+
* @param string $path
|
113 |
+
*
|
114 |
+
* @return string
|
115 |
+
*/
|
116 |
+
function pum_asset_url( $path = '' ) {
|
117 |
+
return Popup_Maker::$URL . 'assets/' . ltrim( $path,'/' );
|
118 |
+
}
|
119 |
+
|
120 |
+
/**
|
121 |
+
* Resets both asset cached files & transient CSS storage to be regenerated.
|
122 |
+
*
|
123 |
+
* @since 1.8.0
|
124 |
+
*/
|
125 |
+
function pum_reset_assets() {
|
126 |
+
// Reset/regenerate asset cache.
|
127 |
+
PUM_AssetCache::reset_cache();
|
128 |
+
// Reset/regenerate stored theme CSS styles.
|
129 |
+
delete_transient( 'popmake_theme_styles' );
|
130 |
+
}
|
131 |
+
|
132 |
+
/**
|
133 |
+
* Returns array key from dot notated array key..
|
134 |
+
*
|
135 |
+
* @since 1.0
|
136 |
+
*
|
137 |
+
* @deprecated 1.8.0
|
138 |
+
*
|
139 |
+
* @param array $a is the array you are searching.
|
140 |
+
* @param string $path is the dot notated path.
|
141 |
+
* @param string $default is the default returned if key empty or not found.
|
142 |
+
*
|
143 |
+
* @return mixed results of lookup
|
144 |
+
*/
|
145 |
+
function popmake_resolve( array $a, $path, $default = null ) {
|
146 |
+
$current = $a;
|
147 |
+
$p = strtok( $path, '.' );
|
148 |
+
while ( $p !== false ) {
|
149 |
+
if ( ! isset( $current[ $p ] ) ) {
|
150 |
+
return $default;
|
151 |
+
}
|
152 |
+
$current = $current[ $p ];
|
153 |
+
$p = strtok( '.' );
|
154 |
+
}
|
155 |
+
|
156 |
+
return $current;
|
157 |
+
}
|
158 |
+
|
159 |
+
/**
|
160 |
+
* Checks whether function is disabled.
|
161 |
+
*
|
162 |
+
* @since 1.4
|
163 |
+
*
|
164 |
+
* @param string $function Name of the function.
|
165 |
+
*
|
166 |
+
* @return bool Whether or not function is disabled.
|
167 |
+
*/
|
168 |
+
function pum_is_func_disabled( $function ) {
|
169 |
+
$disabled = explode( ',', ini_get( 'disable_functions' ) );
|
170 |
+
|
171 |
+
return in_array( $function, $disabled );
|
172 |
+
}
|
includes/functions/themes/migrations.php
CHANGED
@@ -1,144 +1,144 @@
|
|
1 |
-
<?php
|
2 |
-
/*******************************************************************************
|
3 |
-
* Copyright (c) 2017, WP Popup Maker
|
4 |
-
******************************************************************************/
|
5 |
-
|
6 |
-
/**
|
7 |
-
* Checks if passive migration for popups should be enabled.
|
8 |
-
*
|
9 |
-
* This determines if the query load may be potentially too high to run passive migrations on live servers.
|
10 |
-
*
|
11 |
-
* @return bool
|
12 |
-
*/
|
13 |
-
function pum_passive_theme_upgrades_enabled() {
|
14 |
-
/** @var int $theme_count */
|
15 |
-
static $theme_count;
|
16 |
-
|
17 |
-
if ( defined( 'PUM_DISABLE_PASSIVE_UPGRADES' ) && PUM_DISABLE_PASSIVE_UPGRADES ) {
|
18 |
-
return false;
|
19 |
-
}
|
20 |
-
|
21 |
-
if ( ! $theme_count ) {
|
22 |
-
$theme_count = get_transient( 'pum_theme_count' );
|
23 |
-
|
24 |
-
if ( $theme_count === false ) {
|
25 |
-
$theme_count = pum_count_themes( array(
|
26 |
-
'post_status' => array( 'publish', 'pending', 'draft', 'auto-draft', 'future', 'private', 'inherit', 'trash' ),
|
27 |
-
) );
|
28 |
-
|
29 |
-
set_transient( 'pum_theme_count', $theme_count, MINUTE_IN_SECONDS );
|
30 |
-
}
|
31 |
-
}
|
32 |
-
|
33 |
-
return pum_is_popup_theme_editor() || $theme_count <= apply_filters( 'pum_passive_themes_enabled_max_count', 10 );
|
34 |
-
}
|
35 |
-
|
36 |
-
/**
|
37 |
-
* Upgrade popup data to model v2.
|
38 |
-
*
|
39 |
-
* @since 1.8.0
|
40 |
-
*
|
41 |
-
* @param PUM_Model_Theme $theme
|
42 |
-
*/
|
43 |
-
function pum_theme_migration_1( &$theme ) {
|
44 |
-
|
45 |
-
$delete_meta = array( 'popup_theme_defaults_set' );
|
46 |
-
|
47 |
-
// Used to merge with existing values to ensure data integrity.
|
48 |
-
$meta_defaults = pum_get_theme_v2_meta_defaults();
|
49 |
-
|
50 |
-
foreach ( array_keys( $meta_defaults ) as $group ) {
|
51 |
-
// Get old data.
|
52 |
-
$v1_meta_values = pum_get_theme_v1_meta( $group, $theme->ID );
|
53 |
-
|
54 |
-
// Loop over all fields which were merged and mark their meta keys for deletion.
|
55 |
-
foreach ( $v1_meta_values as $old_meta_key => $old_meta_value ) {
|
56 |
-
$delete_meta[] = "popup_theme_{$group}_{$old_meta_key}";
|
57 |
-
}
|
58 |
-
|
59 |
-
$existing_v2_meta = $theme->get_meta( "popup_theme_{$group}" );
|
60 |
-
|
61 |
-
if ( ! empty( $existing_v2_meta ) ) {
|
62 |
-
continue;
|
63 |
-
}
|
64 |
-
|
65 |
-
// Merge defaults.
|
66 |
-
$values = wp_parse_args( $v1_meta_values, $meta_defaults[ $group ] );
|
67 |
-
|
68 |
-
// Update meta storage.
|
69 |
-
$theme->update_meta( "popup_theme_{$group}", $values );
|
70 |
-
}
|
71 |
-
|
72 |
-
/**
|
73 |
-
* Clean up automatically.
|
74 |
-
*/
|
75 |
-
pum_cleanup_post_meta_keys( $theme->ID, $delete_meta );
|
76 |
-
}
|
77 |
-
|
78 |
-
add_action( 'pum_theme_passive_migration_1', 'pum_theme_migration_1' );
|
79 |
-
|
80 |
-
/**
|
81 |
-
* Upgrade popup data to model v3.
|
82 |
-
*
|
83 |
-
* @since 1.8.0
|
84 |
-
*
|
85 |
-
* @param PUM_Model_Theme $theme
|
86 |
-
*/
|
87 |
-
function pum_theme_migration_2( &$theme ) {
|
88 |
-
|
89 |
-
$changed = false;
|
90 |
-
$delete_meta = array();
|
91 |
-
|
92 |
-
$settings = $theme->get_settings();
|
93 |
-
|
94 |
-
$old_meta_elements = array(
|
95 |
-
'overlay',
|
96 |
-
'container',
|
97 |
-
'title',
|
98 |
-
'content',
|
99 |
-
'close',
|
100 |
-
);
|
101 |
-
|
102 |
-
foreach ( $old_meta_elements as $element ) {
|
103 |
-
$meta_key = 'popup_theme_' . $element;
|
104 |
-
|
105 |
-
/**
|
106 |
-
* Migrate popup_theme_overlay meta data.
|
107 |
-
*/
|
108 |
-
$element_data = $theme->get_meta( $meta_key );
|
109 |
-
if ( ! empty( $element_data ) && is_array( $element_data ) ) {
|
110 |
-
$keys = $theme->remapped_meta_settings_keys( $element );
|
111 |
-
|
112 |
-
// Foreach old key, save the value under popup settings for the new key.
|
113 |
-
foreach ( $keys as $old_key => $new_key ) {
|
114 |
-
if ( isset( $element_data[ $old_key ] ) ) {
|
115 |
-
$settings[ $new_key ] = $element_data[ $old_key ];
|
116 |
-
$changed = true;
|
117 |
-
unset( $element_data[ $old_key ] );
|
118 |
-
}
|
119 |
-
}
|
120 |
-
|
121 |
-
if ( empty( $element_data ) ) {
|
122 |
-
$delete_meta[] = $meta_key;
|
123 |
-
} else {
|
124 |
-
// Update the saved popup display data with any remaining keys from extensions.
|
125 |
-
$theme->update_meta( $meta_key, $element_data );
|
126 |
-
}
|
127 |
-
}
|
128 |
-
|
129 |
-
}
|
130 |
-
|
131 |
-
/**
|
132 |
-
* Save only if something changed.
|
133 |
-
*/
|
134 |
-
if ( $changed ) {
|
135 |
-
$theme->update_meta( 'popup_theme_settings', $settings );
|
136 |
-
}
|
137 |
-
|
138 |
-
/**
|
139 |
-
* Clean up automatically.
|
140 |
-
*/
|
141 |
-
pum_cleanup_post_meta_keys( $theme->ID, $delete_meta );
|
142 |
-
}
|
143 |
-
|
144 |
-
add_action( 'pum_theme_passive_migration_2', 'pum_theme_migration_2' );
|
1 |
+
<?php
|
2 |
+
/*******************************************************************************
|
3 |
+
* Copyright (c) 2017, WP Popup Maker
|
4 |
+
******************************************************************************/
|
5 |
+
|
6 |
+
/**
|
7 |
+
* Checks if passive migration for popups should be enabled.
|
8 |
+
*
|
9 |
+
* This determines if the query load may be potentially too high to run passive migrations on live servers.
|
10 |
+
*
|
11 |
+
* @return bool
|
12 |
+
*/
|
13 |
+
function pum_passive_theme_upgrades_enabled() {
|
14 |
+
/** @var int $theme_count */
|
15 |
+
static $theme_count;
|
16 |
+
|
17 |
+
if ( defined( 'PUM_DISABLE_PASSIVE_UPGRADES' ) && PUM_DISABLE_PASSIVE_UPGRADES ) {
|
18 |
+
return false;
|
19 |
+
}
|
20 |
+
|
21 |
+
if ( ! $theme_count ) {
|
22 |
+
$theme_count = get_transient( 'pum_theme_count' );
|
23 |
+
|
24 |
+
if ( $theme_count === false ) {
|
25 |
+
$theme_count = pum_count_themes( array(
|
26 |
+
'post_status' => array( 'publish', 'pending', 'draft', 'auto-draft', 'future', 'private', 'inherit', 'trash' ),
|
27 |
+
) );
|
28 |
+
|
29 |
+
set_transient( 'pum_theme_count', $theme_count, MINUTE_IN_SECONDS );
|
30 |
+
}
|
31 |
+
}
|
32 |
+
|
33 |
+
return pum_is_popup_theme_editor() || $theme_count <= apply_filters( 'pum_passive_themes_enabled_max_count', 10 );
|
34 |
+
}
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Upgrade popup data to model v2.
|
38 |
+
*
|
39 |
+
* @since 1.8.0
|
40 |
+
*
|
41 |
+
* @param PUM_Model_Theme $theme
|
42 |
+
*/
|
43 |
+
function pum_theme_migration_1( &$theme ) {
|
44 |
+
|
45 |
+
$delete_meta = array( 'popup_theme_defaults_set' );
|
46 |
+
|
47 |
+
// Used to merge with existing values to ensure data integrity.
|
48 |
+
$meta_defaults = pum_get_theme_v2_meta_defaults();
|
49 |
+
|
50 |
+
foreach ( array_keys( $meta_defaults ) as $group ) {
|
51 |
+
// Get old data.
|
52 |
+
$v1_meta_values = pum_get_theme_v1_meta( $group, $theme->ID );
|
53 |
+
|
54 |
+
// Loop over all fields which were merged and mark their meta keys for deletion.
|
55 |
+
foreach ( $v1_meta_values as $old_meta_key => $old_meta_value ) {
|
56 |
+
$delete_meta[] = "popup_theme_{$group}_{$old_meta_key}";
|
57 |
+
}
|
58 |
+
|
59 |
+
$existing_v2_meta = $theme->get_meta( "popup_theme_{$group}" );
|
60 |
+
|
61 |
+
if ( ! empty( $existing_v2_meta ) ) {
|
62 |
+
continue;
|
63 |
+
}
|
64 |
+
|
65 |
+
// Merge defaults.
|
66 |
+
$values = wp_parse_args( $v1_meta_values, $meta_defaults[ $group ] );
|
67 |
+
|
68 |
+
// Update meta storage.
|
69 |
+
$theme->update_meta( "popup_theme_{$group}", $values );
|
70 |
+
}
|
71 |
+
|
72 |
+
/**
|
73 |
+
* Clean up automatically.
|
74 |
+
*/
|
75 |
+
pum_cleanup_post_meta_keys( $theme->ID, $delete_meta );
|
76 |
+
}
|
77 |
+
|
78 |
+
add_action( 'pum_theme_passive_migration_1', 'pum_theme_migration_1' );
|
79 |
+
|
80 |
+
/**
|
81 |
+
* Upgrade popup data to model v3.
|
82 |
+
*
|
83 |
+
* @since 1.8.0
|
84 |
+
*
|
85 |
+
* @param PUM_Model_Theme $theme
|
86 |
+
*/
|
87 |
+
function pum_theme_migration_2( &$theme ) {
|
88 |
+
|
89 |
+
$changed = false;
|
90 |
+
$delete_meta = array();
|
91 |
+
|
92 |
+
$settings = $theme->get_settings();
|
93 |
+
|
94 |
+
$old_meta_elements = array(
|
95 |
+
'overlay',
|
96 |
+
'container',
|
97 |
+
'title',
|
98 |
+
'content',
|
99 |
+
'close',
|
100 |
+
);
|
101 |
+
|
102 |
+
foreach ( $old_meta_elements as $element ) {
|
103 |
+
$meta_key = 'popup_theme_' . $element;
|
104 |
+
|
105 |
+
/**
|
106 |
+
* Migrate popup_theme_overlay meta data.
|
107 |
+
*/
|
108 |
+
$element_data = $theme->get_meta( $meta_key );
|
109 |
+
if ( ! empty( $element_data ) && is_array( $element_data ) ) {
|
110 |
+
$keys = $theme->remapped_meta_settings_keys( $element );
|
111 |
+
|
112 |
+
// Foreach old key, save the value under popup settings for the new key.
|
113 |
+
foreach ( $keys as $old_key => $new_key ) {
|
114 |
+
if ( isset( $element_data[ $old_key ] ) ) {
|
115 |
+
$settings[ $new_key ] = $element_data[ $old_key ];
|
116 |
+
$changed = true;
|
117 |
+
unset( $element_data[ $old_key ] );
|
118 |
+
}
|
119 |
+
}
|
120 |
+
|
121 |
+
if ( empty( $element_data ) ) {
|
122 |
+
$delete_meta[] = $meta_key;
|
123 |
+
} else {
|
124 |
+
// Update the saved popup display data with any remaining keys from extensions.
|
125 |
+
$theme->update_meta( $meta_key, $element_data );
|
126 |
+
}
|
127 |
+
}
|
128 |
+
|
129 |
+
}
|
130 |
+
|
131 |
+
/**
|
132 |
+
* Save only if something changed.
|
133 |
+
*/
|
134 |
+
if ( $changed ) {
|
135 |
+
$theme->update_meta( 'popup_theme_settings', $settings );
|
136 |
+
}
|
137 |
+
|
138 |
+
/**
|
139 |
+
* Clean up automatically.
|
140 |
+
*/
|
141 |
+
pum_cleanup_post_meta_keys( $theme->ID, $delete_meta );
|
142 |
+
}
|
143 |
+
|
144 |
+
add_action( 'pum_theme_passive_migration_2', 'pum_theme_migration_2' );
|
includes/integrations/class-pum-buddypress-integration.php
CHANGED
@@ -1,248 +1,248 @@
|
|
1 |
-
<?php
|
2 |
-
/*******************************************************************************
|
3 |
-
* Copyright (c) 2018, WP Popup Maker
|
4 |
-
******************************************************************************/
|
5 |
-
|
6 |
-
// Exit if accessed directly
|
7 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
8 |
-
exit;
|
9 |
-
}
|
10 |
-
|
11 |
-
/**
|
12 |
-
* Class PUM_BuddyPress_Integration
|
13 |
-
*/
|
14 |
-
class PUM_BuddyPress_Integration {
|
15 |
-
|
16 |
-
/**
|
17 |
-
*
|
18 |
-
*/
|
19 |
-
public static function init() {
|
20 |
-
add_filter( 'pum_registered_conditions', array( __CLASS__, 'registered_conditions' ) );
|
21 |
-
add_filter( 'pum_condition_sort_order', array( __CLASS__, 'condition_sort_order' ) );
|
22 |
-
}
|
23 |
-
|
24 |
-
/**
|
25 |
-
* @param array $conditions
|
26 |
-
*
|
27 |
-
* @return array
|
28 |
-
*/
|
29 |
-
public static function registered_conditions( $conditions = array() ) {
|
30 |
-
|
31 |
-
$conditions = array_merge( $conditions, array(
|
32 |
-
// Add Additional Conditions
|
33 |
-
'is_buddypress' => array(
|
34 |
-
'group' => __( 'BuddyPress', 'buddypress' ),
|
35 |
-
'name' => __( 'BP: Is a BuddyPress Page', 'popup-maker' ),
|
36 |
-
'callback' => 'is_buddypress',
|
37 |
-
),
|
38 |
-
|
39 |
-
'bp_is_user' => array(
|
40 |
-
'group' => __( 'BuddyPress', 'buddypress' ),
|
41 |
-
'name' => __( 'BP: Is User Page', 'popup-maker' ),
|
42 |
-
'callback' => 'bp_is_user',
|
43 |
-
),
|
44 |
-
|
45 |
-
'bp_is_group' => array(
|
46 |
-
'group' => __( 'BuddyPress', 'buddypress' ),
|
47 |
-
'name' => __( 'BP: Is Group Page', 'popup-maker' ),
|
48 |
-
'callback' => 'bp_is_group',
|
49 |
-
),
|
50 |
-
|
51 |
-
'bp_is_user_messages' => array(
|
52 |
-
'group' => __( 'BuddyPress', 'buddypress' ),
|
53 |
-
'name' => __( 'BP: Is User Messages Page', 'popup-maker' ),
|
54 |
-
'callback' => 'bp_is_user_messages',
|
55 |
-
),
|
56 |
-
|
57 |
-
'bp_is_activation_page' => array(
|
58 |
-
'group' => __( 'BuddyPress', 'buddypress' ),
|
59 |
-
'name' => __( 'BP: Is Activation Page', 'popup-maker' ),
|
60 |
-
'callback' => 'bp_is_activation_page',
|
61 |
-
),
|
62 |
-
|
63 |
-
'bp_is_register_page' => array(
|
64 |
-
'group' => __( 'BuddyPress', 'buddypress' ),
|
65 |
-
'name' => __( 'BP: Is Register Page', 'popup-maker' ),
|
66 |
-
'callback' => 'bp_is_register_page',
|
67 |
-
),
|
68 |
-
|
69 |
-
'bp_is_item_admin' => array(
|
70 |
-
'group' => __( 'BuddyPress', 'buddypress' ),
|
71 |
-
'name' => __( 'BP: Is Item Admin', 'popup-maker' ),
|
72 |
-
'callback' => 'bp_is_item_admin',
|
73 |
-
),
|
74 |
-
|
75 |
-
'bp_is_item_mod' => array(
|
76 |
-
'group' => __( 'BuddyPress', 'buddypress' ),
|
77 |
-
'name' => __( 'BP: Is Item Mod', 'popup-maker' ),
|
78 |
-
'callback' => 'bp_is_item_mod',
|
79 |
-
),
|
80 |
-
|
81 |
-
'bp_is_directory' => array(
|
82 |
-
'group' => __( 'BuddyPress', 'buddypress' ),
|
83 |
-
'name' => __( 'BP: Is Directory', 'popup-maker' ),
|
84 |
-
'callback' => 'bp_is_directory',
|
85 |
-
),
|
86 |
-
'bp_is_current_component' => array(
|
87 |
-
'group' => __( 'BuddyPress', 'buddypress' ),
|
88 |
-
'name' => __( 'BP: Is Current Component', 'popup-maker' ),
|
89 |
-
'fields' => array(
|
90 |
-
'selected' => array(
|
91 |
-
'type' => 'select',
|
92 |
-
'multiple' => true,
|
93 |
-
'as_array' => true,
|
94 |
-
'select2' => true,
|
95 |
-
'options' => self::component_option_list(),
|
96 |
-
'label' => __( 'Which components?' ),
|
97 |
-
),
|
98 |
-
),
|
99 |
-
'callback' => array( __CLASS__, 'bp_is_current_component' ),
|
100 |
-
),
|
101 |
-
|
102 |
-
'bp_is_current_action' => array(
|
103 |
-
'group' => __( 'BuddyPress', 'buddypress' ),
|
104 |
-
'name' => __( 'BP: Is Current Action', 'popup-maker' ),
|
105 |
-
'fields' => array(
|
106 |
-
'selected' => array(
|
107 |
-
'type' => 'text',
|
108 |
-
'label' => __( 'Which actions?' ),
|
109 |
-
),
|
110 |
-
),
|
111 |
-
'callback' => array( __CLASS__, 'bp_is_current_action' ),
|
112 |
-
),
|
113 |
-
|
114 |
-
'bp_is_action_variable' => array(
|
115 |
-
'group' => __( 'BuddyPress', 'buddypress' ),
|
116 |
-
'name' => __( 'BP: Is Action Variable', 'popup-maker' ),
|
117 |
-
'fields' => array(
|
118 |
-
'selected' => array(
|
119 |
-
'type' => 'text',
|
120 |
-
'label' => __( 'Which action variables?' ),
|
121 |
-
),
|
122 |
-
),
|
123 |
-
'callback' => array( __CLASS__, 'bp_is_action_variable' ),
|
124 |
-
),
|
125 |
-
|
126 |
-
) );
|
127 |
-
|
128 |
-
return $conditions;
|
129 |
-
}
|
130 |
-
|
131 |
-
/**
|
132 |
-
* @return array
|
133 |
-
*/
|
134 |
-
public static function component_option_list() {
|
135 |
-
global $bp;
|
136 |
-
|
137 |
-
$components = array();
|
138 |
-
|
139 |
-
foreach ( $bp->active_components as $component => $key ) {
|
140 |
-
$components[ $component ] = ucfirst( $component );
|
141 |
-
}
|
142 |
-
|
143 |
-
return $components;
|
144 |
-
}
|
145 |
-
|
146 |
-
/**
|
147 |
-
* Checks if the current page is the selected bp components.
|
148 |
-
*
|
149 |
-
* @param array $settings
|
150 |
-
*
|
151 |
-
* @return bool
|
152 |
-
*/
|
153 |
-
public static function bp_is_current_component( $settings = array() ) {
|
154 |
-
global $bp;
|
155 |
-
|
156 |
-
if ( empty ( $settings['selected'] ) ) {
|
157 |
-
return false;
|
158 |
-
}
|
159 |
-
|
160 |
-
if ( ! is_array( $settings['selected'] ) ) {
|
161 |
-
$settings['selected'] = array( $settings['selected'] );
|
162 |
-
}
|
163 |
-
|
164 |
-
$found = false;
|
165 |
-
|
166 |
-
foreach ( $settings['selected'] as $component ) {
|
167 |
-
if ( ! array_key_exists( $component, $bp->active_components ) ) {
|
168 |
-
continue;
|
169 |
-
}
|
170 |
-
|
171 |
-
if ( bp_is_current_component( $component ) ) {
|
172 |
-
$found = true;
|
173 |
-
}
|
174 |
-
|
175 |
-
}
|
176 |
-
|
177 |
-
return $found;
|
178 |
-
}
|
179 |
-
|
180 |
-
/**
|
181 |
-
* Checks if the current page is the selected bp action.
|
182 |
-
*
|
183 |
-
* @param array $settings
|
184 |
-
*
|
185 |
-
* @return bool
|
186 |
-
*/
|
187 |
-
public static function bp_is_current_action( $settings = array() ) {
|
188 |
-
|
189 |
-
if ( empty ( $settings['selected'] ) ) {
|
190 |
-
return false;
|
191 |
-
}
|
192 |
-
|
193 |
-
if ( ! is_array( $settings['selected'] ) ) {
|
194 |
-
$settings['selected'] = array_map( 'trim', explode( ',', $settings['selected'] ) );
|
195 |
-
}
|
196 |
-
|
197 |
-
$found = false;
|
198 |
-
|
199 |
-
foreach ( $settings['selected'] as $action ) {
|
200 |
-
if ( bp_is_current_action( $action ) ) {
|
201 |
-
$found = true;
|
202 |
-
}
|
203 |
-
}
|
204 |
-
|
205 |
-
return $found;
|
206 |
-
}
|
207 |
-
|
208 |
-
|
209 |
-
/**
|
210 |
-
* Checks if the current page is the selected bp action variable.
|
211 |
-
*
|
212 |
-
* @param array $settings
|
213 |
-
*
|
214 |
-
* @return bool
|
215 |
-
*/
|
216 |
-
public static function bp_is_action_variable( $settings = array() ) {
|
217 |
-
|
218 |
-
if ( empty ( $settings['selected'] ) ) {
|
219 |
-
return false;
|
220 |
-
}
|
221 |
-
|
222 |
-
if ( ! is_array( $settings['selected'] ) ) {
|
223 |
-
$settings['selected'] = array_map( 'trim', explode( ',', $settings['selected'] ) );
|
224 |
-
}
|
225 |
-
|
226 |
-
$found = false;
|
227 |
-
|
228 |
-
foreach ( $settings['selected'] as $variable ) {
|
229 |
-
if ( bp_is_action_variable( $variable ) ) {
|
230 |
-
$found = true;
|
231 |
-
}
|
232 |
-
}
|
233 |
-
|
234 |
-
return $found;
|
235 |
-
}
|
236 |
-
|
237 |
-
/**
|
238 |
-
* @param array $order
|
239 |
-
*
|
240 |
-
* @return array
|
241 |
-
*/
|
242 |
-
public static function condition_sort_order( $order = array() ) {
|
243 |
-
$order[ __( 'BuddyPress', 'buddypress' ) ] = 5.756;
|
244 |
-
|
245 |
-
return $order;
|
246 |
-
}
|
247 |
-
|
248 |
-
}
|
1 |
+
<?php
|
2 |
+
/*******************************************************************************
|
3 |
+
* Copyright (c) 2018, WP Popup Maker
|
4 |
+
******************************************************************************/
|
5 |
+
|
6 |
+
// Exit if accessed directly
|
7 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
8 |
+
exit;
|
9 |
+
}
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Class PUM_BuddyPress_Integration
|
13 |
+
*/
|
14 |
+
class PUM_BuddyPress_Integration {
|
15 |
+
|
16 |
+
/**
|
17 |
+
*
|
18 |
+
*/
|
19 |
+
public static function init() {
|
20 |
+
add_filter( 'pum_registered_conditions', array( __CLASS__, 'registered_conditions' ) );
|
21 |
+
add_filter( 'pum_condition_sort_order', array( __CLASS__, 'condition_sort_order' ) );
|
22 |
+
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* @param array $conditions
|
26 |
+
*
|
27 |
+
* @return array
|
28 |
+
*/
|
29 |
+
public static function registered_conditions( $conditions = array() ) {
|
30 |
+
|
31 |
+
$conditions = array_merge( $conditions, array(
|
32 |
+
// Add Additional Conditions
|
33 |
+
'is_buddypress' => array(
|
34 |
+
'group' => __( 'BuddyPress', 'buddypress' ),
|
35 |
+
'name' => __( 'BP: Is a BuddyPress Page', 'popup-maker' ),
|
36 |
+
'callback' => 'is_buddypress',
|
37 |
+
),
|
38 |
+
|
39 |
+
'bp_is_user' => array(
|
40 |
+
'group' => __( 'BuddyPress', 'buddypress' ),
|
41 |
+
'name' => __( 'BP: Is User Page', 'popup-maker' ),
|
42 |
+
'callback' => 'bp_is_user',
|
43 |
+
),
|
44 |
+
|
45 |
+
'bp_is_group' => array(
|
46 |
+
'group' => __( 'BuddyPress', 'buddypress' ),
|
47 |
+
'name' => __( 'BP: Is Group Page', 'popup-maker' ),
|
48 |
+
'callback' => 'bp_is_group',
|
49 |
+
),
|
50 |
+
|
51 |
+
'bp_is_user_messages' => array(
|
52 |
+
'group' => __( 'BuddyPress', 'buddypress' ),
|
53 |
+
'name' => __( 'BP: Is User Messages Page', 'popup-maker' ),
|
54 |
+
'callback' => 'bp_is_user_messages',
|
55 |
+
),
|
56 |
+
|
57 |
+
'bp_is_activation_page' => array(
|
58 |
+
'group' => __( 'BuddyPress', 'buddypress' ),
|
59 |
+
'name' => __( 'BP: Is Activation Page', 'popup-maker' ),
|
60 |
+
'callback' => 'bp_is_activation_page',
|
61 |
+
),
|
62 |
+
|
63 |
+
'bp_is_register_page' => array(
|
64 |
+
'group' => __( 'BuddyPress', 'buddypress' ),
|
65 |
+
'name' => __( 'BP: Is Register Page', 'popup-maker' ),
|
66 |
+
'callback' => 'bp_is_register_page',
|
67 |
+
),
|
68 |
+
|
69 |
+
'bp_is_item_admin' => array(
|
70 |
+
'group' => __( 'BuddyPress', 'buddypress' ),
|
71 |
+
'name' => __( 'BP: Is Item Admin', 'popup-maker' ),
|
72 |
+
'callback' => 'bp_is_item_admin',
|
73 |
+
),
|
74 |
+
|
75 |
+
'bp_is_item_mod' => array(
|
76 |
+
'group' => __( 'BuddyPress', 'buddypress' ),
|
77 |
+
'name' => __( 'BP: Is Item Mod', 'popup-maker' ),
|
78 |
+
'callback' => 'bp_is_item_mod',
|
79 |
+
),
|
80 |
+
|
81 |
+
'bp_is_directory' => array(
|
82 |
+
'group' => __( 'BuddyPress', 'buddypress' ),
|
83 |
+
'name' => __( 'BP: Is Directory', 'popup-maker' ),
|
84 |
+
'callback' => 'bp_is_directory',
|
85 |
+
),
|
86 |
+
'bp_is_current_component' => array(
|
87 |
+
'group' => __( 'BuddyPress', 'buddypress' ),
|
88 |
+
'name' => __( 'BP: Is Current Component', 'popup-maker' ),
|
89 |
+
'fields' => array(
|
90 |
+
'selected' => array(
|
91 |
+
'type' => 'select',
|
92 |
+
'multiple' => true,
|
93 |
+
'as_array' => true,
|
94 |
+
'select2' => true,
|
95 |
+
'options' => self::component_option_list(),
|
96 |
+
'label' => __( 'Which components?' ),
|
97 |
+
),
|
98 |
+
),
|
99 |
+
'callback' => array( __CLASS__, 'bp_is_current_component' ),
|
100 |
+
),
|
101 |
+
|
102 |
+
'bp_is_current_action' => array(
|
103 |
+
'group' => __( 'BuddyPress', 'buddypress' ),
|
104 |
+
'name' => __( 'BP: Is Current Action', 'popup-maker' ),
|
105 |
+
'fields' => array(
|
106 |
+
'selected' => array(
|
107 |
+
'type' => 'text',
|
108 |
+
'label' => __( 'Which actions?' ),
|
109 |
+
),
|
110 |
+
),
|
111 |
+
'callback' => array( __CLASS__, 'bp_is_current_action' ),
|
112 |
+
),
|
113 |
+
|
114 |
+
'bp_is_action_variable' => array(
|
115 |
+
'group' => __( 'BuddyPress', 'buddypress' ),
|
116 |
+
'name' => __( 'BP: Is Action Variable', 'popup-maker' ),
|
117 |
+
'fields' => array(
|
118 |
+
'selected' => array(
|
119 |
+
'type' => 'text',
|
120 |
+
'label' => __( 'Which action variables?' ),
|
121 |
+
),
|
122 |
+
),
|
123 |
+
'callback' => array( __CLASS__, 'bp_is_action_variable' ),
|
124 |
+
),
|
125 |
+
|
126 |
+
) );
|
127 |
+
|
128 |
+
return $conditions;
|
129 |
+
}
|
130 |
+
|
131 |
+
/**
|
132 |
+
* @return array
|
133 |
+
*/
|
134 |
+
public static function component_option_list() {
|
135 |
+
global $bp;
|
136 |
+
|
137 |
+
$components = array();
|
138 |
+
|
139 |
+
foreach ( $bp->active_components as $component => $key ) {
|
140 |
+
$components[ $component ] = ucfirst( $component );
|
141 |
+
}
|
142 |
+
|
143 |
+
return $components;
|
144 |
+
}
|
145 |
+
|
146 |
+
/**
|
147 |
+
* Checks if the current page is the selected bp components.
|
148 |
+
*
|
149 |
+
* @param array $settings
|
150 |
+
*
|
151 |
+
* @return bool
|
152 |
+
*/
|
153 |
+
public static function bp_is_current_component( $settings = array() ) {
|
154 |
+
global $bp;
|
155 |
+
|
156 |
+
if ( empty ( $settings['selected'] ) ) {
|
157 |
+
return false;
|
158 |
+
}
|
159 |
+
|
160 |
+
if ( ! is_array( $settings['selected'] ) ) {
|
161 |
+
$settings['selected'] = array( $settings['selected'] );
|
162 |
+
}
|
163 |
+
|
164 |
+
$found = false;
|
165 |
+
|
166 |
+
foreach ( $settings['selected'] as $component ) {
|
167 |
+
if ( ! array_key_exists( $component, $bp->active_components ) ) {
|
168 |
+
continue;
|
169 |
+
}
|
170 |
+
|
171 |
+
if ( bp_is_current_component( $component ) ) {
|
172 |
+
$found = true;
|
173 |
+
}
|
174 |
+
|
175 |
+
}
|
176 |
+
|
177 |
+
return $found;
|
178 |
+
}
|
179 |
+
|
180 |
+
/**
|
181 |
+
* Checks if the current page is the selected bp action.
|
182 |
+
*
|
183 |
+
* @param array $settings
|
184 |
+
*
|
185 |
+
* @return bool
|
186 |
+
*/
|
187 |
+
public static function bp_is_current_action( $settings = array() ) {
|
188 |
+
|
189 |
+
if ( empty ( $settings['selected'] ) ) {
|
190 |
+
return false;
|
191 |
+
}
|
192 |
+
|
193 |
+
if ( ! is_array( $settings['selected'] ) ) {
|
194 |
+
$settings['selected'] = array_map( 'trim', explode( ',', $settings['selected'] ) );
|
195 |
+
}
|
196 |
+
|
197 |
+
$found = false;
|
198 |
+
|
199 |
+
foreach ( $settings['selected'] as $action ) {
|
200 |
+
if ( bp_is_current_action( $action ) ) {
|
201 |
+
$found = true;
|
202 |
+
}
|
203 |
+
}
|
204 |
+
|
205 |
+
return $found;
|
206 |
+
}
|
207 |
+
|
208 |
+
|
209 |
+
/**
|
210 |
+
* Checks if the current page is the selected bp action variable.
|
211 |
+
*
|
212 |
+
* @param array $settings
|
213 |
+
*
|
214 |
+
* @return bool
|
215 |
+
*/
|
216 |
+
public static function bp_is_action_variable( $settings = array() ) {
|
217 |
+
|
218 |
+
if ( empty ( $settings['selected'] ) ) {
|
219 |
+
return false;
|
220 |
+
}
|
221 |
+
|
222 |
+
if ( ! is_array( $settings['selected'] ) ) {
|
223 |
+
$settings['selected'] = array_map( 'trim', explode( ',', $settings['selected'] ) );
|
224 |
+
}
|
225 |
+
|
226 |
+
$found = false;
|
227 |
+
|
228 |
+
foreach ( $settings['selected'] as $variable ) {
|
229 |
+
if ( bp_is_action_variable( $variable ) ) {
|
230 |
+
$found = true;
|
231 |
+
}
|
232 |
+
}
|
233 |
+
|
234 |
+
return $found;
|
235 |
+
}
|
236 |
+
|
237 |
+
/**
|
238 |
+
* @param array $order
|
239 |
+
*
|
240 |
+
* @return array
|
241 |
+
*/
|
242 |
+
public static function condition_sort_order( $order = array() ) {
|
243 |
+
$order[ __( 'BuddyPress', 'buddypress' ) ] = 5.756;
|
244 |
+
|
245 |
+
return $order;
|
246 |
+
}
|
247 |
+
|
248 |
+
}
|
popup-maker.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Popup Maker
|
4 |
* Plugin URI: https://wppopupmaker.com/?utm_campaign=PluginInfo&utm_source=plugin-header&utm_medium=plugin-uri
|
5 |
* Description: Easily create & style popups with any content. Theme editor to quickly style your popups. Add forms, social media boxes, videos & more.
|
6 |
-
* Version: 1.8.
|
7 |
* Author: WP Popup Maker
|
8 |
* Author URI: https://wppopupmaker.com/?utm_campaign=PluginInfo&utm_source=plugin-header&utm_medium=author-uri
|
9 |
* License: GPL2 or later
|
@@ -95,7 +95,7 @@ class Popup_Maker {
|
|
95 |
/**
|
96 |
* @var string Plugin Version
|
97 |
*/
|
98 |
-
public static $VER = '1.8.
|
99 |
|
100 |
/**
|
101 |
* @var int DB Version
|
3 |
* Plugin Name: Popup Maker
|
4 |
* Plugin URI: https://wppopupmaker.com/?utm_campaign=PluginInfo&utm_source=plugin-header&utm_medium=plugin-uri
|
5 |
* Description: Easily create & style popups with any content. Theme editor to quickly style your popups. Add forms, social media boxes, videos & more.
|
6 |
+
* Version: 1.8.2
|
7 |
* Author: WP Popup Maker
|
8 |
* Author URI: https://wppopupmaker.com/?utm_campaign=PluginInfo&utm_source=plugin-header&utm_medium=author-uri
|
9 |
* License: GPL2 or later
|
95 |
/**
|
96 |
* @var string Plugin Version
|
97 |
*/
|
98 |
+
public static $VER = '1.8.2';
|
99 |
|
100 |
/**
|
101 |
* @var int DB Version
|
readme.txt
CHANGED
@@ -7,7 +7,7 @@ Tags: marketing, popup, popups, optin, advertising, conversion, responsive popu
|
|
7 |
Requires at least: 4.1
|
8 |
Tested up to: 5.1
|
9 |
Requires PHP: 5.2.17
|
10 |
-
Stable tag: 1.8.
|
11 |
License: GPLv2 or later
|
12 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
13 |
|
@@ -103,6 +103,9 @@ There are several common causes for this which include:
|
|
103 |
|
104 |
== Changelog ==
|
105 |
|
|
|
|
|
|
|
106 |
= v1.8.1 - 02/22/2019 =
|
107 |
* Fix: Error on older versions of PHP when calling get_plugin_data on a plugin that wasn't installed.
|
108 |
* Fix: "Fatal error: Can not use method return value in write context" on older versions of PHP.
|
7 |
Requires at least: 4.1
|
8 |
Tested up to: 5.1
|
9 |
Requires PHP: 5.2.17
|
10 |
+
Stable tag: 1.8.2
|
11 |
License: GPLv2 or later
|
12 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
13 |
|
103 |
|
104 |
== Changelog ==
|
105 |
|
106 |
+
= v1.8.2 - 02/25/2019 =
|
107 |
+
* Fix: Bug on older versions of PHP due to usage of [] rather than array().
|
108 |
+
|
109 |
= v1.8.1 - 02/22/2019 =
|
110 |
* Fix: Error on older versions of PHP when calling get_plugin_data on a plugin that wasn't installed.
|
111 |
* Fix: "Fatal error: Can not use method return value in write context" on older versions of PHP.
|