Version Description
- Fix issue where if multiple post tags were selected, popups and other campaigns would only appear on the first tag selected.
- Fix campaign shortcode suggestion in admin being incorrect.
- Full security audit to patch any potential issues.
Download this release
Release Info
Developer | griffinjt |
Plugin | Popups by OptinMonster – Best WordPress Lead Generation Plugin |
Version | 1.9.9 |
Comparing to | |
See all releases |
Code changes from version 1.5.2 to 1.9.9
- CHANGELOG.md +401 -0
- OMAPI/Actions.php +102 -19
- OMAPI/Ajax.php +44 -191
- OMAPI/Api.php +122 -46
- OMAPI/ConstantContact.php +536 -0
- OMAPI/Content.php +87 -46
- OMAPI/Menu.php +615 -352
- OMAPI/Output.php +300 -47
- OMAPI/Pointer.php +106 -0
- OMAPI/Refresh.php +170 -129
- OMAPI/RestApi.php +121 -0
- OMAPI/Review.php +79 -407
- OMAPI/Rules.php +115 -15
- OMAPI/Save.php +260 -36
- OMAPI/Shortcode.php +21 -0
- OMAPI/Sites.php +82 -0
- OMAPI/TrustPulse.php +215 -0
- OMAPI/Type.php +76 -67
- OMAPI/Utils.php +22 -0
- OMAPI/Validate.php +124 -110
- OMAPI/Welcome.php +101 -79
- OMAPI/Widget.php +46 -25
- OMAPI/WooCommerce.php +398 -0
- assets/css/images/BigCommerce-logo.png +0 -0
- assets/css/images/constant_OM.png +0 -0
- assets/css/images/features-event.svg +135 -0
- assets/css/images/features-fire.svg +60 -0
- assets/css/images/gravity-forms.png +0 -0
- assets/css/images/home-flexible.svg +66 -0
- assets/css/images/home-smart-targeting.svg +126 -0
- assets/css/images/logo-edd.png +0 -0
- assets/css/images/logo-formidable.png +0 -0
- assets/css/images/logo-om.png +0 -0
- assets/css/images/memberpress-logo.svg +76 -0
- assets/css/images/ninja-forms.png +0 -0
- assets/css/images/om-step-1-sm.png +0 -0
- assets/css/images/om-step-1.png +0 -0
- assets/css/images/om-step-2-sm.png +0 -0
- assets/css/images/om-step-2.png +0 -0
- assets/css/images/om-step-3-sm.png +0 -0
- assets/css/images/om-step-3.png +0 -0
- assets/css/images/om-step-4-sm.png +0 -0
- assets/css/images/om-step-4.png +0 -0
- assets/css/images/tp-video-cta-button.png +0 -0
- assets/css/images/trustpulse-admin-icon.svg +3 -0
- assets/css/images/video-background.png +0 -0
- assets/css/images/woocommerce_logo.png +0 -0
- assets/css/images/wpforms.png +0 -0
- assets/css/pointer.css +36 -0
- assets/css/settings.css +5 -1
- assets/css/trustpulse-admin.min.css +416 -0
- assets/fonts/Averta-Bold.eot +0 -0
- assets/fonts/Averta-Bold.ttf +0 -0
- assets/fonts/Averta-Bold.woff +0 -0
- assets/fonts/Averta-ExtraBoldItalic.ttf +0 -0
- assets/fonts/Averta-ExtraBoldItalic.woff +0 -0
- assets/fonts/Averta-Light.eot +0 -0
- assets/fonts/Averta-Light.ttf +0 -0
- assets/fonts/Averta-Light.woff +0 -0
- assets/fonts/Averta-Regular.eot +0 -0
- assets/fonts/Averta-Regular.ttf +0 -0
- assets/fonts/Averta-Regular.woff +0 -0
- assets/fonts/Averta-Semibold.eot +0 -0
- assets/fonts/Averta-Semibold.ttf +0 -0
- assets/fonts/Averta-Semibold.woff +0 -0
- assets/js/helper.js +6 -66
- assets/js/mailpoet.js +73 -0
- assets/js/notice.js +36 -0
- assets/js/pointer.js +23 -0
- assets/js/settings.js +291 -296
- includes/class-am-notification.php +3 -1
- optin-monster-wp-api.php +247 -35
- readme.txt +403 -374
- views/archie-css.php +30 -0
- views/cybermonday-notification-css.php +83 -0
- views/cybermonday-notification-js.php +20 -0
- views/cybermonday-notification.php +11 -0
- views/cybermonday-pulse-css.php +58 -0
- views/trustpulse-banner.php +24 -0
- views/trustpulse-settings-page.php +73 -0
CHANGELOG.md
ADDED
@@ -0,0 +1,401 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Changelog
|
2 |
+
All notable changes to the OptinMonster plugin will be documented in this file.
|
3 |
+
|
4 |
+
### 1.9.9
|
5 |
+
* Fix issue where if multiple post tags were selected, popups and other campaigns would only appear on the first tag selected.
|
6 |
+
* Fix campaign shortcode suggestion in admin being incorrect.
|
7 |
+
* Full security audit to patch any potential issues.
|
8 |
+
|
9 |
+
### 1.9.8
|
10 |
+
* Fix compatibility with AMP.
|
11 |
+
* Update compatibility with popular caching plugins.
|
12 |
+
* Update to make all strings translatable.
|
13 |
+
* Fix bug where phone numbers wouldn't save when using MailPoet.
|
14 |
+
* Remove old jQuery dependencies.
|
15 |
+
* Update internal notices to be more friendly with other plugins.
|
16 |
+
|
17 |
+
### 1.9.7
|
18 |
+
* Update the OptinMonster API JS URL.
|
19 |
+
* Update trustpulse menu title.
|
20 |
+
|
21 |
+
### 1.9.6
|
22 |
+
* You can now use Gravity Forms AJAX submissions and form validation with your OptinMonster campaigns.
|
23 |
+
* Update admin notices to use the recommended classes
|
24 |
+
|
25 |
+
### 1.9.5
|
26 |
+
* Add support for www domains in Api.js embed code.
|
27 |
+
* Improve MailPoet error outputs.
|
28 |
+
|
29 |
+
### 1.9.4
|
30 |
+
* Fix issue where site settings were not being retrieved properly.
|
31 |
+
|
32 |
+
### 1.9.3
|
33 |
+
* Additional improvements to output of Api.js URL in embed code.
|
34 |
+
|
35 |
+
### 1.9.2
|
36 |
+
* Improve output of Api.js URL in embed code.
|
37 |
+
|
38 |
+
### 1.9.1
|
39 |
+
* Fix issue where closing Cyber Monday notification would not prevent it from showing again.
|
40 |
+
|
41 |
+
### 1.9.0
|
42 |
+
* Improves compatibility when WordPress is installed in a subdirectory or uses multisite with paths.
|
43 |
+
* Bump the minimum, required, version of WooCommerce to 3.2. Any installs below this version will not have WooCommerce support.
|
44 |
+
* Address some incompatibilities with the MailPoet plugin.
|
45 |
+
* Includes some notifications regarding holiday/sale promotions.
|
46 |
+
|
47 |
+
### 1.8.4
|
48 |
+
* Minor update: Added a new filter for action links.
|
49 |
+
|
50 |
+
### 1.8.3
|
51 |
+
* Improved logic to prevent welcome screen from showing in the wrong context.
|
52 |
+
|
53 |
+
### 1.8.2
|
54 |
+
* Fix issue where the WooCommerce cart object wasn't always available.
|
55 |
+
* Fix issue where top floating bars would cover the WP admin bar for logged in users.
|
56 |
+
|
57 |
+
### 1.8.1
|
58 |
+
* Fix issue with backwards compatibility with PHP 5.4 or lower, and WordPress 4.0 or lower.
|
59 |
+
|
60 |
+
### 1.8.0
|
61 |
+
* New campaigns that are fetched from OptinMonster will be enabled by default.
|
62 |
+
* API Keys can now be added with a click-based authentication flow
|
63 |
+
* Add a REST API endpoint that can be used to refresh campaigns
|
64 |
+
* Fix issues where the OptinMonster campaign preview wouldn't load if the campaign was not already active.
|
65 |
+
|
66 |
+
### 1.7.0
|
67 |
+
* Add additional WooCommerce support.
|
68 |
+
|
69 |
+
### 1.6.9
|
70 |
+
* Fixed an issue where saving to MailPoet may fail on pages where only shortcodes are used to embed campaigns.
|
71 |
+
|
72 |
+
### 1.6.8
|
73 |
+
* Fix issue with backwards compatibility with PHP 5.3 or lower.
|
74 |
+
|
75 |
+
### 1.6.7
|
76 |
+
* Fix issue with backwards compatibility with PHP 5.4 or lower, and WordPress 4.0 or lower.
|
77 |
+
|
78 |
+
### 1.6.6
|
79 |
+
* Fixed an issue where campaign refresh would deactivate live campaigns, and remove their settings
|
80 |
+
|
81 |
+
### 1.6.5
|
82 |
+
* Users who have not entered an API key into will now be redirected to the OptinMonster welcome page instead of the OptinMonster settings page
|
83 |
+
* Added a pointer to the Admin Dashboard if an API Key is not entered
|
84 |
+
* Added pagination to the API requests when refreshing campaigns
|
85 |
+
* Additional fixes for future improvements to OptinMonster
|
86 |
+
|
87 |
+
### 1.6.4
|
88 |
+
* Updated the API domain URL.
|
89 |
+
|
90 |
+
### 1.6.3
|
91 |
+
* Improved searching when adding advanced rules for posts/pages/tags.
|
92 |
+
* Add `optin_monster_pre_store_options` filter to allow users to override which campaigns are imported.
|
93 |
+
|
94 |
+
### 1.6.2
|
95 |
+
* Fix issue where the "Automatically add after post setting" was not working properly after changes in 1.6.0.
|
96 |
+
|
97 |
+
### 1.6.1
|
98 |
+
* Fix dashboard notice showing at incorrect times.
|
99 |
+
|
100 |
+
### 1.6.0
|
101 |
+
* Add widget option, "Apply Advanced Output Settings?". If checked, widget will follow the advanced settings rules for the campaign (found in the Output Settings for the campaign).
|
102 |
+
* Fix bug where advanced settings would not apply to inline after-post campaigns.
|
103 |
+
* Update the inline/automatic setting language to make the new behavior more explicit.
|
104 |
+
|
105 |
+
### 1.5.3
|
106 |
+
* "Display the campaign automatically after blog posts" setting no longer selected by default for inline campaigns.
|
107 |
+
* Fix inline campaigns showing in some scenarios, even when "Display the campaign automatically after blog posts" is NOT checked.
|
108 |
+
|
109 |
+
### 1.5.2
|
110 |
+
* Fixed potential privilege escalation bug.
|
111 |
+
* Bumped for 5.0.
|
112 |
+
|
113 |
+
### 1.5.1
|
114 |
+
* Fixed a possible security issue with admin notices.
|
115 |
+
* Updated outdated URLs in the admin.
|
116 |
+
|
117 |
+
### 1.5.0
|
118 |
+
* Refactored WordPress rules system, and a new `[optin-monster]` shortcode parameter, `followrules=true`. This means if you have specific WordPress display rules (e.g. which categories/posts/pages to display the campaign), and use the shortcode to output the campaign, you can have the shortcode follow the rules you have setup. Example shortcode usage: `[optin-monster slug="XXXXXXXXXXXXXXXXXXXX" followrules=true]`
|
119 |
+
|
120 |
+
### 1.4.2
|
121 |
+
* Fixed a bug that caused issues with PHP versions under 5.6.
|
122 |
+
|
123 |
+
### 1.4.1
|
124 |
+
* Include a file that was missing in 1.4.0. Sorry!
|
125 |
+
|
126 |
+
### 1.4.0
|
127 |
+
* Updated to work with OptinMonster 5.0 campaigns.
|
128 |
+
* Fix PHP notices.
|
129 |
+
|
130 |
+
### 1.3.5
|
131 |
+
* Fix issue where shortcodes in campaigns would not be parsed until the campaigns were refreshed a second time.
|
132 |
+
|
133 |
+
### 1.3.4
|
134 |
+
* Updated the API url to reflect the new endpoint.
|
135 |
+
|
136 |
+
### 1.3.3
|
137 |
+
* Fixed an issue that prevented campaigns from showing on some custom taxonomy terms.
|
138 |
+
* Performance improvements when retrieving, and determining when to display, campaigns.
|
139 |
+
* All URLs updated to use HTTPS.
|
140 |
+
* Updated notifications.
|
141 |
+
|
142 |
+
### 1.3.2
|
143 |
+
* Fixed issue where campaigns of an "advanced age" may not work in the plugin.
|
144 |
+
|
145 |
+
### 1.3.1
|
146 |
+
* Fixed missing files in WordPress.org repository.
|
147 |
+
|
148 |
+
### 1.3.0
|
149 |
+
* Is it "campaign"? Or "optin"? No, it's definitely "campaign".
|
150 |
+
* OptinMonster now works with the shiny new MailPoet 3.
|
151 |
+
* We're feeling a little lighter after removing some deprecated code.
|
152 |
+
|
153 |
+
### 1.2.2
|
154 |
+
* Updated API calls to always be done over HTTPS.
|
155 |
+
* Updated error responses from the OptinMonster API to be more informative.
|
156 |
+
|
157 |
+
### 1.2.1
|
158 |
+
* Added additional checks during save routines for user capabilities.
|
159 |
+
|
160 |
+
### 1.2.0
|
161 |
+
* Added additional support for WooCommerce display settings.
|
162 |
+
* Updated language for legacy migrations.
|
163 |
+
* Fixed a multisite activation issue.
|
164 |
+
|
165 |
+
### 1.1.9
|
166 |
+
* Updated version numbers to prevent possible asset caching errors.
|
167 |
+
|
168 |
+
### 1.1.8
|
169 |
+
* Fixed possible undefined errors for API credentials.
|
170 |
+
|
171 |
+
### 1.1.7
|
172 |
+
* Updated the API script domain for adblock.
|
173 |
+
* Added new authentication method for the new OptinMonster REST API.
|
174 |
+
|
175 |
+
### 1.1.6.2
|
176 |
+
* Fixed undefined index errors when API responses returned an error.
|
177 |
+
|
178 |
+
### 1.1.6.1
|
179 |
+
* General plugin enhancements and bug fixes.
|
180 |
+
|
181 |
+
### 1.1.6
|
182 |
+
* Compatibility updates for WordPress 4.7.
|
183 |
+
|
184 |
+
### 1.1.5.9
|
185 |
+
* Added the async attribute to the OptinMonster API script output for improved performance.
|
186 |
+
* Fixed a bug that caused the debugging report to not properly grab shortcodes.
|
187 |
+
* Added helper to remove faulty admin scripts from the OptinMonster settings area that would cause things to fail in some cases.
|
188 |
+
|
189 |
+
### 1.1.5.8
|
190 |
+
* Fixed bug that caused the MailPoet integration to fail in some scenarios.
|
191 |
+
|
192 |
+
### 1.1.5.7
|
193 |
+
* Improved checks for when to output and localize the OptinMonster API script.
|
194 |
+
|
195 |
+
### 1.1.5.6
|
196 |
+
* Fixed bug that caused people to have to define two constants to set the OptinMonster license key in config files.
|
197 |
+
|
198 |
+
### 1.1.5.5
|
199 |
+
* Fixed bug that redirected people already using the plugin to the Welcome screen on update.
|
200 |
+
|
201 |
+
### 1.1.5.4
|
202 |
+
* Fixed bug that caused issues with viewing the Welcome screen.
|
203 |
+
|
204 |
+
### 1.1.5.3
|
205 |
+
* Fixed issue with notices appearing oddly on OM screens.
|
206 |
+
* Updated support video.
|
207 |
+
|
208 |
+
### 1.1.5.2
|
209 |
+
* Fixed bug with post category selections causing campaigns to load globally.
|
210 |
+
|
211 |
+
### 1.1.5.1
|
212 |
+
* Improved welcome screen for new installs.
|
213 |
+
* Bug fixes and enhancements.
|
214 |
+
|
215 |
+
### 1.1.5
|
216 |
+
* Campaigns will now load on the archive pages of individual taxonomies (if selected) by default.
|
217 |
+
* Clarified language regarding how the "load exclusively on" and "never load optin on" settings work.
|
218 |
+
* Removed after post optins from RSS feeds.
|
219 |
+
* Removed the test mode setting in favor of using the "show only to logged-in users" setting for testing campaign output.
|
220 |
+
* When going live, campaigns will load globally by default unless other advanced output settings are specified.
|
221 |
+
* Automatically adding an after post optin after a post is now checked on by default for new after post campaigns.
|
222 |
+
* Added a new "Support" tab with a helpful video, links to documentation and ability to send support details when submitting a ticket.
|
223 |
+
* Migration tab is now only shown if the old plugin exists on the site.
|
224 |
+
* Added helpful tooltips in various areas of the admin.
|
225 |
+
* Moved all advanced output rules into a toggle field to make working with output settings easier.
|
226 |
+
* Fixed the clear local cookies function (it actually works now!).
|
227 |
+
* Removed the confusing Delete button - campaigns should be deleted from the app.
|
228 |
+
* Added an inline shortcode "copy to clipboard" button for after post campaigns.
|
229 |
+
* Improved shortcode processing - it is now automated (no longer need to enter in a setting) and supports non self-closing shortcodes!
|
230 |
+
* Improved individual campaign action links by always making them visible.
|
231 |
+
|
232 |
+
### 1.1.4.7
|
233 |
+
* Updated compatibility for WordPress 4.6.
|
234 |
+
|
235 |
+
### 1.1.4.6
|
236 |
+
* Removed shortcode ajax method that could possibly be exploited by other plugins to run malicious shortcode.
|
237 |
+
|
238 |
+
### 1.1.4.5
|
239 |
+
* Added new feature to allow reviews to be given for OptinMonster.
|
240 |
+
|
241 |
+
### 1.1.4.4
|
242 |
+
* Allow API credentials to be force resaved to clean out stale messages about accounts being expired or invalid.
|
243 |
+
|
244 |
+
### 1.1.4.3
|
245 |
+
* Fixed API script getting cached by CloudFlare Rocket Loader.
|
246 |
+
* Fixed omhide=true conflicting with MonsterLinks in some cases.
|
247 |
+
* Fixed pre 4.1 installs getting incorrect API ID.
|
248 |
+
* Updated Readme so OptinMonster App and account requirement is clearly stated.
|
249 |
+
|
250 |
+
### 1.1.4.2
|
251 |
+
* Added Welcome page on first install.
|
252 |
+
* Updated error messages.
|
253 |
+
* Updated debug code for better error handling.
|
254 |
+
|
255 |
+
### 1.1.4.1
|
256 |
+
* Added No-Cache headers on API requests.
|
257 |
+
|
258 |
+
### 1.1.4
|
259 |
+
* Fixed bug with adblock.
|
260 |
+
* Added new API script with easier updates.
|
261 |
+
|
262 |
+
### 1.1.3.9
|
263 |
+
* Fixed conflict with jQuery and Modernizr when the optin object was not set properly.
|
264 |
+
|
265 |
+
### 1.1.3.8
|
266 |
+
* Fixed bug with canvas slide-in not being able to be closed.
|
267 |
+
|
268 |
+
### 1.1.3.7
|
269 |
+
* Fixed issue with contact forms not displaying properly in optins. [See this doc on how to update shortcode support in your optins.](https://optinmonster.com/docs/how-to-use-wordpress-shortcodes-with-optinmonster/ "How to use WordPress shortcodes with OptinMonster" )
|
270 |
+
|
271 |
+
### 1.1.3.6
|
272 |
+
* Fixed possible issue with sending empty names that caused bugs with provider integrations.
|
273 |
+
|
274 |
+
### 1.1.3.5
|
275 |
+
* Fixed JS error with analytics if GA was not yet defined.
|
276 |
+
|
277 |
+
### 1.1.3.4
|
278 |
+
* Fixed bug with analytics tracking causing user sessions to be skewed.
|
279 |
+
* Fixed bug with fullscreen optins and mobile optins conflicting.
|
280 |
+
* Mobile optins now work for both mobile and tablet devices. Desktop optins work exclusively for desktop.
|
281 |
+
* Various bug fixes and improvements.
|
282 |
+
|
283 |
+
### 1.1.3.3
|
284 |
+
* Fixed bug where fullscreen wouldn't work on mobile if exit intent setting was checked.
|
285 |
+
* Fixed bug with analytics not tracking if multiple spaces were contained in a campaign name.
|
286 |
+
* Fixed bug with clearing local cookies not working in some instances.
|
287 |
+
|
288 |
+
### 1.1.3.2
|
289 |
+
* Fixed bug where shortcode would not parse for optins inserted via widget, shortcode or template tag.
|
290 |
+
* Fixed bug where Mailpoet helper would not output for optins inserted via widget, shortcode or template tag.
|
291 |
+
|
292 |
+
### 1.1.3.1
|
293 |
+
* Fixed issues revolving around split tests not loading properly for mobile devices.
|
294 |
+
|
295 |
+
### 1.1.3
|
296 |
+
* Fixed bug with freezing and not working in IE10/11.
|
297 |
+
|
298 |
+
### 1.1.2.7
|
299 |
+
* Fixed erroneous alert on screen.
|
300 |
+
|
301 |
+
### 1.1.2.6
|
302 |
+
* Fixed bug with lightbox and mobile optins in API script.
|
303 |
+
|
304 |
+
### 1.1.2.5
|
305 |
+
* Fixed bug with GA not tracking data.
|
306 |
+
* Added 13 new mobile themes!
|
307 |
+
|
308 |
+
### 1.1.2.4
|
309 |
+
* Fixed bug with cookies and split tests.
|
310 |
+
* Fixed bug with allowing split tests to be made primary.
|
311 |
+
|
312 |
+
### 1.1.2.3
|
313 |
+
* Added support for a new optin type - fullscreen optins!
|
314 |
+
* Fixed a bug with embedded HubSpot forms.
|
315 |
+
* Fixed bug where dropdown options would not show on Safari for post targeting.
|
316 |
+
|
317 |
+
### 1.1.2.2
|
318 |
+
* Fixed issue with API script not grabbing checkbox and radio fields properly inside an optin.
|
319 |
+
|
320 |
+
### 1.1.2.1
|
321 |
+
* Fixed issue for defining API url with function before filters can be applied to it.
|
322 |
+
|
323 |
+
### 1.1.2
|
324 |
+
* Fixed display error when multiple taxonomy terms were selected for an optin.
|
325 |
+
* Added selection of scheduled posts in optin output settings.
|
326 |
+
|
327 |
+
### 1.1.1
|
328 |
+
* Added option to move floating bar to top of the page. No custom CSS needed!
|
329 |
+
* Added option for a privacy statement below optin form.
|
330 |
+
* Added option to exclude by page slug
|
331 |
+
* Shortcode parsing now available for all optin types.
|
332 |
+
* Various bug fixes
|
333 |
+
|
334 |
+
### 1.1.0.5
|
335 |
+
* Added ability to pause parent campaigns from the app.
|
336 |
+
|
337 |
+
### 1.1.0.4
|
338 |
+
* Fixed bug that caused paused split tests to continue to run.
|
339 |
+
* Fixed bug with passing optin data to a redirect URL with query args.
|
340 |
+
* Added ability to submit lightbox optin forms with the enter button.
|
341 |
+
|
342 |
+
### 1.1.0.3
|
343 |
+
* Fixed bug that caused site verification to fail.
|
344 |
+
|
345 |
+
### 1.1.0.2
|
346 |
+
* Added support for assigning multiple domains to a single optin.
|
347 |
+
* Added unique optin slug on Overview screen to make life easier.
|
348 |
+
|
349 |
+
### 1.1.0.1
|
350 |
+
* Fixed fixed bug with bounce rate in GA.
|
351 |
+
|
352 |
+
### 1.1.0
|
353 |
+
* Fixed focus bug.
|
354 |
+
|
355 |
+
### 1.0.0.9
|
356 |
+
* Fixed analytics bug that caused bounce rates to go whacky in GA.
|
357 |
+
* Fixed "powered by" link placement when using display effects.
|
358 |
+
* Added focus effect for input fields when an optin is loaded.
|
359 |
+
|
360 |
+
### 1.0.0.8
|
361 |
+
* Clear out global cookie when clearing local cookies.
|
362 |
+
* Fixed bug with not loading in IE7-9.
|
363 |
+
* Fixed bug with placeholder shims not working in IE7-9.
|
364 |
+
* Fixed bug with GA clashes when using multiple tracking scripts on a page.
|
365 |
+
|
366 |
+
### 1.0.0.7
|
367 |
+
* Fixed bug with possible duplicate submissions in some configurations.
|
368 |
+
* Added enhanced conversion tracking with GA.
|
369 |
+
|
370 |
+
### 1.0.0.6
|
371 |
+
* Added a dedicated edit output settings link for each optin.
|
372 |
+
|
373 |
+
### 1.0.0.5
|
374 |
+
* Fixed bug with passing lead data to redirect URLs.
|
375 |
+
* Added improved UX by being able to create and edit optins from the plugin itself.
|
376 |
+
|
377 |
+
### 1.0.0.4
|
378 |
+
* Fixed another error with plugin update deploy.
|
379 |
+
|
380 |
+
### 1.0.0.3
|
381 |
+
* Fixed error with deploy.
|
382 |
+
|
383 |
+
### 1.0.0.2
|
384 |
+
* Fixed bug with API script.
|
385 |
+
|
386 |
+
### 1.0.0.1
|
387 |
+
* The "Go Live" link now enables an optin and sets the global/automatic loading setting as well.
|
388 |
+
* Fixed bug with not being able to uncheck clearing local cookies on optin save.
|
389 |
+
* Added extra XSS security checks with `esc_url_raw`.
|
390 |
+
* Added version number beside plugin header title for easy version checking.
|
391 |
+
|
392 |
+
### 1.0.0
|
393 |
+
* Fixed bug with exclusive/never settings not showing previously selected pages.
|
394 |
+
* Fixed bug with API script and loading social services for specific popup types.
|
395 |
+
* Removed unused updater class reference and code.
|
396 |
+
|
397 |
+
### 0.9.9
|
398 |
+
* Fix error with loading old API script.
|
399 |
+
|
400 |
+
### 0.9.8
|
401 |
+
* Initial release.
|
OMAPI/Actions.php
CHANGED
@@ -7,6 +7,17 @@
|
|
7 |
* @package OMAPI
|
8 |
* @author Thomas Griffin
|
9 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
class OMAPI_Actions {
|
11 |
|
12 |
/**
|
@@ -57,6 +68,7 @@ class OMAPI_Actions {
|
|
57 |
|
58 |
// Add validation messages.
|
59 |
add_action( 'admin_init', array( $this, 'actions' ) );
|
|
|
60 |
add_action( 'admin_notices', array( $this, 'notices' ) );
|
61 |
|
62 |
}
|
@@ -101,7 +113,7 @@ class OMAPI_Actions {
|
|
101 |
switch ( $action ) {
|
102 |
case 'status' :
|
103 |
if ( $this->status() ) {
|
104 |
-
$args['optin_monster_api_action_type'] = '
|
105 |
$args['optin_monster_api_action_id'] = $this->optin_id;
|
106 |
} else {
|
107 |
$args['optin_monster_api_action_type'] = 'error';
|
@@ -110,11 +122,13 @@ class OMAPI_Actions {
|
|
110 |
|
111 |
case 'cookies' :
|
112 |
if ( $this->cookies() ) {
|
113 |
-
$args['optin_monster_api_action_type'] = '
|
114 |
} else {
|
115 |
$args['optin_monster_api_action_type'] = 'error';
|
116 |
}
|
117 |
break;
|
|
|
|
|
118 |
}
|
119 |
|
120 |
// Now redirect to prevent reloads from undoing actions.
|
@@ -135,10 +149,16 @@ class OMAPI_Actions {
|
|
135 |
$new = $status ? false : true;
|
136 |
$field = 'global';
|
137 |
$type = get_post_meta( $this->optin_id, '_omapi_type', true );
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
142 |
}
|
143 |
|
144 |
// Maybe update the global/automatic status.
|
@@ -172,25 +192,35 @@ class OMAPI_Actions {
|
|
172 |
public function cookies() {
|
173 |
|
174 |
$optins = $this->base->get_optins();
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
|
|
|
|
|
|
|
|
|
|
184 |
}
|
185 |
}
|
186 |
}
|
187 |
|
188 |
// Clear out global cookie.
|
189 |
setcookie( 'om-global-cookie', '', -1, COOKIEPATH, COOKIE_DOMAIN, false );
|
|
|
190 |
// Clear out interaction cookie.
|
191 |
setcookie( 'om-interaction-cookie', '', -1, COOKIEPATH, COOKIE_DOMAIN, false );
|
|
|
192 |
// Clear out generic success cookie.
|
193 |
setcookie( 'om-success-cookie', '', -1, COOKIEPATH, COOKIE_DOMAIN, false );
|
|
|
|
|
|
|
194 |
|
195 |
return true;
|
196 |
|
@@ -205,15 +235,21 @@ class OMAPI_Actions {
|
|
205 |
* @param string $type The type of notice to retrieve.
|
206 |
* @return string $notice The admin notice.
|
207 |
*/
|
208 |
-
public function get_notice( $action, $type = '
|
209 |
$notice = '';
|
210 |
|
211 |
switch ( $action ) {
|
212 |
case 'status' :
|
213 |
-
$notice = '
|
|
|
|
|
214 |
break;
|
215 |
case 'cookies' :
|
216 |
-
$notice = '
|
|
|
|
|
|
|
|
|
217 |
break;
|
218 |
}
|
219 |
|
@@ -241,10 +277,57 @@ class OMAPI_Actions {
|
|
241 |
}
|
242 |
|
243 |
foreach ( $this->notices as $id => $message ) {
|
244 |
-
echo '<div class="' . $id . '"><p>' . $message . '</p></div>';
|
245 |
}
|
246 |
|
247 |
}
|
248 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
249 |
|
250 |
}
|
7 |
* @package OMAPI
|
8 |
* @author Thomas Griffin
|
9 |
*/
|
10 |
+
|
11 |
+
// Exit if accessed directly.
|
12 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
+
exit;
|
14 |
+
}
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Actions class.
|
18 |
+
*
|
19 |
+
* @since 1.0.0
|
20 |
+
*/
|
21 |
class OMAPI_Actions {
|
22 |
|
23 |
/**
|
68 |
|
69 |
// Add validation messages.
|
70 |
add_action( 'admin_init', array( $this, 'actions' ) );
|
71 |
+
add_action( 'admin_init', array( $this, 'fetch_missing_data' ) );
|
72 |
add_action( 'admin_notices', array( $this, 'notices' ) );
|
73 |
|
74 |
}
|
113 |
switch ( $action ) {
|
114 |
case 'status' :
|
115 |
if ( $this->status() ) {
|
116 |
+
$args['optin_monster_api_action_type'] = 'success';
|
117 |
$args['optin_monster_api_action_id'] = $this->optin_id;
|
118 |
} else {
|
119 |
$args['optin_monster_api_action_type'] = 'error';
|
122 |
|
123 |
case 'cookies' :
|
124 |
if ( $this->cookies() ) {
|
125 |
+
$args['optin_monster_api_action_type'] = 'success';
|
126 |
} else {
|
127 |
$args['optin_monster_api_action_type'] = 'error';
|
128 |
}
|
129 |
break;
|
130 |
+
default:
|
131 |
+
break;
|
132 |
}
|
133 |
|
134 |
// Now redirect to prevent reloads from undoing actions.
|
149 |
$new = $status ? false : true;
|
150 |
$field = 'global';
|
151 |
$type = get_post_meta( $this->optin_id, '_omapi_type', true );
|
152 |
+
|
153 |
+
switch ( $type ) {
|
154 |
+
case 'post':
|
155 |
+
$field = 'automatic';
|
156 |
+
break;
|
157 |
+
case 'sidebar':
|
158 |
+
$field = false;
|
159 |
+
break;
|
160 |
+
default:
|
161 |
+
break;
|
162 |
}
|
163 |
|
164 |
// Maybe update the global/automatic status.
|
192 |
public function cookies() {
|
193 |
|
194 |
$optins = $this->base->get_optins();
|
195 |
+
if ( ! empty( $optins ) ) {
|
196 |
+
foreach ( (array) $optins as $optin ) {
|
197 |
+
if ( $optin ) {
|
198 |
+
// Array of ids so all splits are included
|
199 |
+
$ids = get_post_meta( $optin->ID, '_omapi_ids', true );
|
200 |
+
foreach ( (array) $ids as $id ) {
|
201 |
+
setcookie( 'om-' . $id, '', -1, COOKIEPATH, COOKIE_DOMAIN, false );
|
202 |
+
setcookie( 'om-success-' . $id, '', -1, COOKIEPATH, COOKIE_DOMAIN, false );
|
203 |
+
setcookie( 'omSuccess-' . $id, '', -1, COOKIEPATH, COOKIE_DOMAIN, false );
|
204 |
+
setcookie( 'om-second-' . $id, '', -1, COOKIEPATH, COOKIE_DOMAIN, false );
|
205 |
+
setcookie( 'omSlideClosed-' . $id, '', -1, COOKIEPATH, COOKIE_DOMAIN, false );
|
206 |
+
setcookie( 'omSeen-' . $id, '', -1, COOKIEPATH, COOKIE_DOMAIN, false );
|
207 |
+
setcookie( 'om-' . $id . '-closed', '', -1, COOKIEPATH, COOKIE_DOMAIN, false );
|
208 |
+
}
|
209 |
}
|
210 |
}
|
211 |
}
|
212 |
|
213 |
// Clear out global cookie.
|
214 |
setcookie( 'om-global-cookie', '', -1, COOKIEPATH, COOKIE_DOMAIN, false );
|
215 |
+
setcookie( 'omGlobalSuccessCookie', '', -1, COOKIEPATH, COOKIE_DOMAIN, false );
|
216 |
// Clear out interaction cookie.
|
217 |
setcookie( 'om-interaction-cookie', '', -1, COOKIEPATH, COOKIE_DOMAIN, false );
|
218 |
+
setcookie( 'omGlobalInteractionCookie', '', -1, COOKIEPATH, COOKIE_DOMAIN, false );
|
219 |
// Clear out generic success cookie.
|
220 |
setcookie( 'om-success-cookie', '', -1, COOKIEPATH, COOKIE_DOMAIN, false );
|
221 |
+
setcookie( 'omSuccessCookie', '', -1, COOKIEPATH, COOKIE_DOMAIN, false );
|
222 |
+
setcookie( 'omSessionStart', '', -1, COOKIEPATH, COOKIE_DOMAIN, false );
|
223 |
+
setcookie( 'omSessionPageviews', '', -1, COOKIEPATH, COOKIE_DOMAIN, false );
|
224 |
|
225 |
return true;
|
226 |
|
235 |
* @param string $type The type of notice to retrieve.
|
236 |
* @return string $notice The admin notice.
|
237 |
*/
|
238 |
+
public function get_notice( $action, $type = 'success' ) {
|
239 |
$notice = '';
|
240 |
|
241 |
switch ( $action ) {
|
242 |
case 'status' :
|
243 |
+
$notice = 'success' === $type
|
244 |
+
? sprintf( __( 'The campaign status was updated successfully. You can configure more specific loading requirements by <a href="%s" title="Click here to edit the output settings for the updated campaign.">editing the output settings</a> for the campaign.', 'optin-monster-api' ), esc_url_raw( add_query_arg( array( 'page' => 'optin-monster-api-settings', 'optin_monster_api_view' => 'optins', 'optin_monster_api_action' => 'edit', 'optin_monster_api_id' => $this->optin_id ), admin_url( 'admin.php' ) ) ) )
|
245 |
+
: esc_html__( 'There was an error updating the campaign status. Please try again.', 'optin-monster-api' );
|
246 |
break;
|
247 |
case 'cookies' :
|
248 |
+
$notice = 'success' === $type
|
249 |
+
? esc_html__( 'The local cookies have been cleared successfully.', 'optin-monster-api' )
|
250 |
+
: esc_html__( 'There was an error clearing the local cookies. Please try again.', 'optin-monster-api' );
|
251 |
+
break;
|
252 |
+
default:
|
253 |
break;
|
254 |
}
|
255 |
|
277 |
}
|
278 |
|
279 |
foreach ( $this->notices as $id => $message ) {
|
280 |
+
echo '<div class="notice notice-' . esc_attr( $id ) . '"><p>' . $message . '</p></div>';
|
281 |
}
|
282 |
|
283 |
}
|
284 |
|
285 |
+
/**
|
286 |
+
* When the plugin is first installed
|
287 |
+
* Or Migrated from a pre-1.8.0 version
|
288 |
+
* We need to fetch some additional data
|
289 |
+
*
|
290 |
+
* @since 1.8.0
|
291 |
+
*
|
292 |
+
* @return void
|
293 |
+
*/
|
294 |
+
public function fetch_missing_data() {
|
295 |
+
$creds = $this->base->get_api_credentials();
|
296 |
+
$option = $this->base->get_option();
|
297 |
+
$changed = false;
|
298 |
+
|
299 |
+
// If we don't have an API Key yet, we can't fetch anything else.
|
300 |
+
if ( ! $creds['apikey'] && ! $creds['user'] && ! $creds['key'] ) {
|
301 |
+
return;
|
302 |
+
}
|
303 |
+
|
304 |
+
// Fetch the userId and accountId, if we don't have them
|
305 |
+
if ( empty( $option['userId'] ) || empty( $option['accountId'] ) ) {
|
306 |
+
$api = OMAPI_Api::build( 'v2', 'me', 'GET' );
|
307 |
+
$body = $api->request();
|
308 |
+
|
309 |
+
if ( isset( $body->id, $body->accountId ) ) {
|
310 |
+
$option['userId'] = $body->id;
|
311 |
+
$option['accountId'] = $body->accountId;
|
312 |
+
$changed = true;
|
313 |
+
}
|
314 |
+
|
315 |
+
}
|
316 |
+
|
317 |
+
// Fetch the SiteIds for this site, if we don't have them
|
318 |
+
if ( empty( $option['siteIds'] ) ) {
|
319 |
+
$sites = $this->base->sites->fetch();
|
320 |
+
$option['siteIds'] = $sites['ids'];
|
321 |
+
$option['customApiUrl'] = $sites['customApiUrl'];
|
322 |
+
|
323 |
+
$changed = true;
|
324 |
+
}
|
325 |
+
|
326 |
+
// Only update the option if we've changed something
|
327 |
+
if ( $changed ) {
|
328 |
+
update_option( 'optin_monster_api', $option );
|
329 |
+
}
|
330 |
+
|
331 |
+
}
|
332 |
|
333 |
}
|
OMAPI/Ajax.php
CHANGED
@@ -7,6 +7,17 @@
|
|
7 |
* @package OMAPI
|
8 |
* @author Thomas Griffin
|
9 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
class OMAPI_Ajax {
|
11 |
|
12 |
/**
|
@@ -52,13 +63,6 @@ class OMAPI_Ajax {
|
|
52 |
add_action( 'init', array( $this, 'ajax' ), 999 );
|
53 |
}
|
54 |
}
|
55 |
-
|
56 |
-
// Load actions and filters.
|
57 |
-
add_action( 'wp_ajax_omapi_query_posts', array( $this, 'query_posts' ) );
|
58 |
-
add_action( 'wp_ajax_omapi_query_taxonomies', array( $this, 'query_taxonomies' ) );
|
59 |
-
add_action( 'wp_ajax_omapi_query_selected_posts', array( $this, 'query_selected_posts' ) );
|
60 |
-
add_action( 'wp_ajax_omapi_query_selected_taxonomies', array( $this, 'query_selected_taxonomies' ) );
|
61 |
-
|
62 |
}
|
63 |
|
64 |
/**
|
@@ -71,7 +75,6 @@ class OMAPI_Ajax {
|
|
71 |
self::$instance = $this;
|
72 |
$this->base = OMAPI::get_instance();
|
73 |
$this->view = 'ajax';
|
74 |
-
|
75 |
}
|
76 |
|
77 |
/**
|
@@ -82,174 +85,12 @@ class OMAPI_Ajax {
|
|
82 |
public function ajax() {
|
83 |
|
84 |
switch ( $_REQUEST['action'] ) {
|
85 |
-
case 'mailpoet'
|
86 |
$this->mailpoet();
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
}
|
91 |
-
|
92 |
-
/**
|
93 |
-
* Queries the posts based on search parameters.
|
94 |
-
*
|
95 |
-
* @since 1.0.0
|
96 |
-
*/
|
97 |
-
public function query_posts() {
|
98 |
-
|
99 |
-
// Run a security check first.
|
100 |
-
check_ajax_referer( 'omapi-query-nonce', 'nonce' );
|
101 |
-
|
102 |
-
// Prepare variables.
|
103 |
-
$search = stripslashes( $_POST['q'] );
|
104 |
-
$post_types = get_post_types( array( 'public' => true ) );
|
105 |
-
$ret = array();
|
106 |
-
$args = array(
|
107 |
-
'post_type' => $post_types,
|
108 |
-
's' => $search,
|
109 |
-
'posts_per_page' => -1,
|
110 |
-
'post_status' => array( 'publish', 'future' ),
|
111 |
-
);
|
112 |
-
|
113 |
-
// Make the query.
|
114 |
-
$posts = get_posts( $args );
|
115 |
-
if ( empty( $posts ) ) {
|
116 |
-
// Maybe they entered a post ID to search. Let's try that.
|
117 |
-
$search = (int) $search;
|
118 |
-
if ( $search ) {
|
119 |
-
$id_args = array(
|
120 |
-
'post_type' => $post_types,
|
121 |
-
'post__in' => (array) $search,
|
122 |
-
'posts_per_page' => -1
|
123 |
-
);
|
124 |
-
$id_posts = get_posts( $id_args );
|
125 |
-
|
126 |
-
if ( empty( $id_posts ) ) {
|
127 |
-
$ret['items'] = array();
|
128 |
-
} else {
|
129 |
-
foreach ( $id_posts as $post ) {
|
130 |
-
$ret['items'][] = array(
|
131 |
-
'id' => $post->ID,
|
132 |
-
'title' => $post->post_title
|
133 |
-
);
|
134 |
-
}
|
135 |
-
}
|
136 |
-
} else {
|
137 |
-
$ret['items'] = array();
|
138 |
-
}
|
139 |
-
} else {
|
140 |
-
foreach ( $posts as $post ) {
|
141 |
-
$ret['items'][] = array(
|
142 |
-
'id' => $post->ID,
|
143 |
-
'title' => $post->post_title
|
144 |
-
);
|
145 |
-
}
|
146 |
}
|
147 |
-
|
148 |
-
// Send back the response.
|
149 |
-
die( json_encode( $ret ) );
|
150 |
-
|
151 |
-
}
|
152 |
-
|
153 |
-
/**
|
154 |
-
* Queries the taxonomies based on search parameters.
|
155 |
-
*
|
156 |
-
* @since 1.0.0
|
157 |
-
*/
|
158 |
-
public function query_taxonomies() {
|
159 |
-
|
160 |
-
// Run a security check first.
|
161 |
-
check_ajax_referer( 'omapi-query-nonce', 'nonce' );
|
162 |
-
|
163 |
-
// Prepare variables.
|
164 |
-
$search = stripslashes( $_POST['q'] );
|
165 |
-
$terms = get_tags( array( 'name__like' => $search ) );
|
166 |
-
$ret = array();
|
167 |
-
|
168 |
-
// Make the query.
|
169 |
-
if ( empty( $terms ) ) {
|
170 |
-
$ret['items'] = array();
|
171 |
-
} else {
|
172 |
-
foreach ( $terms as $term ) {
|
173 |
-
$ret['items'][] = array(
|
174 |
-
'id' => $term->term_id,
|
175 |
-
'title' => $term->name
|
176 |
-
);
|
177 |
-
}
|
178 |
-
}
|
179 |
-
|
180 |
-
// Send back the response.
|
181 |
-
die( json_encode( $ret ) );
|
182 |
-
|
183 |
-
}
|
184 |
-
|
185 |
-
/**
|
186 |
-
* Queries the selected items for "never" and "only" output settings
|
187 |
-
* to show pre-selected values by the user.
|
188 |
-
*
|
189 |
-
* @since 1.0.0
|
190 |
-
*/
|
191 |
-
public function query_selected_posts() {
|
192 |
-
|
193 |
-
// Run a security check first.
|
194 |
-
check_ajax_referer( 'omapi-query-nonce', 'nonce' );
|
195 |
-
|
196 |
-
// Prepare variables.
|
197 |
-
$ids = explode( ',', stripslashes( $_POST['ids'] ) );
|
198 |
-
$ret = array();
|
199 |
-
$args = array(
|
200 |
-
'post__in' => $ids,
|
201 |
-
'posts_per_page' => -1,
|
202 |
-
'post_type' => get_post_types( array( 'public' => true ) ),
|
203 |
-
'post_status' => array( 'publish', 'future' ),
|
204 |
-
);
|
205 |
-
|
206 |
-
// Make the query.
|
207 |
-
$posts = get_posts( $args );
|
208 |
-
if ( empty( $posts ) ) {
|
209 |
-
$ret['items'] = array();
|
210 |
-
} else {
|
211 |
-
foreach ( $posts as $post ) {
|
212 |
-
$ret['items'][] = array(
|
213 |
-
'id' => $post->ID,
|
214 |
-
'title' => $post->post_title
|
215 |
-
);
|
216 |
-
}
|
217 |
-
}
|
218 |
-
|
219 |
-
// Send back the response.
|
220 |
-
die( json_encode( $ret ) );
|
221 |
-
|
222 |
-
}
|
223 |
-
|
224 |
-
/**
|
225 |
-
* Queries the selected tags to show pre-selected values by the user.
|
226 |
-
*
|
227 |
-
* @since 1.0.0
|
228 |
-
*/
|
229 |
-
public function query_selected_taxonomies() {
|
230 |
-
|
231 |
-
// Run a security check first.
|
232 |
-
check_ajax_referer( 'omapi-query-nonce', 'nonce' );
|
233 |
-
|
234 |
-
// Prepare variables.
|
235 |
-
$ids = explode( ',', stripslashes( $_POST['ids'] ) );
|
236 |
-
$ret = array();
|
237 |
-
$ret['items'] = array();
|
238 |
-
|
239 |
-
// Make the query.
|
240 |
-
foreach ( $ids as $id ) {
|
241 |
-
$tag = get_tag( absint( $id ) );
|
242 |
-
if ( $tag ) {
|
243 |
-
$ret['items'][] = array(
|
244 |
-
'id' => $tag->term_id,
|
245 |
-
'title' => $tag->name
|
246 |
-
);
|
247 |
-
}
|
248 |
-
}
|
249 |
-
|
250 |
-
// Send back the response.
|
251 |
-
die( json_encode( $ret ) );
|
252 |
-
|
253 |
}
|
254 |
|
255 |
/**
|
@@ -258,16 +99,19 @@ class OMAPI_Ajax {
|
|
258 |
* @since 1.0.0
|
259 |
*/
|
260 |
public function mailpoet() {
|
261 |
-
|
262 |
// Run a security check first.
|
263 |
check_ajax_referer( 'omapi', 'nonce' );
|
264 |
|
265 |
// Prepare variables.
|
266 |
-
$
|
267 |
-
|
268 |
-
|
269 |
-
$
|
270 |
-
$
|
|
|
|
|
|
|
|
|
271 |
|
272 |
// Possibly split name into first and last.
|
273 |
if ( $name ) {
|
@@ -284,6 +128,11 @@ class OMAPI_Ajax {
|
|
284 |
// Save the email address.
|
285 |
$user['email'] = $email;
|
286 |
|
|
|
|
|
|
|
|
|
|
|
287 |
// Store the data.
|
288 |
$data = array(
|
289 |
'user' => $user,
|
@@ -292,7 +141,7 @@ class OMAPI_Ajax {
|
|
292 |
$data = apply_filters( 'optin_monster_pre_optin_mailpoet', $data, $_REQUEST, $list, null );
|
293 |
|
294 |
// Save the subscriber. Check for MailPoet 3 first. Default to legacy.
|
295 |
-
if ( class_exists( '
|
296 |
// Customize the lead data for MailPoet 3.
|
297 |
if ( isset( $user['firstname'] ) ) {
|
298 |
$user['first_name'] = $user['firstname'];
|
@@ -304,14 +153,20 @@ class OMAPI_Ajax {
|
|
304 |
unset( $user['lastname'] );
|
305 |
}
|
306 |
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
}
|
312 |
-
|
|
|
|
|
|
|
|
|
313 |
\MailPoet\API\API::MP( 'v1' )->addSubscriber( $user, array( $list ) );
|
314 |
-
}
|
|
|
|
|
315 |
}
|
316 |
} else {
|
317 |
$userHelper = WYSIJA::get( 'user', 'helper' );
|
@@ -319,8 +174,6 @@ class OMAPI_Ajax {
|
|
319 |
}
|
320 |
|
321 |
// Send back a response.
|
322 |
-
|
323 |
-
|
324 |
}
|
325 |
-
|
326 |
}
|
7 |
* @package OMAPI
|
8 |
* @author Thomas Griffin
|
9 |
*/
|
10 |
+
|
11 |
+
// Exit if accessed directly.
|
12 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
+
exit;
|
14 |
+
}
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Ajax class.
|
18 |
+
*
|
19 |
+
* @since 1.0.0
|
20 |
+
*/
|
21 |
class OMAPI_Ajax {
|
22 |
|
23 |
/**
|
63 |
add_action( 'init', array( $this, 'ajax' ), 999 );
|
64 |
}
|
65 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
}
|
67 |
|
68 |
/**
|
75 |
self::$instance = $this;
|
76 |
$this->base = OMAPI::get_instance();
|
77 |
$this->view = 'ajax';
|
|
|
78 |
}
|
79 |
|
80 |
/**
|
85 |
public function ajax() {
|
86 |
|
87 |
switch ( $_REQUEST['action'] ) {
|
88 |
+
case 'mailpoet':
|
89 |
$this->mailpoet();
|
90 |
+
break;
|
91 |
+
default:
|
92 |
+
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
}
|
95 |
|
96 |
/**
|
99 |
* @since 1.0.0
|
100 |
*/
|
101 |
public function mailpoet() {
|
|
|
102 |
// Run a security check first.
|
103 |
check_ajax_referer( 'omapi', 'nonce' );
|
104 |
|
105 |
// Prepare variables.
|
106 |
+
$data = array_merge( $_REQUEST, $_REQUEST['optinData'] );
|
107 |
+
unset( $data['optinData'] );
|
108 |
+
|
109 |
+
$optin = $this->base->get_optin_by_slug( stripslashes( $data['optin'] ) );
|
110 |
+
$list = get_post_meta( $optin->ID, '_omapi_mailpoet_list', true );
|
111 |
+
$phone_field = get_post_meta( $optin->ID, '_omapi_mailpoet_phone_field', true );
|
112 |
+
$email = ! empty( $data['email'] ) ? stripslashes( $data['email'] ) : false;
|
113 |
+
$name = ! empty( $data['name'] ) ? stripslashes( $data['name'] ) : false;
|
114 |
+
$user = array();
|
115 |
|
116 |
// Possibly split name into first and last.
|
117 |
if ( $name ) {
|
128 |
// Save the email address.
|
129 |
$user['email'] = $email;
|
130 |
|
131 |
+
// Save the phone number
|
132 |
+
if ( ! empty( $phone_field ) ) {
|
133 |
+
$user[ $phone_field ] = ! empty( $data['phone'] ) ? stripslashes( $data['phone'] ) : false;
|
134 |
+
}
|
135 |
+
|
136 |
// Store the data.
|
137 |
$data = array(
|
138 |
'user' => $user,
|
141 |
$data = apply_filters( 'optin_monster_pre_optin_mailpoet', $data, $_REQUEST, $list, null );
|
142 |
|
143 |
// Save the subscriber. Check for MailPoet 3 first. Default to legacy.
|
144 |
+
if ( class_exists( 'MailPoet\\API\\API' ) ) {
|
145 |
// Customize the lead data for MailPoet 3.
|
146 |
if ( isset( $user['firstname'] ) ) {
|
147 |
$user['first_name'] = $user['firstname'];
|
153 |
unset( $user['lastname'] );
|
154 |
}
|
155 |
|
156 |
+
try {
|
157 |
+
$subscriber = \MailPoet\API\API::MP( 'v1' )->getSubscriber( $user['email'] );
|
158 |
+
} catch ( Exception $e ) {
|
159 |
+
$subscriber = false;
|
160 |
+
}
|
161 |
+
|
162 |
+
try {
|
163 |
+
if ( $subscriber ) {
|
164 |
+
\MailPoet\API\API::MP( 'v1' )->subscribeToList( $subscriber['email'], array( $list ) );
|
165 |
+
} else {
|
166 |
\MailPoet\API\API::MP( 'v1' )->addSubscriber( $user, array( $list ) );
|
167 |
+
}
|
168 |
+
} catch ( Exception $e ) {
|
169 |
+
return wp_send_json_error( $e->getMessage(), 400 );
|
170 |
}
|
171 |
} else {
|
172 |
$userHelper = WYSIJA::get( 'user', 'helper' );
|
174 |
}
|
175 |
|
176 |
// Send back a response.
|
177 |
+
wp_send_json_success();
|
|
|
178 |
}
|
|
|
179 |
}
|
OMAPI/Api.php
CHANGED
@@ -7,6 +7,17 @@
|
|
7 |
* @package OMAPI
|
8 |
* @author Thomas Griffin
|
9 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
class OMAPI_Api {
|
11 |
|
12 |
/**
|
@@ -16,7 +27,7 @@ class OMAPI_Api {
|
|
16 |
*
|
17 |
* @var string
|
18 |
*/
|
19 |
-
public $base =
|
20 |
|
21 |
/**
|
22 |
* Current API route.
|
@@ -63,6 +74,15 @@ class OMAPI_Api {
|
|
63 |
*/
|
64 |
public $key = false;
|
65 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
/**
|
67 |
* Plugin slug.
|
68 |
*
|
@@ -72,6 +92,15 @@ class OMAPI_Api {
|
|
72 |
*/
|
73 |
public $plugin = false;
|
74 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
/**
|
76 |
* Additional data to add to request body
|
77 |
*
|
@@ -81,19 +110,68 @@ class OMAPI_Api {
|
|
81 |
*/
|
82 |
protected $additional_data = array();
|
83 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
84 |
/**
|
85 |
* Primary class constructor.
|
86 |
*
|
87 |
* @since 1.0.0
|
88 |
*
|
89 |
-
* @param string $route
|
90 |
-
* @param array $creds
|
91 |
-
* @param string $method
|
|
|
92 |
*/
|
93 |
-
public function __construct( $route, $creds, $method = 'POST' ) {
|
94 |
// Set class properties.
|
95 |
$this->route = $route;
|
96 |
-
$this->
|
97 |
$this->method = $method;
|
98 |
$this->user = ! empty( $creds['user'] ) ? $creds['user'] : '';
|
99 |
$this->key = ! empty( $creds['key'] ) ? $creds['key'] : '';
|
@@ -108,7 +186,7 @@ class OMAPI_Api {
|
|
108 |
*
|
109 |
* @return mixed $value The response to the API call.
|
110 |
*/
|
111 |
-
public function request() {
|
112 |
// Build the body of the request.
|
113 |
$body = array(
|
114 |
'omapi-user' => $this->user,
|
@@ -125,7 +203,11 @@ class OMAPI_Api {
|
|
125 |
$body['omapi-data'] = maybe_serialize( $this->additional_data );
|
126 |
}
|
127 |
|
128 |
-
$
|
|
|
|
|
|
|
|
|
129 |
|
130 |
// Build the headers of the request.
|
131 |
$headers = array(
|
@@ -133,6 +215,7 @@ class OMAPI_Api {
|
|
133 |
'Cache-Control' => 'no-store, no-cache, must-revalidate, max-age=0, post-check=0, pre-check=0',
|
134 |
'Pragma' => 'no-cache',
|
135 |
'Expires' => 0,
|
|
|
136 |
'OMAPI-Referer' => site_url(),
|
137 |
'OMAPI-Sender' => 'WordPress',
|
138 |
);
|
@@ -146,36 +229,52 @@ class OMAPI_Api {
|
|
146 |
'headers' => $headers,
|
147 |
'body' => $body,
|
148 |
'timeout' => 3000,
|
149 |
-
'sslverify' => false
|
|
|
150 |
);
|
151 |
|
152 |
// Perform the query and retrieve the response.
|
153 |
-
$
|
154 |
-
$response_code = wp_remote_retrieve_response_code( $response );
|
155 |
-
$response_body = json_decode( wp_remote_retrieve_body( $response ) );
|
156 |
-
//return new WP_Error( 'debug', '<pre>' . var_export( $response, true ) . '</pre>' );
|
157 |
|
158 |
// Bail out early if there are any errors.
|
159 |
-
if ( is_wp_error( $
|
160 |
-
return $
|
161 |
}
|
162 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
163 |
// If not a 200 status header, send back error.
|
164 |
-
if (
|
165 |
-
$type = ! empty( $response_body->type ) ? $response_body->type : 'api-error';
|
166 |
-
$error = ! empty( $response_body->message ) ? stripslashes( $response_body->message ) : '';
|
167 |
if ( empty( $error ) ) {
|
168 |
-
$error = ! empty( $response_body->status_message ) ? stripslashes( $response_body->status_message ) : '';
|
169 |
}
|
170 |
if ( empty( $error ) ) {
|
171 |
-
$error = ! empty( $response_body->error ) ? stripslashes( $response_body->error ) : 'unknown';
|
172 |
}
|
173 |
|
174 |
-
return new WP_Error( $type, sprintf( __( 'The API returned a <strong>%s</strong> response with this message: <strong>%s</strong>', 'optin-monster-api' ), $response_code, $error ) );
|
175 |
}
|
176 |
|
177 |
// Return the json decoded content.
|
178 |
-
return $response_body;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
179 |
}
|
180 |
|
181 |
/**
|
@@ -202,27 +301,4 @@ class OMAPI_Api {
|
|
202 |
public function set_additional_data( array $data ) {
|
203 |
$this->additional_data = array_merge( $this->additional_data, $data );
|
204 |
}
|
205 |
-
|
206 |
-
/**
|
207 |
-
* Checks for SSL for making API requests.
|
208 |
-
*
|
209 |
-
* @since 1.0.0
|
210 |
-
*
|
211 |
-
* return bool True if SSL is enabled, false otherwise.
|
212 |
-
*/
|
213 |
-
public function is_ssl() {
|
214 |
-
// Use the base is_ssl check first.
|
215 |
-
if ( is_ssl() ) {
|
216 |
-
return true;
|
217 |
-
} else if ( isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) && 'https' == $_SERVER['HTTP_X_FORWARDED_PROTO'] ) {
|
218 |
-
// Also catch proxies and load balancers.
|
219 |
-
return true;
|
220 |
-
} else if ( defined( 'FORCE_SSL_ADMIN' ) && FORCE_SSL_ADMIN ) {
|
221 |
-
return true;
|
222 |
-
}
|
223 |
-
|
224 |
-
// Otherwise, return false.
|
225 |
-
return false;
|
226 |
-
}
|
227 |
-
|
228 |
-
}
|
7 |
* @package OMAPI
|
8 |
* @author Thomas Griffin
|
9 |
*/
|
10 |
+
|
11 |
+
// Exit if accessed directly.
|
12 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
+
exit;
|
14 |
+
}
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Api class.
|
18 |
+
*
|
19 |
+
* @since 1.0.0
|
20 |
+
*/
|
21 |
class OMAPI_Api {
|
22 |
|
23 |
/**
|
27 |
*
|
28 |
* @var string
|
29 |
*/
|
30 |
+
public $base = OPTINMONSTER_APP_URL;
|
31 |
|
32 |
/**
|
33 |
* Current API route.
|
74 |
*/
|
75 |
public $key = false;
|
76 |
|
77 |
+
/**
|
78 |
+
* New API Key.
|
79 |
+
*
|
80 |
+
* @since 1.3.4
|
81 |
+
*
|
82 |
+
* @var bool|string
|
83 |
+
*/
|
84 |
+
public $apikey = false;
|
85 |
+
|
86 |
/**
|
87 |
* Plugin slug.
|
88 |
*
|
92 |
*/
|
93 |
public $plugin = false;
|
94 |
|
95 |
+
/**
|
96 |
+
* The Api Version (v1 or v2) for this request.
|
97 |
+
*
|
98 |
+
* @since 1.8.0
|
99 |
+
*
|
100 |
+
* @var string
|
101 |
+
*/
|
102 |
+
public $version = 'v1';
|
103 |
+
|
104 |
/**
|
105 |
* Additional data to add to request body
|
106 |
*
|
110 |
*/
|
111 |
protected $additional_data = array();
|
112 |
|
113 |
+
/**
|
114 |
+
* The HTTP response array.
|
115 |
+
*
|
116 |
+
* @since 1.6.5
|
117 |
+
*
|
118 |
+
* @var null|array
|
119 |
+
*/
|
120 |
+
public $response = null;
|
121 |
+
|
122 |
+
/**
|
123 |
+
* The HTTP response code.
|
124 |
+
*
|
125 |
+
* @since 1.6.5
|
126 |
+
*
|
127 |
+
* @var int
|
128 |
+
*/
|
129 |
+
public $response_code = 0;
|
130 |
+
|
131 |
+
/**
|
132 |
+
* The parsed HTTP response body.
|
133 |
+
*
|
134 |
+
* @since 1.6.5
|
135 |
+
*
|
136 |
+
* @var mixed
|
137 |
+
*/
|
138 |
+
public $response_body = null;
|
139 |
+
|
140 |
+
/**
|
141 |
+
* Builds the API Object
|
142 |
+
*
|
143 |
+
* @since 1.8.0
|
144 |
+
*
|
145 |
+
* @param string $version The Api Version (v1 or v2)
|
146 |
+
* @param string $endpoint The Api Endpoint
|
147 |
+
* @param string $method The Request method
|
148 |
+
*
|
149 |
+
* @return self
|
150 |
+
*/
|
151 |
+
public static function build( $version, $route, $method = 'POST' ) {
|
152 |
+
$creds = OMAPI::get_instance()->get_api_credentials();
|
153 |
+
// Check if we have the new API and if so only use it
|
154 |
+
if ( $creds['apikey'] ) {
|
155 |
+
return new OMAPI_Api( $route, array( 'apikey' => $creds['apikey'] ), $method, $version );
|
156 |
+
}
|
157 |
+
|
158 |
+
return new OMAPI_Api( $route, array( 'user' => $creds['user'], 'key' => $creds['key'] ), $method, $version);
|
159 |
+
}
|
160 |
+
|
161 |
/**
|
162 |
* Primary class constructor.
|
163 |
*
|
164 |
* @since 1.0.0
|
165 |
*
|
166 |
+
* @param string $route The API route to target.
|
167 |
+
* @param array $creds Array of API credentials.
|
168 |
+
* @param string $method The API method.
|
169 |
+
* @param string $version The version number of our API
|
170 |
*/
|
171 |
+
public function __construct( $route, $creds, $method = 'POST', $version = 'v1' ) {
|
172 |
// Set class properties.
|
173 |
$this->route = $route;
|
174 |
+
$this->version = $version;
|
175 |
$this->method = $method;
|
176 |
$this->user = ! empty( $creds['user'] ) ? $creds['user'] : '';
|
177 |
$this->key = ! empty( $creds['key'] ) ? $creds['key'] : '';
|
186 |
*
|
187 |
* @return mixed $value The response to the API call.
|
188 |
*/
|
189 |
+
public function request( $args = array() ) {
|
190 |
// Build the body of the request.
|
191 |
$body = array(
|
192 |
'omapi-user' => $this->user,
|
203 |
$body['omapi-data'] = maybe_serialize( $this->additional_data );
|
204 |
}
|
205 |
|
206 |
+
$body = wp_parse_args( $args, $body );
|
207 |
+
$url = in_array( $this->method, array( 'GET', 'DELETE' ), true )
|
208 |
+
? add_query_arg( $body, $this->getUrl() )
|
209 |
+
: $this->getUrl();
|
210 |
+
$url = esc_url_raw( $url );
|
211 |
|
212 |
// Build the headers of the request.
|
213 |
$headers = array(
|
215 |
'Cache-Control' => 'no-store, no-cache, must-revalidate, max-age=0, post-check=0, pre-check=0',
|
216 |
'Pragma' => 'no-cache',
|
217 |
'Expires' => 0,
|
218 |
+
'Origin' => site_url(),
|
219 |
'OMAPI-Referer' => site_url(),
|
220 |
'OMAPI-Sender' => 'WordPress',
|
221 |
);
|
229 |
'headers' => $headers,
|
230 |
'body' => $body,
|
231 |
'timeout' => 3000,
|
232 |
+
'sslverify' => false,
|
233 |
+
'method' => $this->method,
|
234 |
);
|
235 |
|
236 |
// Perform the query and retrieve the response.
|
237 |
+
$this->response = wp_remote_request( $url, $data );
|
|
|
|
|
|
|
238 |
|
239 |
// Bail out early if there are any errors.
|
240 |
+
if ( is_wp_error( $this->response ) ) {
|
241 |
+
return $this->response;
|
242 |
}
|
243 |
|
244 |
+
// Get the response code and response body.
|
245 |
+
$this->response_code = wp_remote_retrieve_response_code( $this->response );
|
246 |
+
$this->response_body = json_decode( wp_remote_retrieve_body( $this->response ) );
|
247 |
+
|
248 |
+
// Get the correct success response code to check against.
|
249 |
+
$response_code = 'DELETE' === $this->method ? 204 : 200;
|
250 |
+
|
251 |
// If not a 200 status header, send back error.
|
252 |
+
if ( $response_code != $this->response_code ) {
|
253 |
+
$type = ! empty( $this->response_body->type ) ? $this->response_body->type : 'api-error';
|
254 |
+
$error = ! empty( $this->response_body->message ) ? stripslashes( $this->response_body->message ) : '';
|
255 |
if ( empty( $error ) ) {
|
256 |
+
$error = ! empty( $this->response_body->status_message ) ? stripslashes( $this->response_body->status_message ) : '';
|
257 |
}
|
258 |
if ( empty( $error ) ) {
|
259 |
+
$error = ! empty( $this->response_body->error ) ? stripslashes( $this->response_body->error ) : 'unknown';
|
260 |
}
|
261 |
|
262 |
+
return new WP_Error( $type, sprintf( __( 'The API returned a <strong>%s</strong> response with this message: <strong>%s</strong>', 'optin-monster-api' ), $this->response_code, $error ) );
|
263 |
}
|
264 |
|
265 |
// Return the json decoded content.
|
266 |
+
return $this->response_body;
|
267 |
+
}
|
268 |
+
|
269 |
+
/**
|
270 |
+
* The gets the URL based on our base, endpoint and version
|
271 |
+
*
|
272 |
+
* @since 1.8.0
|
273 |
+
*
|
274 |
+
* @return string The API url.
|
275 |
+
*/
|
276 |
+
public function getUrl() {
|
277 |
+
return $this->base . '/' . $this->version . '/' . $this->route;
|
278 |
}
|
279 |
|
280 |
/**
|
301 |
public function set_additional_data( array $data ) {
|
302 |
$this->additional_data = array_merge( $this->additional_data, $data );
|
303 |
}
|
304 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
OMAPI/ConstantContact.php
ADDED
@@ -0,0 +1,536 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Constant Contact class.
|
4 |
+
*
|
5 |
+
* @since 1.6.0
|
6 |
+
*
|
7 |
+
* @package OMAPI
|
8 |
+
* @author Justin Sternberg
|
9 |
+
*/
|
10 |
+
|
11 |
+
// Exit if accessed directly.
|
12 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
+
exit;
|
14 |
+
}
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Constant Contact class.
|
18 |
+
*
|
19 |
+
* @since 1.6.0
|
20 |
+
*/
|
21 |
+
class OMAPI_ConstantContact {
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Holds the class object.
|
25 |
+
*
|
26 |
+
* @since 1.6.0
|
27 |
+
*
|
28 |
+
* @var object
|
29 |
+
*/
|
30 |
+
public static $instance;
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Path to the file.
|
34 |
+
*
|
35 |
+
* @since 1.6.0
|
36 |
+
*
|
37 |
+
* @var string
|
38 |
+
*/
|
39 |
+
public $file = __FILE__;
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Holds the review slug.
|
43 |
+
*
|
44 |
+
* @since 1.6.0
|
45 |
+
*
|
46 |
+
* @var string
|
47 |
+
*/
|
48 |
+
public $hook;
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Holds the base class object.
|
52 |
+
*
|
53 |
+
* @since 1.6.0
|
54 |
+
*
|
55 |
+
* @var object
|
56 |
+
*/
|
57 |
+
public $base;
|
58 |
+
|
59 |
+
/**
|
60 |
+
* Sign up link.
|
61 |
+
*
|
62 |
+
* @since 1.6.0
|
63 |
+
* @var string
|
64 |
+
*/
|
65 |
+
public $sign_up = 'https://optinmonster.com/refer/constant-contact/';
|
66 |
+
|
67 |
+
/**
|
68 |
+
* Primary class constructor.
|
69 |
+
*
|
70 |
+
* @since 1.6.0
|
71 |
+
*/
|
72 |
+
public function __construct() {
|
73 |
+
|
74 |
+
// Set our object.
|
75 |
+
$this->set();
|
76 |
+
|
77 |
+
// Pages
|
78 |
+
add_action( 'admin_menu', array( $this, 'register_cc_page' ) );
|
79 |
+
add_action( 'admin_notices', array( $this, 'constant_contact_cta_notice' ) );
|
80 |
+
add_action( 'wp_ajax_om_constant_contact_dismiss', array( $this, 'constant_contact_dismiss' ) );
|
81 |
+
}
|
82 |
+
|
83 |
+
/**
|
84 |
+
* Sets our object instance and base class instance.
|
85 |
+
*
|
86 |
+
* @since 1.6.0
|
87 |
+
*/
|
88 |
+
public function set() {
|
89 |
+
|
90 |
+
self::$instance = $this;
|
91 |
+
$this->base = OMAPI::get_instance();
|
92 |
+
|
93 |
+
}
|
94 |
+
|
95 |
+
/**
|
96 |
+
* Loads the OptinMonster admin menu.
|
97 |
+
*
|
98 |
+
* @since 1.6.0
|
99 |
+
*/
|
100 |
+
public function register_cc_page() {
|
101 |
+
$slug = 'optin-monster-constant-contact';
|
102 |
+
$is_current = isset( $_GET['page'] ) && $slug === $_GET['page'];
|
103 |
+
|
104 |
+
$this->hook = add_submenu_page(
|
105 |
+
$is_current ? 'optin-monster-api-settings' : 'optin-monster-api-settings-no-menu', //parent slug
|
106 |
+
esc_html__( 'OptinMonster with Constant Contact', 'optin-monster-api' ), // page title,
|
107 |
+
esc_html__( 'OptinMonster + Constant Contact', 'optin-monster-api' ),
|
108 |
+
apply_filters( 'optin_monster_api_menu_cap', 'manage_options', $slug ), // cap
|
109 |
+
$slug, // slug
|
110 |
+
array( $this, 'display_page' ) // callback
|
111 |
+
);
|
112 |
+
|
113 |
+
// Load settings page assets.
|
114 |
+
if ( $this->hook ) {
|
115 |
+
add_action( 'load-' . $this->hook, array( $this, 'assets' ) );
|
116 |
+
}
|
117 |
+
|
118 |
+
}
|
119 |
+
|
120 |
+
/**
|
121 |
+
* Add admin notices to connect to Constant Contact.
|
122 |
+
*
|
123 |
+
* @since 1.6.0
|
124 |
+
*/
|
125 |
+
public function constant_contact_cta_notice() {
|
126 |
+
|
127 |
+
// Only consider showing the notice when WPForms plugin is not active.
|
128 |
+
// Here WPForms_Constant_Contact class existence is checked which shows the notice in WPForms plugin.
|
129 |
+
if ( class_exists( 'WPForms_Constant_Contact' ) ) {
|
130 |
+
return;
|
131 |
+
}
|
132 |
+
|
133 |
+
// Only consider showing the review request to admin users.
|
134 |
+
if ( ! is_super_admin() ) {
|
135 |
+
return;
|
136 |
+
}
|
137 |
+
|
138 |
+
// Only display the notice if it has not been dismissed.
|
139 |
+
$dismissed = get_option( 'optinmonster_constant_contact_dismiss', false );
|
140 |
+
|
141 |
+
if ( $dismissed ) {
|
142 |
+
return;
|
143 |
+
}
|
144 |
+
|
145 |
+
// Only show on the main dashboard page (wp-admin/index.php)
|
146 |
+
// or any OptinMonster plugin-specific screen.
|
147 |
+
$can_show = $is_om_page = isset( $_GET['page'] ) && 'optin-monster-api-settings' === $_GET['page'];
|
148 |
+
if ( ! $can_show ) {
|
149 |
+
$can_show = function_exists( 'get_current_screen' ) && 'dashboard' === get_current_screen()->id;
|
150 |
+
}
|
151 |
+
|
152 |
+
if ( ! $can_show ) {
|
153 |
+
return;
|
154 |
+
}
|
155 |
+
|
156 |
+
$connect = admin_url( 'admin.php?page=optin-monster-api-settings' );
|
157 |
+
$learn_more = admin_url( 'admin.php?page=optin-monster-constant-contact' );
|
158 |
+
|
159 |
+
// Output the notice message.
|
160 |
+
?>
|
161 |
+
<div class="notice notice-info is-dismissible om-constant-contact-notice">
|
162 |
+
<p>
|
163 |
+
<?php
|
164 |
+
echo wp_kses(
|
165 |
+
__( 'Get the most out of the <strong>OptinMonster</strong> plugin — use it with an active Constant Contact account.', 'optin-monster-api' ),
|
166 |
+
array(
|
167 |
+
'strong' => array(),
|
168 |
+
)
|
169 |
+
);
|
170 |
+
?>
|
171 |
+
</p>
|
172 |
+
<p>
|
173 |
+
<a href="<?php echo esc_url( $this->sign_up ); ?>" class="button-primary" target="_blank" rel="noopener noreferrer">
|
174 |
+
<?php esc_html_e( 'Try Constant Contact for Free', 'optin-monster-api' ); ?>
|
175 |
+
</a>
|
176 |
+
<?php if ( ! $is_om_page ) { ?>
|
177 |
+
<a href="<?php echo esc_url( $connect ); ?>" class="button-secondary">
|
178 |
+
<?php esc_html_e( 'Connect your existing account', 'optin-monster-api' ); ?>
|
179 |
+
</a>
|
180 |
+
<?php } ?>
|
181 |
+
<?php
|
182 |
+
printf(
|
183 |
+
wp_kses(
|
184 |
+
/* translators: %s - OptinMonster Constant Contact internal URL. */
|
185 |
+
__( 'Learn More about the <a href="%s">power of email marketing</a>', 'optin-monster-api' ),
|
186 |
+
array(
|
187 |
+
'a' => array(
|
188 |
+
'href' => array(),
|
189 |
+
),
|
190 |
+
)
|
191 |
+
),
|
192 |
+
esc_url( $learn_more )
|
193 |
+
);
|
194 |
+
?>
|
195 |
+
</p>
|
196 |
+
</div>
|
197 |
+
<style type="text/css">
|
198 |
+
.om-constant-contact-notice {
|
199 |
+
/*border-left-color: #1a5285;*/
|
200 |
+
}
|
201 |
+
|
202 |
+
.om-constant-contact-notice p:first-of-type {
|
203 |
+
margin: 16px 0 8px;
|
204 |
+
}
|
205 |
+
|
206 |
+
.om-constant-contact-notice p:last-of-type {
|
207 |
+
margin: 8px 0 16px;
|
208 |
+
}
|
209 |
+
|
210 |
+
.om-constant-contact-notice .button-primary,
|
211 |
+
.om-constant-contact-notice .button-secondary {
|
212 |
+
display: inline-block;
|
213 |
+
margin: 0 10px 0 0;
|
214 |
+
}
|
215 |
+
</style>
|
216 |
+
<script type="text/javascript">
|
217 |
+
jQuery( function ( $ ) {
|
218 |
+
$( document ).on( 'click', '.om-constant-contact-notice button', function ( event ) {
|
219 |
+
event.preventDefault();
|
220 |
+
$.post( ajaxurl, { action: 'om_constant_contact_dismiss' } );
|
221 |
+
$( '.om-constant-contact-notice' ).remove();
|
222 |
+
} );
|
223 |
+
} );
|
224 |
+
</script>
|
225 |
+
<?php
|
226 |
+
}
|
227 |
+
|
228 |
+
/**
|
229 |
+
* Dismiss the Constant Contact admin notice.
|
230 |
+
*
|
231 |
+
* @since 1.6.0
|
232 |
+
*/
|
233 |
+
public function constant_contact_dismiss() {
|
234 |
+
|
235 |
+
update_option( 'optinmonster_constant_contact_dismiss', 1, false );
|
236 |
+
wp_send_json_success();
|
237 |
+
}
|
238 |
+
|
239 |
+
/**
|
240 |
+
* Loads assets for the settings page.
|
241 |
+
*
|
242 |
+
* @since 1.6.0
|
243 |
+
*/
|
244 |
+
public function assets() {
|
245 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'styles' ) );
|
246 |
+
add_filter( 'admin_footer_text', array( $this, 'footer' ) );
|
247 |
+
add_action( 'in_admin_header', array( $this->base->menu, 'output_plugin_screen_banner' ) );
|
248 |
+
}
|
249 |
+
|
250 |
+
/**
|
251 |
+
* Register and enqueue settings page specific CSS.
|
252 |
+
*
|
253 |
+
* @since 1.6.0
|
254 |
+
*/
|
255 |
+
public function styles() {
|
256 |
+
wp_enqueue_style( $this->base->plugin_slug . '-settings', plugins_url( '/assets/css/settings.css', OMAPI_FILE ), array(), $this->base->version );
|
257 |
+
}
|
258 |
+
|
259 |
+
/**
|
260 |
+
* Customizes the footer text on the OptinMonster settings page.
|
261 |
+
*
|
262 |
+
* @since 1.6.0
|
263 |
+
*
|
264 |
+
* @param string $text The default admin footer text.
|
265 |
+
* @return string $text Amended admin footer text.
|
266 |
+
*/
|
267 |
+
public function footer( $text ) {
|
268 |
+
|
269 |
+
$url = 'https://wordpress.org/support/plugin/optinmonster/reviews?filter=5#new-post';
|
270 |
+
$text = sprintf( __( 'Please rate <strong>OptinMonster</strong> <a href="%1$s" target="_blank" rel="noopener">★★★★★</a> on <a href="%1$s" target="_blank" rel="noopener noreferrer">WordPress.org</a> to help us spread the word. Thank you from the OptinMonster team!', 'optin-monster-api' ), $url );
|
271 |
+
return $text;
|
272 |
+
|
273 |
+
}
|
274 |
+
|
275 |
+
/**
|
276 |
+
* Outputs the Review Page.
|
277 |
+
*
|
278 |
+
* TODO: Update the copy for OM
|
279 |
+
*
|
280 |
+
* @since 1.6.0
|
281 |
+
*/
|
282 |
+
public function display_page() {
|
283 |
+
$images_url = esc_url( plugins_url( '/assets/css/images/', OMAPI_FILE ) );
|
284 |
+
?>
|
285 |
+
<style type="text/css">
|
286 |
+
.admin_page_optin-monster-constant-contact #wpbody {
|
287 |
+
background: #fff;
|
288 |
+
}
|
289 |
+
|
290 |
+
.notice {
|
291 |
+
display: none;
|
292 |
+
}
|
293 |
+
|
294 |
+
.om-cc-wrap {
|
295 |
+
max-width: 970px;
|
296 |
+
}
|
297 |
+
|
298 |
+
.om-cc-wrap h1 {
|
299 |
+
/*color: #1a5285;*/
|
300 |
+
font-size: 30px;
|
301 |
+
margin: 0 0 15px 0;
|
302 |
+
}
|
303 |
+
|
304 |
+
.om-cc-wrap h2 {
|
305 |
+
/*color: #1a5285;*/
|
306 |
+
font-size: 26px;
|
307 |
+
margin: 0 0 15px 0;
|
308 |
+
text-align: left;
|
309 |
+
}
|
310 |
+
|
311 |
+
.om-cc-wrap p {
|
312 |
+
font-size: 16px;
|
313 |
+
font-weight: 300;
|
314 |
+
color: #333;
|
315 |
+
margin: 1.2em 0;
|
316 |
+
}
|
317 |
+
|
318 |
+
.om-cc-wrap ul,
|
319 |
+
.om-cc-wrap ol {
|
320 |
+
margin: 1.6em 2.5em 2em;
|
321 |
+
line-height: 1.5;
|
322 |
+
font-size: 16px;
|
323 |
+
font-weight: 300;
|
324 |
+
}
|
325 |
+
|
326 |
+
.om-cc-wrap ul {
|
327 |
+
list-style: disc;
|
328 |
+
}
|
329 |
+
|
330 |
+
.om-cc-wrap li {
|
331 |
+
margin-bottom: 0.8em;
|
332 |
+
}
|
333 |
+
|
334 |
+
.om-cc-wrap hr {
|
335 |
+
margin: 2.2em 0;
|
336 |
+
}
|
337 |
+
|
338 |
+
.om-cc-wrap .logo {
|
339 |
+
float: right;
|
340 |
+
margin-top: 0.8em;
|
341 |
+
border: 1px solid #ddd;
|
342 |
+
}
|
343 |
+
|
344 |
+
.om-cc-wrap .reasons {
|
345 |
+
margin: 2.2em 400px 2.2em 2em;
|
346 |
+
}
|
347 |
+
|
348 |
+
.om-cc-wrap .reasons li {
|
349 |
+
margin-bottom: 1.4em;
|
350 |
+
}
|
351 |
+
|
352 |
+
.om-cc-wrap .steps {
|
353 |
+
clear: both;
|
354 |
+
display: -webkit-box;
|
355 |
+
display: -ms-flexbox;
|
356 |
+
display: flex;
|
357 |
+
-ms-flex-wrap: wrap;
|
358 |
+
flex-wrap: wrap;
|
359 |
+
}
|
360 |
+
|
361 |
+
.om-cc-wrap .step {
|
362 |
+
-webkit-box-flex: 1;
|
363 |
+
-ms-flex-positive: 1;
|
364 |
+
flex-grow: 1;
|
365 |
+
-ms-flex-negative: 1;
|
366 |
+
flex-shrink: 1;
|
367 |
+
margin-bottom: 1.4em;
|
368 |
+
padding: 0 1em 0 0;
|
369 |
+
-ms-flex-preferred-size: 50%;
|
370 |
+
flex-basis: 50%;
|
371 |
+
-webkit-box-sizing: border-box;
|
372 |
+
box-sizing: border-box;
|
373 |
+
}
|
374 |
+
|
375 |
+
.om-cc-wrap .step a {
|
376 |
+
-webkit-box-shadow: rgba(0, 35, 60, 0.1) 3px 7px 13px 0px;
|
377 |
+
box-shadow: rgba(0, 35, 60, 0.1) 3px 7px 13px 0px;
|
378 |
+
border: 1px solid #efefef;
|
379 |
+
display: block;
|
380 |
+
}
|
381 |
+
|
382 |
+
.om-cc-wrap .step a:hover {
|
383 |
+
border-color: #d9d9d9;
|
384 |
+
}
|
385 |
+
|
386 |
+
.om-cc-wrap .step img {
|
387 |
+
max-width: 100%;
|
388 |
+
height: auto;
|
389 |
+
display: block;
|
390 |
+
}
|
391 |
+
|
392 |
+
.om-cc-wrap .dashicons-yes {
|
393 |
+
color: #19BE19;
|
394 |
+
font-size: 26px;
|
395 |
+
}
|
396 |
+
|
397 |
+
.om-cc-wrap .button {
|
398 |
+
background-color: #0078C3;
|
399 |
+
border: 1px solid #005990;
|
400 |
+
border-radius: 4px;
|
401 |
+
color: #fff;
|
402 |
+
font-size: 16px;
|
403 |
+
font-weight: 600;
|
404 |
+
height: auto;
|
405 |
+
line-height: 1;
|
406 |
+
margin-bottom: 10px;
|
407 |
+
padding: 14px 30px;
|
408 |
+
text-align: center;
|
409 |
+
}
|
410 |
+
|
411 |
+
.om-cc-wrap .button:hover,
|
412 |
+
.om-cc-wrap .button:focus {
|
413 |
+
background-color: #005990;
|
414 |
+
color: #fff
|
415 |
+
}
|
416 |
+
|
417 |
+
@media only screen and (max-width: 767px) {
|
418 |
+
.om-cc-wrap h1 {
|
419 |
+
font-size: 26px;
|
420 |
+
}
|
421 |
+
|
422 |
+
.om-cc-wrap h2 {
|
423 |
+
font-size: 22px;
|
424 |
+
}
|
425 |
+
|
426 |
+
.om-cc-wrap p {
|
427 |
+
font-size: 14px;
|
428 |
+
}
|
429 |
+
|
430 |
+
.om-cc-wrap ul,
|
431 |
+
.om-cc-wrap ol {
|
432 |
+
font-size: 14px;
|
433 |
+
}
|
434 |
+
|
435 |
+
.om-cc-wrap .logo {
|
436 |
+
width: 120px;
|
437 |
+
}
|
438 |
+
|
439 |
+
.om-cc-wrap .reasons {
|
440 |
+
margin-right: 150px;
|
441 |
+
}
|
442 |
+
}
|
443 |
+
</style>
|
444 |
+
<div class="wrap omapi-page om-cc-wrap">
|
445 |
+
<h1><?php esc_html_e( 'Grow Your Website with OptinMonster + Email Marketing', 'optin-monster-api' ); ?></h1>
|
446 |
+
<p><?php esc_html_e( 'Wondering if email marketing is really worth your time?', 'optin-monster-api' ); ?></p>
|
447 |
+
<p><?php echo wp_kses( __( 'Email is hands-down the most effective way to nurture leads and turn them into customers, with a return on investment (ROI) of <strong>$44 back for every $1 spent</strong> according to the Direct Marketing Association.', 'optin-monster-api' ), array( 'strong' => array() ) ); ?></p>
|
448 |
+
<p><?php esc_html_e( 'Here are 3 big reasons why every smart business in the world has an email list:', 'optin-monster-api' ); ?></p>
|
449 |
+
<a href="<?php echo esc_url( $this->sign_up ); ?>" target="_blank" rel="noopener noreferrer">
|
450 |
+
<img width="350" class="logo" src="<?php echo $images_url .'constant_OM.png'; ?>" alt="<?php esc_attr_e( 'OptinMonster with Constant Contact - Try us free', 'optin-monster-api' ); ?>"/>
|
451 |
+
</a>
|
452 |
+
<ol class="reasons">
|
453 |
+
<li><?php echo wp_kses( __( '<strong>Email is still #1</strong> - At least 91% of consumers check their email on a daily basis. You get direct access to your subscribers, without having to play by social media's rules and algorithms.', 'optin-monster-api' ), array( 'strong' => array() ) ); ?></li>
|
454 |
+
<li><?php echo wp_kses( __( '<strong>You own your email list</strong> - Unlike with social media, your list is your property and no one can revoke your access to it.', 'optin-monster-api' ), array( 'strong' => array() ) ); ?></li>
|
455 |
+
<li><?php echo wp_kses( __( '<strong>Email converts</strong> - People who buy products marketed through email spend 138% more than those who don't receive email offers.', 'optin-monster-api' ), array( 'strong' => array() ) ); ?></li>
|
456 |
+
</ol>
|
457 |
+
<p><?php esc_html_e( 'That's why it's crucial to start collecting email addresses and building your list as soon as possible.', 'optin-monster-api' ); ?></p>
|
458 |
+
<p>
|
459 |
+
<?php
|
460 |
+
printf(
|
461 |
+
wp_kses(
|
462 |
+
/* translators: %s - WPBeginners.com Guide to Email Lists URL. */
|
463 |
+
__( 'For more details, see this guide on <a href="%s" target="_blank" rel="noopener noreferrer">why building your email list is so important</a>.', 'optin-monster-api' ),
|
464 |
+
array(
|
465 |
+
'a' => array(
|
466 |
+
'href' => array(),
|
467 |
+
'target' => array(),
|
468 |
+
'rel' => array(),
|
469 |
+
),
|
470 |
+
)
|
471 |
+
),
|
472 |
+
'https://optinmonster.com/beginners-guide-to-email-marketing/'
|
473 |
+
);
|
474 |
+
?>
|
475 |
+
</p>
|
476 |
+
<hr/>
|
477 |
+
<h2><?php esc_html_e( 'You've Already Started - Here's the Next Step (It's Easy)', 'optin-monster-api' ); ?></h2>
|
478 |
+
<p><?php esc_html_e( 'Here are the 3 things you need to build an email list:', 'optin-monster-api' ); ?></p>
|
479 |
+
<ol>
|
480 |
+
<li><?php esc_html_e( 'A Website or Blog', 'optin-monster-api' ); ?> <span class="dashicons dashicons-yes"></span></li>
|
481 |
+
<?php // TODO: update the following line ?>
|
482 |
+
<li><?php esc_html_e( 'High-Converting Form Builder', 'optin-monster-api' ); ?> <span class="dashicons dashicons-yes"></span></li>
|
483 |
+
<li><strong><?php esc_html_e( 'The Best Email Marketing Service', 'optin-monster-api' ); ?></strong></li>
|
484 |
+
</ol>
|
485 |
+
<p><?php esc_html_e( 'With a powerful email marketing service like Constant Contact, you can instantly send out mass notifications and beautifully designed newsletters to engage your subscribers.', 'optin-monster-api' ); ?></p>
|
486 |
+
<p>
|
487 |
+
<a href="<?php echo esc_url( $this->sign_up ); ?>" class="button" target="_blank" rel="noopener noreferrer">
|
488 |
+
<?php esc_html_e( 'Get Started with Constant Contact for Free', 'optin-monster-api' ); ?>
|
489 |
+
</a>
|
490 |
+
</p>
|
491 |
+
<p><?php esc_html_e( 'OptinMonster plugin makes it fast and easy to capture all kinds of visitor information right from your WordPress site - even if you don't have a Constant Contact account.', 'optin-monster-api' ); ?></p>
|
492 |
+
<p><?php esc_html_e( 'But when you combine OptinMonster with Constant Contact, you can nurture your contacts and engage with them even after they leave your website. When you use Constant Contact + OptinMonster together, you can:', 'optin-monster-api' ); ?></p>
|
493 |
+
<ul>
|
494 |
+
<li><?php esc_html_e( 'Seamlessly add new contacts to your email list', 'optin-monster-api' ); ?></li>
|
495 |
+
<li><?php esc_html_e( 'Create and send professional email newsletters', 'optin-monster-api' ); ?></li>
|
496 |
+
<li><?php esc_html_e( 'Get expert marketing and support', 'optin-monster-api' ); ?></li>
|
497 |
+
</ul>
|
498 |
+
<p>
|
499 |
+
<a href="<?php echo esc_url( $this->sign_up ); ?>" target="_blank" rel="noopener noreferrer">
|
500 |
+
<strong><?php esc_html_e( 'Try Constant Contact Today', 'optin-monster-api' ); ?></strong>
|
501 |
+
</a>
|
502 |
+
</p>
|
503 |
+
<hr/>
|
504 |
+
<h2><?php esc_html_e( 'OptinMonster Makes List Building Easy', 'optin-monster-api' ); ?></h2>
|
505 |
+
<p><?php esc_html_e( 'When creating OptinMonster, our goal was to make a conversion optimization tool that was both EASY and POWERFUL.', 'optin-monster-api' ); ?></p>
|
506 |
+
<p><?php esc_html_e( 'Here's how it works.', 'optin-monster-api' ); ?></p>
|
507 |
+
<div class="steps">
|
508 |
+
<div class="step1 step">
|
509 |
+
<a href="<?php echo $images_url . 'om-step-1.png'; ?>"><img src="<?php echo $images_url . 'om-step-1-sm.png'; ?>"></a>
|
510 |
+
<p><?php esc_html_e( '1. Select a design from our beautiful, high-converting template library.', 'optin-monster-api' ); ?></p>
|
511 |
+
</div>
|
512 |
+
<div class="step2 step">
|
513 |
+
<a href="<?php echo $images_url . 'om-step-2.png'; ?>"><img src="<?php echo $images_url . 'om-step-2-sm.png'; ?>"></a>
|
514 |
+
<p><?php esc_html_e( '2. Drag and drop elements to completely customize the look and feel of your campaign.', 'optin-monster-api' ); ?></p>
|
515 |
+
</div>
|
516 |
+
<div class="step3 step">
|
517 |
+
<a href="<?php echo $images_url . 'om-step-3.png'; ?>"><img src="<?php echo $images_url . 'om-step-3-sm.png'; ?>"></a>
|
518 |
+
<p><?php esc_html_e( '3. Connect your Constant Contact email list.', 'optin-monster-api' ); ?></p>
|
519 |
+
</div>
|
520 |
+
<div class="step4 step">
|
521 |
+
<a href="<?php echo $images_url . 'om-step-4.png'; ?>"><img src="<?php echo $images_url . 'om-step-4-sm.png'; ?>"></a>
|
522 |
+
<p><?php esc_html_e( '4. Sync your campaign to your WordPress site, then hit Go Live.', 'optin-monster-api' ); ?></p>
|
523 |
+
</div>
|
524 |
+
</div>
|
525 |
+
<p><?php esc_html_e( 'It doesn't matter what kind of business you run, what kind of website you have, or what industry you are in - you need to start building your email list today.', 'optin-monster-api' ); ?></p>
|
526 |
+
<p><?php esc_html_e( 'With Constant Contact + OptinMonster, growing your list is easy.', 'optin-monster-api' ); ?></p>
|
527 |
+
<p>
|
528 |
+
<a href="<?php echo esc_url( $this->sign_up ); ?>" target="_blank" rel="noopener noreferrer">
|
529 |
+
<strong><?php esc_html_e( 'Try Constant Contact Today', 'optin-monster-api' ); ?></strong>
|
530 |
+
</a>
|
531 |
+
</p>
|
532 |
+
</div>
|
533 |
+
<?php
|
534 |
+
}
|
535 |
+
|
536 |
+
}
|
OMAPI/Content.php
CHANGED
@@ -7,6 +7,17 @@
|
|
7 |
* @package OMAPI
|
8 |
* @author Thomas Griffin
|
9 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
class OMAPI_Content {
|
11 |
|
12 |
/**
|
@@ -63,6 +74,7 @@ class OMAPI_Content {
|
|
63 |
add_action( 'optin_monster_api_content_settings', array( $this, 'settings' ), 10, 2 );
|
64 |
add_action( 'optin_monster_api_content_support', array( $this, 'support' ), 10, 2 );
|
65 |
add_action( 'optin_monster_api_content_migrate', array( $this, 'migrate' ), 10, 2 );
|
|
|
66 |
|
67 |
}
|
68 |
|
@@ -105,8 +117,8 @@ class OMAPI_Content {
|
|
105 |
<?php endif; ?>
|
106 |
<h3>
|
107 |
<?php if ( isset( $_GET['optin_monster_api_action'] ) && 'edit' == $_GET['optin_monster_api_action'] ) : ?>
|
108 |
-
<?php printf(
|
109 |
-
<span class="omapi-back"><a class="button button-secondary button-small" href="<?php echo esc_url_raw( add_query_arg( array( 'optin_monster_api_view' => 'optins' ), admin_url( 'admin.php?page=optin-monster-api-settings' ) ) ); ?>" title="<?php esc_attr_e( 'Back to campaign overview', 'optin-monster-api' ); ?>"><?php
|
110 |
<?php else : ?>
|
111 |
<?php echo esc_html( $panel ); ?>
|
112 |
<?php endif; ?>
|
@@ -125,11 +137,11 @@ class OMAPI_Content {
|
|
125 |
* @since 1.0.0
|
126 |
*/
|
127 |
public function form_end() {
|
128 |
-
|
129 |
// Load different form buttons based on if credentials have been supplied or not.
|
130 |
if ( ! $this->base->get_api_credentials() && 'support' !== $this->view ) :
|
131 |
?>
|
132 |
-
<p class="submit">
|
133 |
<input class="button button-primary" type="submit" name="omapi_submit" value="<?php esc_attr_e( 'Connect to OptinMonster', 'optin-monster-api' ); ?>" tabindex="749" />
|
134 |
</p>
|
135 |
</form>
|
@@ -146,7 +158,7 @@ class OMAPI_Content {
|
|
146 |
?>
|
147 |
<p class="submit">
|
148 |
<input class="button button-primary" type="submit" name="omapi_refresh" value="<?php esc_attr_e( 'Refresh Campaigns', 'optin-monster-api' ); ?>" tabindex="749" />
|
149 |
-
<a class="button button-secondary" href="<?php echo wp_nonce_url( esc_url_raw( add_query_arg( array( 'optin_monster_api_view' => $this->view, 'optin_monster_api_action' => 'cookies' ), admin_url( 'admin.php?page=optin-monster-api-settings' ) ) ), 'omapi-action' ); ?>" title="<?php esc_attr_e( 'Clear Local Cookies', 'optin-monster-api' ); ?>"><?php
|
150 |
</p>
|
151 |
</form>
|
152 |
<?php
|
@@ -157,17 +169,30 @@ class OMAPI_Content {
|
|
157 |
<?php
|
158 |
elseif ( 'support' == $this->view ) :
|
159 |
|
160 |
-
//
|
161 |
|
162 |
-
|
163 |
?>
|
164 |
<p class="submit">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
165 |
<input class="button button-primary" type="submit" name="submit" value="<?php esc_attr_e( 'Save Settings', 'optin-monster-api' ); ?>" tabindex="749" />
|
166 |
</p>
|
167 |
</form>
|
168 |
<?php
|
169 |
endif;
|
170 |
-
|
171 |
}
|
172 |
|
173 |
/**
|
@@ -181,12 +206,14 @@ class OMAPI_Content {
|
|
181 |
public function api( $panel, $object ) {
|
182 |
|
183 |
$link = $this->base->menu->get_action_link();
|
184 |
-
$text = $this->base->menu->has_trial_link()
|
|
|
|
|
185 |
|
186 |
$credentials = $this->base->get_api_credentials();
|
187 |
|
188 |
if ( ! $credentials ) : ?>
|
189 |
-
<p class="omapi-red"><strong><?php
|
190 |
<p><em><?php printf( __( 'Need an OptinMonster account? <a href="%s" title="Click here to learn more about OptinMonster" target="_blank">%s</a>', 'optin-monster-api' ), $link, $text ); ?></em></p>
|
191 |
<?php endif; ?>
|
192 |
|
@@ -195,12 +222,16 @@ class OMAPI_Content {
|
|
195 |
<?php // If we have credentials only show the old stuff if it is saved ?>
|
196 |
<?php if ( $credentials ) : ?>
|
197 |
<?php if ( isset( $credentials['api'] ) && '' != $credentials['api'] || isset( $credentials['key'] ) && '' != $credentials['key'] ) : ?>
|
198 |
-
<p
|
199 |
<?php echo $object->get_setting_ui( 'api', 'user' ); ?>
|
200 |
<?php echo $object->get_setting_ui( 'api', 'key' ); ?>
|
201 |
<?php endif; ?>
|
202 |
<?php endif; ?>
|
203 |
|
|
|
|
|
|
|
|
|
204 |
<?php
|
205 |
|
206 |
}
|
@@ -235,26 +266,26 @@ class OMAPI_Content {
|
|
235 |
|
236 |
$optins = $this->base->get_optins();
|
237 |
$i = 0;
|
238 |
-
if ( $optins ) :
|
239 |
?>
|
240 |
<?php foreach ( $optins as $optin ) : $class = 0 == $i ? ' omapi-optin-first' : '';
|
241 |
if ( (bool) get_post_meta( $optin->ID, '_omapi_enabled', true ) ) {
|
242 |
-
$status = '<span class="omapi-green">' .
|
243 |
-
$status_tooltip =
|
244 |
} else {
|
245 |
-
$status = '<span class="omapi-red">' .
|
246 |
-
$status_tooltip =
|
247 |
}
|
248 |
?>
|
249 |
<p class="omapi-optin<?php echo $class; ?>">
|
250 |
<a href="<?php echo esc_url_raw( add_query_arg( array( 'optin_monster_api_view' => $this->view, 'optin_monster_api_action' => 'edit', 'optin_monster_api_id' => $optin->ID ), admin_url( 'admin.php?page=optin-monster-api-settings' ) ) ); ?>" title="<?php printf( esc_attr__( 'Manage output settings for %s', 'optin-monster-api' ), $optin->post_title ); ?>"><?php echo $optin->post_title; ?></a>
|
251 |
<span class="omapi-status omapi-has-tooltip" data-toggle="tooltip" data-placement="bottom" title="<?php echo $status_tooltip; ?>"><?php echo $status; ?></span><br>
|
252 |
-
<span class="omapi-slug omapi-has-tooltip" data-toggle="tooltip" data-placement="bottom" title="<?php
|
253 |
<span class="omapi-links"><?php echo $this->get_optin_links( $optin->ID ); ?></span>
|
254 |
</p>
|
255 |
<?php $i++; endforeach; ?>
|
256 |
<?php else : ?>
|
257 |
-
<p><strong><?php
|
258 |
<?php
|
259 |
endif;
|
260 |
|
@@ -274,6 +305,18 @@ class OMAPI_Content {
|
|
274 |
|
275 |
}
|
276 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
277 |
public function support( $panel, $object ) {
|
278 |
|
279 |
echo $object->get_setting_ui( 'support', 'video' );
|
@@ -299,51 +342,49 @@ class OMAPI_Content {
|
|
299 |
if ( 'sidebar' !== $type ) {
|
300 |
if ( OMAPI_Utils::is_inline_type( $type ) ) {
|
301 |
echo $object->get_setting_ui( 'optins', 'automatic' );
|
302 |
-
echo $object->get_setting_ui( 'optins', 'automatic_shortcode');
|
303 |
} else {
|
304 |
echo $object->get_setting_ui( 'optins', 'global' );
|
305 |
}
|
306 |
echo $object->get_setting_ui( 'optins', 'users' );
|
307 |
}
|
308 |
|
309 |
-
echo $object->get_setting_ui( 'optins', 'shortcode' );
|
310 |
-
echo $object->get_setting_ui( 'optins', 'shortcode_output' );
|
311 |
-
|
312 |
// Add support for MailPoet if the plugin is active.
|
313 |
if ( $this->base->is_mailpoet_active() ) {
|
314 |
echo $object->get_setting_ui( 'optins', 'mailpoet' );
|
315 |
echo $object->get_setting_ui( 'optins', 'mailpoet_list' );
|
|
|
|
|
316 |
}
|
317 |
if ( 'sidebar' !== $type ) {
|
318 |
|
319 |
// Add WooCommerce Toggle
|
320 |
if ( $this->base->is_woocommerce_active() ) {
|
321 |
-
echo $object->get_setting_ui( 'toggle', 'woocommerce-start');
|
322 |
|
323 |
-
echo $object->get_setting_ui( 'optins', 'show_on_woocommerce');
|
324 |
// Don't show if output can't use the_content filter
|
325 |
if ( ! OMAPI_Utils::is_inline_type( $type ) ) {
|
326 |
echo $object->get_setting_ui( 'optins', 'is_wc_shop' );
|
327 |
}
|
328 |
-
echo $object->get_setting_ui( 'optins', 'is_wc_product');
|
329 |
-
echo $object->get_setting_ui( 'optins', 'is_wc_cart');
|
330 |
-
echo $object->get_setting_ui( 'optins', 'is_wc_checkout');
|
331 |
-
echo $object->get_setting_ui( 'optins', 'is_wc_account');
|
332 |
-
echo $object->get_setting_ui( 'optins', 'is_wc_endpoint');
|
333 |
-
echo $object->get_setting_ui( 'optins', 'is_wc_endpoint_order_pay');
|
334 |
-
echo $object->get_setting_ui( 'optins', 'is_wc_endpoint_order_received');
|
335 |
-
echo $object->get_setting_ui( 'optins', 'is_wc_endpoint_view_order');
|
336 |
-
echo $object->get_setting_ui( 'optins', 'is_wc_endpoint_edit_account');
|
337 |
-
echo $object->get_setting_ui( 'optins', 'is_wc_endpoint_edit_address');
|
338 |
-
echo $object->get_setting_ui( 'optins', 'is_wc_endpoint_lost_password');
|
339 |
-
echo $object->get_setting_ui( 'optins', 'is_wc_endpoint_customer_logout');
|
340 |
-
echo $object->get_setting_ui( 'optins', 'is_wc_endpoint_add_payment_method');
|
341 |
echo $object->get_setting_ui( 'optins', 'is_wc_product_category' );
|
342 |
echo $object->get_setting_ui( 'optins', 'is_wc_product_tag' );
|
343 |
-
echo $object->get_setting_ui( 'toggle', 'woocommerce-end');
|
344 |
}
|
345 |
|
346 |
-
|
347 |
// Advanced Settings
|
348 |
echo $object->get_setting_ui( 'toggle', 'advanced-start' );
|
349 |
echo $object->get_setting_ui( 'optins', 'never' );
|
@@ -355,12 +396,12 @@ class OMAPI_Content {
|
|
355 |
}
|
356 |
|
357 |
if ( 'sidebar' == $type || 'inline' == $type ) {
|
358 |
-
echo $object->get_setting_ui('note', 'sidebar_widget_notice');
|
359 |
}
|
360 |
|
361 |
} else {
|
362 |
?>
|
363 |
-
<p><strong><?php
|
364 |
<?php
|
365 |
}
|
366 |
|
@@ -379,11 +420,11 @@ class OMAPI_Content {
|
|
379 |
$optin = get_post( $optin_id );
|
380 |
$slug = $optin->post_name;
|
381 |
$status = (bool) get_post_meta( $optin_id, '_omapi_enabled', true );
|
382 |
-
$status_link = $status ?
|
383 |
$status_desc = $status ? esc_attr__( 'Disable this campaign', 'optin-monster-api' ) : esc_attr__( 'Go live with this campaign', 'optin-monster-api' );
|
384 |
$links = array();
|
385 |
-
$links['editd'] = '<a href="' . esc_url_raw( OPTINMONSTER_APP_URL . '/campaigns/' . $slug . '/edit/' ) . '" title="' . esc_attr__( 'Edit this campaign on the OptinMonster App', 'optin-monster-api' ) . '" target="_blank">Edit Design</a>';
|
386 |
-
$links['edito'] = '<a href="' . esc_url_raw( add_query_arg( array( 'optin_monster_api_view' => $this->view, 'optin_monster_api_action' => 'edit', 'optin_monster_api_id' => $optin_id ), admin_url( 'admin.php?page=optin-monster-api-settings' ) ) ) . '" title="' . esc_attr__( 'Edit the output settings for this campaign', 'optin-monster-api' ) . '">Edit Output Settings</a>';
|
387 |
$links['status'] = '<a href="' . wp_nonce_url( esc_url_raw( add_query_arg( array( 'optin_monster_api_view' => $this->view, 'optin_monster_api_action' => 'status', 'optin_monster_api_id' => $optin_id ), admin_url( 'admin.php?page=optin-monster-api-settings' ) ) ), 'omapi-action' ) . '" title="' . $status_desc . '">' . $status_link . '</a>';
|
388 |
|
389 |
$links = apply_filters( 'optin_monster_api_action_links', $links, $optin_id );
|
@@ -393,8 +434,8 @@ class OMAPI_Content {
|
|
393 |
|
394 |
public function migrate() {
|
395 |
?>
|
396 |
-
<p><?php
|
397 |
-
<p><a href="https://optinmonster.com/docs/old-wordpress-customers-migrating-to-the-new-optinmonster-app/"><?php
|
398 |
<?php
|
399 |
}
|
400 |
|
7 |
* @package OMAPI
|
8 |
* @author Thomas Griffin
|
9 |
*/
|
10 |
+
|
11 |
+
// Exit if accessed directly.
|
12 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
+
exit;
|
14 |
+
}
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Content class.
|
18 |
+
*
|
19 |
+
* @since 1.0.0
|
20 |
+
*/
|
21 |
class OMAPI_Content {
|
22 |
|
23 |
/**
|
74 |
add_action( 'optin_monster_api_content_settings', array( $this, 'settings' ), 10, 2 );
|
75 |
add_action( 'optin_monster_api_content_support', array( $this, 'support' ), 10, 2 );
|
76 |
add_action( 'optin_monster_api_content_migrate', array( $this, 'migrate' ), 10, 2 );
|
77 |
+
add_action( 'optin_monster_api_content_woocommerce', array( $this, 'woocommerce' ), 10, 2 );
|
78 |
|
79 |
}
|
80 |
|
117 |
<?php endif; ?>
|
118 |
<h3>
|
119 |
<?php if ( isset( $_GET['optin_monster_api_action'] ) && 'edit' == $_GET['optin_monster_api_action'] ) : ?>
|
120 |
+
<?php printf( esc_html__( 'Output Settings for %s', 'optin-monster-api' ), esc_html( $this->optin->post_title ) ); ?>
|
121 |
+
<span class="omapi-back"><a class="button button-secondary button-small" href="<?php echo esc_url_raw( add_query_arg( array( 'optin_monster_api_view' => 'optins' ), admin_url( 'admin.php?page=optin-monster-api-settings' ) ) ); ?>" title="<?php esc_attr_e( 'Back to campaign overview', 'optin-monster-api' ); ?>"><?php esc_html_e( 'Back to Overview', 'optin-monster-api' ); ?></a></span>
|
122 |
<?php else : ?>
|
123 |
<?php echo esc_html( $panel ); ?>
|
124 |
<?php endif; ?>
|
137 |
* @since 1.0.0
|
138 |
*/
|
139 |
public function form_end() {
|
140 |
+
$hide_submit_button_class = apply_filters( 'omapi_hide_submit_buttom', false ) ? 'omapi-hidden' : '';
|
141 |
// Load different form buttons based on if credentials have been supplied or not.
|
142 |
if ( ! $this->base->get_api_credentials() && 'support' !== $this->view ) :
|
143 |
?>
|
144 |
+
<p class="submit <?php echo $hide_submit_button_class; ?>">
|
145 |
<input class="button button-primary" type="submit" name="omapi_submit" value="<?php esc_attr_e( 'Connect to OptinMonster', 'optin-monster-api' ); ?>" tabindex="749" />
|
146 |
</p>
|
147 |
</form>
|
158 |
?>
|
159 |
<p class="submit">
|
160 |
<input class="button button-primary" type="submit" name="omapi_refresh" value="<?php esc_attr_e( 'Refresh Campaigns', 'optin-monster-api' ); ?>" tabindex="749" />
|
161 |
+
<a class="button button-secondary" href="<?php echo wp_nonce_url( esc_url_raw( add_query_arg( array( 'optin_monster_api_view' => $this->view, 'optin_monster_api_action' => 'cookies' ), admin_url( 'admin.php?page=optin-monster-api-settings' ) ) ), 'omapi-action' ); ?>" title="<?php esc_attr_e( 'Clear Local Cookies', 'optin-monster-api' ); ?>"><?php esc_html_e( 'Clear Local Cookies', 'optin-monster-api' ); ?></a>
|
162 |
</p>
|
163 |
</form>
|
164 |
<?php
|
169 |
<?php
|
170 |
elseif ( 'support' == $this->view ) :
|
171 |
|
172 |
+
// You get nothing.
|
173 |
|
174 |
+
elseif ( 'woocommerce' === $this->view ) :
|
175 |
?>
|
176 |
<p class="submit">
|
177 |
+
<?php if ( OMAPI_WooCommerce::is_minimum_version() ) : ?>
|
178 |
+
<?php if ( OMAPI_WooCommerce::is_connected() ) : ?>
|
179 |
+
<input class="button button-primary" type="submit" name="omapi_woocommerce_disconnect" value="<?php esc_attr_e( 'Disconnect WooCommerce', 'optin-monster-api' ); ?>" tabindex="749" />
|
180 |
+
<?php else : ?>
|
181 |
+
<input class="button button-primary" type="submit" name="omapi_woocommerce_connect" value="<?php esc_attr_e( 'Connect WooCommerce', 'optin-monster-api' ); ?>" tabindex="749" />
|
182 |
+
<input class="button button-secondary" type="submit" name="omapi[woocommerce][autogenerate]" value="<?php esc_attr_e( 'Auto-Generate Keys', 'optin-monster-api' ); ?>" tabindex="749" />
|
183 |
+
<?php endif; ?>
|
184 |
+
<?php endif; ?>
|
185 |
+
</p>
|
186 |
+
</form>
|
187 |
+
<?php
|
188 |
+
else :
|
189 |
+
?>
|
190 |
+
<p class="submit <?php echo $hide_submit_button_class; ?>">
|
191 |
<input class="button button-primary" type="submit" name="submit" value="<?php esc_attr_e( 'Save Settings', 'optin-monster-api' ); ?>" tabindex="749" />
|
192 |
</p>
|
193 |
</form>
|
194 |
<?php
|
195 |
endif;
|
|
|
196 |
}
|
197 |
|
198 |
/**
|
206 |
public function api( $panel, $object ) {
|
207 |
|
208 |
$link = $this->base->menu->get_action_link();
|
209 |
+
$text = $this->base->menu->has_trial_link()
|
210 |
+
? esc_html__( 'Click here to start your free 30-day trial!', 'optin-monster-api' )
|
211 |
+
: esc_html__( 'Click here to learn more about OptinMonster!', 'optin-monster-api' );
|
212 |
|
213 |
$credentials = $this->base->get_api_credentials();
|
214 |
|
215 |
if ( ! $credentials ) : ?>
|
216 |
+
<p class="omapi-red"><strong><?php esc_html_e( 'You must authenticate your OptinMonster account before you can use OptinMonster on this site.', 'optin-monster-api' ); ?></strong></p>
|
217 |
<p><em><?php printf( __( 'Need an OptinMonster account? <a href="%s" title="Click here to learn more about OptinMonster" target="_blank">%s</a>', 'optin-monster-api' ), $link, $text ); ?></em></p>
|
218 |
<?php endif; ?>
|
219 |
|
222 |
<?php // If we have credentials only show the old stuff if it is saved ?>
|
223 |
<?php if ( $credentials ) : ?>
|
224 |
<?php if ( isset( $credentials['api'] ) && '' != $credentials['api'] || isset( $credentials['key'] ) && '' != $credentials['key'] ) : ?>
|
225 |
+
<p><?php printf( __( 'The Legacy API Username and Key below will be deprecated soon. Please <a href="%s" target="_blank">generate a new API key</a> and paste it above to authenticate using our new and improved REST API.', 'optin-monster-api' ), esc_url( OPTINMONSTER_APP_URL . '/account/api/' ) ); ?></p>
|
226 |
<?php echo $object->get_setting_ui( 'api', 'user' ); ?>
|
227 |
<?php echo $object->get_setting_ui( 'api', 'key' ); ?>
|
228 |
<?php endif; ?>
|
229 |
<?php endif; ?>
|
230 |
|
231 |
+
<?php if ( ! empty( $_GET['omwpdebug'] ) ) : ?>
|
232 |
+
<?php echo $object->get_setting_ui( 'api', 'omwpdebug' ); ?>
|
233 |
+
<?php endif; ?>
|
234 |
+
|
235 |
<?php
|
236 |
|
237 |
}
|
266 |
|
267 |
$optins = $this->base->get_optins();
|
268 |
$i = 0;
|
269 |
+
if ( ! empty( $optins ) ) :
|
270 |
?>
|
271 |
<?php foreach ( $optins as $optin ) : $class = 0 == $i ? ' omapi-optin-first' : '';
|
272 |
if ( (bool) get_post_meta( $optin->ID, '_omapi_enabled', true ) ) {
|
273 |
+
$status = '<span class="omapi-green">' . esc_html__( 'Live', 'optin-monster-api' ) . '</span>';
|
274 |
+
$status_tooltip = esc_html__( 'This campaign is embedded on your site based on your output settings and will load subject to the display rules configured in the campaign builder.', 'optin-monster-api' );
|
275 |
} else {
|
276 |
+
$status = '<span class="omapi-red">' . esc_html__( 'Disabled', 'optin-monster-api' ) . '</span>';
|
277 |
+
$status_tooltip = esc_html__( 'This campaign is not embedded by the plugin anywhere on this site.', 'optin-monster-api' );
|
278 |
}
|
279 |
?>
|
280 |
<p class="omapi-optin<?php echo $class; ?>">
|
281 |
<a href="<?php echo esc_url_raw( add_query_arg( array( 'optin_monster_api_view' => $this->view, 'optin_monster_api_action' => 'edit', 'optin_monster_api_id' => $optin->ID ), admin_url( 'admin.php?page=optin-monster-api-settings' ) ) ); ?>" title="<?php printf( esc_attr__( 'Manage output settings for %s', 'optin-monster-api' ), $optin->post_title ); ?>"><?php echo $optin->post_title; ?></a>
|
282 |
<span class="omapi-status omapi-has-tooltip" data-toggle="tooltip" data-placement="bottom" title="<?php echo $status_tooltip; ?>"><?php echo $status; ?></span><br>
|
283 |
+
<span class="omapi-slug omapi-has-tooltip" data-toggle="tooltip" data-placement="bottom" title="<?php esc_html_e( 'The unique slug of this campaign. Used for shortcodes and embed scripts.', 'optin-monster-api' ); ?>"><?php echo $optin->post_name; ?></span>
|
284 |
<span class="omapi-links"><?php echo $this->get_optin_links( $optin->ID ); ?></span>
|
285 |
</p>
|
286 |
<?php $i++; endforeach; ?>
|
287 |
<?php else : ?>
|
288 |
+
<p><strong><?php esc_html_e( 'No campaigns could be retrieved for this site.', 'optin-monster-api' ); ?></strong></p>
|
289 |
<?php
|
290 |
endif;
|
291 |
|
305 |
|
306 |
}
|
307 |
|
308 |
+
/**
|
309 |
+
* Loads the content output for the WooCommerce panel.
|
310 |
+
*
|
311 |
+
* @since 1.7.0
|
312 |
+
*
|
313 |
+
* @param string $panel The panel name we are targeting.
|
314 |
+
* @param object $object The menu object (useful for settings helpers).
|
315 |
+
*/
|
316 |
+
public function woocommerce( $panel, $object ) {
|
317 |
+
echo $object->get_setting_ui( 'woocommerce', 'settings' ); // WPCS: XSS ok.
|
318 |
+
}
|
319 |
+
|
320 |
public function support( $panel, $object ) {
|
321 |
|
322 |
echo $object->get_setting_ui( 'support', 'video' );
|
342 |
if ( 'sidebar' !== $type ) {
|
343 |
if ( OMAPI_Utils::is_inline_type( $type ) ) {
|
344 |
echo $object->get_setting_ui( 'optins', 'automatic' );
|
345 |
+
echo $object->get_setting_ui( 'optins', 'automatic_shortcode' );
|
346 |
} else {
|
347 |
echo $object->get_setting_ui( 'optins', 'global' );
|
348 |
}
|
349 |
echo $object->get_setting_ui( 'optins', 'users' );
|
350 |
}
|
351 |
|
|
|
|
|
|
|
352 |
// Add support for MailPoet if the plugin is active.
|
353 |
if ( $this->base->is_mailpoet_active() ) {
|
354 |
echo $object->get_setting_ui( 'optins', 'mailpoet' );
|
355 |
echo $object->get_setting_ui( 'optins', 'mailpoet_list' );
|
356 |
+
echo $object->get_setting_ui( 'optins', 'mailpoet_use_phone' );
|
357 |
+
echo $object->get_setting_ui( 'optins', 'mailpoet_phone_field' );
|
358 |
}
|
359 |
if ( 'sidebar' !== $type ) {
|
360 |
|
361 |
// Add WooCommerce Toggle
|
362 |
if ( $this->base->is_woocommerce_active() ) {
|
363 |
+
echo $object->get_setting_ui( 'toggle', 'woocommerce-start' );
|
364 |
|
365 |
+
echo $object->get_setting_ui( 'optins', 'show_on_woocommerce' );
|
366 |
// Don't show if output can't use the_content filter
|
367 |
if ( ! OMAPI_Utils::is_inline_type( $type ) ) {
|
368 |
echo $object->get_setting_ui( 'optins', 'is_wc_shop' );
|
369 |
}
|
370 |
+
echo $object->get_setting_ui( 'optins', 'is_wc_product' );
|
371 |
+
echo $object->get_setting_ui( 'optins', 'is_wc_cart' );
|
372 |
+
echo $object->get_setting_ui( 'optins', 'is_wc_checkout' );
|
373 |
+
echo $object->get_setting_ui( 'optins', 'is_wc_account' );
|
374 |
+
echo $object->get_setting_ui( 'optins', 'is_wc_endpoint' );
|
375 |
+
echo $object->get_setting_ui( 'optins', 'is_wc_endpoint_order_pay' );
|
376 |
+
echo $object->get_setting_ui( 'optins', 'is_wc_endpoint_order_received' );
|
377 |
+
echo $object->get_setting_ui( 'optins', 'is_wc_endpoint_view_order' );
|
378 |
+
echo $object->get_setting_ui( 'optins', 'is_wc_endpoint_edit_account' );
|
379 |
+
echo $object->get_setting_ui( 'optins', 'is_wc_endpoint_edit_address' );
|
380 |
+
echo $object->get_setting_ui( 'optins', 'is_wc_endpoint_lost_password' );
|
381 |
+
echo $object->get_setting_ui( 'optins', 'is_wc_endpoint_customer_logout' );
|
382 |
+
echo $object->get_setting_ui( 'optins', 'is_wc_endpoint_add_payment_method' );
|
383 |
echo $object->get_setting_ui( 'optins', 'is_wc_product_category' );
|
384 |
echo $object->get_setting_ui( 'optins', 'is_wc_product_tag' );
|
385 |
+
echo $object->get_setting_ui( 'toggle', 'woocommerce-end' );
|
386 |
}
|
387 |
|
|
|
388 |
// Advanced Settings
|
389 |
echo $object->get_setting_ui( 'toggle', 'advanced-start' );
|
390 |
echo $object->get_setting_ui( 'optins', 'never' );
|
396 |
}
|
397 |
|
398 |
if ( 'sidebar' == $type || 'inline' == $type ) {
|
399 |
+
echo $object->get_setting_ui( 'note', 'sidebar_widget_notice' );
|
400 |
}
|
401 |
|
402 |
} else {
|
403 |
?>
|
404 |
+
<p><strong><?php esc_html_e( 'No campaign could be retrieved for the ID specified.', 'optin-monster-api' ); ?></strong></p>
|
405 |
<?php
|
406 |
}
|
407 |
|
420 |
$optin = get_post( $optin_id );
|
421 |
$slug = $optin->post_name;
|
422 |
$status = (bool) get_post_meta( $optin_id, '_omapi_enabled', true );
|
423 |
+
$status_link = $status ? esc_html__( 'Disable', 'optin-monster-api' ) : esc_html__( 'Go Live', 'optin-monster-api' );
|
424 |
$status_desc = $status ? esc_attr__( 'Disable this campaign', 'optin-monster-api' ) : esc_attr__( 'Go live with this campaign', 'optin-monster-api' );
|
425 |
$links = array();
|
426 |
+
$links['editd'] = '<a href="' . esc_url_raw( OPTINMONSTER_APP_URL . '/campaigns/' . $slug . '/edit/' ) . '" title="' . esc_attr__( 'Edit this campaign on the OptinMonster App', 'optin-monster-api' ) . '" target="_blank">' . esc_html__( 'Edit Design', 'optin-monster-api' ) . '</a>';
|
427 |
+
$links['edito'] = '<a href="' . esc_url_raw( add_query_arg( array( 'optin_monster_api_view' => $this->view, 'optin_monster_api_action' => 'edit', 'optin_monster_api_id' => $optin_id ), admin_url( 'admin.php?page=optin-monster-api-settings' ) ) ) . '" title="' . esc_attr__( 'Edit the output settings for this campaign', 'optin-monster-api' ) . '">' . esc_html__( 'Edit Output Settings', 'optin-monster-api' ) . '</a>';
|
428 |
$links['status'] = '<a href="' . wp_nonce_url( esc_url_raw( add_query_arg( array( 'optin_monster_api_view' => $this->view, 'optin_monster_api_action' => 'status', 'optin_monster_api_id' => $optin_id ), admin_url( 'admin.php?page=optin-monster-api-settings' ) ) ), 'omapi-action' ) . '" title="' . $status_desc . '">' . $status_link . '</a>';
|
429 |
|
430 |
$links = apply_filters( 'optin_monster_api_action_links', $links, $optin_id );
|
434 |
|
435 |
public function migrate() {
|
436 |
?>
|
437 |
+
<p><?php esc_html_e( 'Your campaigns created within WordPress using the original OptinMonster plugin can be recreated manually in your OptinMonster account.', 'optin-monster-api' ); ?></p>
|
438 |
+
<p><a href="https://optinmonster.com/docs/old-wordpress-customers-migrating-to-the-new-optinmonster-app/"><?php esc_html_e( 'Read the full post about the changes.', 'optin-monster-api' ); ?></a></p>
|
439 |
<?php
|
440 |
}
|
441 |
|
OMAPI/Menu.php
CHANGED
@@ -7,6 +7,17 @@
|
|
7 |
* @package OMAPI
|
8 |
* @author Thomas Griffin
|
9 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
class OMAPI_Menu {
|
11 |
|
12 |
/**
|
@@ -54,6 +65,22 @@ class OMAPI_Menu {
|
|
54 |
*/
|
55 |
public $tabindex = 429;
|
56 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
/**
|
58 |
* Primary class constructor.
|
59 |
*
|
@@ -72,8 +99,17 @@ class OMAPI_Menu {
|
|
72 |
// Load helper body classes
|
73 |
add_filter( 'admin_body_class', array( $this, 'admin_body_classes' ) );
|
74 |
|
|
|
|
|
75 |
}
|
76 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
}
|
78 |
|
79 |
/**
|
@@ -96,18 +132,31 @@ class OMAPI_Menu {
|
|
96 |
*/
|
97 |
public function menu() {
|
98 |
|
|
|
|
|
|
|
99 |
$this->hook = add_menu_page(
|
100 |
-
|
101 |
-
|
102 |
-
apply_filters( 'optin_monster_api_menu_cap', 'manage_options' ),
|
103 |
'optin-monster-api-settings',
|
104 |
array( $this, 'page' ),
|
105 |
'none',
|
106 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
);
|
108 |
|
109 |
// Load global icon font styles.
|
110 |
-
add_action( 'admin_head', array( $this, '
|
111 |
|
112 |
// Load settings page assets.
|
113 |
if ( $this->hook ) {
|
@@ -121,14 +170,74 @@ class OMAPI_Menu {
|
|
121 |
*
|
122 |
* @since 1.0.0
|
123 |
*/
|
124 |
-
public function
|
|
|
125 |
|
126 |
-
|
127 |
-
|
128 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
129 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
}
|
131 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
132 |
public function admin_body_classes( $classes ) {
|
133 |
|
134 |
$classes .= ' omapi-screen ';
|
@@ -141,6 +250,36 @@ class OMAPI_Menu {
|
|
141 |
|
142 |
}
|
143 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
144 |
/**
|
145 |
* Loads assets for the settings page.
|
146 |
*
|
@@ -151,8 +290,8 @@ class OMAPI_Menu {
|
|
151 |
add_action( 'admin_enqueue_scripts', array( $this, 'styles' ) );
|
152 |
add_action( 'admin_enqueue_scripts', array( $this, 'scripts' ) );
|
153 |
add_filter( 'admin_footer_text', array( $this, 'footer' ) );
|
154 |
-
add_action( 'in_admin_header', array( $this, 'output_plugin_screen_banner') );
|
155 |
-
add_action( 'admin_enqueue_scripts', array( $this, 'fix_plugin_js_conflicts'), 100 );
|
156 |
|
157 |
}
|
158 |
|
@@ -179,10 +318,39 @@ class OMAPI_Menu {
|
|
179 |
* @since 1.0.0
|
180 |
*/
|
181 |
public function scripts() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
182 |
|
183 |
wp_register_script( $this->base->plugin_slug . '-select2', plugins_url( '/assets/js/select2.min.js', OMAPI_FILE ), array( 'jquery' ), $this->base->version, true );
|
184 |
wp_enqueue_script( $this->base->plugin_slug . '-select2' );
|
185 |
wp_register_script( $this->base->plugin_slug . '-settings', plugins_url( '/assets/js/settings.js', OMAPI_FILE ), array( 'jquery', 'jquery-ui-core', 'jquery-ui-datepicker', $this->base->plugin_slug . '-select2' ), $this->base->version, true );
|
|
|
|
|
|
|
|
|
|
|
186 |
wp_enqueue_script( $this->base->plugin_slug . '-settings' );
|
187 |
wp_register_script( $this->base->plugin_slug . '-clipboard', plugins_url( '/assets/js/clipboard.min.js', OMAPI_FILE ), array( $this->base->plugin_slug . '-settings' ), $this->base->version, true );
|
188 |
wp_enqueue_script( $this->base->plugin_slug . '-clipboard' );
|
@@ -194,9 +362,9 @@ class OMAPI_Menu {
|
|
194 |
$this->base->plugin_slug . '-settings',
|
195 |
'omapi',
|
196 |
array(
|
197 |
-
|
198 |
-
|
199 |
-
'confirm' =>
|
200 |
'date_format' => 'F j, Y',
|
201 |
'supportData' => $this->get_support_data(),
|
202 |
)
|
@@ -237,7 +405,7 @@ class OMAPI_Menu {
|
|
237 |
$server_data = '';
|
238 |
$optin_data = '';
|
239 |
|
240 |
-
if ( isset($_GET['optin_monster_api_view']) && $_GET['optin_monster_api_view']
|
241 |
$optin_data = $this->get_optin_data();
|
242 |
$server_data = $this->get_server_data();
|
243 |
}
|
@@ -280,7 +448,7 @@ class OMAPI_Menu {
|
|
280 |
'Shortcodes Synced and Recognized' => get_post_meta( $optin->ID, '_omapi_shortcode', true ) ? htmlspecialchars_decode( get_post_meta( $optin->ID, '_omapi_shortcode_output', true ) ) : 'None recognized',
|
281 |
);
|
282 |
if ( OMAPI_Utils::is_inline_type( $design_type ) ) {
|
283 |
-
$optin_data[$slug]['Automatic Output Status'] = get_post_meta( $optin->ID, '_omapi_automatic', true ) ? 'Enabled' : 'Disabled';
|
284 |
}
|
285 |
|
286 |
}
|
@@ -311,7 +479,6 @@ class OMAPI_Menu {
|
|
311 |
$used_plugins .= $plugin['Name'] . ': ' . $plugin['Version'] . "\n";
|
312 |
}
|
313 |
|
314 |
-
|
315 |
$array = array(
|
316 |
'Server Info' => esc_html( $_SERVER['SERVER_SOFTWARE'] ),
|
317 |
'PHP Version' => function_exists( 'phpversion' ) ? esc_html( phpversion() ) : 'Unable to check.',
|
@@ -325,7 +492,6 @@ class OMAPI_Menu {
|
|
325 |
'API Ping Response' => wp_remote_retrieve_response_code( $api_ping ),
|
326 |
'Active Theme' => $theme,
|
327 |
'Active Plugins' => $used_plugins,
|
328 |
-
|
329 |
);
|
330 |
|
331 |
return $array;
|
@@ -342,7 +508,7 @@ class OMAPI_Menu {
|
|
342 |
public function footer( $text ) {
|
343 |
|
344 |
$url = 'https://wordpress.org/support/plugin/optinmonster/reviews?filter=5#new-post';
|
345 |
-
$text = sprintf( __( 'Please rate <strong>OptinMonster</strong> <a href="%s" target="_blank" rel="noopener">★★★★★</a> on <a href="%s" target="_blank">WordPress.org</a> to help us spread the word. Thank you from the OptinMonster team!', 'optin-monster-api' ), $url, $url );
|
346 |
return $text;
|
347 |
|
348 |
}
|
@@ -399,28 +565,32 @@ class OMAPI_Menu {
|
|
399 |
public function get_panels() {
|
400 |
|
401 |
// Only load the API panel if no API credentials have been set.
|
402 |
-
$panels
|
403 |
-
$creds
|
404 |
-
$can_migrate
|
405 |
$is_legacy_active = $this->base->is_legacy_active();
|
|
|
|
|
406 |
|
407 |
// Set panels requiring credentials.
|
408 |
if ( $creds ) {
|
409 |
-
$panels['optins'] =
|
410 |
}
|
411 |
|
412 |
// Set default panels.
|
413 |
-
$panels['api'] =
|
414 |
|
415 |
-
// Set the
|
416 |
-
|
|
|
|
|
417 |
|
418 |
// Set the Support panel
|
419 |
-
$panels['support'] =
|
420 |
|
421 |
// Set the migration panel.
|
422 |
if ( $creds && $can_migrate && $is_legacy_active ) {
|
423 |
-
$panels['migrate'] =
|
424 |
}
|
425 |
|
426 |
return apply_filters( 'optin_monster_api_panels', $panels );
|
@@ -449,15 +619,23 @@ class OMAPI_Menu {
|
|
449 |
case 'api' :
|
450 |
switch ( $setting ) {
|
451 |
case 'user' :
|
452 |
-
$ret = $this->get_password_field( $setting, $value, $id,
|
453 |
break 2;
|
454 |
|
455 |
case 'key' :
|
456 |
-
$ret = $this->get_password_field( $setting, $value, $id,
|
457 |
break 2;
|
458 |
|
459 |
case 'apikey' :
|
460 |
-
$ret = $this->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
461 |
break 2;
|
462 |
}
|
463 |
break;
|
@@ -465,7 +643,19 @@ class OMAPI_Menu {
|
|
465 |
case 'settings' :
|
466 |
switch ( $setting ) {
|
467 |
case 'cookies' :
|
468 |
-
$ret = $this->get_checkbox_field( $setting, $value, $id,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
469 |
break 2;
|
470 |
}
|
471 |
break;
|
@@ -477,40 +667,44 @@ class OMAPI_Menu {
|
|
477 |
break 2;
|
478 |
|
479 |
case 'links' :
|
480 |
-
$ret = $this->get_support_links( $setting, 'Helpful Links' );
|
481 |
break 2;
|
482 |
|
483 |
case 'server-report';
|
484 |
-
$ret = $this->get_plugin_report($setting, 'Server / Plugin Report');
|
485 |
break 2;
|
|
|
|
|
486 |
}
|
487 |
break;
|
488 |
|
489 |
case 'toggle' :
|
490 |
switch ( $setting ) {
|
491 |
case 'advanced-start' :
|
492 |
-
$ret = $this->get_toggle_start( $setting,
|
493 |
break 2;
|
494 |
case 'advanced-end' :
|
495 |
$ret = $this->get_toggle_end();
|
496 |
break 2;
|
497 |
case 'woocommerce-start' :
|
498 |
-
$ret = $this->get_toggle_start( $setting,
|
499 |
break 2;
|
500 |
case 'woocommerce-end' :
|
501 |
$ret = $this->get_toggle_end();
|
502 |
break 2;
|
|
|
|
|
503 |
}
|
504 |
break;
|
505 |
|
506 |
case 'optins' :
|
507 |
switch ( $setting ) {
|
508 |
case 'enabled' :
|
509 |
-
|
510 |
-
|
511 |
|
512 |
case 'automatic' :
|
513 |
-
$ret = $this->get_checkbox_field( $setting, $value, $id,
|
514 |
break 2;
|
515 |
case 'automatic_shortcode' :
|
516 |
$full_shortcode ='[optin-monster-shortcode id="'. $optin->post_name .'"]';
|
@@ -518,8 +712,8 @@ class OMAPI_Menu {
|
|
518 |
$setting,
|
519 |
$full_shortcode,
|
520 |
$id,
|
521 |
-
|
522 |
-
sprintf( __( 'Use the shortcode to manually add this campaign to inline to a post or page. <a href="%s" title="Click here to learn more about how this work" target="_blank">Click here to learn more about how this works.</a>', 'optin-monster-api' ), 'https://optinmonster.com/docs/how-to-manually-add-an-after-post-or-inline-optin/' ),
|
523 |
false,
|
524 |
array(),
|
525 |
true
|
@@ -527,17 +721,17 @@ class OMAPI_Menu {
|
|
527 |
break 2;
|
528 |
|
529 |
case 'users' :
|
530 |
-
$ret = $this->get_dropdown_field( $setting, $value, $id, $this->get_user_output(),
|
531 |
break 2;
|
532 |
|
533 |
case 'never' :
|
534 |
$val = is_array( $value ) ? implode( ',', $value ) : $value;
|
535 |
-
$ret = $this->get_custom_field( $setting, '<input type="hidden" value="' . $val . '" id="omapi-field-' . $setting . '" class="omapi-select
|
536 |
break 2;
|
537 |
|
538 |
case 'only' :
|
539 |
$val = is_array( $value ) ? implode( ',', $value ) : $value;
|
540 |
-
$ret = $this->get_custom_field( $setting, '<input type="hidden" value="' . $val . '" id="omapi-field-' . $setting . '" class="omapi-select
|
541 |
break 2;
|
542 |
|
543 |
case 'categories' :
|
@@ -546,7 +740,7 @@ class OMAPI_Menu {
|
|
546 |
ob_start();
|
547 |
wp_category_checklist( 0, 0, (array) $value, false, null, true );
|
548 |
$cats = ob_get_clean();
|
549 |
-
$ret = $this->get_custom_field( 'categories', $cats,
|
550 |
}
|
551 |
break;
|
552 |
|
@@ -559,7 +753,7 @@ class OMAPI_Menu {
|
|
559 |
if ( $tag_terms ) {
|
560 |
$display = (array) $value;
|
561 |
$display = isset( $display['post_tag'] ) ? implode( ',', $display['post_tag'] ) : '';
|
562 |
-
$html = $this->get_custom_field( $setting, '<input type="hidden" value="' . $display . '" id="omapi-field-' . $setting . '" class="omapi-select
|
563 |
}
|
564 |
}
|
565 |
|
@@ -590,7 +784,7 @@ class OMAPI_Menu {
|
|
590 |
wp_terms_checklist( 0, $args );
|
591 |
$output = ob_get_clean();
|
592 |
if ( ! empty( $output ) ) {
|
593 |
-
$data[ $taxonomy ] = $this->get_custom_field( 'taxonomies', $output,
|
594 |
}
|
595 |
}
|
596 |
}
|
@@ -608,75 +802,85 @@ class OMAPI_Menu {
|
|
608 |
break;
|
609 |
|
610 |
case 'show' :
|
611 |
-
$ret = $this->get_custom_field( 'show', $this->get_show_fields( $value ),
|
612 |
break;
|
613 |
|
614 |
case 'mailpoet' :
|
615 |
-
$ret = $this->get_checkbox_field( $setting, $value, $id,
|
616 |
break 2;
|
617 |
|
618 |
case 'mailpoet_list' :
|
619 |
-
$ret = $this->get_dropdown_field( $setting, $value, $id, $this->get_mailpoet_lists(),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
620 |
break 2;
|
621 |
|
622 |
// Start WooCommerce settings.
|
623 |
case 'show_on_woocommerce' :
|
624 |
-
$ret = $this->get_checkbox_field( $setting, $value, $id,
|
625 |
break 2;
|
626 |
|
627 |
case 'is_wc_shop' :
|
628 |
-
$ret = $this->get_checkbox_field( $setting, $value, $id,
|
629 |
break 2;
|
630 |
|
631 |
case 'is_wc_product' :
|
632 |
-
$ret = $this->get_checkbox_field( $setting, $value, $id,
|
633 |
break 2;
|
634 |
|
635 |
case 'is_wc_cart' :
|
636 |
-
$ret = $this->get_checkbox_field( $setting, $value, $id,
|
637 |
break 2;
|
638 |
|
639 |
case 'is_wc_checkout' :
|
640 |
-
$ret = $this->get_checkbox_field( $setting, $value, $id,
|
641 |
break 2;
|
642 |
|
643 |
case 'is_wc_account' :
|
644 |
-
$ret = $this->get_checkbox_field( $setting, $value, $id,
|
645 |
break 2;
|
646 |
|
647 |
case 'is_wc_endpoint' :
|
648 |
-
$ret = $this->get_checkbox_field( $setting, $value, $id,
|
649 |
break 2;
|
650 |
case 'is_wc_endpoint_order_pay' :
|
651 |
-
$ret = $this->get_checkbox_field( $setting, $value, $id,
|
652 |
break 2;
|
653 |
|
654 |
case 'is_wc_endpoint_order_received' :
|
655 |
-
$ret = $this->get_checkbox_field( $setting, $value, $id,
|
656 |
break 2;
|
657 |
|
658 |
case 'is_wc_endpoint_view_order' :
|
659 |
-
$ret = $this->get_checkbox_field( $setting, $value, $id,
|
660 |
break 2;
|
661 |
|
662 |
case 'is_wc_endpoint_edit_account' :
|
663 |
-
$ret = $this->get_checkbox_field( $setting, $value, $id,
|
664 |
break 2;
|
665 |
|
666 |
case 'is_wc_endpoint_edit_address' :
|
667 |
-
$ret = $this->get_checkbox_field( $setting, $value, $id,
|
668 |
break 2;
|
669 |
|
670 |
case 'is_wc_endpoint_lost_password' :
|
671 |
-
$ret = $this->get_checkbox_field( $setting, $value, $id,
|
672 |
break 2;
|
673 |
|
674 |
case 'is_wc_endpoint_customer_logout' :
|
675 |
-
$ret = $this->get_checkbox_field( $setting, $value, $id,
|
676 |
break 2;
|
677 |
|
678 |
case 'is_wc_endpoint_add_payment_method' :
|
679 |
-
$ret = $this->get_checkbox_field( $setting, $value, $id,
|
680 |
break 2;
|
681 |
|
682 |
case 'is_wc_product_category' :
|
@@ -696,7 +900,7 @@ class OMAPI_Menu {
|
|
696 |
wp_terms_checklist( 0, $args );
|
697 |
$output = ob_get_clean();
|
698 |
if ( ! empty( $output ) ) {
|
699 |
-
$ret = $this->get_custom_field( $setting, $output,
|
700 |
}
|
701 |
}
|
702 |
break 2;
|
@@ -718,20 +922,26 @@ class OMAPI_Menu {
|
|
718 |
wp_terms_checklist( 0, $args );
|
719 |
$output = ob_get_clean();
|
720 |
if ( ! empty( $output ) ) {
|
721 |
-
$ret = $this->get_custom_field( $setting, $output,
|
722 |
}
|
723 |
}
|
724 |
break 2;
|
725 |
|
|
|
|
|
726 |
}
|
727 |
break;
|
728 |
case 'note' :
|
729 |
switch ( $setting ) {
|
730 |
case 'sidebar_widget_notice' :
|
731 |
-
$ret = $this->get_optin_type_note( $setting,
|
|
|
|
|
732 |
break 2;
|
733 |
}
|
734 |
break;
|
|
|
|
|
735 |
}
|
736 |
|
737 |
// Return the setting output.
|
@@ -751,30 +961,30 @@ class OMAPI_Menu {
|
|
751 |
return apply_filters( 'optin_monster_api_user_output',
|
752 |
array(
|
753 |
array(
|
754 |
-
'name' =>
|
755 |
'value' => 'all'
|
756 |
),
|
757 |
array(
|
758 |
-
'name' =>
|
759 |
'value' => 'out'
|
760 |
),
|
761 |
array(
|
762 |
-
'name' =>
|
763 |
'value' => 'in'
|
764 |
)
|
765 |
)
|
766 |
);
|
767 |
|
768 |
-
|
769 |
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
|
776 |
-
|
777 |
-
|
778 |
|
779 |
// Prepare variables.
|
780 |
$mailpoet = null;
|
@@ -784,26 +994,26 @@ class OMAPI_Menu {
|
|
784 |
|
785 |
// Get lists. Check for MailPoet 3 first. Default to legacy.
|
786 |
if ( class_exists( '\\MailPoet\\Config\\Initializer' ) ) {
|
787 |
-
$lists = \MailPoet\API\API::MP('v1')->getLists();
|
788 |
} else {
|
789 |
$mailpoet = WYSIJA::get( 'list', 'model' );
|
790 |
$lists = $mailpoet->get( array( 'name', 'list_id' ), array( 'is_enabled' => 1 ) );
|
791 |
$listIdKey = 'list_id';
|
792 |
}
|
793 |
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
|
808 |
/**
|
809 |
* Filters the MailPoet lists.
|
@@ -815,53 +1025,101 @@ class OMAPI_Menu {
|
|
815 |
*/
|
816 |
return apply_filters( 'optin_monster_api_mailpoet_lists', $ret, $lists, $mailpoet );
|
817 |
|
818 |
-
|
819 |
-
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
|
861 |
-
|
862 |
-
|
863 |
-
|
864 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
865 |
public function get_text_field( $setting, $value, $id, $label, $desc = false, $place = false, $classes = array(), $copy = false ) {
|
866 |
|
867 |
// Increment the global tabindex counter.
|
@@ -878,7 +1136,7 @@ class OMAPI_Menu {
|
|
878 |
$field .= '<span class="omapi-copy-button button" data-clipboard-target="#omapi-field-' . $setting . '">Copy to clipboard</span>';
|
879 |
}
|
880 |
if ( $desc ) {
|
881 |
-
$field .= '<br /><span class="omapi-field-desc">' . $desc . '</span>';
|
882 |
}
|
883 |
$field .= '</p>';
|
884 |
$field .= '</div>';
|
@@ -888,7 +1146,6 @@ class OMAPI_Menu {
|
|
888 |
|
889 |
}
|
890 |
|
891 |
-
|
892 |
/**
|
893 |
* Retrieves the UI output for a password input field setting.
|
894 |
*
|
@@ -901,19 +1158,23 @@ class OMAPI_Menu {
|
|
901 |
* @param string $desc The description for the input field.
|
902 |
* @param string $place Placeholder text for the field.
|
903 |
* @param array $classes Array of classes to add to the field.
|
|
|
904 |
* @return string $html HTML representation of the data.
|
905 |
*/
|
906 |
-
public function get_password_field( $setting, $value, $id, $label, $desc = false, $place = false, $classes = array() ) {
|
907 |
|
908 |
// Increment the global tabindex counter.
|
909 |
$this->tabindex++;
|
910 |
|
|
|
|
|
|
|
911 |
// Build the HTML.
|
912 |
-
$field = '<div class="omapi-field-box omapi-password-field omapi-field-box-' . $setting . ' omapi-clear">';
|
913 |
$field .= '<p class="omapi-field-wrap"><label for="omapi-field-' . $setting . '">' . $label . '</label><br />';
|
914 |
-
$field .= '<input type="password" id="omapi-field-' . $setting . '" class="' . implode( ' ', (array) $classes ) . '" name="omapi[' . $id . '][' . $setting . ']" tabindex="' . $this->tabindex . '" value="' . $value . '"' . ( $place ? ' placeholder="' . $place . '"' : '' ) . ' />';
|
915 |
if ( $desc ) {
|
916 |
-
$field .= '<br /><span class="omapi-field-desc">' . $desc . '</span>';
|
917 |
}
|
918 |
$field .= '</p>';
|
919 |
$field .= '</div>';
|
@@ -923,6 +1184,43 @@ class OMAPI_Menu {
|
|
923 |
|
924 |
}
|
925 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
926 |
/**
|
927 |
* Retrieves the UI output for a hidden input field setting.
|
928 |
*
|
@@ -941,7 +1239,7 @@ class OMAPI_Menu {
|
|
941 |
|
942 |
// Build the HTML.
|
943 |
$field = '<div class="omapi-field-box omapi-hidden-field omapi-field-box-' . $setting . ' omapi-clear omapi-hidden">';
|
944 |
-
$field .= '<input type="hidden" id="omapi-field-' . $setting . '" class="' . implode( ' ', (array) $classes ) . '" name="omapi[' . $id . '][' . $setting . ']" tabindex="' . $this->tabindex . '" value="' . $value . '" />';
|
945 |
$field .= '</div>';
|
946 |
|
947 |
// Return the HTML.
|
@@ -972,7 +1270,7 @@ class OMAPI_Menu {
|
|
972 |
$field .= '<p class="omapi-field-wrap"><label for="omapi-field-' . $setting . '">' . $label . '</label><br />';
|
973 |
$field .= '<textarea id="omapi-field-' . $setting . '" class="' . implode( ' ', (array) $classes ) . '" name="omapi[' . $id . '][' . $setting . ']" rows="5" tabindex="' . $this->tabindex . '"' . ( $place ? ' placeholder="' . $place . '"' : '' ) . '>' . $value . '</textarea>';
|
974 |
if ( $desc ) {
|
975 |
-
$field .= '<br /><span class="omapi-field-desc">' . $desc . '</span>';
|
976 |
}
|
977 |
$field .= '</p>';
|
978 |
$field .= '</div>';
|
@@ -1003,9 +1301,9 @@ class OMAPI_Menu {
|
|
1003 |
// Build the HTML.
|
1004 |
$field = '<div class="omapi-field-box omapi-checkbox-field omapi-field-box-' . $setting . ' omapi-clear">';
|
1005 |
$field .= '<p class="omapi-field-wrap"><label for="omapi-field-' . $setting . '">' . $label . '</label><br />';
|
1006 |
-
$field .= '<input type="checkbox" id="omapi-field-' . $setting . '" class="' . implode( ' ', (array) $classes ) . '" name="omapi[' . $id . '][' . $setting . ']" tabindex="' . $this->tabindex . '" value="' . $value . '"' . checked( $value, 1, false ) . ' /> ';
|
1007 |
if ( $desc ) {
|
1008 |
-
$field .= '<span class="omapi-field-desc">' . $desc . '</span>';
|
1009 |
}
|
1010 |
$field .= '</p>';
|
1011 |
$field .= '</div>';
|
@@ -1039,11 +1337,11 @@ class OMAPI_Menu {
|
|
1039 |
$field .= '<p class="omapi-field-wrap"><label for="omapi-field-' . $setting . '">' . $label . '</label><br />';
|
1040 |
$field .= '<select id="omapi-field-' . $setting . '" class="' . implode( ' ', (array) $classes ) . '" name="omapi[' . $id . '][' . $setting . ']" tabindex="' . $this->tabindex . '">';
|
1041 |
foreach ( $data as $i => $info ) {
|
1042 |
-
$field .= '<option value="' . $info['value'] . '"' . selected( $info['value'], $value, false ) . '>' . $info['name'] . '</option>';
|
1043 |
}
|
1044 |
$field .= '</select>';
|
1045 |
if ( $desc ) {
|
1046 |
-
$field .= '<br /><span class="omapi-field-desc">' . $desc . '</span>';
|
1047 |
}
|
1048 |
$field .= '</p>';
|
1049 |
$field .= '</div>';
|
@@ -1071,7 +1369,7 @@ class OMAPI_Menu {
|
|
1071 |
$field .= '<p class="omapi-field-wrap"><label for="omapi-field-' . $setting . '">' . $label . '</label></p>';
|
1072 |
$field .= $value;
|
1073 |
if ( $desc ) {
|
1074 |
-
$field .= '<br /><span class="omapi-field-desc">' . $desc . '</span>';
|
1075 |
}
|
1076 |
$field .= '</div>';
|
1077 |
|
@@ -1159,9 +1457,9 @@ class OMAPI_Menu {
|
|
1159 |
$field ='';
|
1160 |
|
1161 |
$field .= '<div class="omapi-support-links ' . $setting . '"><h3>' . $title . '</h3><ul>';
|
1162 |
-
$field .= '<li><a target="_blank" href="' . esc_url( 'https://optinmonster.com/docs/' ) . '">'.
|
1163 |
-
$field .= '<li><a target="_blank" href="' . esc_url( 'https://wordpress.org/plugins/optinmonster/changelog/' ) . '">'.
|
1164 |
-
$field .= '<li><a target="_blank" href="' . esc_url( OPTINMONSTER_APP_URL . '/account/support/' ) . '">'.
|
1165 |
$field .= '</ul></div>';
|
1166 |
|
1167 |
return apply_filters( 'optin_monster_api_support_links', $field, $setting);
|
@@ -1174,189 +1472,137 @@ class OMAPI_Menu {
|
|
1174 |
$field .= '<div class="omapi-support-data ' . $setting . '"><h3>' . $title . '</h3>';
|
1175 |
$link = OPTINMONSTER_APP_URL . '/account/support/';
|
1176 |
$field .= '<p>' . sprintf( wp_kses( __( 'Download the report and attach to your <a href="%s">support ticket</a> to help speed up the process.', 'optin-monster-api' ), array( 'a' => array( 'href' => array() ) ) ), esc_url( $link ) ) . '</p>';
|
1177 |
-
$field .= '<a href="' . esc_url_raw( '#' ) . '" id="js--omapi-support-pdf" class="button button-primary button-large omapi-support-data-button" title="Download a PDF Report for Support" target="_blank">Download PDF Report</a>';
|
1178 |
$field .= '</div>';
|
1179 |
|
1180 |
return apply_filters( 'optin_monster_api_support_data', $field, $setting, $title );
|
1181 |
}
|
1182 |
|
1183 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1184 |
* Returns svg of OM Logo
|
|
|
|
|
1185 |
*/
|
1186 |
public function get_svg_logo() {
|
1187 |
-
return '<svg class
|
1188 |
-
<
|
1189 |
-
|
1190 |
-
|
1191 |
-
|
1192 |
-
|
1193 |
-
|
1194 |
-
|
1195 |
-
<g opacity="0.149002">
|
1196 |
-
<clipPath id="_clip1">
|
1197 |
-
<rect x="385.878" y="344.16" width="139.94" height="15.086"/>
|
1198 |
-
</clipPath>
|
1199 |
-
<g clip-path="url(#_clip1)">
|
1200 |
-
<path d="M455.848,344.16C494.47,344.16 525.819,347.522 525.819,351.704C525.819,355.884 494.469,359.246 455.848,359.246C417.228,359.246 385.879,355.884 385.879,351.704C385.878,347.522 417.228,344.16 455.848,344.16" style="fill:black;fill-rule:nonzero;"/>
|
1201 |
-
</g>
|
1202 |
</g>
|
1203 |
</g>
|
1204 |
-
<
|
1205 |
-
|
1206 |
-
|
1207 |
-
<
|
1208 |
-
|
1209 |
-
|
1210 |
-
<
|
1211 |
-
|
1212 |
-
|
1213 |
-
<
|
1214 |
-
|
1215 |
-
|
1216 |
-
<
|
1217 |
-
|
1218 |
-
|
1219 |
-
<
|
1220 |
-
|
1221 |
-
|
1222 |
-
<
|
1223 |
-
|
1224 |
-
|
1225 |
-
<
|
1226 |
-
|
1227 |
-
|
1228 |
-
<
|
1229 |
-
|
1230 |
-
|
1231 |
-
<
|
1232 |
-
|
1233 |
-
|
1234 |
-
<
|
1235 |
-
|
1236 |
-
|
1237 |
-
<
|
1238 |
-
|
1239 |
-
|
1240 |
-
<
|
1241 |
-
|
1242 |
-
|
1243 |
-
<
|
1244 |
-
|
1245 |
-
|
1246 |
-
<
|
1247 |
-
|
1248 |
-
</g>
|
1249 |
-
<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
|
1250 |
-
<path d="M444.308,267.829C450.214,262.922 458.484,262.922 462.663,268.011C466.843,273.009 465.39,281.096 459.483,286.094C453.575,291.001 445.307,291.001 441.125,285.912C436.947,280.914 438.402,272.827 444.308,267.829" style="fill:white;fill-rule:nonzero;"/>
|
1251 |
-
</g>
|
1252 |
-
<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
|
1253 |
-
<path d="M455.938,275.008C462.844,275.008 468.388,280.188 468.388,286.639C468.388,293.091 462.842,298.271 455.938,298.271C449.034,298.271 443.489,293.091 443.489,286.639C443.489,280.188 449.033,275.008 455.938,275.008" style="fill:rgb(13,130,223);fill-rule:nonzero;"/>
|
1254 |
-
</g>
|
1255 |
-
<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
|
1256 |
-
<path d="M455.938,275.008C459.3,275.008 462.39,276.28 464.571,278.279C463.754,281.096 462.027,283.913 459.482,286.094C454.575,290.183 448.034,290.82 443.58,288.093C443.489,287.639 443.489,287.185 443.489,286.639C443.489,280.188 449.033,275.008 455.938,275.008" style="fill:rgb(3,153,237);fill-rule:nonzero;"/>
|
1257 |
-
</g>
|
1258 |
-
<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
|
1259 |
-
<path d="M455.938,279.188C460.3,279.188 463.935,282.55 463.935,286.639C463.935,290.729 460.391,294.09 455.938,294.09C451.577,294.09 447.942,290.729 447.942,286.639C447.942,282.55 451.485,279.188 455.938,279.188" style="fill:rgb(35,35,35);fill-rule:nonzero;"/>
|
1260 |
-
</g>
|
1261 |
-
<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
|
1262 |
-
<path d="M455.938,279.188C458.755,279.188 461.209,280.551 462.663,282.55C461.844,283.822 460.754,285.003 459.482,286.003C456.209,288.73 452.21,289.911 448.668,289.638C448.214,288.73 447.942,287.639 447.942,286.548C447.942,282.459 451.485,279.097 455.938,279.097L455.938,279.188Z" style="fill:rgb(50,50,50);fill-rule:nonzero;"/>
|
1263 |
-
</g>
|
1264 |
-
<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
|
1265 |
-
<path d="M448.941,275.644C452.212,275.644 454.847,278.098 454.847,281.187C454.847,284.277 452.212,286.731 448.941,286.731C445.67,286.731 443.035,284.277 443.035,281.187C443.035,278.098 445.67,275.644 448.941,275.644" style="fill:white;fill-rule:nonzero;"/>
|
1266 |
-
</g>
|
1267 |
-
<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
|
1268 |
-
<path d="M414.138,308.448C441.581,304.359 469.117,304.722 496.56,308.448C498.559,322.805 497.468,336.438 496.56,350.157C469.117,351.248 441.581,351.431 414.138,350.157C412.502,336.255 412.322,322.351 414.138,308.448" style="fill:rgb(156,174,179);fill-rule:nonzero;"/>
|
1269 |
-
</g>
|
1270 |
-
<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
|
1271 |
-
<path d="M422.044,347.341C444.308,348.157 466.481,348.069 488.743,347.341C480.747,342.796 472.75,338.437 463.754,335.983C460.844,337.346 457.757,338.437 454.667,339.345C454.212,339.435 454.212,339.435 453.758,339.345C451.212,338.527 448.669,337.527 446.214,336.438C437.49,338.981 429.585,342.707 421.952,347.433L422.044,347.341ZM416.773,313.173C415.592,324.169 415.773,335.255 416.956,346.25C424.953,341.253 433.494,337.254 442.489,334.438C432.13,328.986 424.86,321.17 416.773,313.173M491.65,310.993C467.389,308.083 443.035,307.811 418.773,310.993C428.768,322.168 439.766,331.348 454.396,336.162C469.933,331.712 480.655,321.988 491.65,310.993M493.741,346.25C494.469,335.255 495.195,324.26 494.014,313.265C485.837,321.353 477.112,329.076 466.934,334.436C476.385,337.253 485.201,341.435 493.834,346.249L493.741,346.249L493.741,346.25Z" style="fill:rgb(211,232,239);fill-rule:nonzero;"/>
|
1272 |
-
</g>
|
1273 |
-
<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
|
1274 |
-
<path d="M422.044,347.341C432.765,347.705 443.487,347.886 454.303,347.886L454.303,339.345C454.212,339.345 454.122,339.345 453.849,339.253C451.305,338.438 448.762,337.437 446.307,336.346C437.583,338.89 429.678,342.615 422.044,347.341M416.773,313.173C415.592,324.169 415.773,335.255 416.956,346.25C424.953,341.253 433.494,337.254 442.489,334.438C432.13,328.986 424.86,321.17 416.773,313.173M454.303,308.72C442.399,308.72 430.586,309.447 418.773,310.994C428.679,322.17 439.766,331.258 454.303,336.163L454.303,308.72Z" style="fill:white;fill-rule:nonzero;"/>
|
1275 |
-
</g>
|
1276 |
-
<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
|
1277 |
-
<path d="M438.855,315.264C438.765,315.627 438.583,315.992 438.403,316.355C438.219,316.9 437.856,317.443 437.403,317.807C436.312,318.625 434.95,318.354 433.766,317.898C431.131,316.807 429.315,314.172 428.223,311.628C426.952,308.718 426.86,306.63 427.587,303.449C445.943,302.45 464.754,302.268 482.564,303.358L482.564,303.449L482.838,303.449C483.111,306.539 482.838,307.811 482.112,310.358C481.293,313.265 479.565,316.807 476.659,318.17C475.568,318.717 474.296,318.989 473.296,318.261C472.843,317.898 472.481,317.353 472.206,316.807C471.57,315.808 471.39,314.356 471.207,313.264C470.844,313.991 470.39,314.445 469.662,314.626C468.481,314.899 467.118,315.079 465.936,315.171C464.755,315.263 463.485,315.355 462.21,315.355C460.302,315.355 458.211,315.171 456.396,314.628C456.124,315.719 455.669,316.716 454.579,317.079C453.398,317.443 451.943,317.626 450.671,317.718C449.308,317.807 447.945,317.899 446.673,317.899C444.583,317.899 442.22,317.718 440.312,316.9C439.584,316.627 439.128,316.081 438.858,315.355L438.858,315.264L438.855,315.264Z" style="fill:rgb(153,153,102);fill-rule:nonzero;"/>
|
1278 |
-
</g>
|
1279 |
-
<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
|
1280 |
-
<path d="M469.66,302.814C470.388,306.903 470.205,312.174 469.024,312.446C467.206,312.901 460.209,313.629 456.757,312.357C455.846,310.631 455.846,306.269 455.938,302.725C460.664,302.724 465.389,302.724 469.66,302.814M440.308,303.632C439.673,305.541 439.037,307.721 438.401,310.358C438.037,311.994 437.764,313.629 437.49,314.809C437.127,316.444 436.309,316.718 434.764,316.081C430.765,314.356 428.678,307.632 428.857,303.541C431.584,303.359 435.674,303.178 440.307,302.996C444.761,302.905 449.759,302.814 454.757,302.814C455.209,307.812 455.209,313.81 454.121,315.081C452.21,315.72 444.761,316.628 441.124,314.992C439.488,314.266 440.124,308.177 440.215,303.724L440.308,303.632ZM470.388,302.814C470.931,304.995 471.568,307.267 472.203,310.175C472.566,311.992 472.75,313.721 473.021,314.9C473.385,316.717 474.112,316.99 475.565,316.264C479.111,314.445 481.11,307.72 481.017,303.269C478.384,303.087 474.658,302.905 470.388,302.814" style="fill:rgb(192,192,160);fill-rule:nonzero;"/>
|
1281 |
-
</g>
|
1282 |
-
<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
|
1283 |
-
<path d="M455.938,305.268C460.209,305.268 464.482,305.268 468.388,305.358C469.024,307.631 469.024,311.72 466.297,312.719C463.39,312.993 459.209,313.082 456.756,312.174C456.121,310.901 455.938,308.084 455.938,305.268M440.217,305.54C444.125,305.449 448.578,305.358 453.031,305.358C453.483,308.63 454.302,315.173 450.213,315.536C447.214,315.809 443.489,315.809 441.125,314.809C439.765,314.173 439.945,309.63 440.126,305.631L440.217,305.54ZM429.041,306.086C430.949,305.904 433.492,305.812 436.49,305.722C436.854,305.722 437.581,314.718 437.581,314.718C437.217,316.354 436.4,316.627 434.855,315.991C431.674,314.628 429.675,310.082 429.129,306.176L429.041,306.086ZM473.022,314.9C473.385,316.717 474.113,316.99 475.566,316.264C478.476,314.809 480.292,310.083 480.838,305.995C479.112,305.812 477.022,305.722 474.566,305.631C473.113,306.722 472.839,314.264 473.022,314.9" style="fill:rgb(251,250,196);fill-rule:nonzero;"/>
|
1284 |
-
</g>
|
1285 |
-
<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
|
1286 |
-
<path d="M448.123,305.449C448.307,308.995 448.123,312.537 447.671,312.809C446.763,313.357 443.4,314.082 441.765,312.719C441.126,312.266 441.218,308.811 441.31,305.54C443.49,305.449 445.763,305.449 448.216,305.358L448.123,305.449ZM463.391,305.358C463.481,307.994 463.299,310.447 462.936,310.629C462.119,311.082 458.937,311.629 457.302,310.538C456.757,310.175 456.757,307.72 456.847,305.268L463.392,305.268L463.392,305.358L463.391,305.358ZM434.675,305.812C434.584,306.812 434.584,307.995 434.584,309.175L434.584,312.809C434.584,314.173 434.221,314.445 433.493,313.809C432.041,312.719 430.767,309.266 430.222,306.086C431.494,305.994 433.04,305.904 434.675,305.812M479.747,305.904C478.563,305.812 477.201,305.722 475.657,305.722C475.657,306.721 475.749,307.811 475.749,308.994L475.749,312.901C475.749,314.355 476.021,314.628 476.748,313.991C478.02,312.809 479.202,309.357 479.747,305.904" style="fill:white;fill-rule:nonzero;"/>
|
1287 |
-
</g>
|
1288 |
-
<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
|
1289 |
-
<path d="M419.591,348.068C418.591,352.611 414.045,355.61 409.504,355.428C403.234,355.154 393.51,348.249 393.692,341.434C393.783,337.618 396.6,334.163 399.508,331.984C402.325,329.8 407.05,327.531 410.686,328.53C414.32,329.53 416.864,334.528 418.046,337.798C419.135,340.616 420.227,345.071 419.498,348.069L419.591,348.069L419.591,348.068Z" style="fill:rgb(133,197,31);fill-rule:nonzero;"/>
|
1290 |
-
</g>
|
1291 |
-
<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
|
1292 |
-
<path d="M418.046,347.613C418.135,347.068 418.228,346.522 418.228,345.886C417.047,340.888 414.229,335.164 411.049,334.256C406.142,332.8 396.238,339.344 396.781,346.069C399.508,350.249 405.325,353.702 409.504,353.882C413.32,354.065 417.228,351.519 418.047,347.703L418.047,347.613L418.046,347.613Z" style="fill:rgb(112,169,27);fill-rule:nonzero;"/>
|
1293 |
-
</g>
|
1294 |
-
<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
|
1295 |
-
<path d="M413.502,342.524C414.773,339.98 412.686,335.527 409.504,335.89C406.142,336.345 398.872,341.343 398.872,345.251C398.872,347.705 402.234,349.432 405.777,348.433C408.413,347.705 412.502,344.615 413.502,342.524M416.319,348.885C416.955,347.34 416.046,344.615 414.229,344.886C412.321,345.251 407.776,348.521 407.959,350.339C408.048,351.794 410.594,353.066 412.594,352.338C414.047,351.794 415.773,350.157 416.319,348.885" style="fill:rgb(93,141,23);fill-rule:nonzero;"/>
|
1296 |
-
</g>
|
1297 |
-
<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
|
1298 |
-
<path d="M408.504,330.712C408.595,332.348 405.414,333.8 404.142,332.62C403.051,330.529 403.326,327.985 404.233,327.44C405.233,326.895 407.687,327.895 408.504,330.712" style="fill:rgb(44,68,12);fill-rule:nonzero;"/>
|
1299 |
-
</g>
|
1300 |
-
<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
|
1301 |
-
<path d="M402.325,333.711C402.686,335.526 400.235,337.073 399.052,336.255C397.508,334.71 396.964,331.984 397.688,331.348C398.417,330.712 401.052,331.712 402.325,333.711" style="fill:rgb(44,68,12);fill-rule:nonzero;"/>
|
1302 |
-
</g>
|
1303 |
-
<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
|
1304 |
-
<path d="M397.69,338.254C398.238,339.436 397.054,341.071 395.691,340.981C394.239,339.89 392.876,337.346 393.419,336.709C393.965,335.983 396.419,336.709 397.69,338.254" style="fill:rgb(44,68,12);fill-rule:nonzero;"/>
|
1305 |
-
</g>
|
1306 |
-
<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
|
1307 |
-
<path d="M420.953,321.352C421.681,319.989 419.682,319.078 418.046,318.442C416.408,317.898 415.592,317.898 414.956,319.261C414.228,320.624 413.865,322.713 415.592,323.258C417.227,323.804 420.317,322.713 421.045,321.35L420.953,321.35L420.953,321.352Z" style="fill:rgb(44,68,12);fill-rule:nonzero;"/>
|
1308 |
-
</g>
|
1309 |
-
<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
|
1310 |
-
<path d="M422.408,316.264C422.59,317.808 420.407,318.626 418.592,318.99C416.865,319.354 416.137,319.171 415.957,317.626C415.773,316.079 416.229,313.628 418.047,313.265C419.771,312.902 422.225,314.718 422.408,316.264" style="fill:rgb(44,68,12);fill-rule:nonzero;"/>
|
1311 |
-
</g>
|
1312 |
-
<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
|
1313 |
-
<path d="M422.77,311.174C422.955,312.629 420.771,313.358 418.956,313.721C417.229,314.082 416.501,313.902 416.321,312.358C416.136,310.903 416.593,308.632 418.319,308.268C420.047,307.904 422.499,309.631 422.682,311.083L422.77,311.174Z" style="fill:rgb(44,68,12);fill-rule:nonzero;"/>
|
1314 |
-
</g>
|
1315 |
-
<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
|
1316 |
-
<path d="M408.504,307.812C408.776,308.996 411.048,308.72 412.775,308.36C414.501,307.905 415.138,307.541 414.774,306.36C414.501,305.178 413.41,303.543 411.687,303.997C409.96,304.451 408.233,306.633 408.504,307.905L408.504,307.812Z" style="fill:rgb(44,68,12);fill-rule:nonzero;"/>
|
1317 |
-
</g>
|
1318 |
-
<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
|
1319 |
-
<path d="M406.96,322.261L407.504,323.805L406.323,322.897C405.776,322.442 405.324,321.806 404.96,321.079C405.049,321.806 405.142,322.262 405.324,322.897C403.598,320.079 402.051,316.99 403.05,312.902C403.961,309.175 407.687,307.448 410.322,306.722C411.957,306.268 413.773,305.995 415.408,306.177C416.408,306.268 418.135,306.54 418.862,307.448C419.589,308.36 419.953,310.266 420.134,311.538C420.406,313.537 420.317,315.627 420.045,317.626C419.771,319.442 419.227,321.17 418.318,322.624C417.591,323.715 416.772,324.532 415.684,324.988C414.409,325.532 413.137,325.623 411.773,325.351C409.958,324.988 408.322,323.897 406.867,322.352L406.96,322.261Z" style="fill:rgb(133,197,31);fill-rule:nonzero;"/>
|
1320 |
-
</g>
|
1321 |
-
<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
|
1322 |
-
<path d="M417.955,308.72C419.046,309.994 419.591,315.357 418.318,319.263C417.955,319.355 417.5,319.445 417.047,319.445C415.047,319.628 413.137,318.72 411.866,317.629C411.957,318.174 412.139,318.537 412.321,318.81C411.23,318.358 410.322,316.994 409.685,315.448C409.774,316.721 409.958,317.266 410.139,317.994C408.775,317.539 407.686,315.994 406.867,314.36C406.14,312.905 406.231,310.814 407.503,309.907C410.865,307.453 416.591,307.271 417.862,308.816L417.955,308.72Z" style="fill:rgb(161,225,65);fill-rule:nonzero;"/>
|
1323 |
-
</g>
|
1324 |
-
<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
|
1325 |
-
<path d="M491.106,348.068C492.105,352.611 496.648,355.61 501.193,355.428C507.462,355.154 517.185,348.249 517.002,341.434C516.914,337.618 514.094,334.163 511.188,331.984C508.371,329.8 503.644,327.531 500.01,328.53C496.377,329.53 493.832,334.528 492.65,337.798C491.559,340.616 490.469,345.071 491.198,348.069L491.106,348.069L491.106,348.068Z" style="fill:rgb(133,197,31);fill-rule:nonzero;"/>
|
1326 |
-
</g>
|
1327 |
-
<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
|
1328 |
-
<path d="M492.561,347.613C492.469,347.068 492.376,346.522 492.376,345.886C493.559,340.888 496.375,335.164 499.556,334.256C504.463,332.8 514.367,339.344 513.823,346.069C511.096,350.249 505.279,353.702 501.101,353.882C497.284,354.065 493.376,351.519 492.558,347.703L492.558,347.613L492.561,347.613Z" style="fill:rgb(112,169,27);fill-rule:nonzero;"/>
|
1329 |
-
</g>
|
1330 |
-
<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
|
1331 |
-
<path d="M497.194,342.524C495.92,339.98 498.01,335.527 501.193,335.89C504.555,336.345 511.824,341.343 511.824,345.251C511.824,347.705 508.462,349.432 504.918,348.433C502.282,347.705 498.194,344.615 497.194,342.524M494.377,348.885C493.741,347.34 494.649,344.615 496.467,344.886C498.375,345.251 502.917,348.521 502.737,350.339C502.646,351.794 500.102,353.066 498.102,352.338C496.648,351.794 494.922,350.157 494.377,348.885" style="fill:rgb(93,141,23);fill-rule:nonzero;"/>
|
1332 |
-
</g>
|
1333 |
-
<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
|
1334 |
-
<path d="M502.102,330.712C502.01,332.348 505.192,333.8 506.463,332.62C507.554,330.529 507.28,327.985 506.373,327.44C505.373,326.895 502.918,327.895 502.102,330.712" style="fill:rgb(44,68,12);fill-rule:nonzero;"/>
|
1335 |
-
</g>
|
1336 |
-
<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
|
1337 |
-
<path d="M508.28,333.711C507.919,335.526 510.37,337.073 511.553,336.255C513.097,334.71 513.641,331.984 512.917,331.348C512.188,330.712 509.552,331.712 508.28,333.711" style="fill:rgb(44,68,12);fill-rule:nonzero;"/>
|
1338 |
-
</g>
|
1339 |
-
<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
|
1340 |
-
<path d="M512.915,338.254C512.368,339.436 513.552,341.071 514.914,340.981C516.366,339.89 517.729,337.346 517.186,336.709C516.64,335.983 514.187,336.709 512.915,338.254" style="fill:rgb(44,68,12);fill-rule:nonzero;"/>
|
1341 |
-
</g>
|
1342 |
-
<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
|
1343 |
-
<path d="M489.651,321.352C488.924,319.989 490.923,319.078 492.561,318.442C494.197,317.898 495.012,317.898 495.649,319.261C496.376,320.624 496.74,322.713 495.012,323.258C493.378,323.804 490.287,322.713 489.56,321.35L489.651,321.35L489.651,321.352Z" style="fill:rgb(44,68,12);fill-rule:nonzero;"/>
|
1344 |
-
</g>
|
1345 |
-
<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
|
1346 |
-
<path d="M488.288,316.264C488.107,317.808 490.287,318.626 492.105,318.99C493.832,319.354 494.559,319.171 494.74,317.626C494.922,316.079 494.469,313.628 492.65,313.265C490.924,312.902 488.471,314.718 488.288,316.264" style="fill:rgb(44,68,12);fill-rule:nonzero;"/>
|
1347 |
-
</g>
|
1348 |
-
<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
|
1349 |
-
<path d="M487.835,311.174C487.651,312.629 489.834,313.358 491.649,313.721C493.376,314.082 494.104,313.902 494.284,312.358C494.469,310.903 494.013,308.632 492.285,308.268C490.559,307.904 488.106,309.631 487.924,311.083L487.835,311.174Z" style="fill:rgb(44,68,12);fill-rule:nonzero;"/>
|
1350 |
-
</g>
|
1351 |
-
<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
|
1352 |
-
<path d="M502.192,307.812C501.918,308.996 499.646,308.72 497.919,308.36C496.195,307.905 495.557,307.541 495.92,306.36C496.195,305.178 497.283,303.543 499.009,303.997C500.737,304.451 502.463,306.633 502.192,307.905L502.192,307.812Z" style="fill:rgb(44,68,12);fill-rule:nonzero;"/>
|
1353 |
-
</g>
|
1354 |
-
<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
|
1355 |
-
<path d="M503.646,322.261L503.101,323.805L504.282,322.897C504.83,322.442 505.282,321.806 505.645,321.079C505.556,321.806 505.464,322.262 505.282,322.897C507.008,320.079 508.555,316.99 507.555,312.902C506.645,309.175 502.918,307.448 500.284,306.722C498.648,306.268 496.833,305.995 495.197,306.177C494.198,306.268 492.471,306.54 491.744,307.448C491.016,308.36 490.653,310.266 490.472,311.538C490.2,313.537 490.288,315.627 490.562,317.626C490.835,319.442 491.378,321.17 492.288,322.624C493.014,323.715 493.834,324.532 494.922,324.988C496.197,325.532 497.468,325.623 498.832,325.351C500.647,324.988 502.283,323.897 503.739,322.352L503.646,322.261Z" style="fill:rgb(133,197,31);fill-rule:nonzero;"/>
|
1356 |
-
</g>
|
1357 |
-
<g transform="matrix(1,0,0,1,-37.6592,-251.388)">
|
1358 |
-
<path d="M492.65,308.72C491.559,309.994 491.014,315.357 492.287,319.263C492.65,319.355 493.105,319.445 493.558,319.445C495.558,319.628 497.467,318.72 498.739,317.629C498.647,318.174 498.466,318.537 498.284,318.81C499.375,318.358 500.283,316.994 500.919,315.448C500.83,316.721 500.646,317.266 500.466,317.994C501.83,317.539 502.918,315.994 503.738,314.36C504.464,312.905 504.374,310.814 503.102,309.907C499.74,307.453 494.014,307.271 492.743,308.816L492.65,308.72Z" style="fill:rgb(161,225,65);fill-rule:nonzero;"/>
|
1359 |
-
</g>
|
1360 |
</svg>';
|
1361 |
}
|
1362 |
|
@@ -1373,12 +1619,12 @@ class OMAPI_Menu {
|
|
1373 |
|
1374 |
$html .= '<div class="omapi-static-banner">';
|
1375 |
$html .= '<div class="inner-container">';
|
1376 |
-
$html .= '<div class="logo-wrapper">' . $this->get_svg_logo() . '<span class="omapi-logo-version">' . sprintf(
|
1377 |
$html .= '<div class="static-menu"><ul>';
|
1378 |
-
$html .= '<li><a target="_blank" href="' . esc_url_raw( 'https://optinmonster.com/docs/' ) . '">' .
|
1379 |
-
$html .= '<li><a href="' . esc_url_raw( 'https://optinmonster.com/contact-us/' ) . '" target="_blank">' .
|
1380 |
if( $screen->id === 'toplevel_page_optin-monster-api-settings' ) {
|
1381 |
-
$html .= '<li class="omapi-menu-button"><a id="omapi-create-new-optin-button" href="' . OPTINMONSTER_APP_URL . '/campaigns/new/" class="button button-secondary omapi-new-optin" title="' .
|
1382 |
}
|
1383 |
$html .= '</ul></div>';
|
1384 |
$html .= '</div>';
|
@@ -1429,16 +1675,18 @@ class OMAPI_Menu {
|
|
1429 |
$sasId = get_option( 'optinmonster_sas_id', $omSasId );
|
1430 |
}
|
1431 |
|
|
|
|
|
|
|
1432 |
// Return the sas link if we have a sas ID
|
1433 |
if ( ! empty( $omSasId ) ) {
|
1434 |
-
|
1435 |
-
. urlencode( trim( $omSasId ) )
|
1436 |
-
. '&b=601672&m=49337&afftrack=&urllink=optinmonster.com';
|
1437 |
}
|
1438 |
|
1439 |
-
|
1440 |
-
|
1441 |
-
|
|
|
1442 |
}
|
1443 |
|
1444 |
/**
|
@@ -1473,30 +1721,45 @@ class OMAPI_Menu {
|
|
1473 |
$omTrialId = get_option( 'optinmonster_trial_id', $omTrialId );
|
1474 |
}
|
1475 |
|
|
|
|
|
|
|
1476 |
// Return the trial link if we have a trial ID
|
1477 |
if ( ! empty( $omTrialId ) ) {
|
1478 |
-
|
1479 |
-
|
1480 |
-
. '&b=601672&m=49337&afftrack=&urllink=optinmonster.com%2Ffree-trial%2F%3Fid%3D' . urlencode( trim( $omTrialId ) );
|
1481 |
}
|
1482 |
|
1483 |
-
|
1484 |
-
|
|
|
|
|
|
|
1485 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1486 |
}
|
1487 |
|
1488 |
public function get_action_link() {
|
1489 |
-
global $omTrialId
|
1490 |
-
$trial = $this->get_trial_link();
|
1491 |
-
$sas = $this->get_sas_link();
|
1492 |
|
1493 |
if ( ! empty( $omTrialId ) ) {
|
1494 |
-
return $
|
1495 |
-
} else if ( ! empty( $omSasId ) ) {
|
1496 |
-
return $sas;
|
1497 |
-
} else {
|
1498 |
-
return 'https://optinmonster.com/wp/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpdashboard';
|
1499 |
}
|
|
|
|
|
|
|
1500 |
}
|
1501 |
|
1502 |
public function has_trial_link() {
|
7 |
* @package OMAPI
|
8 |
* @author Thomas Griffin
|
9 |
*/
|
10 |
+
|
11 |
+
// Exit if accessed directly.
|
12 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
+
exit;
|
14 |
+
}
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Menu class.
|
18 |
+
*
|
19 |
+
* @since 1.0.0
|
20 |
+
*/
|
21 |
class OMAPI_Menu {
|
22 |
|
23 |
/**
|
65 |
*/
|
66 |
public $tabindex = 429;
|
67 |
|
68 |
+
/**
|
69 |
+
* Panel slugs/names.
|
70 |
+
*
|
71 |
+
* @since 1.9.0
|
72 |
+
*
|
73 |
+
* @var array
|
74 |
+
*/
|
75 |
+
public $panels = array();
|
76 |
+
|
77 |
+
/**
|
78 |
+
* The OM landing page url.
|
79 |
+
*
|
80 |
+
* @since 1.8.4
|
81 |
+
*/
|
82 |
+
const LANDING_URL = 'https://optinmonster.com/wp/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpdashboard';
|
83 |
+
|
84 |
/**
|
85 |
* Primary class constructor.
|
86 |
*
|
99 |
// Load helper body classes
|
100 |
add_filter( 'admin_body_class', array( $this, 'admin_body_classes' ) );
|
101 |
|
102 |
+
add_action( 'admin_notices', array( $this, 'maybe_output_cybermonday_notice' ), 2 );
|
103 |
+
add_action( 'all_admin_notices', array( $this, 'maybe_output_cybermonday_notice' ), 2 );
|
104 |
}
|
105 |
|
106 |
+
$this->panels = array(
|
107 |
+
'optins' => esc_html__( 'Campaigns', 'optin-monster-api' ),
|
108 |
+
'api' => esc_html__( 'Authorization', 'optin-monster-api' ),
|
109 |
+
'woocommerce' => esc_html__( 'WooCommerce', 'optin-monster-api' ),
|
110 |
+
'support' => esc_html__( 'Support', 'optin-monster-api' ),
|
111 |
+
'migrate' => esc_html__( 'Migration', 'optin-monster-api' ),
|
112 |
+
);
|
113 |
}
|
114 |
|
115 |
/**
|
132 |
*/
|
133 |
public function menu() {
|
134 |
|
135 |
+
// Filter to change the menu position if there is any conflict with another menu on the same position.
|
136 |
+
$menu_position = apply_filters( 'optin_monster_api_menu_position', 26 );
|
137 |
+
|
138 |
$this->hook = add_menu_page(
|
139 |
+
esc_html__( 'OptinMonster', 'optin-monster-api' ),
|
140 |
+
esc_html__( 'OptinMonster', 'optin-monster-api' ) . '<span class="om-pulse"></span>',
|
141 |
+
apply_filters( 'optin_monster_api_menu_cap', 'manage_options', 'optin-monster-api-settings' ),
|
142 |
'optin-monster-api-settings',
|
143 |
array( $this, 'page' ),
|
144 |
'none',
|
145 |
+
$menu_position
|
146 |
+
);
|
147 |
+
|
148 |
+
// Just add a placeholder secondary page.
|
149 |
+
add_submenu_page(
|
150 |
+
'optin-monster-api-settings', // parent slug
|
151 |
+
$this->panels[ $this->view ], //page title,
|
152 |
+
$this->panels[ $this->view ],
|
153 |
+
apply_filters( 'optin_monster_api_menu_cap', 'manage_options', 'optin-monster-api-settings' ), //cap
|
154 |
+
'optin-monster-api-settings', //slug
|
155 |
+
array( $this, 'page' )
|
156 |
);
|
157 |
|
158 |
// Load global icon font styles.
|
159 |
+
add_action( 'admin_head', array( $this, 'global_styles' ) );
|
160 |
|
161 |
// Load settings page assets.
|
162 |
if ( $this->hook ) {
|
170 |
*
|
171 |
* @since 1.0.0
|
172 |
*/
|
173 |
+
public function global_styles() {
|
174 |
+
$this->base->output_min_css( 'archie-css.php' );
|
175 |
|
176 |
+
if ( ! $this->is_om_page() && $this->should_show_cybermonday_notice() ) {
|
177 |
+
$this->base->output_min_css( 'cybermonday-pulse-css.php' );
|
178 |
+
}
|
179 |
+
}
|
180 |
+
|
181 |
+
/**
|
182 |
+
* Should we show the cybermonday promo/notice.
|
183 |
+
*
|
184 |
+
* @since 1.9.0
|
185 |
+
*
|
186 |
+
* @return bool
|
187 |
+
*/
|
188 |
+
public function should_show_cybermonday_notice() {
|
189 |
+
$now = time();
|
190 |
+
$begins = strtotime( '2019-11-25 00:00:00' );
|
191 |
+
// $begins = strtotime( '2019-11-19 00:00:00' );
|
192 |
+
$ends = strtotime( '2019-12-03 11:59:59' );
|
193 |
+
$in_window = $now > $begins && $now < $ends;
|
194 |
+
|
195 |
+
return $in_window && 'off' !== get_user_setting( 'om_cybermonday_notice', 'on' );
|
196 |
+
}
|
197 |
+
|
198 |
+
/**
|
199 |
+
* Outputs the cybermonday promo notice, if we can show it.
|
200 |
+
*
|
201 |
+
* @since 1.9.0
|
202 |
+
*/
|
203 |
+
public function maybe_output_cybermonday_notice() {
|
204 |
+
static $hooked = false;
|
205 |
+
if (
|
206 |
+
! $hooked
|
207 |
+
&& $this->should_show_cybermonday_notice()
|
208 |
+
&& $this->is_om_page()
|
209 |
+
) {
|
210 |
+
|
211 |
+
$url = $this->base->get_api_credentials()
|
212 |
+
? OPTINMONSTER_APP_URL . '/account/upgrade'
|
213 |
+
: 'https://optinmonster.com/pricing';
|
214 |
+
$url .= '/?utm_source=orgplugin&utm_medium=link&utm_campaign=bfcm2019';
|
215 |
+
|
216 |
+
$this->base->output_min_css( 'cybermonday-notification-css.php' );
|
217 |
+
$this->base->output_view( 'cybermonday-notification.php', compact( 'url' ) );
|
218 |
+
add_action( 'admin_footer', array( $this, 'handle_closing_notice' ) );
|
219 |
+
}
|
220 |
+
$hooked = true;
|
221 |
+
}
|
222 |
|
223 |
+
/**
|
224 |
+
* Handles the cybermondy notice-closing and setting the cookie.
|
225 |
+
*
|
226 |
+
* @since 1.9.0
|
227 |
+
*/
|
228 |
+
public function handle_closing_notice() {
|
229 |
+
$this->base->output_view( 'cybermonday-notification-js.php' );
|
230 |
}
|
231 |
|
232 |
+
/**
|
233 |
+
* Adds om admin body classes
|
234 |
+
*
|
235 |
+
* @since 1.3.4
|
236 |
+
*
|
237 |
+
* @param array $classes
|
238 |
+
*
|
239 |
+
* @return array
|
240 |
+
*/
|
241 |
public function admin_body_classes( $classes ) {
|
242 |
|
243 |
$classes .= ' omapi-screen ';
|
250 |
|
251 |
}
|
252 |
|
253 |
+
/**
|
254 |
+
* Check if we're on one of the OM menu/sub-menu pages.
|
255 |
+
*
|
256 |
+
* @since 1.9.0
|
257 |
+
*
|
258 |
+
* @return boolean
|
259 |
+
*/
|
260 |
+
public function is_om_page() {
|
261 |
+
if ( ! is_admin() ) {
|
262 |
+
return false;
|
263 |
+
}
|
264 |
+
|
265 |
+
if ( function_exists( 'get_current_screen' ) ) {
|
266 |
+
$screen = get_current_screen();
|
267 |
+
$page = $screen->id;
|
268 |
+
if ( 'toplevel_page_optin-monster-api-settings' === $page ) {
|
269 |
+
return true;
|
270 |
+
}
|
271 |
+
|
272 |
+
if ( ! empty( $screen->parent_base ) && false !== strpos( $screen->parent_base, 'optin-monster-api-settings' ) ) {
|
273 |
+
return true;
|
274 |
+
}
|
275 |
+
|
276 |
+
} else {
|
277 |
+
$page = isset( $_GET['page'] ) ? $_GET['page'] : '';
|
278 |
+
}
|
279 |
+
|
280 |
+
return false !== strpos( $page, 'optin-monster' );
|
281 |
+
}
|
282 |
+
|
283 |
/**
|
284 |
* Loads assets for the settings page.
|
285 |
*
|
290 |
add_action( 'admin_enqueue_scripts', array( $this, 'styles' ) );
|
291 |
add_action( 'admin_enqueue_scripts', array( $this, 'scripts' ) );
|
292 |
add_filter( 'admin_footer_text', array( $this, 'footer' ) );
|
293 |
+
add_action( 'in_admin_header', array( $this, 'output_plugin_screen_banner' ) );
|
294 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'fix_plugin_js_conflicts' ), 100 );
|
295 |
|
296 |
}
|
297 |
|
318 |
* @since 1.0.0
|
319 |
*/
|
320 |
public function scripts() {
|
321 |
+
global $wpdb;
|
322 |
+
|
323 |
+
// Posts query.
|
324 |
+
$postTypes = array_map( 'esc_sql', get_post_types( array( 'public' => true ) ) );
|
325 |
+
$postTypes = implode( "','", $postTypes );
|
326 |
+
|
327 |
+
$sql = "
|
328 |
+
SELECT ID AS `id`, post_title AS `text`
|
329 |
+
FROM $wpdb->posts
|
330 |
+
WHERE post_type IN ( '{$postTypes}' )
|
331 |
+
AND post_status IN ('publish','future')
|
332 |
+
ORDER BY post_title ASC
|
333 |
+
";
|
334 |
+
$posts = $wpdb->get_results( $sql, ARRAY_A );
|
335 |
+
|
336 |
+
// Taxonomies query.
|
337 |
+
$sql = "
|
338 |
+
SELECT terms.term_id AS 'id', terms.name AS 'text'
|
339 |
+
FROM {$wpdb->term_taxonomy} tax
|
340 |
+
LEFT JOIN {$wpdb->terms} terms ON terms.term_id = tax.term_id
|
341 |
+
WHERE tax.taxonomy = 'post_tag'
|
342 |
+
ORDER BY text ASC
|
343 |
+
";
|
344 |
+
$tags = $wpdb->get_results( $sql, ARRAY_A );
|
345 |
|
346 |
wp_register_script( $this->base->plugin_slug . '-select2', plugins_url( '/assets/js/select2.min.js', OMAPI_FILE ), array( 'jquery' ), $this->base->version, true );
|
347 |
wp_enqueue_script( $this->base->plugin_slug . '-select2' );
|
348 |
wp_register_script( $this->base->plugin_slug . '-settings', plugins_url( '/assets/js/settings.js', OMAPI_FILE ), array( 'jquery', 'jquery-ui-core', 'jquery-ui-datepicker', $this->base->plugin_slug . '-select2' ), $this->base->version, true );
|
349 |
+
wp_localize_script( $this->base->plugin_slug . '-settings', 'OMAPI', array(
|
350 |
+
'posts' => $posts,
|
351 |
+
'tags' => $tags,
|
352 |
+
'app_url' => trailingslashit( OPTINMONSTER_APP_URL ),
|
353 |
+
) );
|
354 |
wp_enqueue_script( $this->base->plugin_slug . '-settings' );
|
355 |
wp_register_script( $this->base->plugin_slug . '-clipboard', plugins_url( '/assets/js/clipboard.min.js', OMAPI_FILE ), array( $this->base->plugin_slug . '-settings' ), $this->base->version, true );
|
356 |
wp_enqueue_script( $this->base->plugin_slug . '-clipboard' );
|
362 |
$this->base->plugin_slug . '-settings',
|
363 |
'omapi',
|
364 |
array(
|
365 |
+
'ajax' => admin_url( 'admin-ajax.php' ),
|
366 |
+
'nonce' => wp_create_nonce( 'omapi-query-nonce' ),
|
367 |
+
'confirm' => esc_html__( 'Are you sure you want to reset these settings?', 'optin-monster-api' ),
|
368 |
'date_format' => 'F j, Y',
|
369 |
'supportData' => $this->get_support_data(),
|
370 |
)
|
405 |
$server_data = '';
|
406 |
$optin_data = '';
|
407 |
|
408 |
+
if ( isset( $_GET['optin_monster_api_view'] ) && 'support' === $_GET['optin_monster_api_view'] ) {
|
409 |
$optin_data = $this->get_optin_data();
|
410 |
$server_data = $this->get_server_data();
|
411 |
}
|
448 |
'Shortcodes Synced and Recognized' => get_post_meta( $optin->ID, '_omapi_shortcode', true ) ? htmlspecialchars_decode( get_post_meta( $optin->ID, '_omapi_shortcode_output', true ) ) : 'None recognized',
|
449 |
);
|
450 |
if ( OMAPI_Utils::is_inline_type( $design_type ) ) {
|
451 |
+
$optin_data[$slug][ 'Automatic Output Status' ] = get_post_meta( $optin->ID, '_omapi_automatic', true ) ? 'Enabled' : 'Disabled';
|
452 |
}
|
453 |
|
454 |
}
|
479 |
$used_plugins .= $plugin['Name'] . ': ' . $plugin['Version'] . "\n";
|
480 |
}
|
481 |
|
|
|
482 |
$array = array(
|
483 |
'Server Info' => esc_html( $_SERVER['SERVER_SOFTWARE'] ),
|
484 |
'PHP Version' => function_exists( 'phpversion' ) ? esc_html( phpversion() ) : 'Unable to check.',
|
492 |
'API Ping Response' => wp_remote_retrieve_response_code( $api_ping ),
|
493 |
'Active Theme' => $theme,
|
494 |
'Active Plugins' => $used_plugins,
|
|
|
495 |
);
|
496 |
|
497 |
return $array;
|
508 |
public function footer( $text ) {
|
509 |
|
510 |
$url = 'https://wordpress.org/support/plugin/optinmonster/reviews?filter=5#new-post';
|
511 |
+
$text = sprintf( __( 'Please rate <strong>OptinMonster</strong> <a href="%s" target="_blank" rel="noopener">★★★★★</a> on <a href="%s" target="_blank" rel="noopener noreferrer">WordPress.org</a> to help us spread the word. Thank you from the OptinMonster team!', 'optin-monster-api' ), $url, $url );
|
512 |
return $text;
|
513 |
|
514 |
}
|
565 |
public function get_panels() {
|
566 |
|
567 |
// Only load the API panel if no API credentials have been set.
|
568 |
+
$panels = array();
|
569 |
+
$creds = $this->base->get_api_credentials();
|
570 |
+
$can_migrate = $this->base->can_migrate();
|
571 |
$is_legacy_active = $this->base->is_legacy_active();
|
572 |
+
$is_minimum_woo = OMAPI_WooCommerce::is_minimum_version();
|
573 |
+
$can_manage_woo = current_user_can( 'manage_woocommerce' );
|
574 |
|
575 |
// Set panels requiring credentials.
|
576 |
if ( $creds ) {
|
577 |
+
$panels['optins'] = $this->panels['optins'];
|
578 |
}
|
579 |
|
580 |
// Set default panels.
|
581 |
+
$panels['api'] = $this->panels['api'];
|
582 |
|
583 |
+
// Set the WooCommerce panel.
|
584 |
+
if ( $creds && ( $is_minimum_woo || OMAPI_WooCommerce::is_connected() ) && $can_manage_woo ) {
|
585 |
+
$panels['woocommerce'] = $this->panels['woocommerce'];
|
586 |
+
}
|
587 |
|
588 |
// Set the Support panel
|
589 |
+
$panels['support'] = $this->panels['support'];
|
590 |
|
591 |
// Set the migration panel.
|
592 |
if ( $creds && $can_migrate && $is_legacy_active ) {
|
593 |
+
$panels['migrate'] = $this->panels['migrate'];
|
594 |
}
|
595 |
|
596 |
return apply_filters( 'optin_monster_api_panels', $panels );
|
619 |
case 'api' :
|
620 |
switch ( $setting ) {
|
621 |
case 'user' :
|
622 |
+
$ret = $this->get_password_field( $setting, $value, $id, esc_html__( 'Legacy API Username', 'optin-monster-api' ), esc_html__( 'The Legacy API Username found in your OptinMonster Account API area.', 'optin-monster-api' ), esc_html__( 'Enter your Legacy API Username here...', 'optin-monster-api' ) );
|
623 |
break 2;
|
624 |
|
625 |
case 'key' :
|
626 |
+
$ret = $this->get_password_field( $setting, $value, $id, esc_html__( 'Legacy API Key', 'optin-monster-api' ), esc_html__( 'The Legacy API Key found in your OptinMonster Account API area.', 'optin-monster-api' ), esc_html__( 'Enter your Legacy API Key here...', 'optin-monster-api' ) );
|
627 |
break 2;
|
628 |
|
629 |
case 'apikey' :
|
630 |
+
$ret = $this->get_api_field( $setting, $value, 'omapiAuthorizeButton', esc_html__( 'Authorize OptinMonster', 'optin-monster-api' ), sprintf( esc_html__( 'Click to connect your OptinMonster Account, or %s click here to enter an API Key Manually.%s', 'optin-monster-api' ), '<a href="#" id="omapiShowApiKey">', '</a>' ) );
|
631 |
+
$ret .= $this->get_password_field( $setting, $value, $id, esc_html__( 'API Key', 'optin-monster-api' ), esc_html__( 'A single API Key found in your OptinMonster Account API area.', 'optin-monster-api' ), esc_html__( 'Enter your API Key here...', 'optin-monster-api' ), array(), true );
|
632 |
+
add_filter( 'omapi_hide_submit_buttom', '__return_true' );
|
633 |
+
break 2;
|
634 |
+
|
635 |
+
case 'omwpdebug' :
|
636 |
+
$ret = $this->get_checkbox_field( $setting, $value, $id, esc_html__( 'Debugging Rules', 'optin-monster-api' ), __( 'Allow logged-out/non-admin debugging of plugin rules with the <code>omwpdebug</code> query variable?', 'optin-monster-api' ) );
|
637 |
+
break 2;
|
638 |
+
default:
|
639 |
break 2;
|
640 |
}
|
641 |
break;
|
643 |
case 'settings' :
|
644 |
switch ( $setting ) {
|
645 |
case 'cookies' :
|
646 |
+
$ret = $this->get_checkbox_field( $setting, $value, $id, esc_html__( 'Clear local cookies on campaign update?', 'optin-monster-api' ), esc_html__( 'If checked, local cookies will be cleared for all campaigns after campaign settings are adjusted and saved.', 'optin-monster-api' ) );
|
647 |
+
break 2;
|
648 |
+
default:
|
649 |
+
break 2;
|
650 |
+
}
|
651 |
+
break;
|
652 |
+
|
653 |
+
case 'woocommerce' :
|
654 |
+
switch ( $setting ) {
|
655 |
+
case 'settings' :
|
656 |
+
$ret = $this->get_woocommerce();
|
657 |
+
break 2;
|
658 |
+
default:
|
659 |
break 2;
|
660 |
}
|
661 |
break;
|
667 |
break 2;
|
668 |
|
669 |
case 'links' :
|
670 |
+
$ret = $this->get_support_links( $setting, esc_html__( 'Helpful Links', 'optin-monster-api' ) );
|
671 |
break 2;
|
672 |
|
673 |
case 'server-report';
|
674 |
+
$ret = $this->get_plugin_report( $setting, esc_html__( 'Server / Plugin Report', 'optin-monster-api' ) );
|
675 |
break 2;
|
676 |
+
default:
|
677 |
+
break 2;
|
678 |
}
|
679 |
break;
|
680 |
|
681 |
case 'toggle' :
|
682 |
switch ( $setting ) {
|
683 |
case 'advanced-start' :
|
684 |
+
$ret = $this->get_toggle_start( $setting, esc_html__( 'Advanced Settings', 'optin-monster-api' ), esc_html__( 'More specific settings available for campaign visibility.', 'optin-monster-api' ) );
|
685 |
break 2;
|
686 |
case 'advanced-end' :
|
687 |
$ret = $this->get_toggle_end();
|
688 |
break 2;
|
689 |
case 'woocommerce-start' :
|
690 |
+
$ret = $this->get_toggle_start( $setting, esc_html__( 'WooCommerce Settings', 'optin-monster-api' ), esc_html__( 'More specific settings available for WooCommerce integration.', 'optin-monster-api' ) );
|
691 |
break 2;
|
692 |
case 'woocommerce-end' :
|
693 |
$ret = $this->get_toggle_end();
|
694 |
break 2;
|
695 |
+
default:
|
696 |
+
break 2;
|
697 |
}
|
698 |
break;
|
699 |
|
700 |
case 'optins' :
|
701 |
switch ( $setting ) {
|
702 |
case 'enabled' :
|
703 |
+
$ret = $this->get_checkbox_field( $setting, $value, $id, esc_html__( 'Enable campaign on site?', 'optin-monster-api' ), esc_html__( 'The campaign will not be displayed on this site unless this setting is checked.', 'optin-monster-api' ) );
|
704 |
+
break 2;
|
705 |
|
706 |
case 'automatic' :
|
707 |
+
$ret = $this->get_checkbox_field( $setting, $value, $id, esc_html__( 'Display the campaign automatically after blog posts', 'optin-monster-api' ), sprintf( __( 'If no advanced settings are selected below, the campaign will display after every post. You can turn this off and add it manually to your posts by <a href="%s" target="_blank" rel="noopener">clicking here and viewing the tutorial.</a>', 'optin-monster-api' ), 'https://optinmonster.com/docs/how-to-manually-add-an-after-post-or-inline-optin/' ), array( 'omapi-after-post-auto-select' ) );
|
708 |
break 2;
|
709 |
case 'automatic_shortcode' :
|
710 |
$full_shortcode ='[optin-monster-shortcode id="'. $optin->post_name .'"]';
|
712 |
$setting,
|
713 |
$full_shortcode,
|
714 |
$id,
|
715 |
+
esc_html__( 'Shortcode for this campaign', 'optin-monster-api' ),
|
716 |
+
sprintf( __( 'Use the shortcode to manually add this campaign to inline to a post or page. <a href="%s" title="Click here to learn more about how this work" target="_blank" rel="noopener">Click here to learn more about how this works.</a>', 'optin-monster-api' ), 'https://optinmonster.com/docs/how-to-manually-add-an-after-post-or-inline-optin/' ),
|
717 |
false,
|
718 |
array(),
|
719 |
true
|
721 |
break 2;
|
722 |
|
723 |
case 'users' :
|
724 |
+
$ret = $this->get_dropdown_field( $setting, $value, $id, $this->get_user_output(), esc_html__( 'Who should see this campaign?', 'optin-monster-api' ), sprintf( __( 'Determines who should be able to view this campaign. Want to hide for newsletter subscribers? <a href="%s" target="_blank" rel="noopener">Click here to learn how.</a>', 'optin-monster-api' ), 'https://optinmonster.com/docs/how-to-hide-optinmonster-from-existing-newsletter-subscribers/' ) );
|
725 |
break 2;
|
726 |
|
727 |
case 'never' :
|
728 |
$val = is_array( $value ) ? implode( ',', $value ) : $value;
|
729 |
+
$ret = $this->get_custom_field( $setting, '<input type="hidden" value="' . esc_attr( $val ) . '" id="omapi-field-' . $setting . '" class="omapi-select" name="omapi[' . $id . '][' . $setting . ']" data-placeholder="' . esc_attr__( 'Type to search and select post(s)...', 'optin-monster-api' ) . '">', esc_html__( 'Never load campaign on:', 'optin-monster-api' ), esc_html__( 'Never loads the campaign on the selected posts and/or pages. Does not disable automatic Global output.', 'optin-monster-api' ) );
|
730 |
break 2;
|
731 |
|
732 |
case 'only' :
|
733 |
$val = is_array( $value ) ? implode( ',', $value ) : $value;
|
734 |
+
$ret = $this->get_custom_field( $setting, '<input type="hidden" value="' . esc_attr( $val ) . '" id="omapi-field-' . $setting . '" class="omapi-select" name="omapi[' . $id . '][' . $setting . ']" data-placeholder="' . esc_attr__( 'Type to search and select post(s)...', 'optin-monster-api' ) . '">', esc_html__( 'Load campaign specifically on:', 'optin-monster-api' ), esc_html__( 'Loads the campaign on the selected posts and/or pages.', 'optin-monster-api' ) );
|
735 |
break 2;
|
736 |
|
737 |
case 'categories' :
|
740 |
ob_start();
|
741 |
wp_category_checklist( 0, 0, (array) $value, false, null, true );
|
742 |
$cats = ob_get_clean();
|
743 |
+
$ret = $this->get_custom_field( 'categories', $cats, esc_html__( 'Load campaign on post categories:', 'optin-monster-api' ) );
|
744 |
}
|
745 |
break;
|
746 |
|
753 |
if ( $tag_terms ) {
|
754 |
$display = (array) $value;
|
755 |
$display = isset( $display['post_tag'] ) ? implode( ',', $display['post_tag'] ) : '';
|
756 |
+
$html = $this->get_custom_field( $setting, '<input type="hidden" value="' . esc_attr( $display ) . '" id="omapi-field-' . $setting . '" class="omapi-select" name="tax_input[post_tag][]" data-placeholder="' . esc_attr__( 'Type to search and select post tag(s)...', 'optin-monster-api' ) . '">', esc_html__( 'Load campaign on post tags:', 'optin-monster-api' ), esc_html__( 'Loads the campaign on the selected post tags.', 'optin-monster-api' ) );
|
757 |
}
|
758 |
}
|
759 |
|
784 |
wp_terms_checklist( 0, $args );
|
785 |
$output = ob_get_clean();
|
786 |
if ( ! empty( $output ) ) {
|
787 |
+
$data[ $taxonomy ] = $this->get_custom_field( 'taxonomies', $output, esc_html__( 'Load campaign on ', 'optin-monster-api' ) . strtolower( $tax->labels->name ) . ':' );
|
788 |
}
|
789 |
}
|
790 |
}
|
802 |
break;
|
803 |
|
804 |
case 'show' :
|
805 |
+
$ret = $this->get_custom_field( 'show', $this->get_show_fields( $value ), esc_html__( 'Load campaign on post types and archives:', 'optin-monster-api' ) );
|
806 |
break;
|
807 |
|
808 |
case 'mailpoet' :
|
809 |
+
$ret = $this->get_checkbox_field( $setting, $value, $id, esc_html__( 'Save lead to MailPoet?', 'optin-monster-api' ), esc_html__( 'If checked, successful campaign leads will be saved to MailPoet.', 'optin-monster-api' ) );
|
810 |
break 2;
|
811 |
|
812 |
case 'mailpoet_list' :
|
813 |
+
$ret = $this->get_dropdown_field( $setting, $value, $id, $this->get_mailpoet_lists(), esc_html__( 'Add lead to this MailPoet list:', 'optin-monster-api' ), esc_html__( 'All successful leads for the campaign will be added to this particular MailPoet list.', 'optin-monster-api' ) );
|
814 |
+
break 2;
|
815 |
+
|
816 |
+
case 'mailpoet_use_phone':
|
817 |
+
$phone_field = get_post_meta( $optin_id, '_omapi_mailpoet_phone_field', true );
|
818 |
+
|
819 |
+
$ret = $this->get_checkbox_field( $setting, ! empty( $phone_field ), $id, esc_html__( 'Save phone number to MailPoet?', 'optin-monster-api' ), esc_html__( 'If checked, Phone number will be saved in Mailpoet.', 'optin-monster-api' ) );
|
820 |
+
break 2;
|
821 |
+
|
822 |
+
case 'mailpoet_phone_field' :
|
823 |
+
$ret .= $this->get_dropdown_field( $setting, $value, $id, $this->get_mailpoet_custom_fields(), esc_html__( 'Select the custom field for phone:', 'optin-monster-api' ), esc_html__( 'If you have a custom field for phone numbers, select the field here.', 'optin-monster-api' ) );
|
824 |
break 2;
|
825 |
|
826 |
// Start WooCommerce settings.
|
827 |
case 'show_on_woocommerce' :
|
828 |
+
$ret = $this->get_checkbox_field( $setting, $value, $id, esc_html__( 'Show on all WooCommerce pages', 'optin-monster-api' ), esc_html__( 'The campaign will show on any page where WooCommerce templates are used.', 'optin-monster-api' ) );
|
829 |
break 2;
|
830 |
|
831 |
case 'is_wc_shop' :
|
832 |
+
$ret = $this->get_checkbox_field( $setting, $value, $id, esc_html__( 'Show on WooCommerce shop', 'optin-monster-api' ), esc_html__( 'The campaign will show on the product archive page (shop).', 'optin-monster-api' ) );
|
833 |
break 2;
|
834 |
|
835 |
case 'is_wc_product' :
|
836 |
+
$ret = $this->get_checkbox_field( $setting, $value, $id, esc_html__( 'Show on WooCommerce products', 'optin-monster-api' ), esc_html__( 'The campaign will show on any single product.', 'optin-monster-api' ) );
|
837 |
break 2;
|
838 |
|
839 |
case 'is_wc_cart' :
|
840 |
+
$ret = $this->get_checkbox_field( $setting, $value, $id, esc_html__( 'Show on WooCommerce Cart', 'optin-monster-api' ), esc_html__( 'The campaign will show on the cart page.', 'optin-monster-api' ) );
|
841 |
break 2;
|
842 |
|
843 |
case 'is_wc_checkout' :
|
844 |
+
$ret = $this->get_checkbox_field( $setting, $value, $id, esc_html__( 'Show on WooCommerce Checkout', 'optin-monster-api' ), esc_html__( 'The campaign will show on the checkout page.', 'optin-monster-api' ) );
|
845 |
break 2;
|
846 |
|
847 |
case 'is_wc_account' :
|
848 |
+
$ret = $this->get_checkbox_field( $setting, $value, $id, esc_html__( 'Show on WooCommerce Customer Account', 'optin-monster-api' ), esc_html__( 'The campaign will show on the WooCommerce customer account pages.', 'optin-monster-api' ) );
|
849 |
break 2;
|
850 |
|
851 |
case 'is_wc_endpoint' :
|
852 |
+
$ret = $this->get_checkbox_field( $setting, $value, $id, esc_html__( 'Show on all WooCommerce Endpoints', 'optin-monster-api' ), esc_html__( 'The campaign will show when on any WooCommerce Endpoint.', 'optin-monster-api' ) );
|
853 |
break 2;
|
854 |
case 'is_wc_endpoint_order_pay' :
|
855 |
+
$ret = $this->get_checkbox_field( $setting, $value, $id, esc_html__( 'Show on WooCommerce Order Pay endpoint', 'optin-monster-api' ), esc_html__( 'The campaign will show when the endpoint page for order pay is displayed.', 'optin-monster-api' ) );
|
856 |
break 2;
|
857 |
|
858 |
case 'is_wc_endpoint_order_received' :
|
859 |
+
$ret = $this->get_checkbox_field( $setting, $value, $id, esc_html__( 'Show on WooCommerce Order Received endpoint', 'optin-monster-api' ), esc_html__( 'The campaign will show when the endpoint page for order received is displayed.', 'optin-monster-api' ) );
|
860 |
break 2;
|
861 |
|
862 |
case 'is_wc_endpoint_view_order' :
|
863 |
+
$ret = $this->get_checkbox_field( $setting, $value, $id, esc_html__( 'Show on WooCommerce View Order endpoint', 'optin-monster-api' ), esc_html__( 'The campaign will show when the endpoint page for view order is displayed.', 'optin-monster-api' ) );
|
864 |
break 2;
|
865 |
|
866 |
case 'is_wc_endpoint_edit_account' :
|
867 |
+
$ret = $this->get_checkbox_field( $setting, $value, $id, esc_html__( 'Show on WooCommerce Edit Account endpoint', 'optin-monster-api' ), esc_html__( 'The campaign will show when the endpoint page for edit account is displayed.', 'optin-monster-api' ) );
|
868 |
break 2;
|
869 |
|
870 |
case 'is_wc_endpoint_edit_address' :
|
871 |
+
$ret = $this->get_checkbox_field( $setting, $value, $id, esc_html__( 'Show on WooCommerce Edit Address endpoint', 'optin-monster-api' ), esc_html__( 'The campaign will show when the endpoint page for edit address is displayed.', 'optin-monster-api' ) );
|
872 |
break 2;
|
873 |
|
874 |
case 'is_wc_endpoint_lost_password' :
|
875 |
+
$ret = $this->get_checkbox_field( $setting, $value, $id, esc_html__( 'Show on WooCommerce Lost Password endpoint', 'optin-monster-api' ), esc_html__( 'The campaign will show when the endpoint page for lost password is displayed.', 'optin-monster-api' ) );
|
876 |
break 2;
|
877 |
|
878 |
case 'is_wc_endpoint_customer_logout' :
|
879 |
+
$ret = $this->get_checkbox_field( $setting, $value, $id, esc_html__( 'Show on WooCommerce Customer Logout endpoint', 'optin-monster-api' ), esc_html__( 'The campaign will show when the endpoint page for customer logout is displayed.', 'optin-monster-api' ) );
|
880 |
break 2;
|
881 |
|
882 |
case 'is_wc_endpoint_add_payment_method' :
|
883 |
+
$ret = $this->get_checkbox_field( $setting, $value, $id, esc_html__( 'Show on WooCommerce Add Payment Method endpoint', 'optin-monster-api' ), esc_html__( 'The campaign will show when the endpoint page for add payment method is displayed.', 'optin-monster-api' ) );
|
884 |
break 2;
|
885 |
|
886 |
case 'is_wc_product_category' :
|
900 |
wp_terms_checklist( 0, $args );
|
901 |
$output = ob_get_clean();
|
902 |
if ( ! empty( $output ) ) {
|
903 |
+
$ret = $this->get_custom_field( $setting, $output, esc_html__( 'Show on WooCommerce Product Categories:', 'optin-monster-api' ) );
|
904 |
}
|
905 |
}
|
906 |
break 2;
|
922 |
wp_terms_checklist( 0, $args );
|
923 |
$output = ob_get_clean();
|
924 |
if ( ! empty( $output ) ) {
|
925 |
+
$ret = $this->get_custom_field( $setting, $output, esc_html__( 'Show on WooCommerce Product Tags:', 'optin-monster-api' ) );
|
926 |
}
|
927 |
}
|
928 |
break 2;
|
929 |
|
930 |
+
default:
|
931 |
+
break 2;
|
932 |
}
|
933 |
break;
|
934 |
case 'note' :
|
935 |
switch ( $setting ) {
|
936 |
case 'sidebar_widget_notice' :
|
937 |
+
$ret = $this->get_optin_type_note( $setting, esc_html__( 'Use Widgets to set Sidebar output', 'optin-monster-api' ), esc_html__( 'You can set this campaign to show in your sidebars using the OptinMonster widget within your sidebars.', 'optin-monster-api' ), 'widgets.php', esc_html__( 'Go to Widgets', 'optin-monster-api' ) );
|
938 |
+
break 2;
|
939 |
+
default:
|
940 |
break 2;
|
941 |
}
|
942 |
break;
|
943 |
+
default:
|
944 |
+
break;
|
945 |
}
|
946 |
|
947 |
// Return the setting output.
|
961 |
return apply_filters( 'optin_monster_api_user_output',
|
962 |
array(
|
963 |
array(
|
964 |
+
'name' => esc_html__( 'Show campaign to all visitors and users', 'optin-monster-api' ),
|
965 |
'value' => 'all'
|
966 |
),
|
967 |
array(
|
968 |
+
'name' => esc_html__( 'Show campaign to only visitors (not logged-in)', 'optin-monster-api' ),
|
969 |
'value' => 'out'
|
970 |
),
|
971 |
array(
|
972 |
+
'name' => esc_html__( 'Show campaign to only users (logged-in)', 'optin-monster-api' ),
|
973 |
'value' => 'in'
|
974 |
)
|
975 |
)
|
976 |
);
|
977 |
|
978 |
+
}
|
979 |
|
980 |
+
/**
|
981 |
+
* Returns the available MailPoet lists.
|
982 |
+
*
|
983 |
+
* @since 1.0.0
|
984 |
+
*
|
985 |
+
* @return array An array of MailPoet lists.
|
986 |
+
*/
|
987 |
+
public function get_mailpoet_lists() {
|
988 |
|
989 |
// Prepare variables.
|
990 |
$mailpoet = null;
|
994 |
|
995 |
// Get lists. Check for MailPoet 3 first. Default to legacy.
|
996 |
if ( class_exists( '\\MailPoet\\Config\\Initializer' ) ) {
|
997 |
+
$lists = \MailPoet\API\API::MP( 'v1' )->getLists();
|
998 |
} else {
|
999 |
$mailpoet = WYSIJA::get( 'list', 'model' );
|
1000 |
$lists = $mailpoet->get( array( 'name', 'list_id' ), array( 'is_enabled' => 1 ) );
|
1001 |
$listIdKey = 'list_id';
|
1002 |
}
|
1003 |
|
1004 |
+
// Add default option.
|
1005 |
+
$ret[] = array(
|
1006 |
+
'name' => esc_html__( 'Select your MailPoet list...', 'optin-monster-api' ),
|
1007 |
+
'value' => 'none',
|
1008 |
+
);
|
1009 |
|
1010 |
+
// Loop through the list data and add to array.
|
1011 |
+
foreach ( (array) $lists as $list ) {
|
1012 |
+
$ret[] = array(
|
1013 |
+
'name' => $list['name'],
|
1014 |
+
'value' => $list[ $listIdKey ],
|
1015 |
+
);
|
1016 |
+
}
|
1017 |
|
1018 |
/**
|
1019 |
* Filters the MailPoet lists.
|
1025 |
*/
|
1026 |
return apply_filters( 'optin_monster_api_mailpoet_lists', $ret, $lists, $mailpoet );
|
1027 |
|
1028 |
+
}
|
1029 |
+
|
1030 |
+
/**
|
1031 |
+
* Returns the available MailPoet custom fields.
|
1032 |
+
*
|
1033 |
+
* @since 1.9.8
|
1034 |
+
*
|
1035 |
+
* @return array An array of MailPoet custom fields.
|
1036 |
+
*/
|
1037 |
+
public function get_mailpoet_custom_fields() {
|
1038 |
+
// Prepare variables.
|
1039 |
+
$custom_fields = array();
|
1040 |
+
$ret = array();
|
1041 |
+
$default_fields = array( 'email', 'first_name', 'last_name' );
|
1042 |
+
|
1043 |
+
// Get lists. Check for MailPoet 3.
|
1044 |
+
if ( class_exists( '\\MailPoet\\Config\\Initializer' ) ) {
|
1045 |
+
$custom_fields = \MailPoet\API\API::MP( 'v1' )->getSubscriberFields();
|
1046 |
+
}
|
1047 |
+
|
1048 |
+
// Add default option.
|
1049 |
+
$ret[] = array(
|
1050 |
+
'name' => esc_html__( 'Select the phone number field...', 'optin-monster-api' ),
|
1051 |
+
'value' => '',
|
1052 |
+
);
|
1053 |
+
|
1054 |
+
// Loop through the list data and add to array.
|
1055 |
+
foreach ( (array) $custom_fields as $custom_field ) {
|
1056 |
+
if ( in_array( $custom_field['id'], $default_fields ) ) {
|
1057 |
+
continue;
|
1058 |
+
}
|
1059 |
+
|
1060 |
+
$ret[] = array(
|
1061 |
+
'name' => $custom_field['name'],
|
1062 |
+
'value' => $custom_field['id'],
|
1063 |
+
);
|
1064 |
+
}
|
1065 |
+
|
1066 |
+
/**
|
1067 |
+
* Filters the MailPoet custom fields.
|
1068 |
+
*
|
1069 |
+
*
|
1070 |
+
* @param array. $ret The MailPoet custom fields array, except
|
1071 |
+
* first name, last name and email
|
1072 |
+
* @param array. $custom_fields The raw MailPoet custom fields array.
|
1073 |
+
* Format differs by plugin verison.
|
1074 |
+
*/
|
1075 |
+
return apply_filters( 'optin_monster_api_mailpoet_custom_fields', $ret, $custom_fields );
|
1076 |
+
}
|
1077 |
+
|
1078 |
+
/**
|
1079 |
+
* Retrieves the UI output for the single posts show setting.
|
1080 |
+
*
|
1081 |
+
* @since 2.0.0
|
1082 |
+
*
|
1083 |
+
* @param array $value The meta index value for the show setting.
|
1084 |
+
* @return string $html HTML representation of the data.
|
1085 |
+
*/
|
1086 |
+
public function get_show_fields( $value ) {
|
1087 |
+
|
1088 |
+
// Increment the global tabindex counter.
|
1089 |
+
$this->tabindex++;
|
1090 |
+
|
1091 |
+
$output = '<label for="omapi-field-show-index" class="omapi-custom-label">';
|
1092 |
+
$output .= '<input type="checkbox" id="omapi-field-show-index" name="omapi[optins][show][]" value="index"' . checked( in_array( 'index', (array) $value ), 1, false ) . ' /> ' . esc_html__( 'Front Page and Search Pages', 'optin-monster-api' ) . '</label><br />';
|
1093 |
+
$post_types = get_post_types( array( 'public' => true ) );
|
1094 |
+
foreach ( (array) $post_types as $show ) {
|
1095 |
+
$pt_object = get_post_type_object( $show );
|
1096 |
+
$label = $pt_object->labels->name;
|
1097 |
+
$output .= '<label for="omapi-field-show-' . esc_html( strtolower( $label ) ) . '" class="omapi-custom-label">';
|
1098 |
+
$output .= '<input type="checkbox" id="omapi-field-show-' . esc_html( strtolower( $label ) ) . '" name="omapi[optins][show][]" tabindex="' . $this->tabindex . '" value="' . esc_attr( $show ) . '"' . checked( in_array( $show, (array) $value ), 1, false ) . ' /> ' . esc_html( $label ) . '</label><br />';
|
1099 |
+
|
1100 |
+
// Increment the global tabindex counter and iterator.
|
1101 |
+
$this->tabindex++;
|
1102 |
+
}
|
1103 |
+
|
1104 |
+
return $output;
|
1105 |
+
|
1106 |
+
}
|
1107 |
+
|
1108 |
+
/**
|
1109 |
+
* Retrieves the UI output for a plain text input field setting.
|
1110 |
+
*
|
1111 |
+
* @since 1.0.0
|
1112 |
+
*
|
1113 |
+
* @param string $setting The name of the setting to be saved to the DB.
|
1114 |
+
* @param mixed $value The value of the setting.
|
1115 |
+
* @param string $id The setting ID to target for name field.
|
1116 |
+
* @param string $label The label of the input field.
|
1117 |
+
* @param string $desc The description for the input field.
|
1118 |
+
* @param string $place Placeholder text for the field.
|
1119 |
+
* @param array $classes Array of classes to add to the field.
|
1120 |
+
* @param boolean $copy Turn on clipboard copy button and make field readonly
|
1121 |
+
* @return string $html HTML representation of the data.
|
1122 |
+
*/
|
1123 |
public function get_text_field( $setting, $value, $id, $label, $desc = false, $place = false, $classes = array(), $copy = false ) {
|
1124 |
|
1125 |
// Increment the global tabindex counter.
|
1136 |
$field .= '<span class="omapi-copy-button button" data-clipboard-target="#omapi-field-' . $setting . '">Copy to clipboard</span>';
|
1137 |
}
|
1138 |
if ( $desc ) {
|
1139 |
+
$field .= '<br /><label for="omapi-field-' . $setting . '"><span class="omapi-field-desc">' . $desc . '</span></label>';
|
1140 |
}
|
1141 |
$field .= '</p>';
|
1142 |
$field .= '</div>';
|
1146 |
|
1147 |
}
|
1148 |
|
|
|
1149 |
/**
|
1150 |
* Retrieves the UI output for a password input field setting.
|
1151 |
*
|
1158 |
* @param string $desc The description for the input field.
|
1159 |
* @param string $place Placeholder text for the field.
|
1160 |
* @param array $classes Array of classes to add to the field.
|
1161 |
+
* @param bool $hidden If the field should be hidden by default.
|
1162 |
* @return string $html HTML representation of the data.
|
1163 |
*/
|
1164 |
+
public function get_password_field( $setting, $value, $id, $label, $desc = false, $place = false, $classes = array(), $hidden = false ) {
|
1165 |
|
1166 |
// Increment the global tabindex counter.
|
1167 |
$this->tabindex++;
|
1168 |
|
1169 |
+
// if the field should be hidden, add the omapi-hidden class
|
1170 |
+
$hidden_class = $hidden ? 'omapi-hidden' : '';
|
1171 |
+
|
1172 |
// Build the HTML.
|
1173 |
+
$field = '<div class="omapi-field-box omapi-password-field omapi-field-box-' . $setting . ' omapi-clear '. $hidden_class . '">';
|
1174 |
$field .= '<p class="omapi-field-wrap"><label for="omapi-field-' . $setting . '">' . $label . '</label><br />';
|
1175 |
+
$field .= '<input type="password" id="omapi-field-' . $setting . '" class="' . implode( ' ', (array) $classes ) . '" name="omapi[' . $id . '][' . $setting . ']" tabindex="' . $this->tabindex . '" value="' . esc_attr( $value ) . '"' . ( $place ? ' placeholder="' . $place . '"' : '' ) . ' />';
|
1176 |
if ( $desc ) {
|
1177 |
+
$field .= '<br /><label for="omapi-field-' . $setting . '"><span class="omapi-field-desc">' . $desc . '</span></label>';
|
1178 |
}
|
1179 |
$field .= '</p>';
|
1180 |
$field .= '</div>';
|
1184 |
|
1185 |
}
|
1186 |
|
1187 |
+
/**
|
1188 |
+
* Retrieves the UI output for a password input field setting.
|
1189 |
+
*
|
1190 |
+
* @since 1.8.0
|
1191 |
+
*
|
1192 |
+
* @param string $setting The name of the setting to be saved to the DB.
|
1193 |
+
* @param mixed $value The value of the setting.
|
1194 |
+
* @param string $id The setting ID to target for name field.
|
1195 |
+
* @param string $label The label of the input field.
|
1196 |
+
* @param string $desc The description for the input field.
|
1197 |
+
* @return string $html HTML representation of the data.
|
1198 |
+
*/
|
1199 |
+
public function get_api_field( $setting, $value, $id, $label, $desc = false ) {
|
1200 |
+
|
1201 |
+
// Increment the global tabindex counter.
|
1202 |
+
$this->tabindex++;
|
1203 |
+
$value = trim( $value );
|
1204 |
+
|
1205 |
+
// Build the HTML.
|
1206 |
+
$field = '<div class="omapi-field-box omapi-field-wrap omapi-api-field omapi-field-box-' . $setting . ' omapi-clear"><br/>';
|
1207 |
+
if ( empty( $value ) ) {
|
1208 |
+
$field .= "<input type='submit' id='{$id}' class='button button-omapi-gray button-hero' value='{$label}'>";
|
1209 |
+
if ( $desc ) {
|
1210 |
+
$field .= '<br /><label for="omapi-field-' . $setting . '"><span class="omapi-field-desc">' . $desc . '</span></label>';
|
1211 |
+
}
|
1212 |
+
} else {
|
1213 |
+
$field .= '<p>' . __( 'Your account is <strong>connected.</strong>', 'optin-monster-api' ) . '</p><button id="omapiDisconnectButton" class="button button-omapi-gray button-hero">' . esc_html__( 'Disconnect', 'optin-monster-api' ) . '</button>';
|
1214 |
+
}
|
1215 |
+
|
1216 |
+
$field .= '</p>';
|
1217 |
+
$field .= '</div>';
|
1218 |
+
|
1219 |
+
// Return the HTML.
|
1220 |
+
return apply_filters( 'optin_monster_api_field', $field, $setting, $value, $id, $label );
|
1221 |
+
|
1222 |
+
}
|
1223 |
+
|
1224 |
/**
|
1225 |
* Retrieves the UI output for a hidden input field setting.
|
1226 |
*
|
1239 |
|
1240 |
// Build the HTML.
|
1241 |
$field = '<div class="omapi-field-box omapi-hidden-field omapi-field-box-' . $setting . ' omapi-clear omapi-hidden">';
|
1242 |
+
$field .= '<input type="hidden" id="omapi-field-' . $setting . '" class="' . implode( ' ', (array) $classes ) . '" name="omapi[' . $id . '][' . $setting . ']" tabindex="' . $this->tabindex . '" value="' . esc_attr( $value ) . '" />';
|
1243 |
$field .= '</div>';
|
1244 |
|
1245 |
// Return the HTML.
|
1270 |
$field .= '<p class="omapi-field-wrap"><label for="omapi-field-' . $setting . '">' . $label . '</label><br />';
|
1271 |
$field .= '<textarea id="omapi-field-' . $setting . '" class="' . implode( ' ', (array) $classes ) . '" name="omapi[' . $id . '][' . $setting . ']" rows="5" tabindex="' . $this->tabindex . '"' . ( $place ? ' placeholder="' . $place . '"' : '' ) . '>' . $value . '</textarea>';
|
1272 |
if ( $desc ) {
|
1273 |
+
$field .= '<br /><label for="omapi-field-' . $setting . '"><span class="omapi-field-desc">' . $desc . '</span></label>';
|
1274 |
}
|
1275 |
$field .= '</p>';
|
1276 |
$field .= '</div>';
|
1301 |
// Build the HTML.
|
1302 |
$field = '<div class="omapi-field-box omapi-checkbox-field omapi-field-box-' . $setting . ' omapi-clear">';
|
1303 |
$field .= '<p class="omapi-field-wrap"><label for="omapi-field-' . $setting . '">' . $label . '</label><br />';
|
1304 |
+
$field .= '<input type="checkbox" id="omapi-field-' . $setting . '" class="' . implode( ' ', (array) $classes ) . '" name="omapi[' . $id . '][' . $setting . ']" tabindex="' . $this->tabindex . '" value="' . esc_attr( $value ) . '"' . checked( $value, 1, false ) . ' /> ';
|
1305 |
if ( $desc ) {
|
1306 |
+
$field .= '<label for="omapi-field-' . $setting . '"><span class="omapi-field-desc">' . $desc . '</span></label>';
|
1307 |
}
|
1308 |
$field .= '</p>';
|
1309 |
$field .= '</div>';
|
1337 |
$field .= '<p class="omapi-field-wrap"><label for="omapi-field-' . $setting . '">' . $label . '</label><br />';
|
1338 |
$field .= '<select id="omapi-field-' . $setting . '" class="' . implode( ' ', (array) $classes ) . '" name="omapi[' . $id . '][' . $setting . ']" tabindex="' . $this->tabindex . '">';
|
1339 |
foreach ( $data as $i => $info ) {
|
1340 |
+
$field .= '<option value="' . esc_attr( $info['value'] ) . '"' . selected( $info['value'], $value, false ) . '>' . $info['name'] . '</option>';
|
1341 |
}
|
1342 |
$field .= '</select>';
|
1343 |
if ( $desc ) {
|
1344 |
+
$field .= '<br /><label for="omapi-field-' . $setting . '"><span class="omapi-field-desc">' . $desc . '</span></label>';
|
1345 |
}
|
1346 |
$field .= '</p>';
|
1347 |
$field .= '</div>';
|
1369 |
$field .= '<p class="omapi-field-wrap"><label for="omapi-field-' . $setting . '">' . $label . '</label></p>';
|
1370 |
$field .= $value;
|
1371 |
if ( $desc ) {
|
1372 |
+
$field .= '<br /><label for="omapi-field-' . $setting . '"><span class="omapi-field-desc">' . $desc . '</span></label>';
|
1373 |
}
|
1374 |
$field .= '</div>';
|
1375 |
|
1457 |
$field ='';
|
1458 |
|
1459 |
$field .= '<div class="omapi-support-links ' . $setting . '"><h3>' . $title . '</h3><ul>';
|
1460 |
+
$field .= '<li><a target="_blank" rel="noopener" href="' . esc_url( 'https://optinmonster.com/docs/' ) . '">'. esc_html__( 'Documentation', 'optin-monster-api' ) . '</a></li>';
|
1461 |
+
$field .= '<li><a target="_blank" rel="noopener noreferrer" href="' . esc_url( 'https://wordpress.org/plugins/optinmonster/changelog/' ) . '">'. esc_html__( 'Changelog', 'optin-monster-api' ) . '</a></li>';
|
1462 |
+
$field .= '<li><a target="_blank" rel="noopener" href="' . esc_url( OPTINMONSTER_APP_URL . '/account/support/' ) . '">'. esc_html__( 'Create a Support Ticket', 'optin-monster-api' ) . '</a></li>';
|
1463 |
$field .= '</ul></div>';
|
1464 |
|
1465 |
return apply_filters( 'optin_monster_api_support_links', $field, $setting);
|
1472 |
$field .= '<div class="omapi-support-data ' . $setting . '"><h3>' . $title . '</h3>';
|
1473 |
$link = OPTINMONSTER_APP_URL . '/account/support/';
|
1474 |
$field .= '<p>' . sprintf( wp_kses( __( 'Download the report and attach to your <a href="%s">support ticket</a> to help speed up the process.', 'optin-monster-api' ), array( 'a' => array( 'href' => array() ) ) ), esc_url( $link ) ) . '</p>';
|
1475 |
+
$field .= '<a href="' . esc_url_raw( '#' ) . '" id="js--omapi-support-pdf" class="button button-primary button-large omapi-support-data-button" title="' . esc_html__( 'Download a PDF Report for Support', 'optin-monster-api' ) . '" target="_blank">' . esc_html__( 'Download PDF Report', 'optin-monster-api' ) . '</a>';
|
1476 |
$field .= '</div>';
|
1477 |
|
1478 |
return apply_filters( 'optin_monster_api_support_data', $field, $setting, $title );
|
1479 |
}
|
1480 |
|
1481 |
+
/**
|
1482 |
+
* Returns the WooCommerce tab output.
|
1483 |
+
*
|
1484 |
+
* @since 1.7.0
|
1485 |
+
*
|
1486 |
+
* @return string $output The WooCommerce panel output.
|
1487 |
+
*/
|
1488 |
+
public function get_woocommerce() {
|
1489 |
+
|
1490 |
+
$keys_tab = OMAPI_WooCommerce::version_compare( '3.4.0' ) ? 'advanced' : 'api';
|
1491 |
+
$keys_admin_url = admin_url( "admin.php?page=wc-settings&tab={$keys_tab}§ion=keys" );
|
1492 |
+
$output = '';
|
1493 |
+
|
1494 |
+
if ( ! OMAPI_WooCommerce::is_minimum_version() && OMAPI_WooCommerce::is_connected() ) {
|
1495 |
+
$output .= '<p>' . esc_html( sprintf( __( 'OptinMonster requires WooCommerce %s or above.', 'optin-monster-api' ), OMAPI_WooCommerce::MINIMUM_VERSION ) ) . '</p>'
|
1496 |
+
. '<p>' . esc_html_x( 'This site is currently running: ', 'the current version of WooCommerce: "WooCommerce x.y.z"', 'optin-monster-api' )
|
1497 |
+
. '<code>WooCommerce ' . esc_html( OMAPI_WooCommerce::version() ) . '</code>.</p>'
|
1498 |
+
. '<p>' . esc_html__( 'Please upgrade to the latest version of WooCommerce to enjoy deeper integration with OptinMonster.', 'optin-monster-api' ) . '</p>';
|
1499 |
+
} elseif ( OMAPI_WooCommerce::is_connected() ) {
|
1500 |
+
// Set some default key details.
|
1501 |
+
$defaults = array(
|
1502 |
+
'key_id' => '',
|
1503 |
+
'description' => esc_html__( 'no description found', 'optin-monster-api' ),
|
1504 |
+
'truncated_key' => esc_html__( 'no truncated key found', 'optin-monster-api' ),
|
1505 |
+
);
|
1506 |
+
|
1507 |
+
// Get the key details.
|
1508 |
+
$key_id = $this->base->get_option( 'woocommerce', 'key_id' );
|
1509 |
+
$details = OMAPI_WooCommerce::get_key_details_by_id( $key_id );
|
1510 |
+
$r = wp_parse_args( array_filter( $details ), $defaults );
|
1511 |
+
$description = esc_html( $r['description'] );
|
1512 |
+
$truncated_key = esc_html( $r['truncated_key'] );
|
1513 |
+
|
1514 |
+
// Set up the key details for output.
|
1515 |
+
$key_string = "<code>{$description} (…{$truncated_key})</code>";
|
1516 |
+
$key_url = esc_url( add_query_arg( 'edit-key', $r['key_id'], $keys_admin_url ) );
|
1517 |
+
|
1518 |
+
$output .= '<p>' . esc_html__( 'WooCommerce is currently connected to OptinMonster with the following key:', 'optin-monster-api' ) . '</p>';
|
1519 |
+
$output .= '<p>' . $key_string . ' <a href="' . $key_url . '">View key</a></p>';
|
1520 |
+
$output .= '<p>' . esc_html__( 'You need to disconnect WooCommerce, below, to remove your keys from OptinMonster, or to change the consumer key/secret pair associated with OptinMonster.', 'optin-monster-api' ) . '</p>';
|
1521 |
+
$output .= $this->get_hidden_field( 'disconnect', '1', 'woocommerce' );
|
1522 |
+
} else {
|
1523 |
+
|
1524 |
+
$output .= '<p>' . sprintf( __( 'In order to integrate WooCommerce with the Display Rules in the campaign builder, OptinMonster needs <a href="%s" target="_blank">WooCommerce REST API credentials</a>. OptinMonster only needs Read access permissions to work. Enter an existing consumer key/secret pair below, or we can auto-generate a new pair of keys for you.', 'optin-monster-api' ), esc_url( $keys_admin_url ) ) . '</p>';
|
1525 |
+
$output .= $this->get_text_field(
|
1526 |
+
'consumer_key',
|
1527 |
+
'',
|
1528 |
+
'woocommerce',
|
1529 |
+
esc_html__( 'Consumer key', 'optin-monster-api' ),
|
1530 |
+
'',
|
1531 |
+
'ck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
|
1532 |
+
);
|
1533 |
+
$output .= $this->get_text_field(
|
1534 |
+
'consumer_secret',
|
1535 |
+
'',
|
1536 |
+
'woocommerce',
|
1537 |
+
esc_html__( 'Consumer secret', 'optin-monster-api' ),
|
1538 |
+
'',
|
1539 |
+
'cs_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
|
1540 |
+
);
|
1541 |
+
}
|
1542 |
+
|
1543 |
+
return $output;
|
1544 |
+
}
|
1545 |
+
|
1546 |
+
/**
|
1547 |
* Returns svg of OM Logo
|
1548 |
+
*
|
1549 |
+
* @return string The OptinMonster logo SVG data.
|
1550 |
*/
|
1551 |
public function get_svg_logo() {
|
1552 |
+
return '<svg class="omapi-svg-logo" viewBox="0 0 716 112" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.41">
|
1553 |
+
<path d="M527.78 91.4c0 1.1-.55 1.74-1.73 1.92-2.54.36-16 .36-18.35-.1-1.19-.26-1.82-1.08-1.82-2.45 0-3.27.36-13.99.36-17.26 0-2.54-.27-10.9-.27-13.45 0-5.54-2.36-8.27-7.18-8.27-2.9 0-8.9 3.36-8.9 6.63v32.72c0 1.36-.64 2.09-1.91 2.27-2.64.36-15.54.27-17.9-.09-1.28-.18-1.91-.91-1.91-2l.09-28.53c0-10.09-.82-18-2.36-23.72-.19-.82-.28-2 .81-2.27 2.55-.27 5.9-.73 10.18-1.37 6.45-1.27 10-1.9 10.81-1.9 1.18 0 .91 8.18 2.1 8.18.45 0 1.72-1.37 6.53-4.18 4.82-2.82 9-4.19 12.55-4.19 9.81 0 18.62 4.82 18.62 15.27 0 11.63 0 18.81.1 31.17 0 5.27.09 9.18.09 11.81l.09-.18zm40.35-47.24c0 .36-.28.9-.91 1.63-4.91-1.27-12.36.27-12.36 6.27 0 5.27 11.9 9.91 11.9 21.9 0 4-1.72 9.64-4.72 12.09-6 5.09-14.72 9.36-22.45 9.36-1.9 0-9.63-12.9-9.63-14.63 0-.37.27-.55.64-.64 2.81-.54 5.72-1.09 8.54-1.54 3.54-1.19 5.36-3 5.36-5.64 0-1.81-1-3.81-3.09-6.18a179.39 179.39 0 0 1-5.82-6.54C525.14 44.7 542.96 29.9 559.4 29.9c1.55 0 8.64 13 8.64 14.17l.09.1zm47.16 31.26c0 1.9-.91 9-.91 10.9 0 2.36-.27 2.45-2.36 3.64a35.86 35.86 0 0 1-17.36 4.27c-11.72 0-17.54-4.46-17.54-13.45 0-4.45.64-19.54.64-24.08 0-4.82-7-.82-7-4.27 0-1.1.27-4.91.27-5.9 0-1.46-.27-6.37-.27-7.73 0-.82 1.27-1.27 3.9-1.37 1.46 0 2.28-.45 2.37-1.18.27-1.54.36-4 .27-7.27l-.27-7.45c0-4.72.46-7 1.36-7 1.73 0 8 1.46 9.45 1.64 2.1.27 5.18.73 9.36 1.18 1 .1 1.55.45 1.55 1 0 2.73-.82 12-.82 14.72 0 2 .55 3 1.73 3 2.36 0 10.45-.36 12.9-.36.91 0 1.36.27 1.36.9 0 1.82-.63 6.55-.63 8.37l.09 8.45c0 .81-.55 1.27-1.73 1.27-4.18-.1-8.45-.18-12.63-.18-.64 0-.9.9-.9 2.63l.08 8.63c0 6.37.82 9.64 7.55 9.64 3.81 0 9.54-3.09 9.54-.1v.1zm37.53-18.9c0-8-9.9-13.18-15.36-6.28-1.54 2-2.27 4.28-2.27 7 0 1.1.54 1.64 1.73 1.64 3 0 7.63-.46 13.99-1.37 1.36-.18 2-.54 2-1h-.1zm21.26 3.72c0 4.1-1.36 6.45-4 7-.45.09-4.63.54-12.54 1.36-4.81.55-11.9 1.18-21.35 1.91 1.73 8.27 15.45 9.81 23.99 4.82 1.54-1 3.09-1.91 4.63-2.91 1.82.9 7.27 11.36 7.27 13.26 0 .28-.27.73-.9 1.37-4.91 5.27-12.55 7.9-23 7.9-19.08 0-32.35-12.08-32.35-31.26 0-18.35 11.63-32.08 30.35-32.08 7.73 0 14.36 2.82 19.81 8.55a28 28 0 0 1 8.18 20.17l-.09-.09zm41.07-4.82c0 3.1-3.45 2.37-6 2.19-3.72-.28-8.17-.28-10.17 1.45-1.18 1-1.82 3.18-1.82 6.36 0 2.91.19 12.9.19 15.81 0 1.91.45 8.54.45 10.45 0 1-.64 1.55-2 1.64-3.9.36-14.08.36-18.17-.1-1.37-.17-2-.81-2-2l.09-29.07c0-9.54-.91-17.36-2.64-23.45-.18-.81-.27-1.9.82-2.09 2.27-.27 5.45-.72 9.82-1.36 6.36-1.27 9.72-1.9 9.9-1.9 1.82 0 1.1 7.63 2.45 7.63.55 0 1.1-1.1 5-3.18 3.9-2.1 7.63-3.19 11.18-3.19 2.27 0 3.36.46 3.36 1.46 0 1.18-.1 2.82-.36 5-.64 5.9-.28 9.36-.28 14.35h.18zm-348.3 35.54c0 1.36-.64 2.18-1.82 2.36-2.45.36-15.72.36-18.17-.1-1.19-.26-1.82-1.26-1.82-3 0-3.17.36-13.53.36-16.62 0-7.09-.09-12.09-.27-15.09-.27-4.81-2.55-7.17-6.82-7.17-3.81 0-8.36 3.81-8.81 7.72-.18 1.73-.27 6.63-.27 14.9 0 3.18.36 14.09.36 17.36 0 1.36-.55 2-1.73 2h-18.35c-1.1 0-1.73-.82-1.73-2.46 0-3.27.36-13.9.36-17.17 0-2.54-.27-11.08-.27-13.63 0-14.9-15.8-7.27-15.8-1.9l.08 32.89c0 2.09-.18 2.18-2.27 2.36-4.36.36-11.72.36-17.27-.1-2-.17-2-.17-2-2.26l.1-29.08c0-6.63-.46-14.09-1.46-22.36-.18-1-.36-2.08.73-2.45 2-.82 9.09-1.18 10.45-1.45 1.36-.28 7.27-2.1 9.54-2.1 1.82 0 .9 8.55 1.73 8.46 2.45-.64 8.18-8.9 20.08-8.9 7.09 0 14.36 3.36 16.26 10.26 4.28-5.82 12.64-10.27 19.82-10.27 10.17 0 18.71 5 18.71 15.63 0 3.64-.36 15.72-.36 19.36 0 4.27.36 18.72.36 22.99l.28-.18zM41.44 63.15c0-6.09-4-12.09-10.63-12.09-9.91 0-14.09 13-7.91 20.54 6.18 7.54 18.54 3.36 18.54-8.45m66.33.54c0-11.72-12.81-16.26-18.72-8.45-4.9 6.54-3 20.72 8 20.72 7.09 0 10.72-4.09 10.72-12.27m22.45.1c0 16.99-10.9 30.35-28.35 30.35-6.73 0-15.09-4.64-14.82-4.64-.54 0-.81.64-.81 1.82 0 3.63.63 15 .63 18.63 0 1.27-.63 1.9-2 1.9-3.09 0-15.54.28-17.72-.27-1.18-.27-1.81-1-1.81-2.27l.09-46.7c0-9.46-.73-17.36-2.1-23.82-.18-.81-.27-1.9.64-2.27 3.27-1.27 14.82-3 18.45-3 3.73 0 2.36 6.27 3.54 6.27-.45 0 1.37-1.09 5.18-3.27 3.91-2.18 7.36-3.27 10.54-3.27 17.9 0 28.63 12.81 28.63 30.44l-.1.1zm46.34 11.44c0 2.64-.9 8.36-.9 10.9 0 2.2-.19 2.46-2.37 3.64a35.84 35.84 0 0 1-17.36 4.28c-11.72 0-17.53-4.46-17.53-13.45 0-4.64.63-19.45.63-24.08 0-4.91-7-.73-7-4.27 0-1.1.28-4.91.28-5.91 0-1.45-.27-6.36-.27-7.73 0-.81 1.27-1.27 3.9-1.36 1.46 0 2.27-.45 2.37-1.18.27-1.54.36-4 .27-7.27l-.27-7.45c0-4.73.45-7 1.36-7 2.18 0 7.18 1.37 9.45 1.64 2.09.27 5.18.72 9.36 1.18 1 .09 1.54.45 1.54 1 0 3.09-.81 11.63-.81 14.72 0 2 .54 3 1.72 3 2.36 0 10.45-.36 12.9-.36.91 0 1.37.27 1.37.9 0 1.82-.64 6.55-.64 8.36l.1 8.45c0 .82-.55 1.28-1.73 1.28-4.36-.1-8.27-.18-12.63-.18-.64 0-.91.9-.91 2.63l.09 8.63c0 6.36.9 9.64 7.54 9.64 4.27 0 9.54-3.19 9.54-.1v.1zm23.54-10.08c0 5 .36 21.35.36 26.35 0 .82-.54 1.36-1.54 1.55-2.82.45-15.82.54-18.63 0-.91-.19-1.46-.46-1.64-.82-.27-.55.27-24.9.27-27.08 0-11.45-.45-20.63-1.36-27.44-.36-3 .37-2.82 6.73-2.1 8.17.82 9.54-.27 15.8-.27 1.73 0 1.46 1.1 1.37 2.37-.9 7.9-1.36 16.99-1.36 27.44m1.54-45.07c0 7-4 10.54-11.9 10.54-12.54 0-15.36-12.54-8.27-18.27 7.45-6 20.17-1.9 20.17 7.73m65.07 71.15c0 1.09-.55 1.73-1.73 1.9-2.54.37-16 .37-18.36-.08-1.18-.28-1.81-1.1-1.81-2.46 0-3.27.36-14 .36-17.26 0-2.55-.27-10.9-.27-13.45 0-5.54-2.37-8.27-7.18-8.27-3.1 0-8.9 3.45-8.9 6.63v32.72c0 1.36-.64 2.09-1.92 2.27-3 .36-15.08.36-17.9-.1-1.27-.17-1.9-.9-1.9-2l.09-28.52c0-10.1-.82-18-2.37-23.72-.18-.91-.18-2 .82-2.27 2.55-.28 5.9-.73 10.18-1.37 6.45-1.27 10-1.9 10.81-1.9 1.18 0 .91 8.17 2.1 8.17-.46 0 1.72-1.36 6.53-4.18 4.82-2.81 9-4.18 12.55-4.18 9.81 0 18.62 4.82 18.62 15.27 0 11.63 0 18.81.1 31.17 0 5.27.09 9.18.09 11.81l.09-.18zM61.25 63.15c0 18.45-12.18 31.08-30.72 31.08C12.73 94.23 0 81.78 0 63.88c0-18.54 11.54-31.63 30.53-31.63 18.36 0 30.72 12.54 30.72 30.9" fill="#fff" fill-rule="nonzero"/>
|
1554 |
+
<g opacity=".15" transform="translate(-37.66 -251.39)">
|
1555 |
+
<clipPath id="a">
|
1556 |
+
<path d="M385.88 344.16h139.94v15.09H385.88z"/>
|
1557 |
+
</clipPath>
|
1558 |
+
<g clip-path="url(#a)">
|
1559 |
+
<path d="M455.85 344.16c38.62 0 69.97 3.36 69.97 7.54s-31.35 7.55-69.97 7.55-69.97-3.37-69.97-7.55 31.35-7.54 69.97-7.54" fill-rule="nonzero"/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1560 |
</g>
|
1561 |
</g>
|
1562 |
+
<path d="M460.26 32.8c.91-.55 1.1-3.91 1.18-4.9.28-2.28 3.1-3.28 4.91-2.1 3.18 2.27 4.82 6.63 5.27 10.36.46 3.82.1 8.9-2.63 11.9-2.91 3.28-10.27 4.28-14.63 3.82-1.18-.09-2.28-.36-3.37-.54l-2.09-18.72 2.28.45c2.27.45 6.9.91 9-.27h.08z" fill="#996" fill-rule="nonzero"/>
|
1563 |
+
<path d="M467.35 29.16a7.6 7.6 0 0 0-1.9-1.9c-.74-.55-2.1-.1-2.2.81l-.08.64c1.36-.46 2.9-.1 4.18.45m2.54 12.82c.55-2.91.28-6.27-.72-9.18a6.36 6.36 0 0 0-2.82-2.18c-1.73-.73-2.64-.46-3.45.27-.1.73-.28 1.27-.46 1.82 4.73 1.54 6.73 6.08 7.46 9.36v-.1zm-13.8-6.73a24.9 24.9 0 0 1-5.1-.54l1.64 15.08c2.18.45 4.72.45 7 .18 1.63-5.81 0-12.63-3.64-14.8l.1.08zm5.08-1c-.63.36-1.55.64-2.63.82 3.27 3.45 4.27 9.72 3.08 14.63 2.73-.55 5-1.55 6.18-2.82.28-.27.46-.63.73-.9 0-5.19-2.09-10.73-7.09-11.82-.09.1-.09.1-.18.1h-.09z" fill="#c0c0a0" fill-rule="nonzero"/>
|
1564 |
+
<path d="M460.26 44.06c-2.18.55-4.54.64-6.27.46-.73-.1-1.36-.18-2-.36l-1.09-9.36c1.73.36 3.46.54 5.1.54 2.35 1.46 3.9 4.9 4.17 8.72h.1zm6.64-13.17l.27 1.63c.18 1.1.18 2.37.09 3.64a10.65 10.65 0 0 0-4.82-3.45c.18-.55.37-1.1.46-1.82.72-.64 1.72-1 3.45-.27l.55.27m-1.37-3.55c.28.46.46.91.64 1.37-1-.27-2-.37-3.1-.1l.1-.63c.09-.9 1.45-1.36 2.18-.82l.18.1v.08zm-4.36 6.91c-.64.36-1.55.64-2.63.82 2 2.09 3.08 5.18 3.45 8.45a7.12 7.12 0 0 0 3.18-2c.73-.73-1.18-6.81-3.82-7.36-.09.1-.09.1-.18.1" fill="#fbfac4" fill-rule="nonzero"/>
|
1565 |
+
<path d="M375.03 32.8c-.92-.55-1.1-3.91-1.19-4.9-.27-2.28-3.09-3.28-4.9-2.1-3.19 2.27-4.82 6.63-5.27 10.36-.46 3.82-.1 8.9 2.63 11.9 2.9 3.28 10.27 4.28 14.63 3.82 1.18-.09 2.27-.36 3.36-.54l2.1-18.72-2.28.45c-2.27.45-6.9.91-9-.27h-.08z" fill="#996" fill-rule="nonzero"/>
|
1566 |
+
<path d="M367.94 29.16a7.61 7.61 0 0 1 1.9-1.9c.73-.55 2.1-.1 2.19.81l.09.64c-1.37-.46-2.91-.1-4.18.45m-2.55 12.82c-.54-2.91-.27-6.27.73-9.18a6.36 6.36 0 0 1 2.82-2.18c1.72-.73 2.63-.46 3.45.27.09.73.27 1.27.45 1.82-4.72 1.54-6.72 6.08-7.45 9.36v-.1zm13.82-6.73c1.63 0 3.36-.18 5.08-.54l-1.63 15.08c-2.18.45-4.73.45-7 .18-1.63-5.81 0-12.63 3.64-14.8l-.1.08zm-5.1-1c.64.36 1.55.64 2.64.82-3.27 3.45-4.27 9.72-3.09 14.63-2.72-.55-5-1.55-6.18-2.82-.27-.27-.45-.63-.72-.9 0-5.19 2.09-10.73 7.08-11.82.1.1.1.1.19.1h.09z" fill="#c0c0a0" fill-rule="nonzero"/>
|
1567 |
+
<path d="M375.03 44.06c2.18.55 4.54.64 6.27.46.72-.1 1.36-.18 2-.36l1.08-9.36a24.9 24.9 0 0 1-5.08.54c-2.37 1.46-3.91 4.9-4.19 8.72h-.08zm-6.64-13.17l-.27 1.63c-.18 1.1-.18 2.37-.09 3.64a10.64 10.64 0 0 1 4.81-3.45c-.18-.55-.36-1.1-.45-1.82-.73-.64-1.72-1-3.45-.27l-.55.27m1.36-3.55c-.27.46-.45.91-.63 1.37 1-.27 2-.37 3.09-.1l-.1-.63c-.08-.9-1.44-1.36-2.17-.82l-.19.1v.08zm4.37 6.91c.63.36 1.54.64 2.63.82-2 2.09-3.09 5.18-3.45 8.45a7.12 7.12 0 0 1-3.18-2c-.73-.73 1.18-6.81 3.81-7.36.1.1.1.1.19.1" fill="#fbfac4" fill-rule="nonzero"/>
|
1568 |
+
<path d="M385.11 29.16c-3.18-.27-6.27.37-9.36.82l2.73-2.64a38.36 38.36 0 0 1 9.54-6.45c5-2.54 10.72-4.45 16.45-5-4-1.72-8.55-2.54-12.82-3.54 16.45-3.45 37.53-4.72 52.62 8.09 8.63 7.36 13.36 21 13.36 33.35 0 46.62-79.42 46.62-79.42 0a37.4 37.4 0 0 1 4.45-17.72c-1.09.27-2.09.64-3.18 1.09l-4.82 2 3.45-3.9a28.05 28.05 0 0 1 7.18-5.91l-.18-.19z" fill="#8ed41e" fill-rule="nonzero"/>
|
1569 |
+
<path d="M420.73 14.8c7.73.91 15.27 3.46 21.54 8.82 7.63 6.45 11.72 18.45 11.72 29.26 0 19.8-16.36 30.08-33.26 30.62V14.8z" fill="#70a91b" fill-rule="nonzero"/>
|
1570 |
+
<path d="M391.47 24.9c6-4 15.81-5.28 27.63-4.64-2.1-2.46-4-4-6.82-5.36 5.36-.19 9.63 1 20.27 4.63a51.33 51.33 0 0 0-30.99-6.63 37.93 37.93 0 0 1 10.81 5.09c-10.8-1.19-23.26 4-28.26 8.26 3.27-.36 6.18.28 9.27 1.64-4.36 1.54-7.18 2.9-9.9 5.54 4.72-2.36 8.45-4.36 14.44-5.63-2.36-.82-3.63-2.27-6.45-2.9" fill="#a1e141" fill-rule="nonzero"/>
|
1571 |
+
<path d="M417.82 13.9c10.91 0 19.72 8.54 19.72 19.17 0 10.54-8.8 19.17-19.72 19.17-10.9 0-19.71-8.54-19.71-19.17 0-10.54 8.81-19.17 19.71-19.17" fill="#70a91b" fill-rule="nonzero"/>
|
1572 |
+
<path d="M386.57 50.97c.63-1.18 60.42-1.63 61.6 0 2.1 2.73.92 5.36 0 7.63h-61.6c-.55-2.45-1.46-5.08 0-7.63" fill="#70a91b" fill-rule="nonzero"/>
|
1573 |
+
<path d="M387.38 52.7c.64-1.55 58.89-2.18 60.07 0 2 3.72.82 7.36 0 10.45h-60.07c-.54-3.37-1.36-6.9 0-10.45" fill="#4b7113" fill-rule="nonzero"/>
|
1574 |
+
<path d="M435.82 13.08c-.82-15.54-21.72-17.18-27.17-5 9.63-5.27 19.44-3.36 27.17 5" fill="#70a91b" fill-rule="nonzero"/>
|
1575 |
+
<path d="M424.19.17C418.1-.73 411.47 1.9 408.74 8c3.63-2 7.36-2.9 10.9-2.9.73-1.37 2.46-4 4.64-4.92h-.1z" fill="#85c51f" fill-rule="nonzero"/>
|
1576 |
+
<path d="M417.82 11.9c9.82 0 17.72 7.9 17.72 17.72 0 9.81-7.9 17.72-17.72 17.72-9.8 0-17.71-7.9-17.71-17.72 0-9.82 7.9-17.72 17.71-17.72" fill="#d3e8ef" fill-rule="nonzero"/>
|
1577 |
+
<path d="M406.65 16.44c5.9-4.9 14.17-4.9 18.35.18 4.18 5 2.73 13.09-3.18 18.09-5.9 4.9-14.17 4.9-18.35-.19-4.18-5-2.73-13.08 3.18-18.08" fill="#fff" fill-rule="nonzero"/>
|
1578 |
+
<path d="M418.28 23.62c6.9 0 12.45 5.18 12.45 11.63 0 6.45-5.55 11.63-12.45 11.63-6.9 0-12.45-5.18-12.45-11.63 0-6.45 5.54-11.63 12.45-11.63" fill="#0d82df" fill-rule="nonzero"/>
|
1579 |
+
<path d="M418.28 23.62c3.36 0 6.45 1.27 8.63 3.27a16.47 16.47 0 0 1-5.09 7.82c-4.9 4.08-11.45 4.72-15.9 2-.09-.46-.09-.91-.09-1.46 0-6.45 5.54-11.63 12.45-11.63" fill="#0399ed" fill-rule="nonzero"/>
|
1580 |
+
<path d="M418.28 27.8c4.36 0 8 3.36 8 7.45 0 4.1-3.55 7.45-8 7.45-4.36 0-8-3.36-8-7.45s3.55-7.45 8-7.45" fill="#232323" fill-rule="nonzero"/>
|
1581 |
+
<path d="M418.28 27.8a8.3 8.3 0 0 1 6.72 3.36 14.3 14.3 0 0 1-3.18 3.45 15.33 15.33 0 0 1-10.81 3.64c-.46-.9-.73-2-.73-3.09 0-4.09 3.55-7.45 8-7.45v.09z" fill="#323232" fill-rule="nonzero"/>
|
1582 |
+
<path d="M411.28 24.26c3.27 0 5.9 2.45 5.9 5.54s-2.63 5.54-5.9 5.54c-3.27 0-5.9-2.45-5.9-5.54s2.63-5.54 5.9-5.54" fill="#fff" fill-rule="nonzero"/>
|
1583 |
+
<path d="M376.48 57.06c27.44-4.09 54.98-3.73 82.42 0 2 14.36.9 27.99 0 41.7-27.44 1.1-54.98 1.28-82.42 0-1.64-13.9-1.82-27.8 0-41.7" fill="#9caeb3" fill-rule="nonzero"/>
|
1584 |
+
<path d="M384.38 95.95c22.27.82 44.44.73 66.7 0-8-4.54-15.99-8.9-24.99-11.36-2.9 1.37-6 2.46-9.08 3.37-.46.09-.46.09-.91 0a76.34 76.34 0 0 1-7.55-2.91 97.44 97.44 0 0 0-24.26 11l.1-.1zm-5.27-34.17c-1.18 11-1 22.09.19 33.08 8-5 16.53-9 25.53-11.81-10.36-5.45-17.63-13.27-25.72-21.27M454 59.6c-24.26-2.9-48.61-3.18-72.88 0 10 11.18 21 20.36 35.63 25.17C432.27 80.32 443 70.6 453.99 59.6m2.1 35.26c.72-11 1.45-21.99.26-32.98-8.17 8.09-16.9 15.8-27.08 21.17 9.46 2.81 18.27 7 26.9 11.81h-.09z" fill="#d3e8ef" fill-rule="nonzero"/>
|
1585 |
+
<path d="M384.38 95.95c10.73.37 21.45.55 32.26.55v-8.54c-.09 0-.18 0-.45-.1a75.27 75.27 0 0 1-7.54-2.9 97.5 97.5 0 0 0-24.27 11m-5.27-34.17c-1.18 11-1 22.08.19 33.07 8-5 16.53-9 25.53-11.81-10.36-5.45-17.63-13.27-25.72-21.27m37.53-4.45c-11.9 0-23.71.73-35.53 2.28 9.91 11.17 21 20.26 35.53 25.17V57.33z" fill="#fff" fill-rule="nonzero"/>
|
1586 |
+
<path d="M401.2 63.88c-.1.36-.28.72-.46 1.09a3.26 3.26 0 0 1-1 1.45c-1.09.82-2.45.55-3.63.09-2.64-1.1-4.45-3.73-5.55-6.27-1.27-2.91-1.36-5-.63-8.18 18.35-1 37.16-1.18 54.97-.09v.1h.28c.27 3.08 0 4.35-.73 6.9-.82 2.9-2.54 6.45-5.45 7.81-1.1.55-2.36.82-3.36.1-.46-.37-.82-.91-1.1-1.46-.63-1-.8-2.45-1-3.54-.36.72-.8 1.18-1.54 1.36a26.4 26.4 0 0 1-3.72.54c-1.18.1-2.45.19-3.73.19-1.9 0-4-.19-5.81-.73-.28 1.1-.73 2.09-1.82 2.45-1.18.36-2.64.55-3.9.64-1.37.09-2.73.18-4 .18-2.1 0-4.46-.18-6.37-1a2.45 2.45 0 0 1-1.45-1.54v-.1z" fill="#996" fill-rule="nonzero"/>
|
1587 |
+
<path d="M432 51.43c.73 4.09.55 9.36-.64 9.63-1.81.45-8.81 1.18-12.26-.1-.91-1.72-.91-6.08-.82-9.62 4.72 0 9.45 0 13.72.09m-29.35.81a82.01 82.01 0 0 0-1.9 6.73c-.37 1.64-.65 3.27-.92 4.45-.36 1.64-1.18 1.91-2.73 1.27-4-1.72-6.08-8.45-5.9-12.54 2.72-.18 6.81-.36 11.45-.54 4.45-.1 9.45-.18 14.45-.18.45 5 .45 11-.64 12.26-1.9.64-9.36 1.55-13-.09-1.63-.72-1-6.81-.9-11.26l.09-.1zm30.08-.81c.54 2.18 1.18 4.45 1.81 7.36.37 1.81.55 3.54.82 4.72.37 1.82 1.1 2.1 2.55 1.37 3.54-1.82 5.54-8.55 5.45-13-2.64-.18-6.36-.36-10.63-.45" fill="#c0c0a0" fill-rule="nonzero"/>
|
1588 |
+
<path d="M418.28 53.88c4.27 0 8.54 0 12.45.09.63 2.27.63 6.36-2.1 7.36-2.9.27-7.08.36-9.53-.54-.64-1.28-.82-4.1-.82-6.91m-15.72.27c3.9-.09 8.36-.18 12.81-.18.45 3.27 1.27 9.81-2.82 10.18-3 .27-6.72.27-9.08-.73-1.36-.64-1.18-5.18-1-9.18l.09-.09zm-11.18.55c1.91-.18 4.45-.28 7.45-.37.36 0 1.1 9 1.1 9-.37 1.64-1.19 1.9-2.73 1.27-3.19-1.36-5.18-5.9-5.73-9.81l-.09-.1zm43.98 8.81c.37 1.82 1.1 2.1 2.55 1.37 2.9-1.46 4.72-6.18 5.27-10.27a97.38 97.38 0 0 0-6.27-.37c-1.46 1.1-1.73 8.64-1.55 9.27" fill="#fbfac4" fill-rule="nonzero"/>
|
1589 |
+
<path d="M410.46 54.06c.19 3.55 0 7.09-.45 7.36-.9.55-4.27 1.27-5.9-.09-.64-.45-.55-3.9-.46-7.18 2.18-.09 4.45-.09 6.9-.18l-.09.1zm15.27-.09c.1 2.64-.09 5.09-.45 5.27-.82.45-4 1-5.64-.09-.54-.36-.54-2.82-.45-5.27h6.54v.09zm-28.71.45c-.1 1-.1 2.19-.1 3.37v3.63c0 1.36-.36 1.64-1.09 1-1.45-1.09-2.72-4.54-3.27-7.72 1.27-.1 2.82-.18 4.46-.28m45.07.1c-1.19-.1-2.55-.19-4.1-.19 0 1 .1 2.1.1 3.28v3.9c0 1.46.27 1.73 1 1.1 1.27-1.19 2.45-4.64 3-8.1" fill="#fff" fill-rule="nonzero"/>
|
1590 |
+
<path d="M381.93 96.68c-1 4.54-5.54 7.54-10.09 7.36-6.27-.27-15.99-7.18-15.8-14 .08-3.81 2.9-7.27 5.8-9.44 2.83-2.19 7.55-4.46 11.19-3.46 3.63 1 6.17 6 7.36 9.27 1.09 2.82 2.18 7.27 1.45 10.27h.1z" fill="#85c51f" fill-rule="nonzero"/>
|
1591 |
+
<path d="M380.39 96.22c.09-.54.18-1.09.18-1.72-1.18-5-4-10.72-7.18-11.63-4.9-1.46-14.81 5.09-14.27 11.81 2.73 4.18 8.55 7.63 12.72 7.81 3.82.19 7.73-2.36 8.55-6.18v-.09z" fill="#70a91b" fill-rule="nonzero"/>
|
1592 |
+
<path d="M375.84 91.14c1.27-2.55-.81-7-4-6.64-3.36.46-10.63 5.46-10.63 9.36 0 2.46 3.36 4.18 6.9 3.18 2.64-.72 6.73-3.81 7.73-5.9m2.82 6.36c.64-1.55-.27-4.27-2.09-4-1.9.36-6.45 3.63-6.27 5.45.09 1.46 2.63 2.73 4.63 2a7.69 7.69 0 0 0 3.73-3.45" fill="#5d8d17" fill-rule="nonzero"/>
|
1593 |
+
<path d="M370.84 79.32c.1 1.64-3.09 3.1-4.36 1.91-1.09-2.09-.81-4.63.1-5.18 1-.54 3.45.46 4.26 3.27M364.67 82.32c.36 1.82-2.1 3.36-3.28 2.55-1.54-1.55-2.09-4.27-1.36-4.91.73-.64 3.36.36 4.64 2.36M360.03 86.87c.55 1.18-.64 2.81-2 2.72-1.45-1.09-2.81-3.63-2.27-4.27.55-.72 3 0 4.27 1.55M383.3 69.96c.72-1.36-1.28-2.27-2.91-2.9-1.64-.55-2.46-.55-3.1.81-.72 1.37-1.08 3.46.64 4 1.64.55 4.73-.54 5.46-1.9h-.1z" fill="#2c440c" fill-rule="nonzero"/>
|
1594 |
+
<path d="M384.75 64.88c.18 1.54-2 2.36-3.82 2.72-1.72.37-2.45.18-2.63-1.36-.19-1.55.27-4 2.09-4.36 1.72-.37 4.18 1.45 4.36 3" fill="#2c440c" fill-rule="nonzero"/>
|
1595 |
+
<path d="M385.11 59.79c.19 1.45-2 2.18-3.81 2.54-1.73.36-2.46.18-2.64-1.36-.18-1.45.27-3.73 2-4.09 1.73-.36 4.18 1.36 4.36 2.82l.1.09zM370.84 56.42c.28 1.19 2.55.91 4.28.55 1.72-.45 2.36-.82 2-2-.28-1.18-1.37-2.81-3.1-2.36-1.72.45-3.45 2.63-3.18 3.9v-.09z" fill="#2c440c" fill-rule="nonzero"/>
|
1596 |
+
<path d="M369.3 70.87l.54 1.55-1.18-.91c-.54-.46-1-1.1-1.36-1.82.09.73.18 1.18.36 1.82-1.72-2.82-3.27-5.9-2.27-10 .91-3.72 4.64-5.45 7.27-6.18a13.9 13.9 0 0 1 5.09-.54c1 .09 2.73.36 3.45 1.27.73.91 1.1 2.82 1.27 4.09.28 2 .19 4.09-.08 6.09a13.1 13.1 0 0 1-1.73 5 5.98 5.98 0 0 1-2.64 2.36 6.42 6.42 0 0 1-3.9.36c-1.82-.36-3.46-1.45-4.91-3l.1-.09z" fill="#85c51f" fill-rule="nonzero"/>
|
1597 |
+
<path d="M380.3 57.33c1.09 1.28 1.63 6.64.36 10.54a7.22 7.22 0 0 1-6.45-1.63c.09.55.27.9.45 1.18-1.09-.45-2-1.81-2.63-3.36.08 1.27.27 1.82.45 2.55-1.36-.46-2.45-2-3.27-3.64-.73-1.45-.64-3.54.63-4.45 3.37-2.46 9.1-2.64 10.36-1.1l.1-.09z" fill="#a1e141" fill-rule="nonzero"/>
|
1598 |
+
<path d="M453.45 96.68c1 4.54 5.54 7.54 10.08 7.36 6.27-.27 16-7.18 15.81-14-.09-3.81-2.9-7.27-5.81-9.44-2.82-2.19-7.55-4.46-11.18-3.46s-6.18 6-7.36 9.27c-1.09 2.82-2.18 7.27-1.45 10.27h-.1z" fill="#85c51f" fill-rule="nonzero"/>
|
1599 |
+
<path d="M454.9 96.22c-.09-.54-.18-1.09-.18-1.72 1.18-5 4-10.72 7.18-11.63 4.9-1.46 14.8 5.09 14.26 11.81-2.72 4.18-8.54 7.63-12.72 7.81-3.82.19-7.72-2.36-8.54-6.18v-.09z" fill="#70a91b" fill-rule="nonzero"/>
|
1600 |
+
<path d="M459.53 91.14c-1.27-2.55.82-7 4-6.64 3.37.46 10.63 5.46 10.63 9.36 0 2.46-3.36 4.18-6.9 3.18-2.64-.72-6.73-3.81-7.73-5.9m-2.81 6.36c-.64-1.55.27-4.27 2.09-4 1.9.36 6.45 3.63 6.27 5.45-.1 1.46-2.64 2.73-4.64 2a7.68 7.68 0 0 1-3.72-3.45" fill="#5d8d17" fill-rule="nonzero"/>
|
1601 |
+
<path d="M464.44 79.32c-.09 1.64 3.1 3.1 4.36 1.91 1.1-2.09.82-4.63-.09-5.18-1-.54-3.45.46-4.27 3.27M470.62 82.32c-.36 1.82 2.1 3.36 3.27 2.55 1.55-1.55 2.1-4.27 1.37-4.91-.73-.64-3.37.36-4.64 2.36M475.26 86.87c-.55 1.18.63 2.81 2 2.72 1.45-1.09 2.81-3.63 2.27-4.27-.55-.72-3 0-4.27 1.55M452 69.96c-.74-1.36 1.26-2.27 2.9-2.9 1.64-.55 2.45-.55 3.09.81.73 1.37 1.1 3.46-.64 4-1.63.55-4.72-.54-5.45-1.9h.1z" fill="#2c440c" fill-rule="nonzero"/>
|
1602 |
+
<path d="M450.63 64.88c-.18 1.54 2 2.36 3.82 2.72 1.72.37 2.45.18 2.63-1.36.18-1.55-.27-4-2.09-4.36-1.73-.37-4.18 1.45-4.36 3" fill="#2c440c" fill-rule="nonzero"/>
|
1603 |
+
<path d="M450.18 59.79c-.19 1.45 2 2.18 3.81 2.54 1.73.36 2.45.18 2.63-1.36.19-1.45-.27-3.73-2-4.09-1.72-.36-4.17 1.36-4.36 2.82l-.08.09zM464.53 56.42c-.27 1.19-2.54.91-4.27.55-1.72-.45-2.36-.82-2-2 .28-1.18 1.36-2.81 3.09-2.36 1.73.45 3.45 2.63 3.18 3.9v-.09z" fill="#2c440c" fill-rule="nonzero"/>
|
1604 |
+
<path d="M465.99 70.87l-.55 1.55 1.18-.91c.55-.46 1-1.1 1.37-1.82a10.5 10.5 0 0 1-.37 1.82c1.73-2.82 3.28-5.9 2.28-10-.91-3.72-4.64-5.45-7.28-6.18a13.91 13.91 0 0 0-5.08-.54c-1 .09-2.73.36-3.46 1.27-.72.91-1.09 2.82-1.27 4.09-.27 2-.18 4.09.1 6.09.27 1.81.8 3.54 1.72 5a5.97 5.97 0 0 0 2.63 2.36c1.28.54 2.55.63 3.91.36 1.82-.36 3.45-1.45 4.91-3l-.1-.09z" fill="#85c51f" fill-rule="nonzero"/>
|
1605 |
+
<path d="M455 57.33c-1.1 1.28-1.65 6.64-.37 10.54a7.22 7.22 0 0 0 6.45-1.63c-.1.55-.27.9-.46 1.18 1.1-.45 2-1.81 2.64-3.36-.09 1.27-.27 1.82-.45 2.55 1.36-.46 2.45-2 3.27-3.64.72-1.45.63-3.54-.64-4.45-3.36-2.46-9.09-2.64-10.36-1.1l-.09-.09z" fill="#a1e141" fill-rule="nonzero"/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1606 |
</svg>';
|
1607 |
}
|
1608 |
|
1619 |
|
1620 |
$html .= '<div class="omapi-static-banner">';
|
1621 |
$html .= '<div class="inner-container">';
|
1622 |
+
$html .= '<div class="logo-wrapper">' . $this->get_svg_logo() . '<span class="omapi-logo-version">' . sprintf( esc_html__( 'v%s', 'optin-monster-api' ), $this->base->version ) . '</span></div>';
|
1623 |
$html .= '<div class="static-menu"><ul>';
|
1624 |
+
$html .= '<li><a target="_blank" rel="noopener" href="' . esc_url_raw( 'https://optinmonster.com/docs/' ) . '">' . esc_html__( 'Need Help?', 'optin-monster-api' ) . '</a></li>';
|
1625 |
+
$html .= '<li><a href="' . esc_url_raw( 'https://optinmonster.com/contact-us/' ) . '" target="_blank" rel="noopener">' . esc_html__( 'Send Us Feedback', 'optin-monster-api' ) . '</a></li>';
|
1626 |
if( $screen->id === 'toplevel_page_optin-monster-api-settings' ) {
|
1627 |
+
$html .= '<li class="omapi-menu-button"><a id="omapi-create-new-optin-button" href="' . OPTINMONSTER_APP_URL . '/campaigns/new/" class="button button-secondary omapi-new-optin" title="' . esc_html__( 'Create New Campaign', 'optin-monster-api' ) . '" target="_blank" rel="noopener">' . esc_html__( 'Create New Campaign', 'optin-monster-api' ) . '</a></li>';
|
1628 |
}
|
1629 |
$html .= '</ul></div>';
|
1630 |
$html .= '</div>';
|
1675 |
$sasId = get_option( 'optinmonster_sas_id', $omSasId );
|
1676 |
}
|
1677 |
|
1678 |
+
// Return the regular WP landing page by default
|
1679 |
+
$url = self::LANDING_URL;
|
1680 |
+
|
1681 |
// Return the sas link if we have a sas ID
|
1682 |
if ( ! empty( $omSasId ) ) {
|
1683 |
+
$url = $this->get_affiliate_url( $omSasId );
|
|
|
|
|
1684 |
}
|
1685 |
|
1686 |
+
return apply_filters( 'optin_monster_action_link', $url, array(
|
1687 |
+
'type' => 'sas',
|
1688 |
+
'id' => $omSasId,
|
1689 |
+
) );
|
1690 |
}
|
1691 |
|
1692 |
/**
|
1721 |
$omTrialId = get_option( 'optinmonster_trial_id', $omTrialId );
|
1722 |
}
|
1723 |
|
1724 |
+
// Return the regular WP landing page by default
|
1725 |
+
$url = self::LANDING_URL;
|
1726 |
+
|
1727 |
// Return the trial link if we have a trial ID
|
1728 |
if ( ! empty( $omTrialId ) ) {
|
1729 |
+
$url = $this->get_affiliate_url( $omTrialId )
|
1730 |
+
. '%2Ffree-trial%2F%3Fid%3D' . urlencode( trim( $omTrialId ) );
|
|
|
1731 |
}
|
1732 |
|
1733 |
+
return apply_filters( 'optin_monster_action_link', $url, array(
|
1734 |
+
'type' => 'trial',
|
1735 |
+
'id' => $omTrialId,
|
1736 |
+
) );
|
1737 |
+
}
|
1738 |
|
1739 |
+
/**
|
1740 |
+
* Get the affiliate url for given id.
|
1741 |
+
*
|
1742 |
+
* @since 1.8.4
|
1743 |
+
*
|
1744 |
+
* @param mixed $reference_id The reference ID.
|
1745 |
+
*
|
1746 |
+
* @return string The affilaite url.
|
1747 |
+
*/
|
1748 |
+
public function get_affiliate_url( $reference_id ) {
|
1749 |
+
return 'https://www.shareasale.com/r.cfm?u='
|
1750 |
+
. urlencode( trim( $reference_id ) )
|
1751 |
+
. '&b=601672&m=49337&afftrack=&urllink=optinmonster.com';
|
1752 |
}
|
1753 |
|
1754 |
public function get_action_link() {
|
1755 |
+
global $omTrialId;
|
|
|
|
|
1756 |
|
1757 |
if ( ! empty( $omTrialId ) ) {
|
1758 |
+
return $this->get_trial_link();
|
|
|
|
|
|
|
|
|
1759 |
}
|
1760 |
+
|
1761 |
+
// Returns the sas or fallback url, which is self::LANDING_URL.
|
1762 |
+
return $this->get_sas_link();
|
1763 |
}
|
1764 |
|
1765 |
public function has_trial_link() {
|
OMAPI/Output.php
CHANGED
@@ -7,6 +7,17 @@
|
|
7 |
* @package OMAPI
|
8 |
* @author Thomas Griffin
|
9 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
class OMAPI_Output {
|
11 |
|
12 |
/**
|
@@ -54,6 +65,15 @@ class OMAPI_Output {
|
|
54 |
*/
|
55 |
public $localized = false;
|
56 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
/**
|
58 |
* Holds JS slugs for maybe parsing shortcodes.
|
59 |
*
|
@@ -79,6 +99,11 @@ class OMAPI_Output {
|
|
79 |
*/
|
80 |
public function __construct() {
|
81 |
|
|
|
|
|
|
|
|
|
|
|
82 |
// Set our object.
|
83 |
$this->set();
|
84 |
|
@@ -92,6 +117,7 @@ class OMAPI_Output {
|
|
92 |
// Load actions and filters.
|
93 |
add_action( 'wp_enqueue_scripts', array( $this, 'api_script' ) );
|
94 |
add_action( 'wp_footer', array( $this, 'localize' ), 9999 );
|
|
|
95 |
add_action( 'wp_footer', array( $this, 'maybe_parse_shortcodes' ), 11 );
|
96 |
|
97 |
// Maybe load OptinMonster.
|
@@ -122,8 +148,7 @@ class OMAPI_Output {
|
|
122 |
* @since 1.0.0
|
123 |
*/
|
124 |
public function api_script() {
|
125 |
-
|
126 |
-
wp_enqueue_script( $this->base->plugin_slug . '-api-script', OPTINMONSTER_APIJS_URL, array( 'jquery' ), null );
|
127 |
|
128 |
if ( version_compare( get_bloginfo( 'version' ), '4.1.0', '>=' ) ) {
|
129 |
add_filter( 'script_loader_tag', array( $this, 'filter_api_script' ), 10, 2 );
|
@@ -134,7 +159,7 @@ class OMAPI_Output {
|
|
134 |
}
|
135 |
|
136 |
/**
|
137 |
-
* Filters the API script tag to add a custom ID.
|
138 |
*
|
139 |
* @since 1.0.0
|
140 |
*
|
@@ -149,9 +174,10 @@ class OMAPI_Output {
|
|
149 |
return $tag;
|
150 |
}
|
151 |
|
152 |
-
// Adjust the output to add our custom script ID.
|
153 |
-
return
|
154 |
-
|
|
|
155 |
}
|
156 |
|
157 |
/**
|
@@ -163,9 +189,8 @@ class OMAPI_Output {
|
|
163 |
* @return string $url Amended URL with our ID attribute appended.
|
164 |
*/
|
165 |
public function filter_api_url( $url ) {
|
166 |
-
|
167 |
// If the handle is not ours, do nothing.
|
168 |
-
if ( false === strpos( $url, str_replace( 'https://', '',
|
169 |
return $url;
|
170 |
}
|
171 |
|
@@ -200,23 +225,14 @@ class OMAPI_Output {
|
|
200 |
*/
|
201 |
public function maybe_load_optinmonster() {
|
202 |
|
203 |
-
// If a URL suffix is set to not load optinmonster, don't do anything.
|
204 |
-
if ( apply_filters( 'optin_monster_api_query_filter', false ) ) {
|
205 |
-
// Default the global cookie to 30 days.
|
206 |
-
$global_cookie = 30;
|
207 |
-
$global_cookie = apply_filters( 'optin_monster_query_cookie', $global_cookie ); // Deprecated.
|
208 |
-
$global_cookie = apply_filters( 'optin_monster_api_query_cookie', $global_cookie );
|
209 |
-
if ( $global_cookie ) {
|
210 |
-
setcookie( 'om-global-cookie', 1, time() + 3600 * 24 * (int) $global_cookie, COOKIEPATH, COOKIE_DOMAIN, false );
|
211 |
-
}
|
212 |
-
|
213 |
-
return;
|
214 |
-
}
|
215 |
-
|
216 |
// Add the hook to allow OptinMonster to process.
|
217 |
add_action( 'pre_get_posts', array( $this, 'load_optinmonster_inline' ), 9999 );
|
218 |
add_action( 'wp_footer', array( $this, 'load_optinmonster' ) );
|
219 |
|
|
|
|
|
|
|
|
|
220 |
}
|
221 |
|
222 |
/**
|
@@ -270,16 +286,11 @@ class OMAPI_Output {
|
|
270 |
}
|
271 |
|
272 |
// Prepare variables.
|
273 |
-
$post_id =
|
274 |
-
if ( ! $post_id ) {
|
275 |
-
if ( 'page' == get_option( 'show_on_front' ) ) {
|
276 |
-
$post_id = get_option( 'page_for_posts' );
|
277 |
-
}
|
278 |
-
}
|
279 |
$optins = $this->base->get_optins();
|
280 |
|
281 |
// If no optins are found, return early.
|
282 |
-
if (
|
283 |
return $content;
|
284 |
}
|
285 |
|
@@ -306,18 +317,12 @@ class OMAPI_Output {
|
|
306 |
public function load_optinmonster() {
|
307 |
|
308 |
// Prepare variables.
|
309 |
-
|
310 |
-
$
|
311 |
-
|
312 |
-
if ( 'page' == get_option( 'show_on_front' ) ) {
|
313 |
-
$post_id = get_option( 'page_for_posts' );
|
314 |
-
}
|
315 |
-
}
|
316 |
-
$optins = $this->base->get_optins();
|
317 |
-
$init = array();
|
318 |
|
319 |
// If no optins are found, return early.
|
320 |
-
if (
|
321 |
return;
|
322 |
}
|
323 |
|
@@ -359,6 +364,24 @@ class OMAPI_Output {
|
|
359 |
|
360 |
}
|
361 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
362 |
/**
|
363 |
* Sets the slug for possibly parsing shortcodes.
|
364 |
*
|
@@ -380,6 +403,10 @@ class OMAPI_Output {
|
|
380 |
$this->shortcodes[] = get_post_meta( $optin->ID, '_omapi_shortcode_output', true );
|
381 |
}
|
382 |
|
|
|
|
|
|
|
|
|
383 |
return $this;
|
384 |
}
|
385 |
|
@@ -414,7 +441,7 @@ class OMAPI_Output {
|
|
414 |
|
415 |
echo '<div style="position:absolute;overflow:hidden;clip:rect(0 0 0 0);height:1px;width:1px;margin:-1px;padding:0;border:0">';
|
416 |
echo '<div class="omapi-shortcode-helper">' . html_entity_decode( $shortcode, ENT_COMPAT ) . '</div>';
|
417 |
-
echo '<div class="omapi-shortcode-parsed">' . do_shortcode( html_entity_decode( $shortcode, ENT_COMPAT ) ) . '</div>';
|
418 |
echo '</div>';
|
419 |
}
|
420 |
}
|
@@ -450,27 +477,118 @@ class OMAPI_Output {
|
|
450 |
?>
|
451 |
<script type="text/javascript">var omapi_localized = { ajax: '<?php echo esc_url_raw( add_query_arg( 'optin-monster-ajax-route', true, admin_url( 'admin-ajax.php' ) ) ); ?>', nonce: '<?php echo wp_create_nonce( 'omapi' ); ?>', slugs: <?php echo json_encode( $this->slugs ); ?> };</script>
|
452 |
<?php
|
453 |
-
|
454 |
}
|
455 |
|
456 |
/**
|
457 |
-
* Enqueues the WP
|
458 |
*
|
459 |
-
* @since 1.
|
460 |
*/
|
461 |
-
public function
|
462 |
// Only try to use the MailPoet integration if it is active.
|
463 |
if ( $this->base->is_mailpoet_active() ) {
|
464 |
wp_enqueue_script(
|
465 |
-
$this->base->plugin_slug . '-wp-
|
466 |
-
plugins_url( 'assets/js/
|
467 |
-
array( 'jquery'),
|
468 |
$this->base->version . ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? time() : '' ),
|
469 |
true
|
470 |
);
|
471 |
}
|
472 |
}
|
473 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
474 |
/**
|
475 |
* Prepare the optin campaign html.
|
476 |
*
|
@@ -499,11 +617,146 @@ class OMAPI_Output {
|
|
499 |
public function enqueue_helper_js_if_applicable( $should_output, $rules ) {
|
500 |
|
501 |
// Check to see if we need to load the WP API helper script.
|
502 |
-
if ( $should_output
|
|
|
|
|
|
|
|
|
503 |
$this->wp_helper();
|
504 |
}
|
505 |
|
506 |
return $should_output;
|
507 |
}
|
508 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
509 |
}
|
7 |
* @package OMAPI
|
8 |
* @author Thomas Griffin
|
9 |
*/
|
10 |
+
|
11 |
+
// Exit if accessed directly.
|
12 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
+
exit;
|
14 |
+
}
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Output class.
|
18 |
+
*
|
19 |
+
* @since 1.0.0
|
20 |
+
*/
|
21 |
class OMAPI_Output {
|
22 |
|
23 |
/**
|
65 |
*/
|
66 |
public $localized = false;
|
67 |
|
68 |
+
/**
|
69 |
+
* Flag for determining if localized JS variable is output.
|
70 |
+
*
|
71 |
+
* @since 1.0.0
|
72 |
+
*
|
73 |
+
* @var bool
|
74 |
+
*/
|
75 |
+
public $data_output = false;
|
76 |
+
|
77 |
/**
|
78 |
* Holds JS slugs for maybe parsing shortcodes.
|
79 |
*
|
99 |
*/
|
100 |
public function __construct() {
|
101 |
|
102 |
+
// Checking if AMP is enabled.
|
103 |
+
if ( OMAPI_Utils::is_amp_enabled() ) {
|
104 |
+
return;
|
105 |
+
}
|
106 |
+
|
107 |
// Set our object.
|
108 |
$this->set();
|
109 |
|
117 |
// Load actions and filters.
|
118 |
add_action( 'wp_enqueue_scripts', array( $this, 'api_script' ) );
|
119 |
add_action( 'wp_footer', array( $this, 'localize' ), 9999 );
|
120 |
+
add_action( 'wp_footer', array( $this, 'display_rules_data' ), 9999 );
|
121 |
add_action( 'wp_footer', array( $this, 'maybe_parse_shortcodes' ), 11 );
|
122 |
|
123 |
// Maybe load OptinMonster.
|
148 |
* @since 1.0.0
|
149 |
*/
|
150 |
public function api_script() {
|
151 |
+
wp_enqueue_script( $this->base->plugin_slug . '-api-script', $this->base->get_api_url(), array(), null );
|
|
|
152 |
|
153 |
if ( version_compare( get_bloginfo( 'version' ), '4.1.0', '>=' ) ) {
|
154 |
add_filter( 'script_loader_tag', array( $this, 'filter_api_script' ), 10, 2 );
|
159 |
}
|
160 |
|
161 |
/**
|
162 |
+
* Filters the API script tag to output the JS version embed and to add a custom ID.
|
163 |
*
|
164 |
* @since 1.0.0
|
165 |
*
|
174 |
return $tag;
|
175 |
}
|
176 |
|
177 |
+
// Adjust the output to the JS version embed and to add our custom script ID.
|
178 |
+
return $this->om_script_tag( array(
|
179 |
+
'id' => 'omapi-script',
|
180 |
+
) );
|
181 |
}
|
182 |
|
183 |
/**
|
189 |
* @return string $url Amended URL with our ID attribute appended.
|
190 |
*/
|
191 |
public function filter_api_url( $url ) {
|
|
|
192 |
// If the handle is not ours, do nothing.
|
193 |
+
if ( false === strpos( $url, str_replace( 'https://', '', $this->base->get_api_url() ) ) ) {
|
194 |
return $url;
|
195 |
}
|
196 |
|
225 |
*/
|
226 |
public function maybe_load_optinmonster() {
|
227 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
228 |
// Add the hook to allow OptinMonster to process.
|
229 |
add_action( 'pre_get_posts', array( $this, 'load_optinmonster_inline' ), 9999 );
|
230 |
add_action( 'wp_footer', array( $this, 'load_optinmonster' ) );
|
231 |
|
232 |
+
if ( ! empty( $_GET['om-live-preview'] ) || ! empty( $_GET['om-verify-site'] ) ) {
|
233 |
+
add_action( 'wp_footer', array( $this, 'load_global_optinmonster' ) );
|
234 |
+
}
|
235 |
+
|
236 |
}
|
237 |
|
238 |
/**
|
286 |
}
|
287 |
|
288 |
// Prepare variables.
|
289 |
+
$post_id = self::current_id();
|
|
|
|
|
|
|
|
|
|
|
290 |
$optins = $this->base->get_optins();
|
291 |
|
292 |
// If no optins are found, return early.
|
293 |
+
if ( empty( $optins ) ) {
|
294 |
return $content;
|
295 |
}
|
296 |
|
317 |
public function load_optinmonster() {
|
318 |
|
319 |
// Prepare variables.
|
320 |
+
$post_id = self::current_id();
|
321 |
+
$optins = $this->base->get_optins();
|
322 |
+
$init = array();
|
|
|
|
|
|
|
|
|
|
|
|
|
323 |
|
324 |
// If no optins are found, return early.
|
325 |
+
if ( empty( $optins ) ) {
|
326 |
return;
|
327 |
}
|
328 |
|
364 |
|
365 |
}
|
366 |
|
367 |
+
/**
|
368 |
+
* Loads the global OM code on this page.
|
369 |
+
*
|
370 |
+
* @since 1.8.0
|
371 |
+
*/
|
372 |
+
public function load_global_optinmonster() {
|
373 |
+
$option = $this->base->get_option();
|
374 |
+
|
375 |
+
// If we don't have the data we need, return early.
|
376 |
+
if ( empty( $option['userId'] ) || empty( $option['accountId'] ) ) {
|
377 |
+
return;
|
378 |
+
}
|
379 |
+
|
380 |
+
$option['id'] = 'omapi-script-global';
|
381 |
+
|
382 |
+
echo $this->om_script_tag( $option );
|
383 |
+
}
|
384 |
+
|
385 |
/**
|
386 |
* Sets the slug for possibly parsing shortcodes.
|
387 |
*
|
403 |
$this->shortcodes[] = get_post_meta( $optin->ID, '_omapi_shortcode_output', true );
|
404 |
}
|
405 |
|
406 |
+
if ( get_post_meta( $optin->ID, '_omapi_mailpoet', true ) ) {
|
407 |
+
$this->wp_mailpoet();
|
408 |
+
}
|
409 |
+
|
410 |
return $this;
|
411 |
}
|
412 |
|
441 |
|
442 |
echo '<div style="position:absolute;overflow:hidden;clip:rect(0 0 0 0);height:1px;width:1px;margin:-1px;padding:0;border:0">';
|
443 |
echo '<div class="omapi-shortcode-helper">' . html_entity_decode( $shortcode, ENT_COMPAT ) . '</div>';
|
444 |
+
echo '<div class="omapi-shortcode-parsed omapi-encoded">' . htmlentities( do_shortcode( html_entity_decode( $shortcode, ENT_COMPAT ) ) ) . '</div>';
|
445 |
echo '</div>';
|
446 |
}
|
447 |
}
|
477 |
?>
|
478 |
<script type="text/javascript">var omapi_localized = { ajax: '<?php echo esc_url_raw( add_query_arg( 'optin-monster-ajax-route', true, admin_url( 'admin-ajax.php' ) ) ); ?>', nonce: '<?php echo wp_create_nonce( 'omapi' ); ?>', slugs: <?php echo json_encode( $this->slugs ); ?> };</script>
|
479 |
<?php
|
|
|
480 |
}
|
481 |
|
482 |
/**
|
483 |
+
* Enqueues the WP mailpoet script for storing local optins.
|
484 |
*
|
485 |
+
* @since 1.8.2
|
486 |
*/
|
487 |
+
public function wp_mailpoet() {
|
488 |
// Only try to use the MailPoet integration if it is active.
|
489 |
if ( $this->base->is_mailpoet_active() ) {
|
490 |
wp_enqueue_script(
|
491 |
+
$this->base->plugin_slug . '-wp-mailpoet',
|
492 |
+
plugins_url( 'assets/js/mailpoet.js', OMAPI_FILE ),
|
493 |
+
array( 'jquery' ),
|
494 |
$this->base->version . ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? time() : '' ),
|
495 |
true
|
496 |
);
|
497 |
}
|
498 |
}
|
499 |
|
500 |
+
/**
|
501 |
+
* Enqueues the WP helper script for the API.
|
502 |
+
*
|
503 |
+
* @since 1.0.0
|
504 |
+
*/
|
505 |
+
public function wp_helper() {
|
506 |
+
wp_enqueue_script(
|
507 |
+
$this->base->plugin_slug . '-wp-helper',
|
508 |
+
plugins_url( 'assets/js/helper.js', OMAPI_FILE ),
|
509 |
+
array(),
|
510 |
+
$this->base->version . ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? time() : '' ),
|
511 |
+
true
|
512 |
+
);
|
513 |
+
}
|
514 |
+
|
515 |
+
/**
|
516 |
+
* Outputs a JS variable, in the footer of the site, with information about
|
517 |
+
* the current page, and the terms in use for the display rules.
|
518 |
+
*
|
519 |
+
* @since 1.6.5
|
520 |
+
*
|
521 |
+
* @return void
|
522 |
+
*/
|
523 |
+
public function display_rules_data() {
|
524 |
+
global $wp_query;
|
525 |
+
|
526 |
+
// If already localized, do nothing.
|
527 |
+
if ( $this->data_output ) {
|
528 |
+
return;
|
529 |
+
}
|
530 |
+
|
531 |
+
// Set flag to true.
|
532 |
+
$this->data_output = true;
|
533 |
+
|
534 |
+
$tax_terms = array();
|
535 |
+
$object = get_queried_object();
|
536 |
+
$object_id = self::current_id();
|
537 |
+
$object_class = is_object( $object ) ? get_class( $object ) : '';
|
538 |
+
$object_type = '';
|
539 |
+
$object_key = '';
|
540 |
+
$post = null;
|
541 |
+
if ( 'WP_Post' === $object_class ) {
|
542 |
+
$post = $object;
|
543 |
+
$object_type = 'post';
|
544 |
+
$object_key = $object->post_type;
|
545 |
+
} elseif ( 'WP_Term' === $object_class ) {
|
546 |
+
$object_type = 'term';
|
547 |
+
$object_key = $object->taxonomy;
|
548 |
+
}
|
549 |
+
|
550 |
+
// Get the current object's terms, if applicable. Defaults to public taxonomies only.
|
551 |
+
if ( ! empty( $post->ID ) && is_singular() || ( $wp_query->is_category() || $wp_query->is_tag() || $wp_query->is_tax() ) ) {
|
552 |
+
|
553 |
+
// Should we only check public taxonomies?
|
554 |
+
$only_public = apply_filters( 'optinmonster_only_check_public_taxonomies', true, $post );
|
555 |
+
$taxonomies = get_object_taxonomies( $post, false );
|
556 |
+
|
557 |
+
if ( ! empty( $taxonomies ) && is_array( $taxonomies ) ) {
|
558 |
+
foreach ( $taxonomies as $taxonomy ) {
|
559 |
+
|
560 |
+
// Private ones should remain private and not output in the JSON blob.
|
561 |
+
if ( $only_public && ! $taxonomy->public ) {
|
562 |
+
continue;
|
563 |
+
}
|
564 |
+
|
565 |
+
$terms = get_the_terms( $post, $taxonomy->name );
|
566 |
+
if ( ! empty( $terms ) && is_array( $terms ) ) {
|
567 |
+
$tax_terms = array_merge( $tax_terms, wp_list_pluck( $terms, 'term_id' ) );
|
568 |
+
}
|
569 |
+
}
|
570 |
+
|
571 |
+
$tax_terms = wp_parse_id_list( $tax_terms );
|
572 |
+
}
|
573 |
+
}
|
574 |
+
|
575 |
+
$output = array(
|
576 |
+
'wc_cart' => $this->woocommerce_cart(),
|
577 |
+
'object_id' => $object_id,
|
578 |
+
'object_key' => $object_key,
|
579 |
+
'object_type' => $object_type,
|
580 |
+
'term_ids' => $tax_terms,
|
581 |
+
);
|
582 |
+
$output = function_exists( 'wp_json_encode' )
|
583 |
+
? wp_json_encode( $output )
|
584 |
+
: json_encode( $output );
|
585 |
+
|
586 |
+
// Output JS variable.
|
587 |
+
?>
|
588 |
+
<script type="text/javascript">var omapi_data = <?php echo $output; // XSS: okay. ?>;</script>
|
589 |
+
<?php
|
590 |
+
}
|
591 |
+
|
592 |
/**
|
593 |
* Prepare the optin campaign html.
|
594 |
*
|
617 |
public function enqueue_helper_js_if_applicable( $should_output, $rules ) {
|
618 |
|
619 |
// Check to see if we need to load the WP API helper script.
|
620 |
+
if ( $should_output ) {
|
621 |
+
if ( ! $rules->field_empty( 'mailpoet' ) ) {
|
622 |
+
$this->wp_mailpoet();
|
623 |
+
}
|
624 |
+
|
625 |
$this->wp_helper();
|
626 |
}
|
627 |
|
628 |
return $should_output;
|
629 |
}
|
630 |
|
631 |
+
/**
|
632 |
+
* Get the current page/post's post id.
|
633 |
+
*
|
634 |
+
* @since 1.6.9
|
635 |
+
*
|
636 |
+
* @return int
|
637 |
+
*/
|
638 |
+
public static function current_id() {
|
639 |
+
$post_id = get_queried_object_id();
|
640 |
+
if ( ! $post_id ) {
|
641 |
+
if ( 'page' == get_option( 'show_on_front' ) ) {
|
642 |
+
$post_id = get_option( 'page_for_posts' );
|
643 |
+
}
|
644 |
+
}
|
645 |
+
|
646 |
+
return $post_id;
|
647 |
+
}
|
648 |
+
|
649 |
+
/**
|
650 |
+
* AJAX callback for returning WooCommerce cart information.
|
651 |
+
*
|
652 |
+
* @since 1.7.0
|
653 |
+
*
|
654 |
+
* @return array An array of WooCommerce cart data.
|
655 |
+
*/
|
656 |
+
public function woocommerce_cart() {
|
657 |
+
// Bail if WooCommerce isn't currently active.
|
658 |
+
if ( ! OMAPI::is_woocommerce_active() ) {
|
659 |
+
return array();
|
660 |
+
}
|
661 |
+
|
662 |
+
// Check if WooCommerce is the minimum version.
|
663 |
+
if ( ! OMAPI_WooCommerce::is_minimum_version() ) {
|
664 |
+
return array();
|
665 |
+
}
|
666 |
+
|
667 |
+
// Bail if we don't have a cart object.
|
668 |
+
if ( ! isset( WC()->cart ) || '' === WC()->cart ) {
|
669 |
+
return array();
|
670 |
+
}
|
671 |
+
|
672 |
+
// Calculate the cart totals.
|
673 |
+
WC()->cart->calculate_totals();
|
674 |
+
|
675 |
+
// Get initial cart data.
|
676 |
+
$cart = WC()->cart->get_totals();
|
677 |
+
$cart['cart_items'] = WC()->cart->get_cart();
|
678 |
+
|
679 |
+
// Set the currency data.
|
680 |
+
$currencies = get_woocommerce_currencies();
|
681 |
+
$currency_code = get_woocommerce_currency();
|
682 |
+
$cart['currency'] = array(
|
683 |
+
'code' => $currency_code,
|
684 |
+
'symbol' => get_woocommerce_currency_symbol( $currency_code ),
|
685 |
+
'name' => isset( $currencies[ $currency_code ] ) ? $currencies[ $currency_code ] : '',
|
686 |
+
);
|
687 |
+
|
688 |
+
// Add in some extra data to the cart item.
|
689 |
+
foreach ( $cart['cart_items'] as $key => $item ) {
|
690 |
+
$item_details = array(
|
691 |
+
'type' => $item['data']->get_type(),
|
692 |
+
'sku' => $item['data']->get_sku(),
|
693 |
+
'categories' => $item['data']->get_category_ids(),
|
694 |
+
'tags' => $item['data']->get_tag_ids(),
|
695 |
+
'regular_price' => $item['data']->get_regular_price(),
|
696 |
+
'sale_price' => $item['data']->get_sale_price() ? $item['data']->get_sale_price() : $item['data']->get_regular_price(),
|
697 |
+
'virtual' => $item['data']->is_virtual(),
|
698 |
+
'downloadable' => $item['data']->is_downloadable(),
|
699 |
+
'sold_individually' => $item['data']->is_sold_individually(),
|
700 |
+
);
|
701 |
+
unset( $item['data'] );
|
702 |
+
$cart['cart_items'][ $key ] = array_merge( $item, $item_details );
|
703 |
+
}
|
704 |
+
|
705 |
+
// Send back a response.
|
706 |
+
return $cart;
|
707 |
+
}
|
708 |
+
|
709 |
+
/**
|
710 |
+
* Get the OptinMonster embed script JS.
|
711 |
+
*
|
712 |
+
* @since 1.9.8
|
713 |
+
*
|
714 |
+
* @param array $args Array of arguments for the script, including
|
715 |
+
* optional user id, account id, and script id.
|
716 |
+
*
|
717 |
+
* @return string The embed script JS.
|
718 |
+
*/
|
719 |
+
public function om_script_tag( $args = array() ) {
|
720 |
+
|
721 |
+
$src = esc_url_raw( $this->base->get_api_url() );
|
722 |
+
|
723 |
+
$script_id = ! empty( $args['id'] )
|
724 |
+
? sprintf( 's.id="%s";', esc_attr( $args['id'] ) )
|
725 |
+
: '';
|
726 |
+
|
727 |
+
$account_id = ! empty( $args['accountId'] )
|
728 |
+
? sprintf( 's.dataset.account="%s";', esc_attr( $args['accountId'] ) )
|
729 |
+
: '';
|
730 |
+
|
731 |
+
$user_id = ! empty( $args['userId'] )
|
732 |
+
? sprintf( 's.dataset.user="%s";', esc_attr( $args['userId'] ) )
|
733 |
+
: '';
|
734 |
+
|
735 |
+
$env = defined( 'OPTINMONSTER_ENV' )
|
736 |
+
? sprintf( 's.dataset.env="%s";', esc_attr( OPTINMONSTER_ENV ) )
|
737 |
+
: '';
|
738 |
+
|
739 |
+
$tag = '<script>';
|
740 |
+
$tag .= '(function(d){';
|
741 |
+
$tag .= 'var s=d.createElement("script");';
|
742 |
+
$tag .= 's.type="text/javascript";';
|
743 |
+
$tag .= 's.src="%1$s";';
|
744 |
+
$tag .= 's.async=true;';
|
745 |
+
$tag .= '%2$s';
|
746 |
+
$tag .= '%3$s';
|
747 |
+
$tag .= '%4$s';
|
748 |
+
$tag .= '%5$s';
|
749 |
+
$tag .= 'd.getElementsByTagName("head")[0].appendChild(s);';
|
750 |
+
$tag .= '})(document);';
|
751 |
+
$tag .= '</script>';
|
752 |
+
|
753 |
+
return sprintf(
|
754 |
+
$tag,
|
755 |
+
$src,
|
756 |
+
$script_id,
|
757 |
+
$account_id,
|
758 |
+
$user_id,
|
759 |
+
$env
|
760 |
+
);
|
761 |
+
}
|
762 |
}
|
OMAPI/Pointer.php
ADDED
@@ -0,0 +1,106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Admin Pointer class.
|
4 |
+
*
|
5 |
+
* @since 1.6.5
|
6 |
+
*
|
7 |
+
* @package OMAPI
|
8 |
+
* @author Erik Jonasson
|
9 |
+
*/
|
10 |
+
|
11 |
+
// Exit if accessed directly.
|
12 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
+
exit;
|
14 |
+
}
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Admin Pointer class.
|
18 |
+
*
|
19 |
+
* @since 1.6.5
|
20 |
+
*/
|
21 |
+
class OMAPI_Pointer {
|
22 |
+
/**
|
23 |
+
* Holds the class object.
|
24 |
+
*
|
25 |
+
* @since 1.6.5
|
26 |
+
*
|
27 |
+
* @var object
|
28 |
+
*/
|
29 |
+
public static $instance;
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Class Constructor
|
33 |
+
*/
|
34 |
+
public function __construct() {
|
35 |
+
$this->set();
|
36 |
+
|
37 |
+
add_action( 'admin_enqueue_scripts', array( $this, 'load_pointer' ) );
|
38 |
+
}
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Sets our object instance and base class instance.
|
42 |
+
*
|
43 |
+
* @since 1.6.5
|
44 |
+
*/
|
45 |
+
public function set() {
|
46 |
+
self::$instance = $this;
|
47 |
+
$this->base = OMAPI::get_instance();
|
48 |
+
$this->view = isset( $_GET['optin_monster_api_view'] ) ? stripslashes( $_GET['optin_monster_api_view'] ) : $this->base->get_view();
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Loads our Admin Pointer, if:
|
53 |
+
* 1. We're on a valid WP Version
|
54 |
+
* 2. We're on the Dashboard Page
|
55 |
+
* 3. We don't have an API Key
|
56 |
+
* 4. The Pointer hasn't already been dismissed
|
57 |
+
*
|
58 |
+
* @since 1.6.5
|
59 |
+
*/
|
60 |
+
public function load_pointer() {
|
61 |
+
// Don't run on WP < 3.3.
|
62 |
+
if ( get_bloginfo( 'version' ) < '3.3' ) {
|
63 |
+
return;
|
64 |
+
}
|
65 |
+
$screen = get_current_screen();
|
66 |
+
// If we're not on the dashboard, or we already have an API key, don't trigger the pointer.
|
67 |
+
if ( 'dashboard' !== $screen->id || $this->base->get_api_credentials() ) {
|
68 |
+
return;
|
69 |
+
}
|
70 |
+
|
71 |
+
$content = '<h3>' . esc_html__( 'Get More Leads, Subscribers and Sales Today!', 'optin-monster-api' ) . '</h3>';
|
72 |
+
$content .= '<div class="om-pointer-close-link"><a class="close" href="#"></a></div>';
|
73 |
+
$content .= '<h4>' . esc_html__( 'Grow Your Business with OptinMonster', 'optin-monster-api' ) . '</h4>';
|
74 |
+
$content .= '<p>' . esc_html__( 'Turn your website visitors into subscribers and customers with OptinMonster, the #1 conversion optimization toolkit in the world.', 'optin-monster-api' ) . '</p>';
|
75 |
+
$content .= '<p>' . esc_html__( 'For a limited time, get 50% off any plan AND get instant access to OptinMonster University - our exclusive training portal with over $2,000 worth of courses, courses, content and videos', 'optin-monster-api' ) . '<strong> ' . esc_html__( '100% Free!', 'optin-monster-api' ) . '</strong></p>';
|
76 |
+
$content .= '<p><a class="button button-primary" id="omPointerButton" href="admin.php?page=optin-monster-api-welcome">' . esc_html__( 'Click Here to Learn More', 'optin-monster-api' ) . '</a>';
|
77 |
+
|
78 |
+
$pointer = array(
|
79 |
+
'id' => 'om-welcome-pointer',
|
80 |
+
'target' => '#toplevel_page_optin-monster-api-settings',
|
81 |
+
'options' => array(
|
82 |
+
'content' => $content,
|
83 |
+
'position' => array(
|
84 |
+
'edge' => 'left',
|
85 |
+
'align' => 'right',
|
86 |
+
),
|
87 |
+
),
|
88 |
+
);
|
89 |
+
|
90 |
+
// Make sure the pointer hasn't been dismissed.
|
91 |
+
$dismissed = explode( ',', (string) get_user_meta( get_current_user_id(), 'dismissed_wp_pointers', true ) );
|
92 |
+
if ( in_array( $pointer['id'], $dismissed ) ) {
|
93 |
+
return;
|
94 |
+
}
|
95 |
+
|
96 |
+
// Add pointers style to queue.
|
97 |
+
wp_enqueue_style( 'wp-pointer' );
|
98 |
+
// Add pointers script to queue. Add custom script.
|
99 |
+
wp_enqueue_script( $this->base->plugin_slug . '-pointer', plugins_url( 'assets/js/pointer.js', OMAPI_FILE ), array( 'wp-pointer' ), $this->base->version, true );
|
100 |
+
wp_enqueue_style( $this->base->plugin_slug . '-settings', plugins_url( '/assets/css/pointer.css', OMAPI_FILE ), array(), $this->base->version );
|
101 |
+
|
102 |
+
// Add pointer options to script.
|
103 |
+
wp_localize_script( $this->base->plugin_slug . '-pointer', 'omapiPointer', $pointer );
|
104 |
+
|
105 |
+
}
|
106 |
+
}
|
OMAPI/Refresh.php
CHANGED
@@ -7,153 +7,194 @@
|
|
7 |
* @package OMAPI
|
8 |
* @author Thomas Griffin
|
9 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
class OMAPI_Refresh {
|
11 |
|
12 |
/**
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
|
21 |
/**
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
// If no optins available, make sure they get deleted.
|
109 |
-
if (
|
110 |
$this->base->save->store_optins( array() );
|
111 |
}
|
112 |
|
113 |
// Set an error message.
|
114 |
-
$this->error = $
|
115 |
add_action( 'optin_monster_api_messages_' . $this->view, array( $this, 'error' ) );
|
116 |
-
|
117 |
-
// Store the optin data.
|
118 |
-
$this->base->save->store_optins( $ret );
|
119 |
-
|
120 |
-
// Update the option to remove stale error messages.
|
121 |
-
$option = $this->base->get_option();
|
122 |
-
$option['is_invalid'] = false;
|
123 |
-
$option['is_expired'] = false;
|
124 |
-
$option['is_disabled'] = false;
|
125 |
-
update_option( 'optin_monster_api', $option );
|
126 |
-
|
127 |
-
// Set a message.
|
128 |
-
add_action( 'optin_monster_api_messages_' . $this->view, array( $this, 'message' ) );
|
129 |
}
|
130 |
|
131 |
-
|
|
|
132 |
|
133 |
-
|
134 |
-
|
135 |
-
*
|
136 |
-
* @since 1.0.0
|
137 |
-
*/
|
138 |
-
public function error() {
|
139 |
|
140 |
-
|
141 |
-
|
142 |
-
|
|
|
|
|
|
|
|
|
|
|
143 |
|
144 |
-
|
145 |
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
* @since 1.0.0
|
150 |
-
*/
|
151 |
-
public function message() {
|
152 |
|
153 |
-
|
154 |
-
|
155 |
-
|
|
|
|
|
|
|
156 |
|
157 |
-
|
|
|
|
|
|
|
158 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
159 |
}
|
7 |
* @package OMAPI
|
8 |
* @author Thomas Griffin
|
9 |
*/
|
10 |
+
|
11 |
+
// Exit if accessed directly.
|
12 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
+
exit;
|
14 |
+
}
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Refresh class.
|
18 |
+
*
|
19 |
+
* @since 1.0.0
|
20 |
+
*/
|
21 |
class OMAPI_Refresh {
|
22 |
|
23 |
/**
|
24 |
+
* Holds the class object.
|
25 |
+
*
|
26 |
+
* @since 1.0.0
|
27 |
+
*
|
28 |
+
* @var object
|
29 |
+
*/
|
30 |
+
public static $instance;
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Path to the file.
|
34 |
+
*
|
35 |
+
* @since 1.0.0
|
36 |
+
*
|
37 |
+
* @var string
|
38 |
+
*/
|
39 |
+
public $file = __FILE__;
|
40 |
|
41 |
/**
|
42 |
+
* Holds the base class object.
|
43 |
+
*
|
44 |
+
* @since 1.0.0
|
45 |
+
*
|
46 |
+
* @var object
|
47 |
+
*/
|
48 |
+
public $base;
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Arguments for the API requests.
|
52 |
+
*
|
53 |
+
* @since 1.6.5
|
54 |
+
*
|
55 |
+
* @var array
|
56 |
+
*/
|
57 |
+
protected $api_args = array( 'limit' => 100 );
|
58 |
+
|
59 |
+
/**
|
60 |
+
* Primary class constructor.
|
61 |
+
*
|
62 |
+
* @since 1.0.0
|
63 |
+
*/
|
64 |
+
public function __construct() {
|
65 |
+
|
66 |
+
// Set our object.
|
67 |
+
$this->set();
|
68 |
+
}
|
69 |
+
|
70 |
+
/**
|
71 |
+
* Sets our object instance and base class instance.
|
72 |
+
*
|
73 |
+
* @since 1.0.0
|
74 |
+
*/
|
75 |
+
public function set() {
|
76 |
+
|
77 |
+
self::$instance = $this;
|
78 |
+
$this->base = OMAPI::get_instance();
|
79 |
+
$this->view = isset( $_GET['optin_monster_api_view'] ) ? stripslashes( $_GET['optin_monster_api_view'] ) : $this->base->get_view();
|
80 |
+
}
|
81 |
+
|
82 |
+
/**
|
83 |
+
* Maybe refresh optins if the action has been requested.
|
84 |
+
*
|
85 |
+
* @since 1.0.0
|
86 |
+
*/
|
87 |
+
public function maybe_refresh() {
|
88 |
+
|
89 |
+
// If we are missing our save action, return early.
|
90 |
+
if ( empty( $_POST['omapi_refresh'] ) ) {
|
91 |
+
return;
|
92 |
+
}
|
93 |
+
|
94 |
+
// Verify the nonce field.
|
95 |
+
check_admin_referer( 'omapi_nonce_' . $this->view, 'omapi_nonce_' . $this->view );
|
96 |
+
|
97 |
+
// Refresh the optins.
|
98 |
+
$this->refresh();
|
99 |
+
|
100 |
+
// Provide action to refresh optins.
|
101 |
+
do_action( 'optin_monster_api_refresh_optins', $this->view );
|
102 |
+
}
|
103 |
+
|
104 |
+
/**
|
105 |
+
* Refresh the optins.
|
106 |
+
*
|
107 |
+
* @since 1.0.0
|
108 |
+
*/
|
109 |
+
public function refresh() {
|
110 |
+
$api = OMAPI_Api::build( 'v1', 'optins', 'GET' );
|
111 |
+
|
112 |
+
// Set additional flags.
|
113 |
+
$this->api_args['wp'] = $GLOBALS['wp_version'];
|
114 |
+
$this->api_args['restUrl'] = esc_url_raw( get_rest_url() );
|
115 |
+
$this->api_args['homeUrl'] = esc_url_raw( home_url() );
|
116 |
+
|
117 |
+
if ( OMAPI::is_woocommerce_active() ) {
|
118 |
+
$this->api_args['wc'] = OMAPI_WooCommerce::version();
|
119 |
+
}
|
120 |
+
|
121 |
+
$results = array();
|
122 |
+
$body = $api->request( $this->api_args, false );
|
123 |
+
|
124 |
+
// Loop through paginated requests until we have fetched all the campaigns.
|
125 |
+
while ( ! is_wp_error( $body ) || empty( $body ) ) {
|
126 |
+
$limit = absint( wp_remote_retrieve_header( $api->response, 'limit' ) );
|
127 |
+
$page = absint( wp_remote_retrieve_header( $api->response, 'page' ) );
|
128 |
+
$total = absint( wp_remote_retrieve_header( $api->response, 'total' ) );
|
129 |
+
$total_pages = ceil( $total / $limit );
|
130 |
+
$results = array_merge( $results, (array) $body );
|
131 |
+
|
132 |
+
// If we've reached the end, prevent any further requests.
|
133 |
+
if ( $page >= $total_pages || $limit === 0 ) {
|
134 |
+
break;
|
135 |
+
}
|
136 |
+
|
137 |
+
$args = $this->api_args;
|
138 |
+
$args['page'] = $page + 1;
|
139 |
+
|
140 |
+
// Request the next page.
|
141 |
+
$body = $api->request( $args, false );
|
142 |
+
}
|
143 |
+
|
144 |
+
if ( is_wp_error( $body ) ) {
|
145 |
// If no optins available, make sure they get deleted.
|
146 |
+
if ( in_array( $body->get_error_code(), array( 'optins', 'no-campaigns-error' ), true ) ) {
|
147 |
$this->base->save->store_optins( array() );
|
148 |
}
|
149 |
|
150 |
// Set an error message.
|
151 |
+
$this->error = $body->get_error_message();
|
152 |
add_action( 'optin_monster_api_messages_' . $this->view, array( $this, 'error' ) );
|
153 |
+
return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
154 |
}
|
155 |
|
156 |
+
// Store the optin data.
|
157 |
+
$this->base->save->store_optins( $results );
|
158 |
|
159 |
+
// Update our sites as well
|
160 |
+
$sites = $this->base->sites->fetch();
|
|
|
|
|
|
|
|
|
161 |
|
162 |
+
// Update the option to remove stale error messages.
|
163 |
+
$option = $this->base->get_option();
|
164 |
+
$option['is_invalid'] = false;
|
165 |
+
$option['is_expired'] = false;
|
166 |
+
$option['is_disabled'] = false;
|
167 |
+
$option['connected'] = time();
|
168 |
+
$option['siteIds'] = $sites['ids'];
|
169 |
+
$option['customApiUrl'] = $sites['customApiUrl'];
|
170 |
|
171 |
+
$this->base->save->update_option( $option, $this->view );
|
172 |
|
173 |
+
// Set a message.
|
174 |
+
add_action( 'optin_monster_api_messages_' . $this->view, array( $this, 'message' ) );
|
175 |
+
}
|
|
|
|
|
|
|
176 |
|
177 |
+
/**
|
178 |
+
* Output an error message.
|
179 |
+
*
|
180 |
+
* @since 1.0.0
|
181 |
+
*/
|
182 |
+
public function error() {
|
183 |
|
184 |
+
?>
|
185 |
+
<div class="updated error"><p><?php echo $this->error; ?></p></div>
|
186 |
+
<?php
|
187 |
+
}
|
188 |
|
189 |
+
/**
|
190 |
+
* Output a refresh message.
|
191 |
+
*
|
192 |
+
* @since 1.0.0
|
193 |
+
*/
|
194 |
+
public function message() {
|
195 |
+
|
196 |
+
?>
|
197 |
+
<div class="updated"><p><?php esc_html_e( 'Your campaigns have been refreshed successfully.', 'optin-monster-api' ); ?></p></div>
|
198 |
+
<?php
|
199 |
+
}
|
200 |
}
|
OMAPI/RestApi.php
ADDED
@@ -0,0 +1,121 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Rest API Class, where we register/execute any REST API Routes
|
4 |
+
*
|
5 |
+
* @since 1.8.0
|
6 |
+
*/
|
7 |
+
|
8 |
+
// Exit if accessed directly.
|
9 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
+
exit;
|
11 |
+
}
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Rest Api class.
|
15 |
+
*
|
16 |
+
* @since 1.8.0
|
17 |
+
*/
|
18 |
+
class OMAPI_RestApi {
|
19 |
+
|
20 |
+
/**
|
21 |
+
* The Base OMAPI Object
|
22 |
+
*
|
23 |
+
* @since 1.8.0
|
24 |
+
*
|
25 |
+
* @var OMAPI
|
26 |
+
*/
|
27 |
+
protected $base;
|
28 |
+
|
29 |
+
/**
|
30 |
+
* The REST API Namespace
|
31 |
+
*
|
32 |
+
* @since 1.8.0
|
33 |
+
*
|
34 |
+
* @var string The namespace
|
35 |
+
*/
|
36 |
+
protected $namespace = 'omapp/v1';
|
37 |
+
|
38 |
+
public function __construct( ) {
|
39 |
+
$this->base = OMAPI::get_instance();
|
40 |
+
$this->register_rest_routes();
|
41 |
+
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Registers our Rest Routes for this App
|
45 |
+
*
|
46 |
+
* @since 1.8.0
|
47 |
+
*
|
48 |
+
* @return void
|
49 |
+
*/
|
50 |
+
public function register_rest_routes() {
|
51 |
+
register_rest_route(
|
52 |
+
$this->namespace,
|
53 |
+
'/optins/refresh',
|
54 |
+
array(
|
55 |
+
'methods' => 'POST',
|
56 |
+
'callback' => array( $this, 'fetch_campaigns' )
|
57 |
+
)
|
58 |
+
);
|
59 |
+
}
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Refresh our campaigns
|
63 |
+
*
|
64 |
+
* @since 1.8.0
|
65 |
+
*
|
66 |
+
* @param WP_REST_Request The REST Request
|
67 |
+
* @return WP_REST_Response The API Response
|
68 |
+
*/
|
69 |
+
public function fetch_campaigns( $request ) {
|
70 |
+
$header = $request->get_header( 'X-OptinMonster-ApiKey' );
|
71 |
+
|
72 |
+
// Use this API Key to make a request
|
73 |
+
if ( $this->validate_api_key( $header ) ) {
|
74 |
+
|
75 |
+
$this->base->refresh->refresh();
|
76 |
+
|
77 |
+
return new WP_REST_Response(
|
78 |
+
array( 'message' => esc_html__( 'OK', 'optin-monster-api' ) ),
|
79 |
+
200
|
80 |
+
);
|
81 |
+
}
|
82 |
+
|
83 |
+
return new WP_REST_Response(
|
84 |
+
array( 'message' => esc_html__( 'Could not verify this API Key.', 'optin-monster-api' ) ),
|
85 |
+
401
|
86 |
+
);
|
87 |
+
}
|
88 |
+
|
89 |
+
/**
|
90 |
+
* Validate this API Key
|
91 |
+
* We validate an API Key by fetching the Sites this key can fetch
|
92 |
+
* And then confirming that this key has access to at least one of these sites
|
93 |
+
*
|
94 |
+
* @since 1.8.0
|
95 |
+
*
|
96 |
+
* @param string $api_key
|
97 |
+
* @return bool True if the Key can be validated
|
98 |
+
*/
|
99 |
+
public function validate_api_key( $api_key ) {
|
100 |
+
$option = $this->base->get_option();
|
101 |
+
$site_ids = ! empty( $option['siteIds'] ) ? $option['siteIds'] : array();
|
102 |
+
|
103 |
+
if ( empty( $site_ids ) ) {
|
104 |
+
return false;
|
105 |
+
}
|
106 |
+
|
107 |
+
$api_key_sites = $this->base->sites->fetch( $api_key );
|
108 |
+
|
109 |
+
if ( empty( $api_key_sites ) ) {
|
110 |
+
return false;
|
111 |
+
}
|
112 |
+
|
113 |
+
foreach ( $site_ids as $site_id ) {
|
114 |
+
if ( in_array( $site_id, $api_key_sites['ids'] ) ) {
|
115 |
+
return true;
|
116 |
+
}
|
117 |
+
}
|
118 |
+
|
119 |
+
return false;
|
120 |
+
}
|
121 |
+
}
|
OMAPI/Review.php
CHANGED
@@ -7,6 +7,17 @@
|
|
7 |
* @package OMAPI
|
8 |
* @author Devin Vinson
|
9 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
class OMAPI_Review {
|
11 |
|
12 |
/**
|
@@ -27,15 +38,6 @@ class OMAPI_Review {
|
|
27 |
*/
|
28 |
public $file = __FILE__;
|
29 |
|
30 |
-
/**
|
31 |
-
* Holds the review slug.
|
32 |
-
*
|
33 |
-
* @since 1.1.4.5
|
34 |
-
*
|
35 |
-
* @var string
|
36 |
-
*/
|
37 |
-
public $hook;
|
38 |
-
|
39 |
/**
|
40 |
* Holds the base class object.
|
41 |
*
|
@@ -45,33 +47,6 @@ class OMAPI_Review {
|
|
45 |
*/
|
46 |
public $base;
|
47 |
|
48 |
-
/**
|
49 |
-
* Current API route.
|
50 |
-
*
|
51 |
-
* @since 1.1.4.5
|
52 |
-
*
|
53 |
-
* @var bool|string
|
54 |
-
*/
|
55 |
-
public $route = 'optinmonster.com/wp-json/optinmonster/v1/pluginreview/';
|
56 |
-
|
57 |
-
/**
|
58 |
-
* API Username.
|
59 |
-
*
|
60 |
-
* @since 1.1.4.5
|
61 |
-
*
|
62 |
-
* @var bool|string
|
63 |
-
*/
|
64 |
-
public $user = false;
|
65 |
-
|
66 |
-
/**
|
67 |
-
* API Key.
|
68 |
-
*
|
69 |
-
* @since 1.0.0
|
70 |
-
*
|
71 |
-
* @var bool|string
|
72 |
-
*/
|
73 |
-
public $key = false;
|
74 |
-
|
75 |
/**
|
76 |
* Primary class constructor.
|
77 |
*
|
@@ -79,25 +54,12 @@ class OMAPI_Review {
|
|
79 |
*/
|
80 |
public function __construct() {
|
81 |
|
82 |
-
// Set default class properties
|
83 |
-
$this->url = 'https://' . $this->route;
|
84 |
-
|
85 |
// Set our object.
|
86 |
$this->set();
|
87 |
|
88 |
-
// Pages
|
89 |
-
add_action( 'admin_menu', array( $this, 'register_review_page' ) );
|
90 |
-
|
91 |
-
// Action
|
92 |
-
add_action( 'admin_post_omapi_send_review', array( $this, 'omapi_send_review' ) );
|
93 |
-
|
94 |
// Review Notices
|
95 |
add_action( 'admin_notices', array( $this, 'review' ) );
|
96 |
add_action( 'wp_ajax_omapi_dismiss_review', array( $this, 'dismiss_review' ) );
|
97 |
-
|
98 |
-
// Admin Notices
|
99 |
-
add_action( 'admin_notices', array( $this, 'notices' ) );
|
100 |
-
|
101 |
}
|
102 |
|
103 |
/**
|
@@ -106,268 +68,8 @@ class OMAPI_Review {
|
|
106 |
* @since 1.1.4.5
|
107 |
*/
|
108 |
public function set() {
|
109 |
-
|
110 |
self::$instance = $this;
|
111 |
$this->base = OMAPI::get_instance();
|
112 |
-
|
113 |
-
}
|
114 |
-
|
115 |
-
/**
|
116 |
-
* Loads the OptinMonster admin menu.
|
117 |
-
*
|
118 |
-
* @since 1.1.4.5
|
119 |
-
*/
|
120 |
-
public function register_review_page() {
|
121 |
-
|
122 |
-
$this->hook = add_submenu_page(
|
123 |
-
__( 'OptinMonster', 'optin-monster-api' ), //parent slug
|
124 |
-
__( 'Review OptinMonster', 'optin-monster-api' ), //page title,
|
125 |
-
__( 'Thank you for your Review', 'optin-monster-api'),
|
126 |
-
apply_filters( 'optin_monster_api_menu_cap', 'manage_options' ), //cap
|
127 |
-
'optin-monster-api-review', //slug
|
128 |
-
array($this, 'callback_to_display_page') //callback
|
129 |
-
);
|
130 |
-
|
131 |
-
// Load settings page assets.
|
132 |
-
if ( $this->hook ) {
|
133 |
-
add_action( 'load-' . $this->hook, array( $this, 'assets' ) );
|
134 |
-
}
|
135 |
-
|
136 |
-
}
|
137 |
-
|
138 |
-
/**
|
139 |
-
* Loads assets for the settings page.
|
140 |
-
*
|
141 |
-
* @since 1.1.4.2
|
142 |
-
*/
|
143 |
-
public function assets() {
|
144 |
-
|
145 |
-
add_action( 'admin_enqueue_scripts', array( $this, 'styles' ) );
|
146 |
-
add_filter( 'admin_footer_text', array( $this, 'footer' ) );
|
147 |
-
add_action( 'in_admin_header', array( $this->base->menu, 'output_plugin_screen_banner') );
|
148 |
-
|
149 |
-
|
150 |
-
}
|
151 |
-
|
152 |
-
/**
|
153 |
-
* Register and enqueue settings page specific CSS.
|
154 |
-
*
|
155 |
-
* @since 1.1.4.2
|
156 |
-
*/
|
157 |
-
public function styles() {
|
158 |
-
|
159 |
-
wp_register_style( $this->base->plugin_slug . '-settings', plugins_url( '/assets/css/settings.css', OMAPI_FILE ), array(), $this->base->version );
|
160 |
-
wp_enqueue_style( $this->base->plugin_slug . '-settings' );
|
161 |
-
|
162 |
-
|
163 |
-
}
|
164 |
-
|
165 |
-
|
166 |
-
/**
|
167 |
-
* Customizes the footer text on the OptinMonster settings page.
|
168 |
-
*
|
169 |
-
* @since 1.1.4.5
|
170 |
-
*
|
171 |
-
* @param string $text The default admin footer text.
|
172 |
-
* @return string $text Amended admin footer text.
|
173 |
-
*/
|
174 |
-
public function footer( $text ) {
|
175 |
-
|
176 |
-
$url = 'https://wordpress.org/support/plugin/optinmonster/reviews?filter=5#new-post';
|
177 |
-
$text = sprintf( __( 'Please rate <strong>OptinMonster</strong> <a href="%s" target="_blank" rel="noopener">★★★★★</a> on <a href="%s" target="_blank">WordPress.org</a> to help us spread the word. Thank you from the OptinMonster team!', 'optin-monster-api' ), $url, $url );
|
178 |
-
return $text;
|
179 |
-
|
180 |
-
}
|
181 |
-
|
182 |
-
/**
|
183 |
-
* Outputs the Review Page.
|
184 |
-
*
|
185 |
-
* @since 1.1.4.5
|
186 |
-
*/
|
187 |
-
public function callback_to_display_page() {
|
188 |
-
|
189 |
-
|
190 |
-
// Get any saved meta
|
191 |
-
$review_meta = get_user_meta( get_current_user_id(), 'omapi_review_data', true );
|
192 |
-
|
193 |
-
// Get autofill details
|
194 |
-
$current_user = wp_get_current_user();
|
195 |
-
$current_usermail = isset ( $review_meta['user-email'] ) ? $review_meta['user-email'] : $current_user->user_email;
|
196 |
-
$current_userfullname = isset ( $review_meta['user-name'] ) ? $review_meta['user-name'] : $current_user->user_firstname . ' ' . $current_user->user_lastname;
|
197 |
-
$current_credentials = isset ( $review_meta['user-creds'] ) ? $review_meta['user-creds'] : '';
|
198 |
-
$current_source = isset ( $review_meta['user-source'] ) ? $review_meta['user-source'] : get_site_url();
|
199 |
-
$user_review = isset ( $review_meta['user-review'] ) ? $review_meta['user-review'] : '';
|
200 |
-
$review_status = isset ( $review_meta['status'] ) ? $review_meta['status'] : 'unfinished';
|
201 |
-
|
202 |
-
?>
|
203 |
-
|
204 |
-
<div class="wrap omapi-page">
|
205 |
-
<h2><?php echo esc_html( get_admin_page_title() ); ?></h2>
|
206 |
-
<div class="review-container">
|
207 |
-
|
208 |
-
<div id="review-panel" >
|
209 |
-
<div class="omapi-well omapi-mini-well">
|
210 |
-
<?php if ($review_status == 'finished') : ?>
|
211 |
-
|
212 |
-
<p><?php _e('Thank you for sending us your review. Please consider leaving us a review on WordPress.org as well. We do really appreciate your time.', 'optin-monster-api'); ?></p>
|
213 |
-
<?php else: ?>
|
214 |
-
<p><?php _e('Thank you for taking a minute to send us a review.', 'optin-monster-api'); ?></p>
|
215 |
-
|
216 |
-
<?php endif; ?>
|
217 |
-
</div>
|
218 |
-
<div class="omapi-review-form">
|
219 |
-
<form method="post" action="<?php echo admin_url( 'admin-post.php' ); ?>">
|
220 |
-
<input type="hidden" name="action" value="omapi_send_review">
|
221 |
-
<?php wp_nonce_field('omapi-submit-review','omapi-review-nonce') ?>
|
222 |
-
<div class="omapi-field-box">
|
223 |
-
<div class="omapi-field-wrap">
|
224 |
-
<label for="user-review"><?php _e('Review (required)', 'optin-monster-api'); ?></label>
|
225 |
-
<textarea id="user-review" tabindex="1" rows="5" name="user-review"><?php echo $user_review; ?></textarea>
|
226 |
-
<span class="omapi-field-desc"><?php _e('Be as specific as you would like (140 to 1000 characters).', 'optin-monster-api'); ?></span>
|
227 |
-
</div>
|
228 |
-
</div>
|
229 |
-
<div class="omapi-field-box">
|
230 |
-
<div class="omapi-field-wrap">
|
231 |
-
<label for="user-email"><?php _e('Email (required)', 'optin-monster-api'); ?></label>
|
232 |
-
<input type="text" id="user-email" placeholder="<?php _e('Email', 'optin-monster-api')?>" tabindex="1" name="user-email" value="<?php echo $current_usermail ?>">
|
233 |
-
</div>
|
234 |
-
</div>
|
235 |
-
<div class="omapi-field-box">
|
236 |
-
<div class="omapi-field-wrap">
|
237 |
-
<label><?php _e('Your Name (required)', 'optin-monster-api'); ?></label>
|
238 |
-
<input type="text" id="user-name" placeholder="<?php _e('Your Name', 'optin-monster-api')?>" tabindex="1" name="user-name" value="<?php echo $current_userfullname ?>">
|
239 |
-
<span class="omapi-field-desc"><?php _e('The name you would like shown if featured.', 'optin-monster-api'); ?></span>
|
240 |
-
</div>
|
241 |
-
</div>
|
242 |
-
<div class="omapi-field-box">
|
243 |
-
<div class="omapi-field-wrap">
|
244 |
-
<label><?php _e('Title and Company', 'optin-monster-api'); ?></label>
|
245 |
-
<input type="text" id="user-credentials" placeholder="<?php _e('Title, Company Name', 'optin-monster-api')?>" tabindex="1" name="user-credentials" value="<?php echo $current_credentials ?>">
|
246 |
-
<span class="omapi-field-desc"><?php _e('Professional Title and Company', 'optin-monster-api'); ?></span>
|
247 |
-
</div>
|
248 |
-
</div>
|
249 |
-
<div class="omapi-field-box">
|
250 |
-
<div class="omapi-field-wrap">
|
251 |
-
<label><?php _e('Where are you using OptinMonster', 'optin-monster-api'); ?></label>
|
252 |
-
<input type="text" id="user-source" placeholder="http://" tabindex="1" name="user-source" value="<?php echo $current_source; ?>">
|
253 |
-
<span class="omapi-field-desc"><?php _e('May be shown if featured.', 'optin-monster-api'); ?></span>
|
254 |
-
</div>
|
255 |
-
</div>
|
256 |
-
<p class="submit">
|
257 |
-
<?php if ($review_status !== 'finished') : ?>
|
258 |
-
<button class="button button-primary" type="submit"><?php _e('Send Review', 'optin-monster-api'); ?></button>
|
259 |
-
<?php endif; ?>
|
260 |
-
</p>
|
261 |
-
|
262 |
-
</form>
|
263 |
-
</div>
|
264 |
-
</div>
|
265 |
-
|
266 |
-
</div>
|
267 |
-
<?php
|
268 |
-
|
269 |
-
}
|
270 |
-
|
271 |
-
/**
|
272 |
-
* Handle review submission
|
273 |
-
*
|
274 |
-
* This is called via admin_post_{action} when form is submitted.
|
275 |
-
*
|
276 |
-
* @since 1.1.4.5
|
277 |
-
*
|
278 |
-
*/
|
279 |
-
public function omapi_send_review() {
|
280 |
-
|
281 |
-
// Check our form nonce
|
282 |
-
if ( ! wp_verify_nonce( $_POST['omapi-review-nonce'], 'omapi-submit-review' ) ) {
|
283 |
-
die( 'Unable to process request');
|
284 |
-
}
|
285 |
-
|
286 |
-
$user_id = get_current_user_id();
|
287 |
-
|
288 |
-
// Setup empty defaults
|
289 |
-
$user_review = '';
|
290 |
-
$user_email = '';
|
291 |
-
$user_name = '';
|
292 |
-
$user_creds = '';
|
293 |
-
$user_source = '';
|
294 |
-
$user_api = $this->base->get_api_credentials();
|
295 |
-
|
296 |
-
if ( isset( $_POST['user-review'] ) ) {
|
297 |
-
$user_review = sanitize_text_field( $_POST['user-review'] );
|
298 |
-
}
|
299 |
-
if ( isset( $_POST['user-email'] ) ) {
|
300 |
-
$user_email = sanitize_email( $_POST['user-email'] );
|
301 |
-
}
|
302 |
-
if ( isset( $_POST['user-name'] ) ) {
|
303 |
-
$user_name = sanitize_text_field( $_POST['user-name'] );
|
304 |
-
}
|
305 |
-
if ( isset( $_POST['user-credentials'] ) ) {
|
306 |
-
$user_creds = sanitize_text_field( $_POST['user-credentials'] );
|
307 |
-
}
|
308 |
-
if ( isset( $_POST['user-source'] ) ) {
|
309 |
-
$user_source = esc_url( $_POST['user-source'] );
|
310 |
-
}
|
311 |
-
|
312 |
-
// Add data into query
|
313 |
-
$data_array = array(
|
314 |
-
'user-review' => $user_review,
|
315 |
-
'user-email' => $user_email,
|
316 |
-
'user-name' => $user_name,
|
317 |
-
'user-creds' => $user_creds,
|
318 |
-
'user-source' => $user_source,
|
319 |
-
'user-key' => $user_api['key'],
|
320 |
-
'user-id' => $user_api['user']
|
321 |
-
);
|
322 |
-
|
323 |
-
// Save everything passed in to user meta as well
|
324 |
-
update_user_meta( $user_id, 'omapi_review_data', $data_array );
|
325 |
-
|
326 |
-
|
327 |
-
// Check for Name, Review, Email
|
328 |
-
if ( $user_name === '' || $user_review === '' || $user_email === '' ) {
|
329 |
-
$message = 'required-fields';
|
330 |
-
wp_redirect( add_query_arg( 'action', $message , admin_url( 'admin.php?page=optin-monster-api-review' ) ) );
|
331 |
-
exit;
|
332 |
-
}
|
333 |
-
|
334 |
-
// Build the headers of the request.
|
335 |
-
$headers = array(
|
336 |
-
'Content-Type' => 'application/x-www-form-urlencoded',
|
337 |
-
'Cache-Control' => 'no-store, no-cache, must-revalidate, max-age=0, post-check=0, pre-check=0',
|
338 |
-
'Pragma' => 'no-cache',
|
339 |
-
'Expires' => 0,
|
340 |
-
'OMAPI-Referer' => site_url(),
|
341 |
-
'OMAPI-Sender' => 'WordPress'
|
342 |
-
);
|
343 |
-
|
344 |
-
// Setup data to be sent to the API.
|
345 |
-
$data = array(
|
346 |
-
'headers' => $headers,
|
347 |
-
'body' => $data_array,
|
348 |
-
'timeout' => 3000,
|
349 |
-
'sslverify' => false
|
350 |
-
);
|
351 |
-
|
352 |
-
// Perform the query and retrieve the response.
|
353 |
-
$response = wp_remote_post( esc_url_raw( $this->url ), $data );
|
354 |
-
$response_body = json_decode( wp_remote_retrieve_body( $response ) );
|
355 |
-
|
356 |
-
if ( is_wp_error( $response_body ) ) {
|
357 |
-
//$action_query = 'error';
|
358 |
-
}
|
359 |
-
|
360 |
-
$message = isset($action_query) ? $action_query : 'success';
|
361 |
-
|
362 |
-
// Update array
|
363 |
-
$data_array['status'] = 'finished';
|
364 |
-
|
365 |
-
// Add status to review meta
|
366 |
-
update_user_meta( $user_id, 'omapi_review_data', $data_array );
|
367 |
-
|
368 |
-
//reload review page and end things
|
369 |
-
wp_redirect( add_query_arg( 'action', $message , admin_url( 'admin.php?page=optin-monster-api-review' ) ) );
|
370 |
-
exit;
|
371 |
}
|
372 |
|
373 |
/**
|
@@ -376,94 +78,83 @@ class OMAPI_Review {
|
|
376 |
* @since 1.1.6.1
|
377 |
*/
|
378 |
public function review() {
|
379 |
-
|
380 |
-
|
|
|
381 |
return;
|
382 |
}
|
383 |
|
384 |
-
// Verify that we can do a check for reviews.
|
385 |
$review = get_option( 'omapi_review' );
|
386 |
-
$time = time();
|
387 |
-
$load = false;
|
388 |
|
389 |
-
|
390 |
-
|
391 |
-
'time' => $time,
|
392 |
-
'dismissed' => false
|
393 |
-
);
|
394 |
-
$load = true;
|
395 |
-
} else {
|
396 |
-
// Check if it has been dismissed or not.
|
397 |
-
if ( (isset( $review['dismissed'] ) && ! $review['dismissed']) && (isset( $review['time'] ) && (($review['time'] + DAY_IN_SECONDS) <= $time)) ) {
|
398 |
-
$load = true;
|
399 |
-
}
|
400 |
-
}
|
401 |
-
|
402 |
-
// If we cannot load, return early.
|
403 |
-
if ( ! $load ) {
|
404 |
-
return;
|
405 |
-
}
|
406 |
|
407 |
-
|
408 |
-
update_option( 'omapi_review', $review );
|
409 |
|
410 |
-
|
411 |
-
|
412 |
-
$optins = $this->base->get_optins();
|
413 |
-
if ( ! $optins ) {
|
414 |
-
return;
|
415 |
-
}
|
416 |
-
|
417 |
-
foreach ( $optins as $optin ) {
|
418 |
-
// Verify the optin has been enabled.
|
419 |
-
$enabled = get_post_meta( $optin->ID, '_omapi_enabled', true );
|
420 |
-
if ( ! $enabled ) {
|
421 |
-
continue;
|
422 |
}
|
423 |
|
424 |
-
|
425 |
-
|
426 |
-
if ( ! $created ) {
|
427 |
-
continue;
|
428 |
-
}
|
429 |
|
430 |
-
|
431 |
-
|
432 |
-
break;
|
433 |
}
|
434 |
}
|
435 |
|
436 |
-
//
|
437 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
438 |
return;
|
439 |
}
|
440 |
|
441 |
// We have a candidate! Output a review message.
|
|
|
|
|
|
|
|
|
|
|
|
|
442 |
?>
|
443 |
<div class="notice notice-info is-dismissible om-review-notice">
|
444 |
-
<
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
451 |
</div>
|
452 |
-
<script type="text/javascript">
|
453 |
-
jQuery(document).ready( function($) {
|
454 |
-
$(document).on('click', '.om-dismiss-review-notice, .om-review-notice button', function( event ) {
|
455 |
-
if ( ! $(this).hasClass('om-review-out') ) {
|
456 |
-
event.preventDefault();
|
457 |
-
}
|
458 |
-
|
459 |
-
$.post( ajaxurl, {
|
460 |
-
action: 'omapi_dismiss_review'
|
461 |
-
});
|
462 |
-
|
463 |
-
$('.om-review-notice').remove();
|
464 |
-
});
|
465 |
-
});
|
466 |
-
</script>
|
467 |
<?php
|
468 |
}
|
469 |
|
@@ -473,39 +164,20 @@ class OMAPI_Review {
|
|
473 |
* @since 1.1.6.1
|
474 |
*/
|
475 |
public function dismiss_review() {
|
476 |
-
$review = get_option( 'omapi_review' );
|
477 |
-
if ( ! $review ) {
|
478 |
-
$review = array();
|
479 |
-
}
|
480 |
-
|
481 |
-
$review['time'] = time();
|
482 |
-
$review['dismissed'] = true;
|
483 |
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
/**
|
489 |
-
* Add admin notices as needed for review
|
490 |
-
*
|
491 |
-
* @since 1.1.4.5
|
492 |
-
*
|
493 |
-
*/
|
494 |
-
public function notices() {
|
495 |
-
|
496 |
-
if ( ! isset ( $_GET['action'] ) ) {
|
497 |
-
return;
|
498 |
}
|
499 |
|
500 |
-
|
501 |
-
|
502 |
-
|
|
|
|
|
503 |
|
504 |
-
|
505 |
-
if ( 'required-fields' === $_GET['action'] ) {
|
506 |
-
echo '<div class="error is-dismissible"><p>' . __( 'Your Name, Review, and Email address are required to submit your review.', 'optin-monster-api' ) . '</p></div>';
|
507 |
-
}
|
508 |
|
|
|
509 |
}
|
510 |
-
|
511 |
-
}
|
7 |
* @package OMAPI
|
8 |
* @author Devin Vinson
|
9 |
*/
|
10 |
+
|
11 |
+
// Exit if accessed directly.
|
12 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
+
exit;
|
14 |
+
}
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Review class.
|
18 |
+
*
|
19 |
+
* @since 1.1.4.5
|
20 |
+
*/
|
21 |
class OMAPI_Review {
|
22 |
|
23 |
/**
|
38 |
*/
|
39 |
public $file = __FILE__;
|
40 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
/**
|
42 |
* Holds the base class object.
|
43 |
*
|
47 |
*/
|
48 |
public $base;
|
49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
/**
|
51 |
* Primary class constructor.
|
52 |
*
|
54 |
*/
|
55 |
public function __construct() {
|
56 |
|
|
|
|
|
|
|
57 |
// Set our object.
|
58 |
$this->set();
|
59 |
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
// Review Notices
|
61 |
add_action( 'admin_notices', array( $this, 'review' ) );
|
62 |
add_action( 'wp_ajax_omapi_dismiss_review', array( $this, 'dismiss_review' ) );
|
|
|
|
|
|
|
|
|
63 |
}
|
64 |
|
65 |
/**
|
68 |
* @since 1.1.4.5
|
69 |
*/
|
70 |
public function set() {
|
|
|
71 |
self::$instance = $this;
|
72 |
$this->base = OMAPI::get_instance();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
}
|
74 |
|
75 |
/**
|
78 |
* @since 1.1.6.1
|
79 |
*/
|
80 |
public function review() {
|
81 |
+
|
82 |
+
// Don't show review request notice on welcome page.
|
83 |
+
if ( ! empty( $_GET['page'] ) && 'optin-monster-api-welcome' === $_GET['page'] ) {
|
84 |
return;
|
85 |
}
|
86 |
|
|
|
87 |
$review = get_option( 'omapi_review' );
|
|
|
|
|
88 |
|
89 |
+
// If already dismissed...
|
90 |
+
if ( ! empty( $review['dismissed'] ) ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
|
92 |
+
if ( empty( $review['later'] ) ) {
|
|
|
93 |
|
94 |
+
// Dismissed and no later, so do not show.
|
95 |
+
return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
}
|
97 |
|
98 |
+
$delayed_less_than_month_ago = ! empty( $review['later'] ) && $review['time'] + ( 30 * DAY_IN_SECONDS ) > time();
|
99 |
+
if ( $delayed_less_than_month_ago ) {
|
|
|
|
|
|
|
100 |
|
101 |
+
// Delayed less than a month ago, so do not show.
|
102 |
+
return;
|
|
|
103 |
}
|
104 |
}
|
105 |
|
106 |
+
// Check the installation time and find if it's ok to show the review notice.
|
107 |
+
$option = $this->base->get_option();
|
108 |
+
|
109 |
+
$installed_less_than_week_ago = $option['installed'] + ( 7 * DAY_IN_SECONDS ) > time();
|
110 |
+
|
111 |
+
if ( $installed_less_than_week_ago ) {
|
112 |
+
|
113 |
+
// Do not show the review if the plugin was installed less than 1 week ago.
|
114 |
return;
|
115 |
}
|
116 |
|
117 |
// We have a candidate! Output a review message.
|
118 |
+
|
119 |
+
wp_enqueue_script( $this->base->plugin_slug . '-notice', plugins_url( 'assets/js/notice.js', OMAPI_FILE ), array( 'jquery' ), $this->base->version, true );
|
120 |
+
wp_localize_script( $this->base->plugin_slug . '-notice', 'omNotice', array(
|
121 |
+
'nonce' => wp_create_nonce( 'om-review-nonce' ),
|
122 |
+
) );
|
123 |
+
|
124 |
?>
|
125 |
<div class="notice notice-info is-dismissible om-review-notice">
|
126 |
+
<div class="om-notice-wrap">
|
127 |
+
<h3><?php esc_html_e( 'Are you enjoying OptinMonster?', 'optin-monster-api' ); ?></h3>
|
128 |
+
<p style="margin-bottom:0">
|
129 |
+
<a href="#" class="button button-primary om-review-btns" data-res="yes" rel="noopener"><?php esc_html_e( 'Yes!', 'optin-monster-api' ); ?> 🙂</a>
|
130 |
+
<a href="#" class="button button-secondary om-review-btns" data-res="no" target="_blank" rel="noopener"><?php esc_html_e( 'Not Really!', 'optin-monster-api' ); ?></a>
|
131 |
+
<?php if ( ! $this->base->get_api_credentials() ) : ?>
|
132 |
+
<a href="<?php echo esc_url( admin_url( 'admin.php?page=optin-monster-api-welcome' ) ); ?>" class="om-dismiss-review-notice om-dismiss-review-notice-delay button button-secondary" rel="noopener">
|
133 |
+
<?php esc_html_e( 'What is OptinMonster?', 'optin-monster-api' ); ?>
|
134 |
+
</a>
|
135 |
+
<?php endif; ?>
|
136 |
+
</p>
|
137 |
+
</div>
|
138 |
+
<br>
|
139 |
+
<div class="om-notice-review">
|
140 |
+
<div class="om-steps om-step-yes" style="display: none">
|
141 |
+
<p><?php esc_html_e( 'That\'s awesome! Could you please do me a BIG favor and give it a 5-star rating on WordPress to help us spread the word and boost our motivation?', 'optin-monster-api' ); ?></p>
|
142 |
+
<p><strong>~ Thomas Griffin<br><?php printf( esc_html__( 'Co-Founder of %1$s', 'optin-monster-api' ), 'OptinMonster' ); ?></strong></p>
|
143 |
+
<p>
|
144 |
+
<a href="https://wordpress.org/support/plugin/optinmonster/reviews/?filter=5#new-post" class="om-dismiss-review-notice button button-primary" target="_blank" rel="noopener noreferrer"><?php esc_html_e( 'Ok, you deserve it', 'optin-monster-api' ); ?></a>
|
145 |
+
<a href="#" class="om-dismiss-review-notice om-dismiss-review-notice-delay" rel="noopener noreferrer"><?php esc_html_e( 'Nope, maybe later!', 'optin-monster-api' ); ?></a>
|
146 |
+
<a href="#" class="om-dismiss-review-notice" rel="noopener noreferrer"><?php esc_html_e( 'I already did!', 'optin-monster-api' ); ?></a>
|
147 |
+
</p>
|
148 |
+
</div>
|
149 |
+
<div class="om-steps om-step-no" style="display: none">
|
150 |
+
<p><?php printf( esc_html__( 'We\'re sorry to hear you aren\'t enjoying %1$s. We would love a chance to improve. Could you take a minute and let us know what we can do better?', 'optin-monster-api' ), 'OptinMonster' ); ?></p>
|
151 |
+
<p>
|
152 |
+
<a href="https://optinmonster.com/plugin-review-feedback/" class="om-dismiss-review-notice button button-primary" target="_blank" rel="noopener noreferrer"><?php esc_html_e( 'Give feedback', 'optin-monster-api' ); ?></a>
|
153 |
+
<a href="#" class="om-dismiss-review-notice" rel="noopener noreferrer"><?php esc_html_e( 'No thanks!', 'optin-monster-api' ); ?></a>
|
154 |
+
</p>
|
155 |
+
</div>
|
156 |
+
</div>
|
157 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
158 |
<?php
|
159 |
}
|
160 |
|
164 |
* @since 1.1.6.1
|
165 |
*/
|
166 |
public function dismiss_review() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
167 |
|
168 |
+
// Checking ajax nonce.
|
169 |
+
if ( empty( $_POST['nonce'] ) || ! wp_verify_nonce( $_POST['nonce'], 'om-review-nonce' ) ) {
|
170 |
+
wp_send_json_error();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
171 |
}
|
172 |
|
173 |
+
$option = array(
|
174 |
+
'time' => time(),
|
175 |
+
'dismissed' => true,
|
176 |
+
'later' => ! empty( $_POST['later'] ) && wp_validate_boolean( $_POST['later'] ),
|
177 |
+
);
|
178 |
|
179 |
+
$option['updated'] = update_option( 'omapi_review', $option );
|
|
|
|
|
|
|
180 |
|
181 |
+
wp_send_json_success( $option );
|
182 |
}
|
183 |
+
}
|
|
OMAPI/Rules.php
CHANGED
@@ -7,6 +7,17 @@
|
|
7 |
* @package OMAPI
|
8 |
* @author Justin Sternberg
|
9 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
class OMAPI_Rules_Exception extends Exception {
|
11 |
protected $bool = null;
|
12 |
public function __construct( $message = null, $code = 0, Exception $previous = null ) {
|
@@ -96,6 +107,15 @@ class OMAPI_Rules {
|
|
96 |
*/
|
97 |
protected $is_inline_check = false;
|
98 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
/**
|
100 |
* The current post id.
|
101 |
*
|
@@ -229,6 +249,17 @@ class OMAPI_Rules {
|
|
229 |
return OMAPI_Utils::is_inline_type( $this->get_field_value( 'type' ) );
|
230 |
}
|
231 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
232 |
/**
|
233 |
* Determines if given campaign should show.
|
234 |
*
|
@@ -259,10 +290,11 @@ class OMAPI_Rules {
|
|
259 |
$this->exclude_if_not_enabled();
|
260 |
$this->exclude_on_campaign_types();
|
261 |
$this->exclude_on_user_logged_in_checks();
|
|
|
262 |
|
263 |
$this->default_checks();
|
264 |
$this->woocommerce_checks();
|
265 |
-
$this->
|
266 |
$this->output_if_global_override();
|
267 |
|
268 |
// If we get this far, include it.
|
@@ -273,6 +305,18 @@ class OMAPI_Rules {
|
|
273 |
$should_output = $e instanceof OMAPI_Rules_True;
|
274 |
}
|
275 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
276 |
return $should_output;
|
277 |
}
|
278 |
|
@@ -381,6 +425,7 @@ class OMAPI_Rules {
|
|
381 |
// Set flag for possibly not loading globally.
|
382 |
if ( $this->field_not_empty_array( 'only' ) ) {
|
383 |
$this->global_override = false;
|
|
|
384 |
|
385 |
// If the optin is only to be shown on specific post IDs...
|
386 |
if ( $this->item_in_field( $this->post_id, 'only' ) ) {
|
@@ -415,6 +460,7 @@ class OMAPI_Rules {
|
|
415 |
if ( $this->field_not_empty_array( 'show' ) ) {
|
416 |
// Set flag for not loading globally.
|
417 |
$this->global_override = false;
|
|
|
418 |
}
|
419 |
|
420 |
if (
|
@@ -463,21 +509,35 @@ class OMAPI_Rules {
|
|
463 |
}
|
464 |
|
465 |
/**
|
466 |
-
*
|
467 |
*
|
468 |
-
* @since 1.5.
|
469 |
*
|
470 |
* @throws OMAPI_Rules_False
|
471 |
* @return void
|
472 |
*/
|
473 |
-
public function
|
474 |
if (
|
475 |
-
$this->
|
476 |
-
|
477 |
-
|
478 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
479 |
&& ! $this->field_empty( 'automatic' )
|
480 |
-
&& is_singular( 'post' )
|
481 |
) {
|
482 |
throw new OMAPI_Rules_True( 'include inline automatic on singular post' );
|
483 |
}
|
@@ -508,6 +568,7 @@ class OMAPI_Rules {
|
|
508 |
if ( $this->field_not_empty_array( 'categories' ) ) {
|
509 |
// Set flag for possibly not loading globally.
|
510 |
$this->global_override = false;
|
|
|
511 |
}
|
512 |
|
513 |
// If the optin is only to be shown on particular categories...
|
@@ -532,7 +593,6 @@ class OMAPI_Rules {
|
|
532 |
// return $html;
|
533 |
// }
|
534 |
|
535 |
-
$taxonomy = 'category';
|
536 |
if ( $this->post_id ) {
|
537 |
$all_cats = get_the_category( $this->post_id );
|
538 |
|
@@ -559,7 +619,7 @@ class OMAPI_Rules {
|
|
559 |
throw new OMAPI_Rules_True( 'post on category' );
|
560 |
}
|
561 |
|
562 |
-
throw new OMAPI_Rules_False( '
|
563 |
}
|
564 |
|
565 |
protected function check_taxonomies_field() {
|
@@ -573,6 +633,7 @@ class OMAPI_Rules {
|
|
573 |
foreach ( $values as $i => $value ) {
|
574 |
if ( OMAPI_Utils::field_not_empty_array( $values, $i ) ) {
|
575 |
$this->global_override = false;
|
|
|
576 |
break;
|
577 |
}
|
578 |
}
|
@@ -590,6 +651,13 @@ class OMAPI_Rules {
|
|
590 |
$this->check_is_home_and_show_on_index();
|
591 |
|
592 |
foreach ( $taxonomies as $taxonomy => $ids_to_check ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
593 |
|
594 |
if ( $this->post_id ) {
|
595 |
$all_terms = get_the_terms( $this->post_id, $taxonomy );
|
@@ -604,13 +672,16 @@ class OMAPI_Rules {
|
|
604 |
}
|
605 |
}
|
606 |
|
607 |
-
if ( ! $this->is_inline_check
|
608 |
-
|
|
|
|
|
|
|
|
|
609 |
}
|
610 |
-
|
611 |
}
|
612 |
|
613 |
-
throw new OMAPI_Rules_False( '
|
614 |
}
|
615 |
|
616 |
protected function check_is_home_and_show_on_index() {
|
@@ -645,6 +716,7 @@ class OMAPI_Rules {
|
|
645 |
}
|
646 |
|
647 |
$this->global_override = false;
|
|
|
648 |
|
649 |
if ( call_user_func_array( array_shift( $callback ), $callback ) ) {
|
650 |
// If it passes, send it back.
|
@@ -672,10 +744,38 @@ class OMAPI_Rules {
|
|
672 |
case 'field_values':
|
673 |
case 'caught':
|
674 |
case 'global_override':
|
|
|
675 |
return $this->$property;
|
|
|
|
|
676 |
}
|
677 |
|
678 |
throw new Exception( sprintf( esc_html__( 'Invalid %1$s property: %2$s', 'optin-monster-api' ), __CLASS__, $property ) );
|
679 |
}
|
680 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
681 |
}
|
7 |
* @package OMAPI
|
8 |
* @author Justin Sternberg
|
9 |
*/
|
10 |
+
|
11 |
+
// Exit if accessed directly.
|
12 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
+
exit;
|
14 |
+
}
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Rules exception base class.
|
18 |
+
*
|
19 |
+
* @since 1.5.0
|
20 |
+
*/
|
21 |
class OMAPI_Rules_Exception extends Exception {
|
22 |
protected $bool = null;
|
23 |
public function __construct( $message = null, $code = 0, Exception $previous = null ) {
|
107 |
*/
|
108 |
protected $is_inline_check = false;
|
109 |
|
110 |
+
/**
|
111 |
+
* The advanced settings for the campaign that should override inline.
|
112 |
+
*
|
113 |
+
* @since 1.6.2
|
114 |
+
*
|
115 |
+
* @var array
|
116 |
+
*/
|
117 |
+
protected $advanced_settings = array();
|
118 |
+
|
119 |
/**
|
120 |
* The current post id.
|
121 |
*
|
249 |
return OMAPI_Utils::is_inline_type( $this->get_field_value( 'type' ) );
|
250 |
}
|
251 |
|
252 |
+
/**
|
253 |
+
* Checks if current campaign is a non-shortcode inline type on a post.
|
254 |
+
*
|
255 |
+
* @since 1.6.2
|
256 |
+
*
|
257 |
+
* @return bool
|
258 |
+
*/
|
259 |
+
public function is_inline_post_type() {
|
260 |
+
return $this->is_inline_check && 'shortcode' !== $this->is_inline_check && is_singular( 'post' );
|
261 |
+
}
|
262 |
+
|
263 |
/**
|
264 |
* Determines if given campaign should show.
|
265 |
*
|
290 |
$this->exclude_if_not_enabled();
|
291 |
$this->exclude_on_campaign_types();
|
292 |
$this->exclude_on_user_logged_in_checks();
|
293 |
+
$this->exclude_if_inline_and_not_automatic();
|
294 |
|
295 |
$this->default_checks();
|
296 |
$this->woocommerce_checks();
|
297 |
+
$this->include_if_inline_and_automatic_and_no_advanced_settings();
|
298 |
$this->output_if_global_override();
|
299 |
|
300 |
// If we get this far, include it.
|
305 |
$should_output = $e instanceof OMAPI_Rules_True;
|
306 |
}
|
307 |
|
308 |
+
$rules_debug = ! empty( $_GET['omwpdebug'] );
|
309 |
+
|
310 |
+
if ( $rules_debug ) {
|
311 |
+
$option = OMAPI::get_instance()->get_option();
|
312 |
+
$rules_debug = ! empty( $option['api']['omwpdebug'] ) || is_user_logged_in() && apply_filters( 'optin_monster_api_menu_cap', 'manage_options', '' );
|
313 |
+
}
|
314 |
+
|
315 |
+
// If query var is set and user can manage OM, output debug data.
|
316 |
+
if ( apply_filters( 'optin_monster_api_should_output_rules_debug', $rules_debug ) ) {
|
317 |
+
$this->output_debug();
|
318 |
+
}
|
319 |
+
|
320 |
return $should_output;
|
321 |
}
|
322 |
|
425 |
// Set flag for possibly not loading globally.
|
426 |
if ( $this->field_not_empty_array( 'only' ) ) {
|
427 |
$this->global_override = false;
|
428 |
+
$this->advanced_settings['show'] = $this->get_field_value( 'only' );
|
429 |
|
430 |
// If the optin is only to be shown on specific post IDs...
|
431 |
if ( $this->item_in_field( $this->post_id, 'only' ) ) {
|
460 |
if ( $this->field_not_empty_array( 'show' ) ) {
|
461 |
// Set flag for not loading globally.
|
462 |
$this->global_override = false;
|
463 |
+
$this->advanced_settings['show'] = $this->get_field_value( 'show' );
|
464 |
}
|
465 |
|
466 |
if (
|
509 |
}
|
510 |
|
511 |
/**
|
512 |
+
* Disable campaign from showing if it is being checked inline and is NOT set to automatic.
|
513 |
*
|
514 |
+
* @since 1.5.3
|
515 |
*
|
516 |
* @throws OMAPI_Rules_False
|
517 |
* @return void
|
518 |
*/
|
519 |
+
public function exclude_if_inline_and_not_automatic() {
|
520 |
if (
|
521 |
+
$this->is_inline_post_type()
|
522 |
+
&& $this->field_empty( 'automatic' )
|
523 |
+
) {
|
524 |
+
throw new OMAPI_Rules_False( 'exclude inline if not automatic on singular post' );
|
525 |
+
}
|
526 |
+
}
|
527 |
+
|
528 |
+
/**
|
529 |
+
* Enable campaign to show if it is being checked inline and is set to automatic.
|
530 |
+
*
|
531 |
+
* @since 1.6.2
|
532 |
+
*
|
533 |
+
* @throws OMAPI_Rules_True
|
534 |
+
* @return void
|
535 |
+
*/
|
536 |
+
public function include_if_inline_and_automatic_and_no_advanced_settings() {
|
537 |
+
if (
|
538 |
+
empty( $this->advanced_settings )
|
539 |
+
&& $this->is_inline_post_type()
|
540 |
&& ! $this->field_empty( 'automatic' )
|
|
|
541 |
) {
|
542 |
throw new OMAPI_Rules_True( 'include inline automatic on singular post' );
|
543 |
}
|
568 |
if ( $this->field_not_empty_array( 'categories' ) ) {
|
569 |
// Set flag for possibly not loading globally.
|
570 |
$this->global_override = false;
|
571 |
+
$this->advanced_settings['categories'] = $categories;
|
572 |
}
|
573 |
|
574 |
// If the optin is only to be shown on particular categories...
|
593 |
// return $html;
|
594 |
// }
|
595 |
|
|
|
596 |
if ( $this->post_id ) {
|
597 |
$all_cats = get_the_category( $this->post_id );
|
598 |
|
619 |
throw new OMAPI_Rules_True( 'post on category' );
|
620 |
}
|
621 |
|
622 |
+
throw new OMAPI_Rules_False( 'no category matches found' );
|
623 |
}
|
624 |
|
625 |
protected function check_taxonomies_field() {
|
633 |
foreach ( $values as $i => $value ) {
|
634 |
if ( OMAPI_Utils::field_not_empty_array( $values, $i ) ) {
|
635 |
$this->global_override = false;
|
636 |
+
$this->advanced_settings['taxonomies'] = $values;
|
637 |
break;
|
638 |
}
|
639 |
}
|
651 |
$this->check_is_home_and_show_on_index();
|
652 |
|
653 |
foreach ( $taxonomies as $taxonomy => $ids_to_check ) {
|
654 |
+
// Tags are saved differently.
|
655 |
+
// https://github.com/awesomemotive/optin-monster-wp-api/issues/104
|
656 |
+
if ( ! empty( $ids_to_check[0] ) && false !== strpos( $ids_to_check[0], ',' ) ) {
|
657 |
+
$ids_to_check = explode( ',', (string) $ids_to_check[0] );
|
658 |
+
}
|
659 |
+
|
660 |
+
$ids_to_check = (array) $ids_to_check;
|
661 |
|
662 |
if ( $this->post_id ) {
|
663 |
$all_terms = get_the_terms( $this->post_id, $taxonomy );
|
672 |
}
|
673 |
}
|
674 |
|
675 |
+
if ( ! $this->is_inline_check ) {
|
676 |
+
foreach ( $ids_to_check as $tax_id ) {
|
677 |
+
if ( OMAPI_Utils::is_term_archive( $tax_id, $taxonomy ) ) {
|
678 |
+
throw new OMAPI_Rules_True( "not inline and is on $taxonomy archive" );
|
679 |
+
}
|
680 |
+
}
|
681 |
}
|
|
|
682 |
}
|
683 |
|
684 |
+
throw new OMAPI_Rules_False( 'no taxonomy matches found' );
|
685 |
}
|
686 |
|
687 |
protected function check_is_home_and_show_on_index() {
|
716 |
}
|
717 |
|
718 |
$this->global_override = false;
|
719 |
+
$this->advanced_settings[ $field ] = $this->get_field_value( $field );
|
720 |
|
721 |
if ( call_user_func_array( array_shift( $callback ), $callback ) ) {
|
722 |
// If it passes, send it back.
|
744 |
case 'field_values':
|
745 |
case 'caught':
|
746 |
case 'global_override':
|
747 |
+
case 'advanced_settings':
|
748 |
return $this->$property;
|
749 |
+
default:
|
750 |
+
break;
|
751 |
}
|
752 |
|
753 |
throw new Exception( sprintf( esc_html__( 'Invalid %1$s property: %2$s', 'optin-monster-api' ), __CLASS__, $property ) );
|
754 |
}
|
755 |
|
756 |
+
/**
|
757 |
+
* Outputs some debug data for the current campaign object.
|
758 |
+
*
|
759 |
+
* @since 1.6.2
|
760 |
+
*
|
761 |
+
* @return void
|
762 |
+
*/
|
763 |
+
protected function output_debug() {
|
764 |
+
$show = $this->caught instanceof OMAPI_Rules_True;
|
765 |
+
|
766 |
+
echo '<xmp class="_om-campaign-status" style="color: '. ( $show ? 'green' : 'red' ) . ';">'. $this->optin->post_name . ":\n" . print_r( $this->caught->getMessage(), true ) .'</xmp>';
|
767 |
+
|
768 |
+
if ( ! empty( $this->advanced_settings ) ) {
|
769 |
+
echo '<xmp class="_om-advanced-settings">$advanced_settings: '. print_r( $this->advanced_settings, true ) .'</xmp>';
|
770 |
+
}
|
771 |
+
|
772 |
+
if ( ! empty( $this->field_values ) ) {
|
773 |
+
echo '<xmp class="_om-field-values" style="display:none;">$field_values: '. print_r( $this->field_values, true ) .'</xmp>';
|
774 |
+
}
|
775 |
+
|
776 |
+
echo '<xmp class="_om-is-inline-check" style="display:none;">$is_inline_check?: '. print_r( $this->is_inline_check, true ) .'</xmp>';
|
777 |
+
echo '<xmp class="_om-global-override" style="display:none;">$global_override?: '. print_r( $this->global_override, true ) .'</xmp>';
|
778 |
+
echo '<xmp class="_om-optin" style="display:none;">$optin: '. print_r( $this->optin, true ) .'</xmp>';
|
779 |
+
}
|
780 |
+
|
781 |
}
|
OMAPI/Save.php
CHANGED
@@ -7,6 +7,17 @@
|
|
7 |
* @package OMAPI
|
8 |
* @author Thomas Griffin
|
9 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
class OMAPI_Save {
|
11 |
|
12 |
/**
|
@@ -54,10 +65,6 @@ class OMAPI_Save {
|
|
54 |
|
55 |
// Set our object.
|
56 |
$this->set();
|
57 |
-
|
58 |
-
// Possibly save settings.
|
59 |
-
$this->maybe_save();
|
60 |
-
|
61 |
}
|
62 |
|
63 |
/**
|
@@ -127,12 +134,16 @@ class OMAPI_Save {
|
|
127 |
$old_user = isset( $option['api']['user'] ) ? $option['api']['user'] : false;
|
128 |
$old_key = isset( $option['api']['key'] ) ? $option['api']['key'] : false;
|
129 |
$old_apikey = isset( $option['api']['apikey'] ) ? $option['api']['apikey'] : false;
|
130 |
-
|
|
|
|
|
|
|
|
|
131 |
|
132 |
// Check for new single apikey and break early with only that data check
|
133 |
if ( $apikey ) {
|
134 |
// Verify this new API Key works but posting to the Legacy route
|
135 |
-
$api = new OMAPI_Api( 'verify', array( 'apikey' => $apikey ) );
|
136 |
$ret = $api->request();
|
137 |
|
138 |
if ( is_wp_error( $ret ) ) {
|
@@ -148,16 +159,14 @@ class OMAPI_Save {
|
|
148 |
$option['is_invalid'] = false;
|
149 |
$option['is_expired'] = false;
|
150 |
$option['is_disabled'] = false;
|
|
|
151 |
|
152 |
// Store the optin data.
|
153 |
$this->store_optins( $ret );
|
154 |
|
155 |
-
// Allow option to be filtered before saving.
|
156 |
-
$option = apply_filters( 'optin_monster_api_save', $option, $data, $this->view );
|
157 |
-
|
158 |
// Save the option.
|
159 |
-
|
160 |
-
|
161 |
}
|
162 |
// End since we are working with the new apikey
|
163 |
break;
|
@@ -186,17 +195,13 @@ class OMAPI_Save {
|
|
186 |
$option['api']['user'] = '';
|
187 |
$option['api']['key'] = '';
|
188 |
|
189 |
-
|
190 |
-
// Allow option to be filtered before saving.
|
191 |
-
$option = apply_filters( 'optin_monster_api_save', $option, $data, $this->view );
|
192 |
-
|
193 |
// Save the option.
|
194 |
-
|
195 |
} else {
|
196 |
-
$this->errors['error'] =
|
197 |
}
|
198 |
} else {
|
199 |
-
$api = new OMAPI_Api( 'verify', array( 'user' => $user, 'key' => $key ) );
|
200 |
$ret = $api->request();
|
201 |
if ( is_wp_error( $ret ) ) {
|
202 |
$this->errors['error'] = $ret->get_error_message();
|
@@ -209,15 +214,13 @@ class OMAPI_Save {
|
|
209 |
$option['is_invalid'] = false;
|
210 |
$option['is_expired'] = false;
|
211 |
$option['is_disabled'] = false;
|
|
|
212 |
|
213 |
// Store the optin data.
|
214 |
$this->store_optins( $ret );
|
215 |
|
216 |
-
// Allow option to be filtered before saving.
|
217 |
-
$option = apply_filters( 'optin_monster_api_save', $option, $data, $this->view );
|
218 |
-
|
219 |
// Save the option.
|
220 |
-
|
221 |
}
|
222 |
}
|
223 |
break;
|
@@ -259,7 +262,6 @@ class OMAPI_Save {
|
|
259 |
$fields['is_wc_product_category'] = isset( $data['taxonomies']['product_cat'] ) ? $data['taxonomies']['product_cat'] : array();
|
260 |
$fields['is_wc_product_tag'] = isset( $data['taxonomies']['product_tag'] ) ? $data['taxonomies']['product_tag'] : array();
|
261 |
|
262 |
-
|
263 |
// Convert old test mode data and remove.
|
264 |
$test_mode = get_post_meta( $optin_id, '_omapi_test', true );
|
265 |
if ( isset( $test_mode ) && $test_mode ) {
|
@@ -268,8 +270,9 @@ class OMAPI_Save {
|
|
268 |
}
|
269 |
|
270 |
if ( $this->base->is_mailpoet_active() ) {
|
271 |
-
$fields['mailpoet']
|
272 |
-
$fields['mailpoet_list']
|
|
|
273 |
}
|
274 |
|
275 |
// Allow fields to be filtered.
|
@@ -285,13 +288,33 @@ class OMAPI_Save {
|
|
285 |
$option = $this->base->get_option();
|
286 |
$option['settings']['cookies'] = isset( $data['cookies'] ) ? 1 : 0;
|
287 |
|
288 |
-
// Allow option to be filtered before saving.
|
289 |
-
$option = apply_filters( 'optin_monster_api_save', $option, $data, $this->view );
|
290 |
-
|
291 |
// Save the option.
|
292 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
293 |
break;
|
294 |
}
|
|
|
295 |
// If selected, clear out all local cookies.
|
296 |
if ( $this->base->get_option( 'settings', 'cookies' ) ) {
|
297 |
$this->base->actions->cookies();
|
@@ -315,6 +338,17 @@ class OMAPI_Save {
|
|
315 |
* @param array $optins Array of optin objects to store.
|
316 |
*/
|
317 |
public function store_optins( $optins ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
318 |
|
319 |
// Do nothing if this is just a success message.
|
320 |
if ( isset( $optins->success ) ) {
|
@@ -323,7 +357,7 @@ class OMAPI_Save {
|
|
323 |
|
324 |
// Loop through all of the local optins so we can try to match and update.
|
325 |
$local_optins = $this->base->get_optins();
|
326 |
-
if ( $local_optins ) {
|
327 |
$this->sync_optins( $local_optins, $optins );
|
328 |
} else {
|
329 |
$this->add_optins( $optins );
|
@@ -360,15 +394,16 @@ class OMAPI_Save {
|
|
360 |
*/
|
361 |
public function sync_optins( $local_optins, $remote_optins ) {
|
362 |
foreach ( $local_optins as $local ) {
|
363 |
-
if ( isset( $remote_optins->{$local->post_name} ) ) {
|
364 |
|
365 |
-
|
|
|
|
|
366 |
|
367 |
-
unset( $remote_optins
|
368 |
} else {
|
369 |
// Delete the local optin. It does not exist remotely.
|
370 |
wp_delete_post( $local->ID, true );
|
371 |
-
unset( $remote_optins
|
372 |
}
|
373 |
}
|
374 |
|
@@ -421,10 +456,12 @@ class OMAPI_Save {
|
|
421 |
'post_type' => 'omapi',
|
422 |
) );
|
423 |
|
424 |
-
if (
|
425 |
update_post_meta( $post_id, '_omapi_automatic', 1 );
|
426 |
}
|
427 |
|
|
|
|
|
428 |
$this->update_optin_meta( $post_id, $optin );
|
429 |
}
|
430 |
|
@@ -472,6 +509,193 @@ class OMAPI_Save {
|
|
472 |
}
|
473 |
}
|
474 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
475 |
/**
|
476 |
* Output any error messages.
|
477 |
*
|
@@ -495,7 +719,7 @@ class OMAPI_Save {
|
|
495 |
public function message() {
|
496 |
|
497 |
?>
|
498 |
-
<div class="updated"><p><?php
|
499 |
<?php
|
500 |
|
501 |
}
|
7 |
* @package OMAPI
|
8 |
* @author Thomas Griffin
|
9 |
*/
|
10 |
+
|
11 |
+
// Exit if accessed directly.
|
12 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
+
exit;
|
14 |
+
}
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Save class.
|
18 |
+
*
|
19 |
+
* @since 1.0.0
|
20 |
+
*/
|
21 |
class OMAPI_Save {
|
22 |
|
23 |
/**
|
65 |
|
66 |
// Set our object.
|
67 |
$this->set();
|
|
|
|
|
|
|
|
|
68 |
}
|
69 |
|
70 |
/**
|
134 |
$old_user = isset( $option['api']['user'] ) ? $option['api']['user'] : false;
|
135 |
$old_key = isset( $option['api']['key'] ) ? $option['api']['key'] : false;
|
136 |
$old_apikey = isset( $option['api']['apikey'] ) ? $option['api']['apikey'] : false;
|
137 |
+
if ( isset( $data['omwpdebug'] ) ) {
|
138 |
+
$option['api']['omwpdebug'] = true;
|
139 |
+
} else {
|
140 |
+
unset( $option['api']['omwpdebug'] );
|
141 |
+
}
|
142 |
|
143 |
// Check for new single apikey and break early with only that data check
|
144 |
if ( $apikey ) {
|
145 |
// Verify this new API Key works but posting to the Legacy route
|
146 |
+
$api = new OMAPI_Api( 'verify/', array( 'apikey' => $apikey ) );
|
147 |
$ret = $api->request();
|
148 |
|
149 |
if ( is_wp_error( $ret ) ) {
|
159 |
$option['is_invalid'] = false;
|
160 |
$option['is_expired'] = false;
|
161 |
$option['is_disabled'] = false;
|
162 |
+
$option['connected'] = time();
|
163 |
|
164 |
// Store the optin data.
|
165 |
$this->store_optins( $ret );
|
166 |
|
|
|
|
|
|
|
167 |
// Save the option.
|
168 |
+
$this->update_optin_monster_api_option( $option, $data );
|
169 |
+
wp_safe_redirect( admin_url( 'admin.php?page=optin-monster-api-settings&optin_monster_api_view=optins' ) );
|
170 |
}
|
171 |
// End since we are working with the new apikey
|
172 |
break;
|
195 |
$option['api']['user'] = '';
|
196 |
$option['api']['key'] = '';
|
197 |
|
|
|
|
|
|
|
|
|
198 |
// Save the option.
|
199 |
+
$this->update_optin_monster_api_option( $option, $data );
|
200 |
} else {
|
201 |
+
$this->errors['error'] = esc_html__( 'You must provide a valid API Key to authenticate with OptinMonster.', 'optin-monster-api' );
|
202 |
}
|
203 |
} else {
|
204 |
+
$api = new OMAPI_Api( 'verify/', array( 'user' => $user, 'key' => $key ) );
|
205 |
$ret = $api->request();
|
206 |
if ( is_wp_error( $ret ) ) {
|
207 |
$this->errors['error'] = $ret->get_error_message();
|
214 |
$option['is_invalid'] = false;
|
215 |
$option['is_expired'] = false;
|
216 |
$option['is_disabled'] = false;
|
217 |
+
$option['connected'] = time();
|
218 |
|
219 |
// Store the optin data.
|
220 |
$this->store_optins( $ret );
|
221 |
|
|
|
|
|
|
|
222 |
// Save the option.
|
223 |
+
$this->update_optin_monster_api_option( $option, $data );
|
224 |
}
|
225 |
}
|
226 |
break;
|
262 |
$fields['is_wc_product_category'] = isset( $data['taxonomies']['product_cat'] ) ? $data['taxonomies']['product_cat'] : array();
|
263 |
$fields['is_wc_product_tag'] = isset( $data['taxonomies']['product_tag'] ) ? $data['taxonomies']['product_tag'] : array();
|
264 |
|
|
|
265 |
// Convert old test mode data and remove.
|
266 |
$test_mode = get_post_meta( $optin_id, '_omapi_test', true );
|
267 |
if ( isset( $test_mode ) && $test_mode ) {
|
270 |
}
|
271 |
|
272 |
if ( $this->base->is_mailpoet_active() ) {
|
273 |
+
$fields['mailpoet'] = isset( $data['mailpoet'] ) ? 1 : 0;
|
274 |
+
$fields['mailpoet_list'] = isset( $data['mailpoet_list'] ) ? esc_attr( $data['mailpoet_list'] ) : 'none';
|
275 |
+
$fields['mailpoet_phone_field'] = isset( $data['mailpoet_use_phone'], $data['mailpoet_phone_field'] ) ? esc_attr( $data['mailpoet_phone_field'] ) : '';
|
276 |
}
|
277 |
|
278 |
// Allow fields to be filtered.
|
288 |
$option = $this->base->get_option();
|
289 |
$option['settings']['cookies'] = isset( $data['cookies'] ) ? 1 : 0;
|
290 |
|
|
|
|
|
|
|
291 |
// Save the option.
|
292 |
+
$this->update_optin_monster_api_option( $option, $data );
|
293 |
+
break;
|
294 |
+
|
295 |
+
case 'woocommerce':
|
296 |
+
if ( ! empty( $data['autogenerate'] ) ) {
|
297 |
+
// Auto-generate a key pair.
|
298 |
+
$auto_generated_keys = $this->woocommerce_autogenerate();
|
299 |
+
if ( empty( $auto_generated_keys ) ) {
|
300 |
+
$this->errors['error'] = esc_html__( 'WooCommerce REST API keys could not be auto-generated on your behalf. Please try again.', 'optin-monster-api' );
|
301 |
+
break;
|
302 |
+
}
|
303 |
+
|
304 |
+
// Merge data array, with auto-generated keys array.
|
305 |
+
$data = array_merge( $data, $auto_generated_keys );
|
306 |
+
}
|
307 |
+
|
308 |
+
if ( empty( $data['disconnect'] ) ) {
|
309 |
+
$this->woocommerce_connect( $data );
|
310 |
+
} else {
|
311 |
+
$this->woocommerce_disconnect( $data );
|
312 |
+
}
|
313 |
+
break;
|
314 |
+
default:
|
315 |
break;
|
316 |
}
|
317 |
+
|
318 |
// If selected, clear out all local cookies.
|
319 |
if ( $this->base->get_option( 'settings', 'cookies' ) ) {
|
320 |
$this->base->actions->cookies();
|
338 |
* @param array $optins Array of optin objects to store.
|
339 |
*/
|
340 |
public function store_optins( $optins ) {
|
341 |
+
/**
|
342 |
+
* Allows the filtering of what campaigns are stored locally.
|
343 |
+
*
|
344 |
+
* @since 1.6.3
|
345 |
+
*
|
346 |
+
* @param array $optins An array of `WP_Post` objects.
|
347 |
+
* @param object $this The OMAPI object.
|
348 |
+
*
|
349 |
+
* @return array The filtered `WP_Post` objects array.
|
350 |
+
*/
|
351 |
+
$optins = apply_filters( 'optin_monster_pre_store_options', $optins, $this );
|
352 |
|
353 |
// Do nothing if this is just a success message.
|
354 |
if ( isset( $optins->success ) ) {
|
357 |
|
358 |
// Loop through all of the local optins so we can try to match and update.
|
359 |
$local_optins = $this->base->get_optins();
|
360 |
+
if ( ! empty( $local_optins ) ) {
|
361 |
$this->sync_optins( $local_optins, $optins );
|
362 |
} else {
|
363 |
$this->add_optins( $optins );
|
394 |
*/
|
395 |
public function sync_optins( $local_optins, $remote_optins ) {
|
396 |
foreach ( $local_optins as $local ) {
|
|
|
397 |
|
398 |
+
if ( isset( $remote_optins[ $local->post_name ] ) ) {
|
399 |
+
|
400 |
+
$this->update_optin( $local, $remote_optins[ $local->post_name ] );
|
401 |
|
402 |
+
unset( $remote_optins[ $local->post_name ] );
|
403 |
} else {
|
404 |
// Delete the local optin. It does not exist remotely.
|
405 |
wp_delete_post( $local->ID, true );
|
406 |
+
unset( $remote_optins[ $local->post_name ] );
|
407 |
}
|
408 |
}
|
409 |
|
456 |
'post_type' => 'omapi',
|
457 |
) );
|
458 |
|
459 |
+
if ( 'post' === $optin->type ) {
|
460 |
update_post_meta( $post_id, '_omapi_automatic', 1 );
|
461 |
}
|
462 |
|
463 |
+
update_post_meta( $post_id, '_omapi_enabled', true );
|
464 |
+
|
465 |
$this->update_optin_meta( $post_id, $optin );
|
466 |
}
|
467 |
|
509 |
}
|
510 |
}
|
511 |
|
512 |
+
/**
|
513 |
+
* Updated the `optin_monster_api` option in the database.
|
514 |
+
*
|
515 |
+
* @since 1.7.0
|
516 |
+
*
|
517 |
+
* @param array $option The full `optin_monster_api` option array.
|
518 |
+
* @param array $data The parameters passed in via POST request.
|
519 |
+
* @param string $view The current settings menu view.
|
520 |
+
*
|
521 |
+
* @return void
|
522 |
+
*/
|
523 |
+
public function update_optin_monster_api_option( $option, $data, $view = '' ) {
|
524 |
+
$this->update_option( $option, $view, $data );
|
525 |
+
}
|
526 |
+
|
527 |
+
/**
|
528 |
+
* Updated the `optin_monster_api` option in the database.
|
529 |
+
*
|
530 |
+
* @since 1.9.8
|
531 |
+
*
|
532 |
+
* @param array $option The full `optin_monster_api` option array.
|
533 |
+
* @param string $view Optional. The current settings menu view.
|
534 |
+
* @param array $data Optional. The parameters passed in via POST request.
|
535 |
+
*
|
536 |
+
* @return mixed The results of update_option.
|
537 |
+
*/
|
538 |
+
public function update_option( $option, $view = '', $data = array() ) {
|
539 |
+
$view = $view ? $view : $this->view;
|
540 |
+
|
541 |
+
// Allow storing the timestamp of when the API is connected for "first time".
|
542 |
+
// We are not changing it if the user disconnects and reconnects.
|
543 |
+
$connected = $this->base->get_option( 'connected' );
|
544 |
+
if ( ! empty( $connected ) ) {
|
545 |
+
unset( $option['connected'] );
|
546 |
+
}
|
547 |
+
|
548 |
+
/**
|
549 |
+
* Filters the `optin_monster_api` option before being saved to the database.
|
550 |
+
*
|
551 |
+
* @since 1.0.0
|
552 |
+
*
|
553 |
+
* @param array $option The full `optin_monster_api` option array.
|
554 |
+
* @param array $data The parameters passed in via POST request.
|
555 |
+
* @param string $view The current settings menu view.
|
556 |
+
*/
|
557 |
+
$option = apply_filters( 'optin_monster_api_save', $option, $data, $view );
|
558 |
+
|
559 |
+
// Save the option.
|
560 |
+
return update_option( 'optin_monster_api', $option );
|
561 |
+
}
|
562 |
+
|
563 |
+
/**
|
564 |
+
* Handles auto-generating WooCommerce API keys for use with OM.
|
565 |
+
*
|
566 |
+
* @since 1.7.0
|
567 |
+
*
|
568 |
+
* @return array
|
569 |
+
*/
|
570 |
+
public function woocommerce_autogenerate() {
|
571 |
+
$cookies = array();
|
572 |
+
foreach ( $_COOKIE as $name => $val ) {
|
573 |
+
$cookies[] = "$name=" . urlencode( is_array( $val ) ? serialize( $val ) : $val );
|
574 |
+
}
|
575 |
+
$cookies = implode( '; ', $cookies );
|
576 |
+
|
577 |
+
$request_args = array(
|
578 |
+
'sslverify' => apply_filters( 'https_local_ssl_verify', true ),
|
579 |
+
'body' => array(
|
580 |
+
'action' => 'woocommerce_update_api_key',
|
581 |
+
'description' => esc_html__( 'OptinMonster API Read-Access (Auto-Generated)', 'optin-monster-api' ),
|
582 |
+
'permissions' => 'read',
|
583 |
+
'user' => get_current_user_id(),
|
584 |
+
'security' => wp_create_nonce( 'update-api-key' ),
|
585 |
+
),
|
586 |
+
'headers' => array(
|
587 |
+
'cookie' => $cookies,
|
588 |
+
),
|
589 |
+
);
|
590 |
+
$response = wp_remote_post( admin_url( 'admin-ajax.php' ), $request_args );
|
591 |
+
$code = wp_remote_retrieve_response_code( $response );
|
592 |
+
$body = json_decode( wp_remote_retrieve_body( $response ) );
|
593 |
+
|
594 |
+
if (
|
595 |
+
200 === intval( $code )
|
596 |
+
&& ! empty( $body->success )
|
597 |
+
&& ! empty( $body->data->consumer_key )
|
598 |
+
&& ! empty( $body->data->consumer_secret )
|
599 |
+
) {
|
600 |
+
|
601 |
+
return (array) $body->data;
|
602 |
+
}
|
603 |
+
|
604 |
+
return array();
|
605 |
+
}
|
606 |
+
|
607 |
+
/**
|
608 |
+
* Handles connecting WooCommerce when the connect button is clicked.
|
609 |
+
*
|
610 |
+
* @since 1.7.0
|
611 |
+
*
|
612 |
+
* @param array $data The data passed in via POST request.
|
613 |
+
*
|
614 |
+
* @return void
|
615 |
+
*/
|
616 |
+
protected function woocommerce_connect( $data ) {
|
617 |
+
$keys = $this->base->woocommerce->validate_keys( $data );
|
618 |
+
|
619 |
+
if ( isset( $keys['error'] ) ) {
|
620 |
+
$this->errors['error'] = $keys['error'];
|
621 |
+
} else {
|
622 |
+
|
623 |
+
// Get the version of the REST API we should use. The
|
624 |
+
// `v3` route wasn't added until WooCommerce 3.5.0.
|
625 |
+
$api_version = OMAPI_WooCommerce::version_compare( '3.5.0' )
|
626 |
+
? 'v3'
|
627 |
+
: 'v2';
|
628 |
+
|
629 |
+
// Get current site url.
|
630 |
+
$url = esc_url_raw( site_url() );
|
631 |
+
|
632 |
+
// Make a connection request.
|
633 |
+
$response = $this->base->woocommerce->connect(
|
634 |
+
array(
|
635 |
+
'consumerKey' => $keys['consumer_key'],
|
636 |
+
'consumerSecret' => $keys['consumer_secret'],
|
637 |
+
'apiVersion' => $api_version,
|
638 |
+
'shop' => $url,
|
639 |
+
'name' => esc_html( get_bloginfo( 'name' ) ),
|
640 |
+
)
|
641 |
+
);
|
642 |
+
|
643 |
+
// Output an error or register a successful connection.
|
644 |
+
if ( is_wp_error( $response ) ) {
|
645 |
+
$this->errors['error'] = isset( $response->message )
|
646 |
+
? $response->message
|
647 |
+
: esc_html__( 'WooCommerce could not be connected to OptinMonster. The OptinMonster API returned with the following response: ', 'optin-monster-api' ) . $response->get_error_message();
|
648 |
+
} else {
|
649 |
+
|
650 |
+
// Get the shop hostname.
|
651 |
+
// NOTE: Error suppression is used as prior to PHP 5.3.3, an
|
652 |
+
// E_WARNING would be generated when URL parsing failed.
|
653 |
+
$site = function_exists( 'wp_parse_url' )
|
654 |
+
? wp_parse_url( $url )
|
655 |
+
: @parse_url( $url );
|
656 |
+
$host = isset( $site['host'] ) ? $site['host'] : '';
|
657 |
+
|
658 |
+
// Set up the connected WooCommerce options.
|
659 |
+
$option = $this->base->get_option();
|
660 |
+
$option['woocommerce'] = array(
|
661 |
+
'api_version' => $api_version,
|
662 |
+
'key_id' => $keys['key_id'],
|
663 |
+
'shop' => $host,
|
664 |
+
);
|
665 |
+
|
666 |
+
// Save the option.
|
667 |
+
$this->update_optin_monster_api_option( $option, $data );
|
668 |
+
}
|
669 |
+
}
|
670 |
+
}
|
671 |
+
|
672 |
+
/**
|
673 |
+
* Handles disconnecting WooCommerce when the disconnect button is clicked.
|
674 |
+
*
|
675 |
+
* @since 1.7.0
|
676 |
+
*
|
677 |
+
* @param array $data The data passed in via POST request.
|
678 |
+
*
|
679 |
+
* @return void
|
680 |
+
*/
|
681 |
+
protected function woocommerce_disconnect( $data ) {
|
682 |
+
$response = $this->base->woocommerce->disconnect();
|
683 |
+
|
684 |
+
// Output an error or register a successful disconnection.
|
685 |
+
if ( is_wp_error( $response ) ) {
|
686 |
+
$this->errors['error'] = isset( $response->message )
|
687 |
+
? $response->message
|
688 |
+
: esc_html__( 'WooCommerce could not be disconnected from OptinMonster. The OptinMonster API returned with the following response: ', 'optin-monster-api' ) . $response->get_error_message();
|
689 |
+
} else {
|
690 |
+
$option = $this->base->get_option();
|
691 |
+
|
692 |
+
unset( $option['woocommerce'] );
|
693 |
+
|
694 |
+
// Save the option.
|
695 |
+
$this->update_optin_monster_api_option( $option, $data );
|
696 |
+
}
|
697 |
+
}
|
698 |
+
|
699 |
/**
|
700 |
* Output any error messages.
|
701 |
*
|
719 |
public function message() {
|
720 |
|
721 |
?>
|
722 |
+
<div class="updated"><p><?php esc_html_e( 'Your settings have been saved successfully.', 'optin-monster-api' ); ?></p></div>
|
723 |
<?php
|
724 |
|
725 |
}
|
OMAPI/Shortcode.php
CHANGED
@@ -7,6 +7,17 @@
|
|
7 |
* @package OMAPI
|
8 |
* @author Thomas Griffin
|
9 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
class OMAPI_Shortcode {
|
11 |
|
12 |
/**
|
@@ -78,6 +89,11 @@ class OMAPI_Shortcode {
|
|
78 |
*/
|
79 |
public function shortcode( $atts ) {
|
80 |
|
|
|
|
|
|
|
|
|
|
|
81 |
global $post;
|
82 |
|
83 |
// Merge default attributes with passed attributes.
|
@@ -143,6 +159,11 @@ class OMAPI_Shortcode {
|
|
143 |
*/
|
144 |
public function shortcode_v1( $atts ) {
|
145 |
|
|
|
|
|
|
|
|
|
|
|
146 |
// Run the v2 implementation.
|
147 |
$atts['slug'] = $atts['id'];
|
148 |
unset( $atts['id'] );
|
7 |
* @package OMAPI
|
8 |
* @author Thomas Griffin
|
9 |
*/
|
10 |
+
|
11 |
+
// Exit if accessed directly.
|
12 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
+
exit;
|
14 |
+
}
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Shortcode class.
|
18 |
+
*
|
19 |
+
* @since 1.0.0
|
20 |
+
*/
|
21 |
class OMAPI_Shortcode {
|
22 |
|
23 |
/**
|
89 |
*/
|
90 |
public function shortcode( $atts ) {
|
91 |
|
92 |
+
// Checking if AMP is enabled.
|
93 |
+
if ( OMAPI_Utils::is_amp_enabled() ) {
|
94 |
+
return;
|
95 |
+
}
|
96 |
+
|
97 |
global $post;
|
98 |
|
99 |
// Merge default attributes with passed attributes.
|
159 |
*/
|
160 |
public function shortcode_v1( $atts ) {
|
161 |
|
162 |
+
// Checking if AMP is enabled.
|
163 |
+
if ( OMAPI_Utils::is_amp_enabled() ) {
|
164 |
+
return;
|
165 |
+
}
|
166 |
+
|
167 |
// Run the v2 implementation.
|
168 |
$atts['slug'] = $atts['id'];
|
169 |
unset( $atts['id'] );
|
OMAPI/Sites.php
ADDED
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Rest API Class, where we register/execute any REST API Routes
|
4 |
+
*
|
5 |
+
* @since 1.8.0
|
6 |
+
*/
|
7 |
+
|
8 |
+
// Exit if accessed directly.
|
9 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
10 |
+
exit;
|
11 |
+
}
|
12 |
+
|
13 |
+
/**
|
14 |
+
* Rest Api class.
|
15 |
+
*
|
16 |
+
* @since 1.8.0
|
17 |
+
*/
|
18 |
+
class OMAPI_Sites {
|
19 |
+
|
20 |
+
/**
|
21 |
+
* The Base OMAPI Object
|
22 |
+
*
|
23 |
+
* @since 1.8.0
|
24 |
+
*
|
25 |
+
* @var OMAPI
|
26 |
+
*/
|
27 |
+
protected $base;
|
28 |
+
|
29 |
+
public function __construct( ) {
|
30 |
+
$this->base = OMAPI::get_instance();
|
31 |
+
}
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Refresh the site data.
|
35 |
+
*
|
36 |
+
* @since 1.8.0
|
37 |
+
*
|
38 |
+
* @param mixed $api_key If we want to use a custom API Key, pass it in
|
39 |
+
*
|
40 |
+
* @return array|null $sites An array of sites if the request is successful
|
41 |
+
*/
|
42 |
+
public function fetch( $api_key = null ) {
|
43 |
+
$api = OMAPI_Api::build( 'v2', 'sites/origin', 'GET' );
|
44 |
+
|
45 |
+
if ( $api_key ) {
|
46 |
+
$api->set( 'apikey', $api_key );
|
47 |
+
}
|
48 |
+
|
49 |
+
$body = $api->request();
|
50 |
+
$sites = array(
|
51 |
+
'ids' => array(),
|
52 |
+
'customApiUrl' => ''
|
53 |
+
);
|
54 |
+
|
55 |
+
if ( ! is_wp_error( $body ) && ! empty( $body->data ) ) {
|
56 |
+
foreach ( $body->data as $site ) {
|
57 |
+
$checkCnames = true;
|
58 |
+
$sites['ids'][] = (int) $site->numericId;
|
59 |
+
|
60 |
+
$homeUrl = str_replace( array( 'https://', 'www.' ), '', esc_url_raw( home_url( '', 'https' ) ) );
|
61 |
+
|
62 |
+
// If we have a custom CNAME, let's enable it and add the data to the output array.
|
63 |
+
// We need to make sure that it matches the home_url to ensure that the correct domain
|
64 |
+
// is loaded.
|
65 |
+
$wildcardDomain = '*.' === substr( $site->domain, 0, 2 );
|
66 |
+
if ( ( $homeUrl === $site->domain || $wildcardDomain ) && $site->settings->enableCustomCnames && $checkCnames ) {
|
67 |
+
if ( ! $wildcardDomain ) {
|
68 |
+
$checkCnames = false;
|
69 |
+
}
|
70 |
+
if ( $site->settings->cdnCname && $site->settings->cdnCnameVerified ) {
|
71 |
+
$sites['customApiUrl'] = 'https://' . $site->settings->cdnUrl . '/app/js/api.min.js';
|
72 |
+
} else if ( $site->settings->apiCname && $site->settings->apiCnameVerified ) {
|
73 |
+
// Not sure if this will wreak havoc during verification of the domains, so leaving it commented out for now.
|
74 |
+
// $sites['customApiUrl'] = 'https://' . $site->settings->apiUrl . '/a/app/js/api.min.js';
|
75 |
+
}
|
76 |
+
}
|
77 |
+
}
|
78 |
+
}
|
79 |
+
|
80 |
+
return $sites;
|
81 |
+
}
|
82 |
+
}
|
OMAPI/TrustPulse.php
ADDED
@@ -0,0 +1,215 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* TrustPulse class.
|
4 |
+
*
|
5 |
+
* @since 1.9.0
|
6 |
+
*
|
7 |
+
* @package OMAPI
|
8 |
+
* @author Justin Sternberg
|
9 |
+
*/
|
10 |
+
|
11 |
+
// Exit if accessed directly.
|
12 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
+
exit;
|
14 |
+
}
|
15 |
+
|
16 |
+
/**
|
17 |
+
* TrustPulse class.
|
18 |
+
*
|
19 |
+
* @since 1.9.0
|
20 |
+
*/
|
21 |
+
class OMAPI_TrustPulse {
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Holds the class object.
|
25 |
+
*
|
26 |
+
* @since 1.9.0
|
27 |
+
*
|
28 |
+
* @var object
|
29 |
+
*/
|
30 |
+
public static $instance;
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Path to the file.
|
34 |
+
*
|
35 |
+
* @since 1.9.0
|
36 |
+
*
|
37 |
+
* @var string
|
38 |
+
*/
|
39 |
+
public $file = __FILE__;
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Holds the base class object.
|
43 |
+
*
|
44 |
+
* @since 1.9.0
|
45 |
+
*
|
46 |
+
* @var object
|
47 |
+
*/
|
48 |
+
public $base;
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Holds the welcome slug.
|
52 |
+
*
|
53 |
+
* @since 1.9.0
|
54 |
+
*
|
55 |
+
* @var string
|
56 |
+
*/
|
57 |
+
public $hook;
|
58 |
+
|
59 |
+
/**
|
60 |
+
* Whether the TrustPulse plugin is active.
|
61 |
+
*
|
62 |
+
* @since 1.9.0
|
63 |
+
*
|
64 |
+
* @var bool
|
65 |
+
*/
|
66 |
+
public $trustpulse_active;
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Whether the TrustPulse plugin has been setup.
|
70 |
+
*
|
71 |
+
* @since 1.9.0
|
72 |
+
*
|
73 |
+
* @var bool
|
74 |
+
*/
|
75 |
+
public $trustpulse_setup;
|
76 |
+
|
77 |
+
/**
|
78 |
+
* Primary class constructor.
|
79 |
+
*
|
80 |
+
* @since 1.9.0
|
81 |
+
*/
|
82 |
+
public function __construct() {
|
83 |
+
if ( ! defined( 'TRUSTPULSE_APP_URL' ) ) {
|
84 |
+
define( 'TRUSTPULSE_APP_URL', 'https://app.trustpulse.com/' );
|
85 |
+
}
|
86 |
+
|
87 |
+
if ( ! defined( 'TRUSTPULSE_URL' ) ) {
|
88 |
+
define( 'TRUSTPULSE_URL', 'https://trustpulse.com/' );
|
89 |
+
}
|
90 |
+
|
91 |
+
// If we are not in admin or admin ajax, return.
|
92 |
+
if ( ! is_admin() ) {
|
93 |
+
return;
|
94 |
+
}
|
95 |
+
|
96 |
+
// If user is in admin ajax or doing cron, return.
|
97 |
+
if ( ( defined( 'DOING_AJAX' ) && DOING_AJAX ) || ( defined( 'DOING_CRON' ) && DOING_CRON ) ) {
|
98 |
+
return;
|
99 |
+
}
|
100 |
+
|
101 |
+
// If user is not logged in, return.
|
102 |
+
if ( ! is_user_logged_in() ) {
|
103 |
+
return;
|
104 |
+
}
|
105 |
+
|
106 |
+
// If user cannot manage_options, return.
|
107 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
108 |
+
return;
|
109 |
+
}
|
110 |
+
|
111 |
+
// Set our object.
|
112 |
+
$this->set();
|
113 |
+
|
114 |
+
// Register the menu item.
|
115 |
+
add_action( 'admin_menu', array( $this, 'register_welcome_page' ) );
|
116 |
+
}
|
117 |
+
|
118 |
+
/**
|
119 |
+
* Sets our object instance and base class instance.
|
120 |
+
*
|
121 |
+
* @since 1.9.0
|
122 |
+
*/
|
123 |
+
public function set() {
|
124 |
+
self::$instance = $this;
|
125 |
+
$this->base = OMAPI::get_instance();
|
126 |
+
|
127 |
+
$this->trustpulse_active = function_exists( 'trustpulse_dir_uri' );
|
128 |
+
|
129 |
+
$account_id = get_option( 'trustpulse_script_id', null );
|
130 |
+
$this->trustpulse_setup = ! empty( $account_id );
|
131 |
+
}
|
132 |
+
|
133 |
+
/**
|
134 |
+
* Loads the OptinMonster admin menu.
|
135 |
+
*
|
136 |
+
* @since 1.9.0
|
137 |
+
*/
|
138 |
+
public function register_welcome_page() {
|
139 |
+
$this->hook = add_submenu_page(
|
140 |
+
// If trustpulse is active/setup, don't show the TP sub-menu item under OM.
|
141 |
+
$this->trustpulse_active && $this->trustpulse_setup
|
142 |
+
? 'optin-monster-api-settings-no-menu'
|
143 |
+
: 'optin-monster-api-settings', // Parent slug
|
144 |
+
esc_html__( 'TrustPulse', 'optin-monster-api' ), // Page title
|
145 |
+
esc_html__( 'Social Proof Widget', 'optin-monster-api' ),
|
146 |
+
apply_filters( 'optin_monster_api_menu_cap', 'manage_options', 'optin-monster-trustpulse' ), // Cap
|
147 |
+
'optin-monster-trustpulse', // Slug
|
148 |
+
array( $this, 'display_page' ) // Callback
|
149 |
+
);
|
150 |
+
|
151 |
+
// If TrustPulse is active, we want to redirect to its own landing page.
|
152 |
+
if ( $this->trustpulse_active ) {
|
153 |
+
add_action( 'load-' . $this->hook, array( __CLASS__, 'redirect_trustpulse_plugin' ) );
|
154 |
+
}
|
155 |
+
|
156 |
+
// Load settings page assets.
|
157 |
+
add_action( 'load-' . $this->hook, array( $this, 'assets' ) );
|
158 |
+
}
|
159 |
+
|
160 |
+
/**
|
161 |
+
* Redirects to the trustpulse admin page.
|
162 |
+
*
|
163 |
+
* @since 1.9.0
|
164 |
+
*/
|
165 |
+
public static function redirect_trustpulse_plugin() {
|
166 |
+
$url = esc_url_raw( admin_url( 'admin.php?page=trustpulse' ) );
|
167 |
+
wp_safe_redirect( $url );
|
168 |
+
exit;
|
169 |
+
}
|
170 |
+
|
171 |
+
/**
|
172 |
+
* Outputs the OptinMonster settings page.
|
173 |
+
*
|
174 |
+
* @since 1.9.0
|
175 |
+
*/
|
176 |
+
public function display_page() {
|
177 |
+
$this->base->output_view( 'trustpulse-settings-page.php' );
|
178 |
+
}
|
179 |
+
|
180 |
+
/**
|
181 |
+
* Loads assets for the settings page.
|
182 |
+
*
|
183 |
+
* @since 1.9.0
|
184 |
+
*/
|
185 |
+
public function assets() {
|
186 |
+
add_filter( 'admin_body_class', array( $this, 'add_body_classes' ) );
|
187 |
+
|
188 |
+
wp_enqueue_style( $this->base->plugin_slug . '-settings', $this->base->url . 'assets/css/settings.css', array(), $this->base->version );
|
189 |
+
|
190 |
+
wp_enqueue_style( 'om-tp-admin-css', $this->base->url . 'assets/css/trustpulse-admin.min.css', false, $this->base->version );
|
191 |
+
add_action( 'in_admin_header', array( $this, 'render_banner' ) );
|
192 |
+
}
|
193 |
+
|
194 |
+
/**
|
195 |
+
* Renders TP banner in the page header
|
196 |
+
*
|
197 |
+
* @return void
|
198 |
+
*/
|
199 |
+
public function render_banner() {
|
200 |
+
$this->base->output_view( 'trustpulse-banner.php' );
|
201 |
+
}
|
202 |
+
|
203 |
+
/**
|
204 |
+
* Add body classes.
|
205 |
+
*
|
206 |
+
* @since 1.9.0
|
207 |
+
*/
|
208 |
+
public function add_body_classes( $classes ) {
|
209 |
+
|
210 |
+
$classes .= ' omapi-trustpulse ';
|
211 |
+
|
212 |
+
return $classes;
|
213 |
+
}
|
214 |
+
|
215 |
+
}
|
OMAPI/Type.php
CHANGED
@@ -7,87 +7,98 @@
|
|
7 |
* @package OMAPI
|
8 |
* @author Thomas Griffin
|
9 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
class OMAPI_Type {
|
11 |
|
12 |
/**
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
|
21 |
/**
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
|
46 |
-
|
47 |
-
|
48 |
|
49 |
// Load actions and filters.
|
50 |
-
|
51 |
-
|
52 |
-
}
|
53 |
-
|
54 |
-
/**
|
55 |
-
* Sets our object instance and base class instance.
|
56 |
-
*
|
57 |
-
* @since 1.0.0
|
58 |
-
*/
|
59 |
-
public function set() {
|
60 |
|
61 |
-
|
62 |
-
|
63 |
-
|
|
|
|
|
|
|
64 |
|
65 |
-
|
|
|
|
|
|
|
66 |
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
|
74 |
-
|
75 |
-
|
76 |
-
|
|
|
|
|
77 |
array(
|
78 |
'name' => _x( 'Campaigns', 'post type general name', 'optin-monster-api' ),
|
79 |
'singular_name' => _x( 'Campaign', 'post type singular name', 'optin-monster-api' ),
|
80 |
-
'add_new' =>
|
81 |
-
'add_new_item' =>
|
82 |
-
'edit_item' =>
|
83 |
-
'new_item' =>
|
84 |
-
'all_items' =>
|
85 |
-
'view_item' =>
|
86 |
-
'search_items' =>
|
87 |
-
'not_found' =>
|
88 |
-
'not_found_in_trash' =>
|
89 |
'parent_item_colon' => '',
|
90 |
-
'menu_name' =>
|
91 |
)
|
92 |
),
|
93 |
'public' => false,
|
@@ -95,10 +106,8 @@ class OMAPI_Type {
|
|
95 |
'capability_type' => 'post',
|
96 |
'has_archive' => false,
|
97 |
'hierarchical' => false,
|
98 |
-
'supports' => array( 'title' )
|
99 |
)
|
100 |
);
|
101 |
-
|
102 |
-
}
|
103 |
-
|
104 |
}
|
7 |
* @package OMAPI
|
8 |
* @author Thomas Griffin
|
9 |
*/
|
10 |
+
|
11 |
+
// Exit if accessed directly.
|
12 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
+
exit;
|
14 |
+
}
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Type class.
|
18 |
+
*
|
19 |
+
* @since 1.0.0
|
20 |
+
*/
|
21 |
class OMAPI_Type {
|
22 |
|
23 |
/**
|
24 |
+
* Holds the class object.
|
25 |
+
*
|
26 |
+
* @since 1.0.0
|
27 |
+
*
|
28 |
+
* @var object
|
29 |
+
*/
|
30 |
+
public static $instance;
|
31 |
|
32 |
/**
|
33 |
+
* Path to the file.
|
34 |
+
*
|
35 |
+
* @since 1.0.0
|
36 |
+
*
|
37 |
+
* @var string
|
38 |
+
*/
|
39 |
+
public $file = __FILE__;
|
40 |
|
41 |
+
/**
|
42 |
+
* Holds the base class object.
|
43 |
+
*
|
44 |
+
* @since 1.0.0
|
45 |
+
*
|
46 |
+
* @var object
|
47 |
+
*/
|
48 |
+
public $base;
|
49 |
|
50 |
+
/**
|
51 |
+
* Primary class constructor.
|
52 |
+
*
|
53 |
+
* @since 1.0.0
|
54 |
+
*/
|
55 |
+
public function __construct() {
|
56 |
|
57 |
+
// Set our object.
|
58 |
+
$this->set();
|
59 |
|
60 |
// Load actions and filters.
|
61 |
+
$this->type();
|
62 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
|
64 |
+
/**
|
65 |
+
* Sets our object instance and base class instance.
|
66 |
+
*
|
67 |
+
* @since 1.0.0
|
68 |
+
*/
|
69 |
+
public function set() {
|
70 |
|
71 |
+
self::$instance = $this;
|
72 |
+
$this->base = OMAPI::get_instance();
|
73 |
+
$this->view = isset( $_GET['optin_monster_api_view'] ) ? stripslashes( $_GET['optin_monster_api_view'] ) : $this->base->get_view();
|
74 |
+
}
|
75 |
|
76 |
+
/**
|
77 |
+
* Loads the OptinMonster API post type.
|
78 |
+
*
|
79 |
+
* @since 1.0.0
|
80 |
+
*/
|
81 |
+
public function type() {
|
82 |
|
83 |
+
register_post_type(
|
84 |
+
'omapi',
|
85 |
+
array(
|
86 |
+
'labels' => apply_filters(
|
87 |
+
'optin_monster_api_post_type_labels',
|
88 |
array(
|
89 |
'name' => _x( 'Campaigns', 'post type general name', 'optin-monster-api' ),
|
90 |
'singular_name' => _x( 'Campaign', 'post type singular name', 'optin-monster-api' ),
|
91 |
+
'add_new' => esc_html__( 'Add New', 'optin-monster-api' ),
|
92 |
+
'add_new_item' => esc_html__( 'Add New Campaign', 'optin-monster-api' ),
|
93 |
+
'edit_item' => esc_html__( 'Edit Campaign', 'optin-monster-api' ),
|
94 |
+
'new_item' => esc_html__( 'New Campaign', 'optin-monster-api' ),
|
95 |
+
'all_items' => esc_html__( 'Campaigns', 'optin-monster-api' ),
|
96 |
+
'view_item' => esc_html__( 'View Campaign', 'optin-monster-api' ),
|
97 |
+
'search_items' => esc_html__( 'Search Campaigns', 'optin-monster-api' ),
|
98 |
+
'not_found' => esc_html__( 'No Campaigns found', 'optin-monster-api' ),
|
99 |
+
'not_found_in_trash' => esc_html__( 'No Campaigns found in trash', 'optin-monster-api' ),
|
100 |
'parent_item_colon' => '',
|
101 |
+
'menu_name' => esc_html__( 'Campaigns', 'optin-monster-api' ),
|
102 |
)
|
103 |
),
|
104 |
'public' => false,
|
106 |
'capability_type' => 'post',
|
107 |
'has_archive' => false,
|
108 |
'hierarchical' => false,
|
109 |
+
'supports' => array( 'title' ),
|
110 |
)
|
111 |
);
|
112 |
+
}
|
|
|
|
|
113 |
}
|
OMAPI/Utils.php
CHANGED
@@ -7,6 +7,17 @@
|
|
7 |
* @package OMAPI
|
8 |
* @author Justin Sternberg
|
9 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
class OMAPI_Utils {
|
11 |
|
12 |
/**
|
@@ -55,4 +66,15 @@ class OMAPI_Utils {
|
|
55 |
return 'post_tag' === $taxonomy && is_tag( $term_id ) || is_tax( $taxonomy, $term_id );
|
56 |
}
|
57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
}
|
7 |
* @package OMAPI
|
8 |
* @author Justin Sternberg
|
9 |
*/
|
10 |
+
|
11 |
+
// Exit if accessed directly.
|
12 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
+
exit;
|
14 |
+
}
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Utils class.
|
18 |
+
*
|
19 |
+
* @since 1.3.6
|
20 |
+
*/
|
21 |
class OMAPI_Utils {
|
22 |
|
23 |
/**
|
66 |
return 'post_tag' === $taxonomy && is_tag( $term_id ) || is_tax( $taxonomy, $term_id );
|
67 |
}
|
68 |
|
69 |
+
/**
|
70 |
+
* Determines if AMP is enabled on the site or not.
|
71 |
+
*
|
72 |
+
* @since 1.9.8
|
73 |
+
*
|
74 |
+
* @return bool True if AMP is enabled, false otherwise.
|
75 |
+
*/
|
76 |
+
public static function is_amp_enabled() {
|
77 |
+
return function_exists( 'is_amp_endpoint' ) && is_amp_endpoint();
|
78 |
+
}
|
79 |
+
|
80 |
}
|
OMAPI/Validate.php
CHANGED
@@ -7,44 +7,55 @@
|
|
7 |
* @package OMAPI
|
8 |
* @author Thomas Griffin
|
9 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
class OMAPI_Validate {
|
11 |
|
12 |
/**
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
|
21 |
/**
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
|
49 |
// Possibly validate our API credentials.
|
50 |
$this->maybe_validate();
|
@@ -52,64 +63,64 @@ class OMAPI_Validate {
|
|
52 |
// Add validation messages.
|
53 |
add_action( 'admin_notices', array( $this, 'notices' ) );
|
54 |
|
55 |
-
|
56 |
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
|
68 |
-
|
69 |
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
if (
|
81 |
set_transient( '_omapi_validate', true, DAY_IN_SECONDS );
|
82 |
return;
|
83 |
}
|
84 |
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
|
90 |
-
|
91 |
-
|
92 |
|
93 |
-
|
94 |
-
|
95 |
|
96 |
-
|
97 |
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
|
105 |
$creds = $this->base->get_api_credentials();
|
106 |
|
107 |
// Check for new apikey and only use the old user/key if we don't have it
|
108 |
if ( ! $creds['apikey'] ) {
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
|
114 |
$ret = $api->request();
|
115 |
if ( is_wp_error( $ret ) ) {
|
@@ -137,6 +148,8 @@ class OMAPI_Validate {
|
|
137 |
$option['is_expired'] = true;
|
138 |
$option['is_disabled'] = false;
|
139 |
break;
|
|
|
|
|
140 |
}
|
141 |
|
142 |
// Update option.
|
@@ -148,42 +161,44 @@ class OMAPI_Validate {
|
|
148 |
set_transient( '_omapi_validate', true, DAY_IN_SECONDS );
|
149 |
}
|
150 |
|
151 |
-
|
152 |
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
|
160 |
global $pagenow;
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
167 |
}
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
echo '<div class="error"><p>' . __( 'The subscription to this OptinMonster account has expired. Please renew your subscription to use the OptinMonster API.', 'optin-monster-api' ) . '</p>';
|
174 |
-
echo '<p><a href="' . OPTINMONSTER_APP_URL . '/account/billing/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpdashboard" class="button button-primary button-large omapi-new-optin" title="Renew Subscription" target="_blank">Renew Subscription</a></p></div>';
|
175 |
-
} else {
|
176 |
-
// If user has dismissed before no point going through page checks
|
177 |
-
if ( $this->should_user_see_connect_nag() ) {
|
178 |
-
if ( ! ( isset($_GET['page'] ) && $_GET['page'] == 'optin-monster-api-settings') && ! ( isset($_GET['page'] ) && $_GET['page'] == 'optin-monster-api-welcome') && ! ( 'index.php' == $pagenow ) && ! $this->base->get_api_credentials() ){
|
179 |
-
echo '<div id="omapi-please-connect-notice" class="updated notice is-dismissible"><h3 style="padding:2px;font-weight:normal;margin:.5em 0 0;">' . __( 'Get More Email Subscribers with OptinMonster', 'optin-monster-api' ) . '</h3><p>' . __( 'Please connect to or create an OptinMonster account to start using OptinMonster. This will enable you to start turning website visitors into subscribers & customers.', 'optin-monster-api' ) . '</p>';
|
180 |
-
echo '<p><a href="' . esc_url_raw( $this->base->menu->get_dashboard_link() ) . '" class="button button-primary button-large omapi-new-optin" title="Connect OptinMonster">Connect OptinMonster</a></p></div>';
|
181 |
-
}
|
182 |
-
}
|
183 |
-
|
184 |
-
}
|
185 |
-
|
186 |
-
}
|
187 |
|
188 |
/**
|
189 |
* Script to hide the please connect nag
|
@@ -191,7 +206,7 @@ class OMAPI_Validate {
|
|
191 |
public function hide_connect_notice_script() {
|
192 |
?>
|
193 |
<script type="text/javascript">
|
194 |
-
jQuery(document).on('click', '#omapi-please-connect-notice .notice-dismiss', function( event ) {
|
195 |
event.preventDefault();
|
196 |
|
197 |
//Set the pointer to be closed for this user
|
@@ -199,7 +214,7 @@ class OMAPI_Validate {
|
|
199 |
pointer: 'omapi_please_connect_notice',
|
200 |
action: 'dismiss-wp-pointer'
|
201 |
});
|
202 |
-
jQuery('#omapi-please-connect-notice').fadeTo(100, 0, function() {
|
203 |
jQuery( this ).slideUp(100, function() {
|
204 |
jQuery( this ).remove()
|
205 |
})
|
@@ -223,7 +238,7 @@ class OMAPI_Validate {
|
|
223 |
$dismissed_pointers = explode( ',', get_user_meta( get_current_user_id(), 'dismissed_wp_pointers', true ) );
|
224 |
|
225 |
// Check if our pointer is not among dismissed ones and that the user should see this
|
226 |
-
if( ! in_array( 'omapi_please_connect_notice', $dismissed_pointers ) && current_user_can('activate_plugins') ) {
|
227 |
$show_the_nag = true;
|
228 |
// Add footer script to save when user dismisses
|
229 |
add_action( 'admin_print_footer_scripts', array( $this, 'hide_connect_notice_script' ) );
|
@@ -237,5 +252,4 @@ class OMAPI_Validate {
|
|
237 |
|
238 |
}
|
239 |
|
240 |
-
|
241 |
-
}
|
7 |
* @package OMAPI
|
8 |
* @author Thomas Griffin
|
9 |
*/
|
10 |
+
|
11 |
+
// Exit if accessed directly.
|
12 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
+
exit;
|
14 |
+
}
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Validate class.
|
18 |
+
*
|
19 |
+
* @since 1.0.0
|
20 |
+
*/
|
21 |
class OMAPI_Validate {
|
22 |
|
23 |
/**
|
24 |
+
* Holds the class object.
|
25 |
+
*
|
26 |
+
* @since 1.0.0
|
27 |
+
*
|
28 |
+
* @var object
|
29 |
+
*/
|
30 |
+
public static $instance;
|
31 |
|
32 |
/**
|
33 |
+
* Path to the file.
|
34 |
+
*
|
35 |
+
* @since 1.0.0
|
36 |
+
*
|
37 |
+
* @var string
|
38 |
+
*/
|
39 |
+
public $file = __FILE__;
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Holds the base class object.
|
43 |
+
*
|
44 |
+
* @since 1.0.0
|
45 |
+
*
|
46 |
+
* @var object
|
47 |
+
*/
|
48 |
+
public $base;
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Primary class constructor.
|
52 |
+
*
|
53 |
+
* @since 1.0.0
|
54 |
+
*/
|
55 |
+
public function __construct() {
|
56 |
+
|
57 |
+
// Set our object.
|
58 |
+
$this->set();
|
59 |
|
60 |
// Possibly validate our API credentials.
|
61 |
$this->maybe_validate();
|
63 |
// Add validation messages.
|
64 |
add_action( 'admin_notices', array( $this, 'notices' ) );
|
65 |
|
66 |
+
}
|
67 |
|
68 |
+
/**
|
69 |
+
* Sets our object instance and base class instance.
|
70 |
+
*
|
71 |
+
* @since 1.0.0
|
72 |
+
*/
|
73 |
+
public function set() {
|
74 |
|
75 |
+
self::$instance = $this;
|
76 |
+
$this->base = OMAPI::get_instance();
|
77 |
+
$this->view = isset( $_GET['optin_monster_api_view'] ) ? stripslashes( $_GET['optin_monster_api_view'] ) : $this->base->get_view();
|
78 |
|
79 |
+
}
|
80 |
|
81 |
+
/**
|
82 |
+
* Maybe validate our API credentials if the transient has expired.
|
83 |
+
*
|
84 |
+
* @since 1.0.0
|
85 |
+
*/
|
86 |
+
public function maybe_validate() {
|
87 |
|
88 |
+
// Check to see if welcome options have been set. If not, let's delay this check for a day.
|
89 |
+
// Also set a transient so that we know the plugin has been activated.
|
90 |
+
$options = $this->base->get_option();
|
91 |
+
if ( empty( $options['welcome']['status'] ) || 'welcomed' !== $options['welcome']['status'] ) {
|
92 |
set_transient( '_omapi_validate', true, DAY_IN_SECONDS );
|
93 |
return;
|
94 |
}
|
95 |
|
96 |
+
// Check if the transient has expired.
|
97 |
+
if ( false !== ( $transient = get_transient( '_omapi_validate' ) ) ) {
|
98 |
+
return;
|
99 |
+
}
|
100 |
|
101 |
+
// Validate API.
|
102 |
+
$this->validate();
|
103 |
|
104 |
+
// Provide action to refresh optins.
|
105 |
+
do_action( 'optin_monster_api_validate_api', $this->view );
|
106 |
|
107 |
+
}
|
108 |
|
109 |
+
/**
|
110 |
+
* Validate API credentials.
|
111 |
+
*
|
112 |
+
* @since 1.0.0
|
113 |
+
*/
|
114 |
+
public function validate() {
|
115 |
|
116 |
$creds = $this->base->get_api_credentials();
|
117 |
|
118 |
// Check for new apikey and only use the old user/key if we don't have it
|
119 |
if ( ! $creds['apikey'] ) {
|
120 |
+
$api = new OMAPI_Api( 'validate/', array( 'user' => $creds['user'], 'key' => $creds['key'] ) );
|
121 |
+
} else {
|
122 |
+
$api = new OMAPI_Api( 'verify/', array( 'apikey' => $creds['apikey'] ) );
|
123 |
+
}
|
124 |
|
125 |
$ret = $api->request();
|
126 |
if ( is_wp_error( $ret ) ) {
|
148 |
$option['is_expired'] = true;
|
149 |
$option['is_disabled'] = false;
|
150 |
break;
|
151 |
+
default:
|
152 |
+
break;
|
153 |
}
|
154 |
|
155 |
// Update option.
|
161 |
set_transient( '_omapi_validate', true, DAY_IN_SECONDS );
|
162 |
}
|
163 |
|
164 |
+
}
|
165 |
|
166 |
+
/**
|
167 |
+
* Outputs any validation notices.
|
168 |
+
*
|
169 |
+
* @since 1.0.0
|
170 |
+
*/
|
171 |
+
public function notices() {
|
172 |
|
173 |
global $pagenow;
|
174 |
+
$page = isset( $_GET['page'] ) ? $_GET['page'] : '';
|
175 |
+
|
176 |
+
$option = $this->base->get_option();
|
177 |
+
if ( isset( $option['is_invalid'] ) && $option['is_invalid'] ) {
|
178 |
+
if ( 'optin-monster-api-settings' !== $page && 'optin-monster-api-welcome' !== $page ) {
|
179 |
+
if ( ! $this->base->menu->has_trial_link() ) {
|
180 |
+
echo '<div class="notice notice-error"><p>' . esc_html__( 'There was an error verifying your OptinMonster API credentials. They are either missing or they are no longer valid.', 'optin-monster-api' ) . '</p>';
|
181 |
+
echo '<p><a href="' . esc_url_raw( admin_url( 'admin.php?page=optin-monster-api-settings' ) ) . '" class="button button-primary button-large omapi-new-optin" title="' . esc_html__( 'View API Settings', 'optin-monster-api' ) . '">' . esc_html__( 'View API Settings', 'optin-monster-api' ) . '</a></p></div>';
|
182 |
+
}
|
183 |
+
}
|
184 |
+
} elseif ( isset( $option['is_disabled'] ) && $option['is_disabled'] ) {
|
185 |
+
echo '<div class="notice notice-error"><p>' . esc_html__( 'The subscription to this OptinMonster account has been disabled, likely due to a refund or other administrator action. Please contact OptinMonster support to resolve this issue.', 'optin-monster-api' ) . '</p>';
|
186 |
+
echo '<p><a href="' . OPTINMONSTER_APP_URL . '/account/support/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpdashboard" class="button button-primary button-large omapi-new-optin" title="' . esc_html__( 'Contact OptinMonster Support', 'optin-monster-api' ) . '" target="_blank">' . esc_html__( 'Contact Support', 'optin-monster-api' ) . '</a></p></div>';
|
187 |
+
} elseif ( isset( $option['is_expired'] ) && $option['is_expired'] ) {
|
188 |
+
echo '<div class="notice notice-error"><p>' . esc_html__( 'The subscription to this OptinMonster account has expired. Please renew your subscription to use the OptinMonster API.', 'optin-monster-api' ) . '</p>';
|
189 |
+
echo '<p><a href="' . OPTINMONSTER_APP_URL . '/account/billing/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpdashboard" class="button button-primary button-large omapi-new-optin" title="' . esc_html__( 'Renew Subscription', 'optin-monster-api' ) . '" target="_blank">' . esc_html__( 'Renew Subscription', 'optin-monster-api' ) . '</a></p></div>';
|
190 |
+
} else {
|
191 |
+
// If user has dismissed before no point going through page checks
|
192 |
+
if ( $this->should_user_see_connect_nag() ) {
|
193 |
+
if ( 'optin-monster-api-settings' !== $page && 'optin-monster-api-welcome' !== $page && 'index.php' !== $pagenow && ! $this->base->get_api_credentials() ) {
|
194 |
+
echo '<div id="omapi-please-connect-notice" class="notice notice-success is-dismissible"><h3 style="padding:2px;font-weight:normal;margin:.5em 0 0;">' . esc_html__( 'Get More Email Subscribers with OptinMonster', 'optin-monster-api' ) . '</h3><p>' . esc_html__( 'Please connect to or create an OptinMonster account to start using OptinMonster. This will enable you to start turning website visitors into subscribers & customers.', 'optin-monster-api' ) . '</p>';
|
195 |
+
echo '<p><a href="' . esc_url_raw( $this->base->menu->get_dashboard_link() ) . '" class="button button-primary button-large omapi-new-optin" title="' . esc_html__( 'Connect OptinMonster', 'optin-monster-api' ) . '">' . esc_html__( 'Connect OptinMonster' ) . '</a></p></div>';
|
196 |
}
|
197 |
+
}
|
198 |
+
|
199 |
+
}
|
200 |
+
|
201 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
202 |
|
203 |
/**
|
204 |
* Script to hide the please connect nag
|
206 |
public function hide_connect_notice_script() {
|
207 |
?>
|
208 |
<script type="text/javascript">
|
209 |
+
jQuery(document).on( 'click', '#omapi-please-connect-notice .notice-dismiss', function( event ) {
|
210 |
event.preventDefault();
|
211 |
|
212 |
//Set the pointer to be closed for this user
|
214 |
pointer: 'omapi_please_connect_notice',
|
215 |
action: 'dismiss-wp-pointer'
|
216 |
});
|
217 |
+
jQuery( '#omapi-please-connect-notice' ).fadeTo( 100, 0, function() {
|
218 |
jQuery( this ).slideUp(100, function() {
|
219 |
jQuery( this ).remove()
|
220 |
})
|
238 |
$dismissed_pointers = explode( ',', get_user_meta( get_current_user_id(), 'dismissed_wp_pointers', true ) );
|
239 |
|
240 |
// Check if our pointer is not among dismissed ones and that the user should see this
|
241 |
+
if( ! in_array( 'omapi_please_connect_notice', $dismissed_pointers ) && current_user_can( 'activate_plugins' ) ) {
|
242 |
$show_the_nag = true;
|
243 |
// Add footer script to save when user dismisses
|
244 |
add_action( 'admin_print_footer_scripts', array( $this, 'hide_connect_notice_script' ) );
|
252 |
|
253 |
}
|
254 |
|
255 |
+
}
|
|
OMAPI/Welcome.php
CHANGED
@@ -7,6 +7,17 @@
|
|
7 |
* @package OMAPI
|
8 |
* @author Devin Vinson
|
9 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
class OMAPI_Welcome {
|
11 |
|
12 |
/**
|
@@ -36,7 +47,6 @@ class OMAPI_Welcome {
|
|
36 |
*/
|
37 |
public $base;
|
38 |
|
39 |
-
|
40 |
/**
|
41 |
* Holds the welcome slug.
|
42 |
*
|
@@ -52,18 +62,37 @@ class OMAPI_Welcome {
|
|
52 |
* @since 1.1.4.2
|
53 |
*/
|
54 |
public function __construct() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
|
56 |
// Set our object.
|
57 |
$this->set();
|
58 |
|
59 |
//Load the Welcome screen
|
60 |
-
add_action('admin_menu', array($this, 'register_welcome_page') );
|
61 |
|
62 |
//maybe redirect
|
63 |
-
add_action('admin_init', array( $this, 'maybe_welcome_redirect' ) );
|
64 |
|
65 |
//maybe add body classes
|
66 |
-
add_action( 'current_screen', array( $this, 'welcome_screen_helpers') );
|
67 |
|
68 |
// Maybe load a dashboard widget.
|
69 |
add_action( 'wp_dashboard_setup', array( $this, 'dashboard_widget' ) );
|
@@ -77,7 +106,7 @@ class OMAPI_Welcome {
|
|
77 |
public function set() {
|
78 |
|
79 |
self::$instance = $this;
|
80 |
-
$this->base
|
81 |
$this->view = isset( $_GET['optin_monster_api_view'] ) ? stripslashes( $_GET['optin_monster_api_view'] ) : $this->base->get_view();
|
82 |
|
83 |
}
|
@@ -93,12 +122,11 @@ class OMAPI_Welcome {
|
|
93 |
|
94 |
// Make sure welcome page is always first page to view.
|
95 |
if ( 'toplevel_page_optin-monster-api-settings' === $screen->id ) {
|
96 |
-
|
97 |
-
if ( ! $
|
98 |
die( wp_redirect( 'admin.php?page=optin-monster-api-welcome' ) );
|
99 |
}
|
100 |
}
|
101 |
-
|
102 |
}
|
103 |
/**
|
104 |
* Add body classes
|
@@ -120,22 +148,21 @@ class OMAPI_Welcome {
|
|
120 |
$options = $this->base->get_option();
|
121 |
|
122 |
//Check for the new option
|
123 |
-
if (
|
124 |
|
125 |
-
//Check if they have been welcomed
|
126 |
-
if ( $options['welcome']['status']
|
127 |
|
128 |
// Update the option.
|
129 |
$options['welcome']['status'] = 'welcomed';
|
130 |
update_option('optin_monster_api', $options );
|
131 |
|
132 |
-
//If this was not a bulk activate send them to the page
|
133 |
-
if(!isset($_GET['activate-multi']))
|
134 |
-
{
|
135 |
// Only redirect if no trial is found.
|
136 |
$trial = $this->base->menu->has_trial_link();
|
137 |
if ( ! $trial ) {
|
138 |
-
wp_redirect('admin.php?page=optin-monster-api-welcome');
|
139 |
}
|
140 |
}
|
141 |
|
@@ -147,7 +174,6 @@ class OMAPI_Welcome {
|
|
147 |
update_option('optin_monster_api', $options );
|
148 |
}
|
149 |
|
150 |
-
|
151 |
}
|
152 |
|
153 |
/**
|
@@ -156,14 +182,16 @@ class OMAPI_Welcome {
|
|
156 |
* @since 1.1.4.2
|
157 |
*/
|
158 |
public function register_welcome_page() {
|
|
|
|
|
159 |
|
160 |
$this->hook = add_submenu_page(
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
apply_filters( 'optin_monster_api_menu_cap', 'manage_options' ), //cap
|
165 |
-
|
166 |
-
array($this, 'callback_to_display_page') //callback
|
167 |
);
|
168 |
|
169 |
// Load settings page assets.
|
@@ -180,25 +208,25 @@ class OMAPI_Welcome {
|
|
180 |
*/
|
181 |
public function callback_to_display_page() {
|
182 |
|
183 |
-
$text = $this->base->menu->has_trial_link() ?
|
184 |
$link = esc_url( $this->base->menu->get_action_link() );
|
185 |
-
$api_link = esc_url_raw( admin_url( 'admin.php?page=optin-monster-api-settings' ) );
|
186 |
?>
|
187 |
<div class="omapi-welcome-content">
|
188 |
<div class="inner-container">
|
189 |
-
<h1><?php
|
190 |
|
191 |
<div class="omapi-well welcome-connect">
|
192 |
-
<p><?php
|
193 |
<div class="actions">
|
194 |
<a class="button button-omapi-green button-hero" href="<?php echo $link; ?>" target="_blank"><?php echo $text; ?></a>
|
195 |
<span class="or">or</span>
|
196 |
-
<a class="button button-omapi-gray button-hero" href="<?php echo $api_link; ?>"><?php
|
197 |
</div>
|
198 |
</div>
|
199 |
<div id="js__omapi-video-well" class="omapi-well welcome-data-vid">
|
200 |
-
<h2><?php
|
201 |
-
<p><?php
|
202 |
<div class="actions">
|
203 |
<a id="js_omapi-welcome-video-link" class="omapi-video-link" href="https://www.youtube.com/embed/jbP9C9bQtv4?rel=0&controls=0&showinfo=0&autoplay=1">
|
204 |
<img width="188" src="<?php echo plugins_url( '/assets/css/images/video-cta-button.png', OMAPI_FILE ) ?>">
|
@@ -210,25 +238,25 @@ class OMAPI_Welcome {
|
|
210 |
</div>
|
211 |
|
212 |
<div class="omapi-sub-title">
|
213 |
-
<h2><?php
|
214 |
-
<p><?php
|
215 |
</div>
|
216 |
<div class="divider"></div>
|
217 |
|
218 |
<div class="omapi-feature-box omapi-clear">
|
219 |
<div class="omapi-feature-image"><img src="<?php echo plugins_url( '/assets/css/images/features-builder.png', OMAPI_FILE ); ?>" alt="<?php esc_attr_e( 'OptinMonster Form Builder', 'optin-monster-api' ); ?>" /></div>
|
220 |
<div class="omapi-feature-text">
|
221 |
-
<h3><?php
|
222 |
-
<p><?php
|
223 |
-
<p><?php
|
224 |
</div>
|
225 |
</div>
|
226 |
|
227 |
<div class="omapi-feature-box omapi-clear">
|
228 |
<div class="omapi-feature-text">
|
229 |
-
<h3><?php
|
230 |
-
<p><?php
|
231 |
-
<p><?php
|
232 |
</div>
|
233 |
<div class="omapi-feature-image"><img src="<?php echo plugins_url( '/assets/css/images/features-exit-animated.gif', OMAPI_FILE ); ?>" alt="<?php esc_attr_e( 'OptinMonster Exit Intent Technology', 'optin-monster-api' ); ?>" /></div>
|
234 |
</div>
|
@@ -236,17 +264,17 @@ class OMAPI_Welcome {
|
|
236 |
<div class="omapi-feature-box omapi-clear">
|
237 |
<div class="omapi-feature-image"><img src="<?php echo plugins_url( '/assets/css/images/features-ab-testing.png', OMAPI_FILE ); ?>" alt="<?php esc_attr_e( 'OptinMonster uses smart A/B testing', 'optin-monster-api' ); ?>" /></div>
|
238 |
<div class="omapi-feature-text">
|
239 |
-
<h3><?php
|
240 |
-
<p><?php
|
241 |
-
<p><?php
|
242 |
</div>
|
243 |
</div>
|
244 |
|
245 |
<div class="omapi-feature-box omapi-clear">
|
246 |
<div class="omapi-feature-text">
|
247 |
-
<h3><?php
|
248 |
-
<p><?php
|
249 |
-
<p><?php
|
250 |
</div>
|
251 |
<div class="omapi-feature-image"><img src="<?php echo plugins_url( '/assets/css/images/features-analytics.png', OMAPI_FILE ); ?>" alt="<?php esc_attr_e( 'OptinMonster Segmenting with Page Level Targeting', 'optin-monster-api' ); ?>" /></div>
|
252 |
</div>
|
@@ -255,7 +283,7 @@ class OMAPI_Welcome {
|
|
255 |
<a class="button button-omapi-green button-hero" href="<?php echo $link; ?>" target="_blank"><?php echo $text; ?></a>
|
256 |
</div>
|
257 |
<div class="omapi-well welcome-featuredin">
|
258 |
-
<h2><?php
|
259 |
<img src="<?php echo plugins_url( '/assets/css/images/featured-logos.png', OMAPI_FILE ); ?>" alt="<?php esc_attr_e( 'OptinMonster has been featured in Inc., Forbes, VB, Yahoo, Entrepreneur, Huff Post, and more', 'optin-monster-api' ); ?>" />
|
260 |
</div>
|
261 |
|
@@ -265,9 +293,9 @@ class OMAPI_Welcome {
|
|
265 |
<img src="<?php echo plugins_url( '/assets/css/images/michaelstelzner.png', OMAPI_FILE ); ?>">
|
266 |
</div>
|
267 |
<p class="ompai-review">
|
268 |
-
|
269 |
-
<span class="reviewer-name"><?php
|
270 |
-
<span class="reviewer-title"><?php
|
271 |
</p>
|
272 |
</div>
|
273 |
<div class="omapi-well omapi-mini-well">
|
@@ -275,9 +303,9 @@ class OMAPI_Welcome {
|
|
275 |
<img src="<?php echo plugins_url( '/assets/css/images/neilpatel.png', OMAPI_FILE ); ?>">
|
276 |
</div>
|
277 |
<p class="ompai-review">
|
278 |
-
<?php _e( 'Exit Intent
|
279 |
-
<span class="reviewer-name"><?php
|
280 |
-
<span class="reviewer-title"><?php
|
281 |
</p>
|
282 |
</div>
|
283 |
<div class="omapi-well omapi-mini-well">
|
@@ -286,18 +314,18 @@ class OMAPI_Welcome {
|
|
286 |
</div>
|
287 |
<p class="ompai-review">
|
288 |
<?php _e( 'OptinMonster played a critical role in increasing my email optin conversion rate by 469%. In real numbers, <strong>that is the difference between $7,765 and $47,748 per month.</strong>', 'optin-monster-api' ); ?>
|
289 |
-
<span class="reviewer-name"><?php
|
290 |
-
<span class="reviewer-title"><?php
|
291 |
</p>
|
292 |
</div>
|
293 |
</div>
|
294 |
|
295 |
<div class="omapi-well welcome-connect">
|
296 |
-
<p><?php
|
297 |
<div class="actions">
|
298 |
<a class="button button-omapi-green button-hero" href="<?php echo $link; ?>" target="_blank"><?php echo $text; ?></a>
|
299 |
<span class="or">or</span>
|
300 |
-
<a class="button button-omapi-gray button-hero" href="<?php echo $api_link; ?>"><?php
|
301 |
</div>
|
302 |
</div>
|
303 |
|
@@ -320,17 +348,17 @@ class OMAPI_Welcome {
|
|
320 |
}
|
321 |
|
322 |
wp_add_dashboard_widget(
|
323 |
-
|
324 |
-
|
325 |
array( $this, 'dashboard_widget_callback' )
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
}
|
335 |
|
336 |
/**
|
@@ -342,9 +370,9 @@ class OMAPI_Welcome {
|
|
342 |
?>
|
343 |
<div class="optin-monster-db-widget" style="text-align:center;">
|
344 |
<p><img src="<?php echo plugins_url( '/assets/css/images/dashboard-icon.png', OMAPI_FILE ); ?>" alt="<?php esc_attr_e( 'Archie', 'optin-monster-api' ); ?>" width="64px" height="64px"></p>
|
345 |
-
<h3 style="font-weight:normal;font-size:1.3em;"><?php
|
346 |
<p><?php _e( 'OptinMonster helps you convert abandoning website visitors into subscribers and customers. <strong>Get more email subscribers now.</strong>', 'optin-monster-api' ); ?></p>
|
347 |
-
<p><a href="<?php echo esc_url( $this->base->menu->get_dashboard_link() ); ?>" class="button button-primary" title="<?php esc_attr_e( 'Connect OptinMonster', 'optin-monster-api' ); ?>"><?php
|
348 |
</div>
|
349 |
<?php
|
350 |
}
|
@@ -359,8 +387,7 @@ class OMAPI_Welcome {
|
|
359 |
add_action( 'admin_enqueue_scripts', array( $this, 'styles' ) );
|
360 |
add_action( 'admin_print_footer_scripts', array( $this, 'scripts' ) );
|
361 |
add_filter( 'admin_footer_text', array( $this, 'footer' ) );
|
362 |
-
add_action( 'in_admin_header', array( $this->base->menu, 'output_plugin_screen_banner') );
|
363 |
-
|
364 |
|
365 |
}
|
366 |
|
@@ -374,22 +401,21 @@ class OMAPI_Welcome {
|
|
374 |
wp_register_style( $this->base->plugin_slug . '-settings', plugins_url( '/assets/css/settings.css', OMAPI_FILE ), array(), $this->base->version );
|
375 |
wp_enqueue_style( $this->base->plugin_slug . '-settings' );
|
376 |
|
377 |
-
|
378 |
}
|
|
|
379 |
public function scripts() {
|
380 |
?>
|
381 |
<script type="text/javascript">
|
382 |
-
jQuery('#js_omapi-welcome-video-link')
|
383 |
-
.on('click', function (e) {
|
384 |
e.preventDefault();
|
385 |
-
jQuery( this ).parents('#js__omapi-video-well').addClass('active');
|
386 |
-
jQuery('#js__omapi-welcome-video-frame').prop('src', jQuery(e.currentTarget).attr('href'));
|
387 |
})
|
388 |
</script>
|
389 |
<?php
|
390 |
}
|
391 |
|
392 |
-
|
393 |
/**
|
394 |
* Customizes the footer text on the OptinMonster settings page.
|
395 |
*
|
@@ -407,8 +433,4 @@ class OMAPI_Welcome {
|
|
407 |
|
408 |
}
|
409 |
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
}
|
7 |
* @package OMAPI
|
8 |
* @author Devin Vinson
|
9 |
*/
|
10 |
+
|
11 |
+
// Exit if accessed directly.
|
12 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
+
exit;
|
14 |
+
}
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Welcome class.
|
18 |
+
*
|
19 |
+
* @since 1.1.4
|
20 |
+
*/
|
21 |
class OMAPI_Welcome {
|
22 |
|
23 |
/**
|
47 |
*/
|
48 |
public $base;
|
49 |
|
|
|
50 |
/**
|
51 |
* Holds the welcome slug.
|
52 |
*
|
62 |
* @since 1.1.4.2
|
63 |
*/
|
64 |
public function __construct() {
|
65 |
+
// If we are not in admin or admin ajax, return.
|
66 |
+
if ( ! is_admin() ) {
|
67 |
+
return;
|
68 |
+
}
|
69 |
+
|
70 |
+
// If user is in admin ajax or doing cron, return.
|
71 |
+
if ( ( defined( 'DOING_AJAX' ) && DOING_AJAX ) || ( defined( 'DOING_CRON' ) && DOING_CRON ) ) {
|
72 |
+
return;
|
73 |
+
}
|
74 |
+
|
75 |
+
// If user is not logged in, return.
|
76 |
+
if ( ! is_user_logged_in() ) {
|
77 |
+
return;
|
78 |
+
}
|
79 |
+
|
80 |
+
// If user cannot manage_options, return.
|
81 |
+
if ( ! current_user_can( 'manage_options' ) ) {
|
82 |
+
return;
|
83 |
+
}
|
84 |
|
85 |
// Set our object.
|
86 |
$this->set();
|
87 |
|
88 |
//Load the Welcome screen
|
89 |
+
add_action( 'admin_menu', array($this, 'register_welcome_page' ) );
|
90 |
|
91 |
//maybe redirect
|
92 |
+
add_action( 'admin_init', array( $this, 'maybe_welcome_redirect' ) );
|
93 |
|
94 |
//maybe add body classes
|
95 |
+
add_action( 'current_screen', array( $this, 'welcome_screen_helpers' ) );
|
96 |
|
97 |
// Maybe load a dashboard widget.
|
98 |
add_action( 'wp_dashboard_setup', array( $this, 'dashboard_widget' ) );
|
106 |
public function set() {
|
107 |
|
108 |
self::$instance = $this;
|
109 |
+
$this->base = OMAPI::get_instance();
|
110 |
$this->view = isset( $_GET['optin_monster_api_view'] ) ? stripslashes( $_GET['optin_monster_api_view'] ) : $this->base->get_view();
|
111 |
|
112 |
}
|
122 |
|
123 |
// Make sure welcome page is always first page to view.
|
124 |
if ( 'toplevel_page_optin-monster-api-settings' === $screen->id ) {
|
125 |
+
// If We don't have the OM API Key set, and the "Bypass welcome screen" query string isn't set
|
126 |
+
if ( ! $this->base->get_api_credentials() && ! isset( $_GET['om-bypass-api-check'] ) ) {
|
127 |
die( wp_redirect( 'admin.php?page=optin-monster-api-welcome' ) );
|
128 |
}
|
129 |
}
|
|
|
130 |
}
|
131 |
/**
|
132 |
* Add body classes
|
148 |
$options = $this->base->get_option();
|
149 |
|
150 |
//Check for the new option
|
151 |
+
if ( ! empty( $options['welcome']['status'] ) ){
|
152 |
|
153 |
+
// Check if they have been welcomed
|
154 |
+
if ( 'none' === $options['welcome']['status'] ) {
|
155 |
|
156 |
// Update the option.
|
157 |
$options['welcome']['status'] = 'welcomed';
|
158 |
update_option('optin_monster_api', $options );
|
159 |
|
160 |
+
// If this was not a bulk activate send them to the page
|
161 |
+
if ( ! isset( $_GET['activate-multi'] ) ) {
|
|
|
162 |
// Only redirect if no trial is found.
|
163 |
$trial = $this->base->menu->has_trial_link();
|
164 |
if ( ! $trial ) {
|
165 |
+
wp_redirect( 'admin.php?page=optin-monster-api-welcome' );
|
166 |
}
|
167 |
}
|
168 |
|
174 |
update_option('optin_monster_api', $options );
|
175 |
}
|
176 |
|
|
|
177 |
}
|
178 |
|
179 |
/**
|
182 |
* @since 1.1.4.2
|
183 |
*/
|
184 |
public function register_welcome_page() {
|
185 |
+
$slug = 'optin-monster-api-welcome';
|
186 |
+
$is_current = isset( $_GET['page'] ) && $slug === $_GET['page'];
|
187 |
|
188 |
$this->hook = add_submenu_page(
|
189 |
+
$is_current ? 'optin-monster-api-settings' : 'optin-monster-api-settings-no-menu', //parent slug
|
190 |
+
esc_html__( 'Welcome to OptinMonster', 'optin-monster-api' ), //page title,
|
191 |
+
esc_html__( 'Welcome', 'optin-monster-api' ),
|
192 |
+
apply_filters( 'optin_monster_api_menu_cap', 'manage_options', $slug ), //cap
|
193 |
+
$slug, //slug
|
194 |
+
array( $this, 'callback_to_display_page' ) //callback
|
195 |
);
|
196 |
|
197 |
// Load settings page assets.
|
208 |
*/
|
209 |
public function callback_to_display_page() {
|
210 |
|
211 |
+
$text = $this->base->menu->has_trial_link() ? esc_html__( 'Get Started for Free', 'optin-monster-api' ) : esc_html__( 'Get OptinMonster Now', 'optin-monster-api' );
|
212 |
$link = esc_url( $this->base->menu->get_action_link() );
|
213 |
+
$api_link = esc_url_raw( admin_url( 'admin.php?page=optin-monster-api-settings&om-bypass-api-check=true' ) );
|
214 |
?>
|
215 |
<div class="omapi-welcome-content">
|
216 |
<div class="inner-container">
|
217 |
+
<h1><?php esc_html_e( 'Welcome to OptinMonster', 'optin-monster-api' ); ?></h1>
|
218 |
|
219 |
<div class="omapi-well welcome-connect">
|
220 |
+
<p><?php esc_html_e( 'Please connect to or create an OptinMonster account to start using OptinMonster. This will enable you to start turning website visitors into subscribers & customers.', 'optin-monster-api' ); ?></p>
|
221 |
<div class="actions">
|
222 |
<a class="button button-omapi-green button-hero" href="<?php echo $link; ?>" target="_blank"><?php echo $text; ?></a>
|
223 |
<span class="or">or</span>
|
224 |
+
<a class="button button-omapi-gray button-hero" href="<?php echo $api_link; ?>"><?php esc_html_e( 'Connect Your Account', 'optin-monster-api' ) ?></a>
|
225 |
</div>
|
226 |
</div>
|
227 |
<div id="js__omapi-video-well" class="omapi-well welcome-data-vid">
|
228 |
+
<h2><?php esc_html_e( 'Get More Email Subscribers, FAST!', 'optin-monster-api' ); ?></h2>
|
229 |
+
<p><?php esc_html_e( 'OptinMonster helps you convert abandoning website visitors into email subscribers with smart web forms and behavior personalization.', 'optin-monster-api' ); ?></p>
|
230 |
<div class="actions">
|
231 |
<a id="js_omapi-welcome-video-link" class="omapi-video-link" href="https://www.youtube.com/embed/jbP9C9bQtv4?rel=0&controls=0&showinfo=0&autoplay=1">
|
232 |
<img width="188" src="<?php echo plugins_url( '/assets/css/images/video-cta-button.png', OMAPI_FILE ) ?>">
|
238 |
</div>
|
239 |
|
240 |
<div class="omapi-sub-title">
|
241 |
+
<h2><?php esc_html_e( 'Top 4 Reasons Why People Love OptinMonster', 'optin-monster-api' ); ?></h2>
|
242 |
+
<p><?php esc_html_e( 'Here\'s why smart business owners love OptinMonster, and you will too!', 'optin-monster-api' ); ?></p>
|
243 |
</div>
|
244 |
<div class="divider"></div>
|
245 |
|
246 |
<div class="omapi-feature-box omapi-clear">
|
247 |
<div class="omapi-feature-image"><img src="<?php echo plugins_url( '/assets/css/images/features-builder.png', OMAPI_FILE ); ?>" alt="<?php esc_attr_e( 'OptinMonster Form Builder', 'optin-monster-api' ); ?>" /></div>
|
248 |
<div class="omapi-feature-text">
|
249 |
+
<h3><?php esc_html_e( 'Build high converting forms in minutes, not hours', 'optin-monster-api' ); ?></h3>
|
250 |
+
<p><?php esc_html_e( 'Create visually stunning optin forms that are optimized for the highest conversion rates.', 'optin-monster-api' ); ?></p>
|
251 |
+
<p><?php esc_html_e( 'You can create various types of optin forms such as lightbox popups, floating bars, slide-ins, and more.', 'optin-monster-api' ); ?></p>
|
252 |
</div>
|
253 |
</div>
|
254 |
|
255 |
<div class="omapi-feature-box omapi-clear">
|
256 |
<div class="omapi-feature-text">
|
257 |
+
<h3><?php esc_html_e( 'Convert abandoning visitors into subscribers & customers', 'optin-monster-api' ); ?></h3>
|
258 |
+
<p><?php esc_html_e( 'Did you know that over 70% of visitors who abandon your website will never return?', 'optin-monster-api' ); ?></p>
|
259 |
+
<p><?php esc_html_e( 'Our exit-intent® technology detects user behavior and prompts them with a targeted campaign at the precise moment they are about to leave.', 'optin-monster-api' ); ?></p>
|
260 |
</div>
|
261 |
<div class="omapi-feature-image"><img src="<?php echo plugins_url( '/assets/css/images/features-exit-animated.gif', OMAPI_FILE ); ?>" alt="<?php esc_attr_e( 'OptinMonster Exit Intent Technology', 'optin-monster-api' ); ?>" /></div>
|
262 |
</div>
|
264 |
<div class="omapi-feature-box omapi-clear">
|
265 |
<div class="omapi-feature-image"><img src="<?php echo plugins_url( '/assets/css/images/features-ab-testing.png', OMAPI_FILE ); ?>" alt="<?php esc_attr_e( 'OptinMonster uses smart A/B testing', 'optin-monster-api' ); ?>" /></div>
|
266 |
<div class="omapi-feature-text">
|
267 |
+
<h3><?php esc_html_e( 'Easily A/B test your ideas and increase conversions', 'optin-monster-api' ); ?></h3>
|
268 |
+
<p><?php esc_html_e( 'A/B testing helps you eliminate the guess work and make data-driven decisions on what works best.', 'optin-monster-api' ); ?></p>
|
269 |
+
<p><?php esc_html_e( 'Try different content, headlines, layouts, and styles to see what converts best with our smart and easy to use A/B testing tool.', 'optin-monster-api' ); ?></p>
|
270 |
</div>
|
271 |
</div>
|
272 |
|
273 |
<div class="omapi-feature-box omapi-clear">
|
274 |
<div class="omapi-feature-text">
|
275 |
+
<h3><?php esc_html_e( 'Measuring your results has never been easier', 'optin-monster-api' ); ?></h3>
|
276 |
+
<p><?php esc_html_e( 'Get the stats that matter and take action to imrpove your lead-generation strategy.', 'optin-monster-api' ); ?></p>
|
277 |
+
<p><?php esc_html_e( 'Our built-in analytics help you analyze clicks, views, and overall conversion rates for each page and optin form.', 'optin-monster-api' ); ?></p>
|
278 |
</div>
|
279 |
<div class="omapi-feature-image"><img src="<?php echo plugins_url( '/assets/css/images/features-analytics.png', OMAPI_FILE ); ?>" alt="<?php esc_attr_e( 'OptinMonster Segmenting with Page Level Targeting', 'optin-monster-api' ); ?>" /></div>
|
280 |
</div>
|
283 |
<a class="button button-omapi-green button-hero" href="<?php echo $link; ?>" target="_blank"><?php echo $text; ?></a>
|
284 |
</div>
|
285 |
<div class="omapi-well welcome-featuredin">
|
286 |
+
<h2><?php esc_html_e( 'OptinMonster has been featured in:', 'optin-monster-api' ); ?></h2>
|
287 |
<img src="<?php echo plugins_url( '/assets/css/images/featured-logos.png', OMAPI_FILE ); ?>" alt="<?php esc_attr_e( 'OptinMonster has been featured in Inc., Forbes, VB, Yahoo, Entrepreneur, Huff Post, and more', 'optin-monster-api' ); ?>" />
|
288 |
</div>
|
289 |
|
293 |
<img src="<?php echo plugins_url( '/assets/css/images/michaelstelzner.png', OMAPI_FILE ); ?>">
|
294 |
</div>
|
295 |
<p class="ompai-review">
|
296 |
+
<?php _e( '<strong>We added more than 95,000 names to our email list</strong> using OptinMonster\'s Exit Intent® technology. We strongly recommend it!', 'optin-monster-api' ); ?>
|
297 |
+
<span class="reviewer-name"><?php esc_html_e( 'Michael Stelzner', 'optin-monster-api' ); ?></span>
|
298 |
+
<span class="reviewer-title"><?php esc_html_e( 'Founder Social Media Examiner', 'optin-monster-api' ); ?></span>
|
299 |
</p>
|
300 |
</div>
|
301 |
<div class="omapi-well omapi-mini-well">
|
303 |
<img src="<?php echo plugins_url( '/assets/css/images/neilpatel.png', OMAPI_FILE ); ?>">
|
304 |
</div>
|
305 |
<p class="ompai-review">
|
306 |
+
<?php _e( 'Exit Intent® popups have doubled my email opt-in rate. <strong>When done right, you can see an instant 10% lift on driving sales.</strong> I highly recommend that you use OptinMonster for growing your email list and sales.', 'optin-monster-api' ); ?>
|
307 |
+
<span class="reviewer-name"><?php esc_html_e( 'Neil Patel', 'optin-monster-api' ); ?></span>
|
308 |
+
<span class="reviewer-title"><?php esc_html_e( 'Founder QuickSprout', 'optin-monster-api' ); ?></span>
|
309 |
</p>
|
310 |
</div>
|
311 |
<div class="omapi-well omapi-mini-well">
|
314 |
</div>
|
315 |
<p class="ompai-review">
|
316 |
<?php _e( 'OptinMonster played a critical role in increasing my email optin conversion rate by 469%. In real numbers, <strong>that is the difference between $7,765 and $47,748 per month.</strong>', 'optin-monster-api' ); ?>
|
317 |
+
<span class="reviewer-name"><?php esc_html_e( 'Matthew Woodward', 'optin-monster-api' ); ?></span>
|
318 |
+
<span class="reviewer-title"><?php esc_html_e( 'SEO Expert', 'optin-monster-api' ); ?></span>
|
319 |
</p>
|
320 |
</div>
|
321 |
</div>
|
322 |
|
323 |
<div class="omapi-well welcome-connect">
|
324 |
+
<p><?php esc_html_e( 'Join the thousands of users who use OptinMonster to convert abandoning website visitors into subscribers and customers.', 'optin-monster-api' ); ?></p>
|
325 |
<div class="actions">
|
326 |
<a class="button button-omapi-green button-hero" href="<?php echo $link; ?>" target="_blank"><?php echo $text; ?></a>
|
327 |
<span class="or">or</span>
|
328 |
+
<a class="button button-omapi-gray button-hero" href="<?php echo $api_link; ?>"><?php esc_html_e( 'Connect Your Account', 'optin-monster-api' ) ?></a>
|
329 |
</div>
|
330 |
</div>
|
331 |
|
348 |
}
|
349 |
|
350 |
wp_add_dashboard_widget(
|
351 |
+
'optin_monster_db_widget',
|
352 |
+
esc_html__( 'Please Connect OptinMonster', 'optin-monster-api' ),
|
353 |
array( $this, 'dashboard_widget_callback' )
|
354 |
+
);
|
355 |
+
|
356 |
+
global $wp_meta_boxes;
|
357 |
+
$normal_dashboard = $wp_meta_boxes['dashboard']['normal']['core'];
|
358 |
+
$example_widget_backup = array( 'optin_monster_db_widget' => $normal_dashboard['optin_monster_db_widget'] );
|
359 |
+
unset( $normal_dashboard['optin_monster_db_widget'] );
|
360 |
+
$sorted_dashboard = array_merge( $example_widget_backup, $normal_dashboard );
|
361 |
+
$wp_meta_boxes['dashboard']['normal']['core'] = $sorted_dashboard;
|
362 |
}
|
363 |
|
364 |
/**
|
370 |
?>
|
371 |
<div class="optin-monster-db-widget" style="text-align:center;">
|
372 |
<p><img src="<?php echo plugins_url( '/assets/css/images/dashboard-icon.png', OMAPI_FILE ); ?>" alt="<?php esc_attr_e( 'Archie', 'optin-monster-api' ); ?>" width="64px" height="64px"></p>
|
373 |
+
<h3 style="font-weight:normal;font-size:1.3em;"><?php esc_html_e( 'Please Connect OptinMonster', 'optin-monster-api' ); ?></h3>
|
374 |
<p><?php _e( 'OptinMonster helps you convert abandoning website visitors into subscribers and customers. <strong>Get more email subscribers now.</strong>', 'optin-monster-api' ); ?></p>
|
375 |
+
<p><a href="<?php echo esc_url( $this->base->menu->get_dashboard_link() ); ?>" class="button button-primary" title="<?php esc_attr_e( 'Connect OptinMonster', 'optin-monster-api' ); ?>"><?php esc_html_e( 'Connect OptinMonster', 'optin-monster-api' ); ?></a></p>
|
376 |
</div>
|
377 |
<?php
|
378 |
}
|
387 |
add_action( 'admin_enqueue_scripts', array( $this, 'styles' ) );
|
388 |
add_action( 'admin_print_footer_scripts', array( $this, 'scripts' ) );
|
389 |
add_filter( 'admin_footer_text', array( $this, 'footer' ) );
|
390 |
+
add_action( 'in_admin_header', array( $this->base->menu, 'output_plugin_screen_banner' ) );
|
|
|
391 |
|
392 |
}
|
393 |
|
401 |
wp_register_style( $this->base->plugin_slug . '-settings', plugins_url( '/assets/css/settings.css', OMAPI_FILE ), array(), $this->base->version );
|
402 |
wp_enqueue_style( $this->base->plugin_slug . '-settings' );
|
403 |
|
|
|
404 |
}
|
405 |
+
|
406 |
public function scripts() {
|
407 |
?>
|
408 |
<script type="text/javascript">
|
409 |
+
jQuery( '#js_omapi-welcome-video-link' )
|
410 |
+
.on( 'click', function ( e ) {
|
411 |
e.preventDefault();
|
412 |
+
jQuery( this ).parents( '#js__omapi-video-well' ).addClass( 'active' );
|
413 |
+
jQuery( '#js__omapi-welcome-video-frame' ).prop( 'src', jQuery( e.currentTarget ).attr( 'href' ) );
|
414 |
})
|
415 |
</script>
|
416 |
<?php
|
417 |
}
|
418 |
|
|
|
419 |
/**
|
420 |
* Customizes the footer text on the OptinMonster settings page.
|
421 |
*
|
433 |
|
434 |
}
|
435 |
|
436 |
+
}
|
|
|
|
|
|
|
|
OMAPI/Widget.php
CHANGED
@@ -7,6 +7,17 @@
|
|
7 |
* @package OMAPI
|
8 |
* @author Thomas Griffin
|
9 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
class OMAPI_Widget extends WP_Widget {
|
11 |
|
12 |
/**
|
@@ -49,7 +60,7 @@ class OMAPI_Widget extends WP_Widget {
|
|
49 |
$widget_ops = apply_filters( 'optin_monster_api_widget_ops',
|
50 |
array(
|
51 |
'classname' => 'optin-monster-api',
|
52 |
-
'description' =>
|
53 |
)
|
54 |
);
|
55 |
|
@@ -63,7 +74,7 @@ class OMAPI_Widget extends WP_Widget {
|
|
63 |
|
64 |
parent::__construct(
|
65 |
'optin-monster-api',
|
66 |
-
apply_filters( 'optin_monster_api_widget_name',
|
67 |
$widget_ops,
|
68 |
$control_ops
|
69 |
);
|
@@ -82,8 +93,8 @@ class OMAPI_Widget extends WP_Widget {
|
|
82 |
*/
|
83 |
public function widget( $args, $instance ) {
|
84 |
|
85 |
-
$title = apply_filters( 'widget_title', $instance['title'] );
|
86 |
-
$optin_id = $instance['optin_monster_id'];
|
87 |
|
88 |
do_action( 'optin_monster_api_widget_before_output', $args, $instance );
|
89 |
|
@@ -113,7 +124,9 @@ class OMAPI_Widget extends WP_Widget {
|
|
113 |
}
|
114 |
|
115 |
// Load the optin.
|
116 |
-
optin_monster( $optin->ID
|
|
|
|
|
117 |
}
|
118 |
|
119 |
do_action( 'optin_monster_api_widget_after_optin', $args, $instance );
|
@@ -141,6 +154,7 @@ class OMAPI_Widget extends WP_Widget {
|
|
141 |
|
142 |
// Sanitize user inputs.
|
143 |
$instance['title'] = trim( $new_instance['title'] );
|
|
|
144 |
$instance['optin_monster_id'] = absint( $new_instance['optin_monster_id'] );
|
145 |
|
146 |
return apply_filters( 'optin_monster_api_widget_update_instance', $instance, $new_instance );
|
@@ -159,41 +173,48 @@ class OMAPI_Widget extends WP_Widget {
|
|
159 |
public function form( $instance ) {
|
160 |
|
161 |
// Get all available optins and widget properties.
|
162 |
-
$optins
|
163 |
-
$title
|
164 |
-
$
|
|
|
165 |
|
166 |
do_action( 'optin_monster_api_widget_before_form', $instance );
|
167 |
?>
|
168 |
<p>
|
169 |
-
<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php
|
170 |
<input id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" style="width: 100%;" />
|
171 |
</p>
|
172 |
<?php do_action( 'optin_monster_api_widget_middle_form', $instance ); ?>
|
173 |
<p>
|
174 |
-
<label for="<?php echo $this->get_field_id( 'optin_monster_id' ); ?>"><?php
|
175 |
<select id="<?php echo esc_attr( $this->get_field_id( 'optin_monster_id' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'optin_monster_id' ) ); ?>" style="width: 100%;">
|
176 |
-
<?php
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
|
|
191 |
}
|
192 |
}
|
193 |
?>
|
194 |
</select>
|
195 |
</p>
|
|
|
|
|
|
|
|
|
196 |
<?php
|
|
|
197 |
do_action( 'optin_monster_api_widget_after_form', $instance );
|
198 |
|
199 |
}
|
7 |
* @package OMAPI
|
8 |
* @author Thomas Griffin
|
9 |
*/
|
10 |
+
|
11 |
+
// Exit if accessed directly.
|
12 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
+
exit;
|
14 |
+
}
|
15 |
+
|
16 |
+
/**
|
17 |
+
* Widget class.
|
18 |
+
*
|
19 |
+
* @since 1.0.0
|
20 |
+
*/
|
21 |
class OMAPI_Widget extends WP_Widget {
|
22 |
|
23 |
/**
|
60 |
$widget_ops = apply_filters( 'optin_monster_api_widget_ops',
|
61 |
array(
|
62 |
'classname' => 'optin-monster-api',
|
63 |
+
'description' => esc_html__( 'Place an OptinMonster campaign into a widgetized area.', 'optin-monster-api' )
|
64 |
)
|
65 |
);
|
66 |
|
74 |
|
75 |
parent::__construct(
|
76 |
'optin-monster-api',
|
77 |
+
apply_filters( 'optin_monster_api_widget_name', esc_html__( 'OptinMonster', 'optin-monster-api' ) ),
|
78 |
$widget_ops,
|
79 |
$control_ops
|
80 |
);
|
93 |
*/
|
94 |
public function widget( $args, $instance ) {
|
95 |
|
96 |
+
$title = apply_filters( 'widget_title', isset( $instance['title'] ) ? $instance['title'] : '' );
|
97 |
+
$optin_id = isset( $instance['optin_monster_id'] ) ? $instance['optin_monster_id'] : 0;
|
98 |
|
99 |
do_action( 'optin_monster_api_widget_before_output', $args, $instance );
|
100 |
|
124 |
}
|
125 |
|
126 |
// Load the optin.
|
127 |
+
optin_monster( $optin->ID, 'id', array(
|
128 |
+
'followrules' => ! empty( $instance['followrules'] ) ? 'true' : 'false',
|
129 |
+
) );
|
130 |
}
|
131 |
|
132 |
do_action( 'optin_monster_api_widget_after_optin', $args, $instance );
|
154 |
|
155 |
// Sanitize user inputs.
|
156 |
$instance['title'] = trim( $new_instance['title'] );
|
157 |
+
$instance['followrules'] = ! empty( $new_instance['followrules'] );
|
158 |
$instance['optin_monster_id'] = absint( $new_instance['optin_monster_id'] );
|
159 |
|
160 |
return apply_filters( 'optin_monster_api_widget_update_instance', $instance, $new_instance );
|
173 |
public function form( $instance ) {
|
174 |
|
175 |
// Get all available optins and widget properties.
|
176 |
+
$optins = $this->base->get_optins();
|
177 |
+
$title = isset( $instance['title'] ) ? $instance['title'] : '';
|
178 |
+
$followrules = ! empty( $instance['followrules'] );
|
179 |
+
$optin_id = isset( $instance['optin_monster_id'] ) ? $instance['optin_monster_id'] : false;
|
180 |
|
181 |
do_action( 'optin_monster_api_widget_before_form', $instance );
|
182 |
?>
|
183 |
<p>
|
184 |
+
<label for="<?php echo $this->get_field_id( 'title' ); ?>"><?php esc_html_e( 'Title', 'optin-monster-api' ); ?></label>
|
185 |
<input id="<?php echo $this->get_field_id( 'title' ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'title' ) ); ?>" type="text" value="<?php echo esc_attr( $title ); ?>" style="width: 100%;" />
|
186 |
</p>
|
187 |
<?php do_action( 'optin_monster_api_widget_middle_form', $instance ); ?>
|
188 |
<p>
|
189 |
+
<label for="<?php echo $this->get_field_id( 'optin_monster_id' ); ?>"><?php esc_html_e( 'Campaign', 'optin-monster-api' ); ?></label>
|
190 |
<select id="<?php echo esc_attr( $this->get_field_id( 'optin_monster_id' ) ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'optin_monster_id' ) ); ?>" style="width: 100%;">
|
191 |
+
<?php if ( ! empty( $optins ) ) {
|
192 |
+
foreach ( $optins as $optin ) {
|
193 |
+
$type = get_post_meta( $optin->ID, '_omapi_type', true );
|
194 |
+
$enabled = (bool) get_post_meta( $optin->ID, '_omapi_enabled', true );
|
195 |
+
|
196 |
+
// Only allow sidebar types.
|
197 |
+
if ( 'sidebar' !== $type && 'inline' !== $type ) {
|
198 |
+
continue;
|
199 |
+
}
|
200 |
+
|
201 |
+
// Display disabled or enabled selection.
|
202 |
+
if ( $enabled ) {
|
203 |
+
echo '<option value="' . esc_attr( $optin->ID ) . '"' . selected( $optin->ID, $optin_id, false ) . '>' . $optin->post_title . '</option>';
|
204 |
+
} else {
|
205 |
+
echo '<option value="' . esc_attr( $optin->ID ) . '" disabled="disabled"' . selected( $optin->ID, $optin_id, false ) . '>' . $optin->post_title . ' (' . esc_html__( 'Not Enabled', 'optin-monster-api' ) . ')</option>';
|
206 |
+
}
|
207 |
}
|
208 |
}
|
209 |
?>
|
210 |
</select>
|
211 |
</p>
|
212 |
+
<p>
|
213 |
+
<input id="<?php echo $this->get_field_id( 'followrules' ); ?>" name="<?php echo esc_attr( $this->get_field_name( 'followrules' ) ); ?>" type="checkbox" value="1" <?php checked( $followrules ); ?> />
|
214 |
+
<label for="<?php echo $this->get_field_id( 'followrules' ); ?>"><?php esc_html_e( 'Apply Advanced Output Settings?', 'optin-monster-api' ); ?></label>
|
215 |
+
</p>
|
216 |
<?php
|
217 |
+
|
218 |
do_action( 'optin_monster_api_widget_after_form', $instance );
|
219 |
|
220 |
}
|
OMAPI/WooCommerce.php
ADDED
@@ -0,0 +1,398 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* WooCommerce class.
|
4 |
+
*
|
5 |
+
* @since 1.7.0
|
6 |
+
*
|
7 |
+
* @package OMAPI
|
8 |
+
* @author Brandon Allen
|
9 |
+
*/
|
10 |
+
|
11 |
+
// Exit if accessed directly.
|
12 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
13 |
+
exit;
|
14 |
+
}
|
15 |
+
|
16 |
+
/**
|
17 |
+
* The WooCommerce class.
|
18 |
+
*
|
19 |
+
* @since 1.7.0
|
20 |
+
*/
|
21 |
+
class OMAPI_WooCommerce {
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Holds the class object.
|
25 |
+
*
|
26 |
+
* @since 1.7.0
|
27 |
+
*
|
28 |
+
* @var object
|
29 |
+
*/
|
30 |
+
public static $instance;
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Path to the file.
|
34 |
+
*
|
35 |
+
* @since 1.7.0
|
36 |
+
*
|
37 |
+
* @var string
|
38 |
+
*/
|
39 |
+
public $file = __FILE__;
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Holds the base class object.
|
43 |
+
*
|
44 |
+
* @since 1.7.0
|
45 |
+
*
|
46 |
+
* @var object
|
47 |
+
*/
|
48 |
+
public $base;
|
49 |
+
|
50 |
+
/**
|
51 |
+
* The minimum WooCommerce version required.
|
52 |
+
*
|
53 |
+
* @since 1.9.0
|
54 |
+
*
|
55 |
+
* @var string
|
56 |
+
*/
|
57 |
+
const MINIMUM_VERSION = '3.2.0';
|
58 |
+
|
59 |
+
/**
|
60 |
+
* Primary class constructor.
|
61 |
+
*
|
62 |
+
* @since 1.7.0
|
63 |
+
*/
|
64 |
+
public function __construct() {
|
65 |
+
|
66 |
+
// Set our object.
|
67 |
+
$this->set();
|
68 |
+
}
|
69 |
+
|
70 |
+
/**
|
71 |
+
* Sets our object instance and base class instance.
|
72 |
+
*
|
73 |
+
* @since 1.7.0
|
74 |
+
*/
|
75 |
+
public function set() {
|
76 |
+
self::$instance = $this;
|
77 |
+
$this->base = OMAPI::get_instance();
|
78 |
+
}
|
79 |
+
|
80 |
+
/**
|
81 |
+
* Connects WooCommerce to OptinMonster.
|
82 |
+
*
|
83 |
+
* @param array $data The array of consumer key and consumer secret.
|
84 |
+
*
|
85 |
+
* @since 1.7.0
|
86 |
+
*
|
87 |
+
* @returns WP_Error|array
|
88 |
+
*/
|
89 |
+
public function connect( $data ) {
|
90 |
+
if ( empty( $data['consumerKey'] ) || empty( $data['consumerSecret'] ) ) {
|
91 |
+
return new WP_Error(
|
92 |
+
'omapi-invalid-woocommerce-keys',
|
93 |
+
esc_html__( 'The consumer key or consumer secret appears to be invalid. Try again.', 'optin-monster-api' )
|
94 |
+
);
|
95 |
+
}
|
96 |
+
|
97 |
+
$data['woocommerce'] = self::version();
|
98 |
+
$data['restUrl'] = esc_url_raw( get_rest_url() );
|
99 |
+
$data['homeUrl'] = esc_url_raw( home_url() );
|
100 |
+
|
101 |
+
// Get the OptinMonster API credentials.
|
102 |
+
$creds = $this->get_request_api_credentials();
|
103 |
+
|
104 |
+
// Initialize the API class.
|
105 |
+
$api = new OMAPI_Api( 'woocommerce/shop', $creds, 'POST', 'v2' );
|
106 |
+
|
107 |
+
return $api->request( $data );
|
108 |
+
}
|
109 |
+
|
110 |
+
/**
|
111 |
+
* Disconnects WooCommerce from OptinMonster.
|
112 |
+
*
|
113 |
+
* @since 1.7.0
|
114 |
+
*/
|
115 |
+
public function disconnect() {
|
116 |
+
|
117 |
+
// Get the OptinMonster API credentials.
|
118 |
+
$creds = $this->get_request_api_credentials();
|
119 |
+
|
120 |
+
// Get the shop.
|
121 |
+
$shop = esc_attr( $this->base->get_option( 'woocommerce', 'shop' ) );
|
122 |
+
|
123 |
+
if ( empty( $shop ) ) {
|
124 |
+
return true;
|
125 |
+
}
|
126 |
+
|
127 |
+
// Initialize the API class.
|
128 |
+
$api = new OMAPI_Api( 'woocommerce/shop/' . rawurlencode( $shop ), $creds, 'DELETE', 'v2' );
|
129 |
+
|
130 |
+
return $api->request();
|
131 |
+
}
|
132 |
+
|
133 |
+
/**
|
134 |
+
* Returns the API credentials to be used in an API request.
|
135 |
+
*
|
136 |
+
* @since 1.7.0
|
137 |
+
*
|
138 |
+
* @return array
|
139 |
+
*/
|
140 |
+
public function get_request_api_credentials() {
|
141 |
+
$creds = $this->base->get_api_credentials();
|
142 |
+
|
143 |
+
// If set, return only the API key, not the legacy API credentials.
|
144 |
+
if ( $creds['apikey'] ) {
|
145 |
+
$_creds = array(
|
146 |
+
'apikey' => $creds['apikey'],
|
147 |
+
);
|
148 |
+
} else {
|
149 |
+
$_creds = array(
|
150 |
+
'user' => $creds['user'],
|
151 |
+
'key' => $creds['key'],
|
152 |
+
);
|
153 |
+
}
|
154 |
+
|
155 |
+
return $_creds;
|
156 |
+
}
|
157 |
+
|
158 |
+
/**
|
159 |
+
* Validates the passed consumer key and consumer secret.
|
160 |
+
*
|
161 |
+
* @since 1.7.0
|
162 |
+
*
|
163 |
+
* @param array $data The consumer key and consumer secret.
|
164 |
+
*
|
165 |
+
* @return array
|
166 |
+
*/
|
167 |
+
public function validate_keys( $data ) {
|
168 |
+
$key = isset( $data['consumer_key'] ) ? $data['consumer_key'] : '';
|
169 |
+
$secret = isset( $data['consumer_secret'] ) ? $data['consumer_secret'] : '';
|
170 |
+
|
171 |
+
if ( ! $key ) {
|
172 |
+
return array(
|
173 |
+
'error' => esc_html__( 'Consumer key is missing.', 'optin-monster-api' ),
|
174 |
+
);
|
175 |
+
}
|
176 |
+
|
177 |
+
if ( ! $secret ) {
|
178 |
+
return array(
|
179 |
+
'error' => esc_html__( 'Consumer secret is missing.', 'optin-monster-api' ),
|
180 |
+
);
|
181 |
+
}
|
182 |
+
|
183 |
+
// Attempt to find the passed consumer key in the database.
|
184 |
+
$keys = $this->get_keys_by_consumer_key( $data['consumer_key'] );
|
185 |
+
|
186 |
+
// If the consumer key is valid, then validate the consumer secret.
|
187 |
+
if (
|
188 |
+
empty( $keys['error'] )
|
189 |
+
&& $this->is_consumer_secret_valid( $keys['consumer_secret'], $secret )
|
190 |
+
) {
|
191 |
+
$keys['consumer_key'] = $key;
|
192 |
+
} else {
|
193 |
+
$keys['error'] = esc_html__( 'Consumer secret is invalid.', 'optin-monster-api' );
|
194 |
+
}
|
195 |
+
|
196 |
+
return $keys;
|
197 |
+
}
|
198 |
+
|
199 |
+
/**
|
200 |
+
* Return the keys for the given consumer key.
|
201 |
+
*
|
202 |
+
* This is a rough copy of the same method used by WooCommerce.
|
203 |
+
*
|
204 |
+
* @since 1.7.0
|
205 |
+
*
|
206 |
+
* @param string $consumer_key The consumer key passed by the user.
|
207 |
+
*
|
208 |
+
* @return array
|
209 |
+
*/
|
210 |
+
private function get_keys_by_consumer_key( $consumer_key ) {
|
211 |
+
global $wpdb;
|
212 |
+
|
213 |
+
$consumer_key = wc_api_hash( sanitize_text_field( $consumer_key ) );
|
214 |
+
|
215 |
+
$keys = $wpdb->get_row(
|
216 |
+
$wpdb->prepare(
|
217 |
+
"
|
218 |
+
SELECT key_id, consumer_secret
|
219 |
+
FROM {$wpdb->prefix}woocommerce_api_keys
|
220 |
+
WHERE consumer_key = %s
|
221 |
+
",
|
222 |
+
$consumer_key
|
223 |
+
),
|
224 |
+
ARRAY_A
|
225 |
+
);
|
226 |
+
|
227 |
+
if ( empty( $keys ) ) {
|
228 |
+
$keys = array(
|
229 |
+
'error' => esc_html__( 'Consumer key is invalid.', 'optin-monster-api' ),
|
230 |
+
);
|
231 |
+
}
|
232 |
+
|
233 |
+
return $keys;
|
234 |
+
}
|
235 |
+
|
236 |
+
/**
|
237 |
+
* Check if the consumer secret provided for the given user is valid
|
238 |
+
*
|
239 |
+
* This is a copy of the same method used by WooCommerce.
|
240 |
+
*
|
241 |
+
* @since 1.7.0
|
242 |
+
*
|
243 |
+
* @param string $keys_consumer_secret The consumer secret from the database.
|
244 |
+
* @param string $consumer_secret The consumer secret passed by the user.
|
245 |
+
*
|
246 |
+
* @return bool
|
247 |
+
*/
|
248 |
+
private function is_consumer_secret_valid( $keys_consumer_secret, $consumer_secret ) {
|
249 |
+
return hash_equals( $keys_consumer_secret, $consumer_secret );
|
250 |
+
}
|
251 |
+
|
252 |
+
/**
|
253 |
+
* Get WooCommerce API description and truncated key info by the key id.
|
254 |
+
*
|
255 |
+
* @since 1.7.0
|
256 |
+
*
|
257 |
+
* @param string $key_id The WooCommerce API key id.
|
258 |
+
*
|
259 |
+
* @return array
|
260 |
+
*/
|
261 |
+
public static function get_key_details_by_id( $key_id ) {
|
262 |
+
if ( empty( $key_id ) ) {
|
263 |
+
return array();
|
264 |
+
}
|
265 |
+
|
266 |
+
global $wpdb;
|
267 |
+
|
268 |
+
$data = $wpdb->get_row(
|
269 |
+
$wpdb->prepare(
|
270 |
+
"
|
271 |
+
SELECT key_id, description, truncated_key
|
272 |
+
FROM {$wpdb->prefix}woocommerce_api_keys
|
273 |
+
WHERE key_id = %d
|
274 |
+
",
|
275 |
+
absint( $key_id )
|
276 |
+
),
|
277 |
+
ARRAY_A
|
278 |
+
);
|
279 |
+
|
280 |
+
return $data;
|
281 |
+
}
|
282 |
+
|
283 |
+
/**
|
284 |
+
* Determines if the current site is has WooCommerce connected.
|
285 |
+
*
|
286 |
+
* Checks that the site stored in the OptinMonster option matches the
|
287 |
+
* current `siteurl` WP option, and that the saved key id still exists in
|
288 |
+
* the WooCommerce key table. If these two things aren't true, then the
|
289 |
+
* current site is not connected.
|
290 |
+
*
|
291 |
+
* @since 1.7.0
|
292 |
+
*
|
293 |
+
* @return boolean
|
294 |
+
*/
|
295 |
+
public static function is_connected() {
|
296 |
+
// Get current site details.
|
297 |
+
// NOTE: Error suppression is used as prior to PHP 5.3.3, an
|
298 |
+
// E_WARNING would be generated when URL parsing failed.
|
299 |
+
$site = function_exists( 'wp_parse_url' )
|
300 |
+
? wp_parse_url( site_url() )
|
301 |
+
: parse_url( site_url() );
|
302 |
+
$host = isset( $site['host'] ) ? $site['host'] : '';
|
303 |
+
|
304 |
+
// Get any options we have stored.
|
305 |
+
$option = OMAPI::get_instance()->get_option( 'woocommerce' );
|
306 |
+
$shop = isset( $option['shop'] ) ? $option['shop'] : '';
|
307 |
+
$key_id = isset( $option['key_id'] ) ? $option['key_id'] : '';
|
308 |
+
$key = $key_id ? self::get_key_details_by_id( $key_id ) : array();
|
309 |
+
|
310 |
+
return ! empty( $key['key_id'] ) && $host === $shop;
|
311 |
+
}
|
312 |
+
|
313 |
+
/**
|
314 |
+
* Add the category base to the category REST API response.
|
315 |
+
*
|
316 |
+
* @since 1.7.0
|
317 |
+
*
|
318 |
+
* @param WP_REST_Response $response The REST API response.
|
319 |
+
*
|
320 |
+
* @return WP_REST_Response
|
321 |
+
*/
|
322 |
+
public static function add_category_base_to_api_response( $response ) {
|
323 |
+
return self::add_base_to_api_response( $response, 'category_rewrite_slug' );
|
324 |
+
}
|
325 |
+
|
326 |
+
/**
|
327 |
+
* Add the tag base to the tag REST API response.
|
328 |
+
*
|
329 |
+
* @since 1.7.0
|
330 |
+
*
|
331 |
+
* @param WP_REST_Response $response The REST API response.
|
332 |
+
*
|
333 |
+
* @return WP_REST_Response
|
334 |
+
*/
|
335 |
+
public static function add_tag_base_to_api_response( $response ) {
|
336 |
+
return self::add_base_to_api_response( $response, 'tag_rewrite_slug' );
|
337 |
+
}
|
338 |
+
|
339 |
+
/**
|
340 |
+
* Add the category/tag base to the category/tag REST API response.
|
341 |
+
*
|
342 |
+
* @since 1.7.0
|
343 |
+
*
|
344 |
+
* @param WP_REST_Response $response The REST API response.
|
345 |
+
* @param string $base The base setting to retrieve.
|
346 |
+
*
|
347 |
+
* @return WP_REST_Response
|
348 |
+
*/
|
349 |
+
public static function add_base_to_api_response( $response, $base ) {
|
350 |
+
$permalink_options = wc_get_permalink_structure();
|
351 |
+
if ( isset( $permalink_options[ $base ] ) ) {
|
352 |
+
$response->data['base'] = $permalink_options[ $base ];
|
353 |
+
}
|
354 |
+
|
355 |
+
return $response;
|
356 |
+
}
|
357 |
+
|
358 |
+
/**
|
359 |
+
* Return the WooCommerce versions string.
|
360 |
+
*
|
361 |
+
* @since 1.9.0
|
362 |
+
*
|
363 |
+
* @return string
|
364 |
+
*/
|
365 |
+
public static function version() {
|
366 |
+
return defined( 'WC_VERSION' ) ? WC_VERSION : '0.0.0';
|
367 |
+
}
|
368 |
+
|
369 |
+
/**
|
370 |
+
* Determines if the passed version string passes the operator compare
|
371 |
+
* against the currently installed version of WooCommerce.
|
372 |
+
*
|
373 |
+
* Defaults to checking if the current WooCommerce version is greater than
|
374 |
+
* the passed version.
|
375 |
+
*
|
376 |
+
* @since 1.9.0
|
377 |
+
*
|
378 |
+
* @param string $version The version to check.
|
379 |
+
* @param string $operator The operator to use for comparison.
|
380 |
+
*
|
381 |
+
* @return string
|
382 |
+
*/
|
383 |
+
public static function version_compare( $version = '', $operator = '>=' ) {
|
384 |
+
return version_compare( self::version(), $version, $operator );
|
385 |
+
}
|
386 |
+
|
387 |
+
/**
|
388 |
+
* Determines if the current WooCommerce version meets the minimum version
|
389 |
+
* requirement.
|
390 |
+
*
|
391 |
+
* @since 1.9.0
|
392 |
+
*
|
393 |
+
* @return boolean
|
394 |
+
*/
|
395 |
+
public static function is_minimum_version() {
|
396 |
+
return self::version_compare( self::MINIMUM_VERSION );
|
397 |
+
}
|
398 |
+
}
|
assets/css/images/BigCommerce-logo.png
ADDED
Binary file
|
assets/css/images/constant_OM.png
ADDED
Binary file
|
assets/css/images/features-event.svg
ADDED
@@ -0,0 +1,135 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="utf-8"?>
|
2 |
+
<svg viewBox="0 0 562 412" xmlns="http://www.w3.org/2000/svg" xmlns:serif="http://www.serif.com/" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.41421">
|
3 |
+
<g opacity=".5" transform="matrix(.7821 0 0 .7821 -149.3014 -85.4476)">
|
4 |
+
<path d="M909.09 158.88v420.67c-.01 10.694-8.82 19.485-19.51 19.48H210.4c-10.697 0-19.5-8.803-19.5-19.5V158.88c0-10.703 8.807-19.51 19.51-19.51h679.17c10.7 0 19.51 8.807 19.51 19.51z" fill="#fff" fill-rule="nonzero"/>
|
5 |
+
<path fill="#1d58bf" fill-opacity=".3" d="M224.9963 186.33337h649.99992v80.00016H224.9963z"/>
|
6 |
+
<path fill="#1d58bf" fill-opacity=".2" d="M225.03963 289.74781h199.99914v120.00024H225.03963zM674.99493 289.74781h199.99914v120.00024H674.99493zM449.99493 289.74781h199.99914v120.00024H449.99493zM225.03963 434.74781h199.99914v120.00024H225.03963zM674.99493 434.74781h199.99914v120.00024H674.99493zM449.99493 434.74781h199.99914v120.00024H449.99493z"/>
|
7 |
+
<path d="M909.09 158.89H190.9v-.01c0-10.697 8.803-19.5 19.5-19.5H889.59c10.7 0 19.5 8.803 19.5 19.5v.01z" fill="#c8cad7" fill-rule="nonzero"/>
|
8 |
+
<circle cx="210.41" cy="149.13" r="4.88" fill="#ededf4"/>
|
9 |
+
<circle cx="225.04" cy="149.13" r="4.88" fill="#ededf4"/>
|
10 |
+
<circle cx="239.67" cy="149.13" r="4.88" fill="#ededf4"/>
|
11 |
+
</g>
|
12 |
+
<path d="M590.46 285.225c0-29.872-24.253-54.125-54.125-54.125h-327.2c-29.872 0-54.125 24.253-54.125 54.125s24.253 54.125 54.125 54.125h327.2c29.872 0 54.125-24.253 54.125-54.125z" fill="url(#_Linear1)" transform="matrix(.74209 0 0 .74209 82.16726 159.83489)"/>
|
13 |
+
<path d="M519.43452 371.50403c0-21.17248-17.1897-38.36218-38.36218-38.36218H237.36359c-21.17248 0-38.36218 17.1897-38.36218 38.36218 0 21.17248 17.1897 38.36218 38.36218 38.36218h243.70875c21.17248 0 38.36218-17.1897 38.36218-38.36218z" fill="#fff"/>
|
14 |
+
<path d="M480.95184 352.25763c0-2.27186-1.84484-4.11652-4.11671-4.11652H285.58108c-2.27243 0-4.11671 1.84466-4.11671 4.11652v8.23348c0 2.27229 1.84428 4.11695 4.1167 4.11695h191.25406c2.27187 0 4.1167-1.84466 4.1167-4.11695v-8.23348z" fill="#3f3d56"/>
|
15 |
+
<path d="M480.95184 371.02555c0-1.51458-1.23008-2.74435-2.74448-2.74435H284.20884c-1.51495 0-2.74447 1.22977-2.74447 2.74435v5.48898c0 1.51486 1.22952 2.74463 2.74447 2.74463h193.99852c1.5144 0 2.74448-1.22977 2.74448-2.74463v-5.48898z" fill="#00aded"/>
|
16 |
+
<path d="M342.00676 386.05141c0-1.51458-1.2299-2.74435-2.74448-2.74435h-55.05373c-1.51476 0-2.74449 1.22977-2.74449 2.74435v5.48898c0 1.51487 1.22973 2.74464 2.74449 2.74464h55.05373c1.51459 0 2.74448-1.22977 2.74448-2.74464v-5.48898z" fill="#9795b1"/>
|
17 |
+
<g fill-rule="nonzero">
|
18 |
+
<path d="M358.2531 392.02014c.59163 0 .87848-.11696 1.16533-.26893l-.30478-.94122c-.1972.09875-.41235.15267-.55577.15267-.26892 0-.38545-.17998-.38545-.55605v-1.86494h1.19221v-.96784h-1.19221v-1.5596l-1.16533.12536v1.43424h-.51991v.96784h.51991v2.02601c0 .98605.49302 1.45246 1.246 1.45246zM362.29567 387.5024c-.51963 0-.9948.25072-1.32647.71713h-.00896v-.6457h-1.17429v4.37487h1.17429v-2.03511c0-.6457.39442-1.13871 1.12043-1.13871.06303 0 .18839 0 .30464.0091v-1.27317c-.0175-.0084-.05322-.0084-.08964-.0084zM365.55004 387.57383v2.12476c0 .84248-.45731 1.27247-.96854 1.27247-.54695 0-.78855-.26892-.78855-1.07568v-2.32155h-1.16533v2.6353c0 1.3362.6632 1.811 1.60442 1.811.49302 0 .96854-.20659 1.29979-.60997h.0182v.53854h1.17443v-4.37487h-1.17442zM368.83942 392.02014c1.14781 0 1.70316-.58267 1.70316-1.36282 0-.85998-.55535-1.06658-1.50568-1.41603-.43069-.16108-.6632-.28713-.6632-.46641 0-.2332.24162-.33125.43-.33125.32285 0 .70802.14356 1.04907.4657l.56446-.86068c-.49303-.38517-.98605-.54625-1.59532-.54625-.8964 0-1.57781.51964-1.57781 1.3089 0 .84247.62748 1.18282 1.3446 1.42513.57356.17928.79766.27803.79766.48392 0 .215-.19679.35856-.53784.35856-.47481 0-.85158-.17017-1.21014-.51123l-.57356.81587c.48392.41249 1.07568.63659 1.7746.63659zM372.3536 392.02014c.59176 0 .8782-.11696 1.16532-.26893l-.30464-.94122c-.19748.09875-.41248.15267-.55605.15267-.26892 0-.38517-.17998-.38517-.55605v-1.86494h1.19194v-.96784h-1.19194v-1.5596l-1.16532.12536v1.43424h-.52034v.96784h.52034v2.02601c0 .98605.49302 1.45246 1.24586 1.45246z" fill="#1d58bf"/>
|
19 |
+
<path d="M376.40562 387.5024c-.53784 0-.99515.1968-1.3271.57356h-.0175v-.50213h-1.17443v6.14947h1.17443v-2.26762h.0175c.30464.35786.73533.56446 1.29068.56446 1.21925 0 2.09745-.8964 2.09745-2.25012 0-1.3264-.8873-2.26762-2.06103-2.26762zm-.25141 3.46866c-.63659 0-1.13871-.47481-1.13871-1.19193 0-.69892.4664-1.22836 1.1387-1.22836.62749 0 1.12051.47552 1.12051 1.22836 0 .70802-.4573 1.19193-1.1205 1.19193zM381.81976 387.57383v2.12476c0 .84248-.4573 1.27247-.96854 1.27247-.54694 0-.78855-.26892-.78855-1.07568v-2.32155h-1.16533v2.6353c0 1.3362.6632 1.811 1.60442 1.811.49303 0 .96854-.20659 1.29979-.60997h.0182v.53854h1.17444v-4.37487h-1.17443zM383.74702 385.35103h1.1743v6.59753h-1.1743zM387.12605 392.02014c1.14781 0 1.70316-.58267 1.70316-1.36282 0-.85998-.55535-1.06658-1.50568-1.41603-.42999-.16108-.6632-.28713-.6632-.46641 0-.2332.24161-.33125.43-.33125.32284 0 .70802.14356 1.04907.4657l.56446-.86068c-.49303-.38517-.98605-.54625-1.59532-.54625-.8964 0-1.57781.51964-1.57781 1.3089 0 .84247.62748 1.18282 1.3446 1.42513.57356.17928.79766.27803.79766.48392 0 .215-.19679.35856-.53784.35856-.47481 0-.85158-.17017-1.21015-.51123l-.57355.81587c.48391.41249 1.07568.63659 1.7746.63659zM393.32033 389.7161c0-1.28158-.86068-2.2137-2.14226-2.2137-1.24586 0-2.16958.92302-2.16958 2.24942 0 1.37191.96854 2.26832 2.25011 2.26832.8782 0 1.51479-.34946 1.89156-.82498l-.76195-.70801c-.2423.29553-.58266.50212-1.04907.49302-.56445 0-.97694-.32285-1.1205-.84248h3.07508c.02661-.07213.02661-.27803.02661-.4216zm-2.10655-1.18283c.51123 0 .82498.30463.94123.76194h-1.92727c.13446-.50213.51123-.76194.98604-.76194z" fill="#00aded"/>
|
20 |
+
</g>
|
21 |
+
<path d="M352.3362 386.0945c-.38985-.10526-.77051-.24529-1.1363-.4248-.31034-.15228-.6097-.32576-.90302-.50839a4.28059 4.28059 0 0 1-.01708.01058c-.77208.4791-1.59296.8661-2.50488 1.03731-.32904.06177-.66185.10054-.99532.12898l-.01063.0009c-.08214 1.83573.04032 3.72786 1.01521 5.302.59423.95947 1.51362 1.67795 2.48731 2.27517l.0254.01547c.39845-.2435.7898-.50318 1.15398-.79322h.82667c-.58592.55146-1.2694 1.0136-1.96423 1.42616-.03256-.02228-.03286 0-.03286 0-.87643-.52039-1.7297-1.09562-2.39376-1.85939-.45109-.51878-.80827-1.11492-1.06569-1.76016-.64686-1.62151-.68784-3.42666-.57505-5.12153.71687-.04271 1.44492-.11159 2.13114-.33286.6768-.21823 1.30011-.58061 1.90217-.97149l.01762-.01147c.01171.00765.02342.01524.03519.02288.75935.4919 1.56971.92602 2.4621 1.11205a6.70181 6.70181 0 0 0 .15359.03011l-.61155.4217zm-.18136 6.3196h-1.13481c-.18968-.00806-.20246-.10413-.20646-.19786-.00472-.11147.06756-.20944.20646-.21536h.97722l.3089-1.12615s.05963-.13943.17947-.15096c.09582-.00926.1782.03119.21793.14708l.46674 1.57933.28591-.89854s.09248-.1638.23932-.13955c.08005.0205.08328.0242.1297.088l.33232.5008h.79573c.00096.00011.14768.01995.1917.12957.05096.12676-.02968.27677-.1917.28364h-.9066c-.09857-.00406-.12671-.0297-.17211-.09236l-.15532-.234-.35934 1.1295s-.06332.13453-.18149.14337c-.09444.00705-.1745-.03333-.21356-.1475l-.45205-1.52962-.15873.5787s-.0721.14635-.19923.15191zm2.22392-6.0194c.04014.97769.0101 1.95688-.15741 2.9234-.07635.44076-.24279 1.04897-.38855 1.47276l-.52451-.1705c.4453-1.17471.553-2.4526.53371-3.7033l.53676-.52237z" fill="#00aded" fill-rule="nonzero"/>
|
22 |
+
<path d="M350.08965 388.9102c.03129-.03568.0394-.0591.08606-.12695.26903-.39144 1.0659-1.44673 2.07848-2.25844.44062-.35324.91685-.67436 1.33812-.88486.70208-.35081.92816-.39358 1.25422-.46954.06193-.01442.2862-.05445.3234.03392.0359.0853-.10399.17519-.15647.21643-.05901.04637-1.40842 1.05545-2.54368 2.55402-.98784 1.30389-1.63428 3.0147-1.63428 3.0147-.01986.03799-.24452.43946-.54593.45902-.27857.0181-.63633-.34424-.63633-.34424-.06877-.06417-.40417-.4622-.68325-.95451-.35593-.6277-.66242-1.37176-.66242-1.37176s-.31816-.62588.28165-.9701c.59141-.33942.85484.00518.9832.20862.10969.17388.33069.59624.4375.80283.0372.07196.06126.11186.07973.09085z" fill="#1d58bf" fill-rule="nonzero"/>
|
23 |
+
<g transform="translate(128.5517 -88.00126) scale(1.24681)">
|
24 |
+
<circle cx="88.506" cy="368.331" r="25.699" fill="#00aded"/>
|
25 |
+
</g>
|
26 |
+
<g>
|
27 |
+
<path d="M251.8583 391.91583c-1.13193 2.18277-3.0103 3.8883-5.2925 4.80302-1.34914.49253-2.77016.76175-4.20647.7954-1.55257.11472-3.11126-.07801-4.58888-.56596-1.9671-.77399-3.65733-2.12312-4.8489-3.86995-1.17629-1.74683-2.12312-3.63898-2.81451-5.62902-.46501-.99272-.65927-2.08946-.56597-3.18162 1.2084-.14684 2.30974-.7694 3.05925-1.72847.44512-.9652.47266-2.07264.07648-3.05925-.09177-.30592-.18355-.59655-.29062-.87188-.22945-.67304-1.02485-1.94263-.47419-2.50859.55067-.56596 1.83555-.55066 2.34033-.7801 1.49597-.8933 3.0929-1.60764 4.75713-2.12618 1.5082-.20039 3.04242-.10249 4.51239.29062.20038.03366.39311.10555.56596.21415.19273.16061.33652.37323.413.61185.4283 1.04015.67303 2.18736 1.00955 3.2581a6.71716 6.71716 0 0 0 1.68259 2.98277c.69904.5935 1.48832 1.06768 2.34032 1.40725l2.0497.93307c.35946.14379.6868.3564.96366.62715.26157.37017.42065.80305.45889 1.2543.37935 2.4428-.02141 4.9422-1.14722 7.14334z" fill="#a0616a" fill-rule="nonzero"/>
|
28 |
+
<path d="M245.49506 377.61384c-3.33764 3.46613-8.63167 4.25388-12.83355 1.91203-.09178-.30592-.18356-.59655-.29063-.87189-.22944-.67303-1.02485-1.94262-.47418-2.50858.55066-.56596 1.83554-.55066 2.34032-.7801 1.49597-.8933 3.0929-1.60764 4.75713-2.12619 1.50821-.20038 3.04242-.10248 4.5124.29063.20037.03365.3931.10555.56595.21415.19274.16061.33652.37323.413.61185.4283 1.08603.67304 2.18736 1.00956 3.2581z" fill-opacity=".1" fill-rule="nonzero"/>
|
29 |
+
<circle cx="263.84" cy="289.36" r="6.94" fill="#a0616a" transform="matrix(1.52962 0 0 1.52962 -165.72867 -72.81407)"/>
|
30 |
+
<path d="M264.63677 390.3036c-11.84082 16.48476-36.14502 16.80904-49.00304 2.93382.1652-.8107.47418-1.59387.90554-2.30055.44818-.69904 1.2191-1.1304 2.0497-1.14722.44359 0 .94836.16826 1.26958-.15296.32122-.32123.21415-.58126.4436-.7954.22944-.21416.7801-.21416 1.2084-.18356.93307.03059 1.82025-.413 2.35562-1.17781.16367-.28451.36405-.54761.59655-.78011.4023-.1958.83824-.30899 1.28489-.33652 1.239-.27533 1.97321-1.52962 2.90628-2.30973.45736-.51549 1.17934-.71434 1.83555-.50478.1499.07801.27992.18662.3824.32122.25087.38547.42218.81682.50478 1.2696.55373 2.5407 1.96404 4.81372 3.99232 6.4397 1.57246 1.18853 3.4906 1.8325 5.46076 1.8325 3.51967 0 6.73188-2.05123 8.21408-5.24355.73881-1.84932 1.16405-3.80877 1.2543-5.79728v-.26004c1.25888-.31204 2.59424-.04894 3.6405.71893 1.01567.77705 2.10017 1.45926 3.2428 2.0344 1.36137.53537 3.05925.53537 3.99232 1.52962.3977.3977.67304.94837 1.17781 1.1931.31358.12238.64398.20039.97896.22945 1.73.46654 1.3063 2.48717 1.3063 2.48717z" fill="#f86d70" fill-rule="nonzero"/>
|
31 |
+
<path d="M230.52003 352.5739c-.7388.59807-1.36595 1.32312-1.85084 2.14147a10.5459 10.5459 0 0 1-3.7017 3.6405c-.63632.22333-1.21604.58279-1.69787 1.05544-.2371.35946-.38853.76634-.4436 1.1931a22.36596 22.36596 0 0 0-.47418 4.5124c-.0566.76328.06883 1.5281.36711 2.23325.30593.64244.88718 1.1931.99426 1.89674.02294.55678-.03977 1.11356-.18356 1.65199-.14684.57667.07954 1.18699.56596 1.52962.27686.0979.56443.1652.8566.19885 1.52962.33652 2.04969 2.14148 2.27913 3.62521.52007 0 .74952-.62714.87189-1.11662l1.52962-7.11275c.18356-.76482.45889-1.6673 1.239-1.92733a3.86232 3.86232 0 0 1 1.6214 0c2.11088.18355 3.88524-1.45314 5.95024-1.91203.66538-.12543 1.343-.16673 2.0191-.12237 1.6214 0 3.51814.74952 3.86995 2.26384 0 .24474.09178.55067.32122.67304.23403.06883.4849.06883.71893 0 1.02484-.10708 1.6367 1.05544 1.94262 2.0038l1.07073 3.47225c.16826.52007.4436 1.14722 1.00956 1.2084.53384-.00305.9866-.40382 1.05544-.93307.02294-.51854-.04895-1.03708-.21415-1.52962-.50478-2.26384.27533-4.58887.74952-6.86801.47418-2.27914.55066-4.8948-1.04015-6.65387-.58126-.62714-1.34607-1.10133-1.88144-1.77436-.53536-.67304-.7801-1.39196-1.30018-2.0191-2.07723-1.82179-4.66994-2.95524-7.41867-3.2428-3.0669-.27075-6.14603.39616-8.82594 1.91202z" fill="#3f3d56" fill-rule="nonzero"/>
|
32 |
+
<g opacity=".1">
|
33 |
+
<path d="M223.71365 367.62592c-.10707-.70363-.68833-1.2543-.99426-1.89673a3.90032 3.90032 0 0 1-.35181-1.37666v.7648c-.0566.76329.06883 1.5281.36711 2.23326.24474.52007.67303.97896.88718 1.52962.1086-.4084.1392-.83364.09178-1.25429zM251.04803 362.71583c-.60726 1.98086-.90247 4.04585-.87188 6.1185.19885-1.50516.48948-2.99654.87188-4.4665.25392-1.12275.34264-2.27762.26004-3.42637-.04895.59656-.1346 1.18852-.26004 1.77437z" fill-rule="nonzero"/>
|
34 |
+
</g>
|
35 |
+
</g>
|
36 |
+
<g>
|
37 |
+
<path d="M590.46 285.225c0-29.872-24.253-54.125-54.125-54.125h-327.2c-29.872 0-54.125 24.253-54.125 54.125s24.253 54.125 54.125 54.125h327.2c29.872 0 54.125-24.253 54.125-54.125z" fill="url(#_Linear2)" transform="matrix(.74209 0 0 .74209 -79.40377 49.16549)"/>
|
38 |
+
<path d="M357.86349 260.83463c0-21.17248-17.1897-38.36218-38.36218-38.36218H75.79256c-21.17248 0-38.36218 17.1897-38.36218 38.36218 0 21.17248 17.1897 38.36218 38.36218 38.36218h243.70875c21.17248 0 38.36218-17.1897 38.36218-38.36218z" fill="#fff"/>
|
39 |
+
<path d="M319.3808 241.58823c0-2.27186-1.84483-4.11652-4.1167-4.11652H124.01005c-2.27243 0-4.11671 1.84466-4.11671 4.11652v8.23348c0 2.27229 1.84428 4.11695 4.1167 4.11695H315.2641c2.27187 0 4.1167-1.84466 4.1167-4.11695v-8.23348z" fill="#3f3d56"/>
|
40 |
+
<path d="M319.3808 260.35615c0-1.51458-1.23007-2.74435-2.74447-2.74435H122.63781c-1.51495 0-2.74447 1.22977-2.74447 2.74435v5.48898c0 1.51486 1.22952 2.74463 2.74447 2.74463h193.99852c1.5144 0 2.74448-1.22977 2.74448-2.74463v-5.48898z" fill="#1d58bf"/>
|
41 |
+
<path d="M180.43573 275.38201c0-1.51458-1.2299-2.74435-2.74448-2.74435h-55.05373c-1.51476 0-2.74449 1.22977-2.74449 2.74435v5.48898c0 1.51487 1.22973 2.74464 2.74449 2.74464h55.05373c1.51459 0 2.74448-1.22977 2.74448-2.74464v-5.48898z" fill="#9795b1"/>
|
42 |
+
<g serif:id="text" fill-rule="nonzero">
|
43 |
+
<path d="M196.68207 281.35074c.59163 0 .87848-.11696 1.16533-.26893l-.30478-.94122c-.1972.09875-.41235.15267-.55577.15267-.26892 0-.38545-.17998-.38545-.55605v-1.86494h1.19221v-.96784h-1.19221v-1.5596l-1.16533.12536v1.43424h-.51991v.96784h.51991v2.02601c0 .98605.49302 1.45246 1.246 1.45246zM200.72464 276.833c-.51963 0-.9948.25072-1.32647.71713h-.00896v-.6457h-1.17429v4.37487h1.17429v-2.03511c0-.6457.39442-1.13871 1.12043-1.13871.06303 0 .18839 0 .30464.0091v-1.27317c-.0175-.0084-.05322-.0084-.08964-.0084zM203.979 276.90443v2.12476c0 .84248-.4573 1.27247-.96853 1.27247-.54695 0-.78855-.26892-.78855-1.07568v-2.32155h-1.16533v2.6353c0 1.3362.6632 1.811 1.60442 1.811.49302 0 .96854-.20659 1.29979-.60997h.0182v.53854h1.17443v-4.37487h-1.17442zM207.26839 281.35074c1.14781 0 1.70316-.58267 1.70316-1.36282 0-.85998-.55535-1.06658-1.50568-1.41603-.43069-.16108-.6632-.28713-.6632-.46641 0-.2332.24162-.33125.43-.33125.32285 0 .70802.14356 1.04907.4657l.56446-.86068c-.49303-.38517-.98605-.54625-1.59532-.54625-.8964 0-1.57781.51964-1.57781 1.3089 0 .84247.62748 1.18282 1.3446 1.42513.57356.17928.79766.27803.79766.48392 0 .215-.19679.35856-.53784.35856-.47481 0-.85158-.17017-1.21014-.51123l-.57356.81587c.48392.41249 1.07568.63659 1.7746.63659zM210.78257 281.35074c.59176 0 .8782-.11696 1.16532-.26893l-.30464-.94122c-.19748.09875-.41248.15267-.55605.15267-.26892 0-.38517-.17998-.38517-.55605v-1.86494h1.19194v-.96784h-1.19194v-1.5596l-1.16532.12536v1.43424h-.52034v.96784h.52034v2.02601c0 .98605.49302 1.45246 1.24586 1.45246z" fill="#1d58bf"/>
|
44 |
+
<path d="M214.8346 276.833c-.53785 0-.99516.1968-1.3271.57356h-.01751v-.50213h-1.17443v6.14947h1.17443v-2.26762h.0175c.30464.35786.73533.56446 1.29068.56446 1.21925 0 2.09745-.8964 2.09745-2.25012 0-1.3264-.8873-2.26762-2.06103-2.26762zm-.25142 3.46866c-.63659 0-1.13871-.47481-1.13871-1.19193 0-.69892.4664-1.22836 1.1387-1.22836.62749 0 1.12051.47552 1.12051 1.22836 0 .70802-.4573 1.19193-1.1205 1.19193zM220.24873 276.90443v2.12476c0 .84248-.4573 1.27247-.96854 1.27247-.54694 0-.78855-.26892-.78855-1.07568v-2.32155h-1.16533v2.6353c0 1.3362.6632 1.811 1.60442 1.811.49303 0 .96854-.20659 1.29979-.60997h.0182v.53854h1.17444v-4.37487h-1.17443zM222.176 274.68163h1.17428v6.59753H222.176zM225.55502 281.35074c1.14781 0 1.70316-.58267 1.70316-1.36282 0-.85998-.55535-1.06658-1.50568-1.41603-.42999-.16108-.6632-.28713-.6632-.46641 0-.2332.24161-.33125.43-.33125.32284 0 .70802.14356 1.04907.4657l.56446-.86068c-.49303-.38517-.98605-.54625-1.59532-.54625-.8964 0-1.57781.51964-1.57781 1.3089 0 .84247.62748 1.18282 1.3446 1.42513.57356.17928.79766.27803.79766.48392 0 .215-.19679.35856-.53784.35856-.47481 0-.85158-.17017-1.21015-.51123l-.57355.81587c.48391.41249 1.07568.63659 1.7746.63659zM231.7493 279.0467c0-1.28158-.86068-2.2137-2.14226-2.2137-1.24586 0-2.16958.92302-2.16958 2.24942 0 1.37191.96854 2.26832 2.25011 2.26832.8782 0 1.51479-.34946 1.89156-.82498l-.76195-.70801c-.2423.29553-.58266.50212-1.04907.49302-.56445 0-.97694-.32285-1.1205-.84248h3.07508c.02661-.07213.02661-.27803.02661-.4216zm-2.10655-1.18283c.51123 0 .82498.30463.94123.76194h-1.92727c.13446-.50213.51123-.76194.98604-.76194z" fill="#00aded"/>
|
45 |
+
</g>
|
46 |
+
<g serif:id="mark">
|
47 |
+
<path d="M190.76518 275.4251c-.38986-.10526-.77052-.24529-1.1363-.4248-.31035-.15228-.6097-.32576-.90303-.50839a4.28059 4.28059 0 0 1-.01708.01058c-.77208.4791-1.59296.8661-2.50488 1.03731-.32904.06177-.66185.10054-.99532.12898l-.01063.0009c-.08214 1.83573.04032 3.72786 1.01521 5.302.59423.95947 1.51362 1.67795 2.48731 2.27517l.0254.01547c.39845-.2435.7898-.50318 1.15398-.79322h.82667c-.58592.55146-1.2694 1.0136-1.96423 1.42616-.03256-.02228-.03286 0-.03286 0-.87643-.52039-1.7297-1.09562-2.39376-1.85939-.45109-.51878-.80827-1.11492-1.06569-1.76016-.64686-1.62151-.68784-3.42666-.57505-5.12153.71687-.04271 1.44492-.11159 2.13114-.33286.6768-.21823 1.30011-.58061 1.90217-.97149l.01762-.01147c.01171.00765.02342.01524.03519.02288.75935.4919 1.56971.92602 2.4621 1.11205a6.70181 6.70181 0 0 0 .15359.03011l-.61155.4217zm-.18137 6.3196H189.449c-.18968-.00806-.20246-.10413-.20646-.19786-.00472-.11147.06756-.20944.20646-.21536h.97722l.3089-1.12615s.05963-.13943.17947-.15096c.09582-.00926.1782.03119.21793.14708l.46674 1.57933.28591-.89854s.09248-.1638.23932-.13955c.08005.0205.08328.0242.1297.088l.33232.5008h.79573c.00096.00011.14768.01995.1917.12957.05096.12676-.02968.27677-.1917.28364h-.9066c-.09857-.00406-.12671-.0297-.17211-.09236l-.15532-.234-.35934 1.1295s-.06332.13453-.18149.14337c-.09444.00705-.1745-.03333-.21356-.1475l-.45205-1.52962-.15873.5787s-.0721.14635-.19923.15191zm2.22392-6.0194c.04014.97769.0101 1.95688-.15741 2.9234-.07635.44076-.24279 1.04897-.38855 1.47276l-.52451-.1705c.4453-1.17471.553-2.4526.53371-3.7033l.53676-.52237z" fill="#00aded" fill-rule="nonzero"/>
|
48 |
+
<path d="M188.51862 278.2408c.03129-.03568.0394-.0591.08606-.12695.26903-.39144 1.0659-1.44673 2.07848-2.25844.44062-.35324.91685-.67436 1.33812-.88486.70208-.35081.92816-.39358 1.25422-.46954.06193-.01442.2862-.05445.3234.03392.0359.0853-.10399.17519-.15647.21643-.05901.04637-1.40842 1.05545-2.54368 2.55402-.98784 1.30389-1.63428 3.0147-1.63428 3.0147-.01986.03799-.24452.43946-.54593.45902-.27857.0181-.63633-.34424-.63633-.34424-.06877-.06417-.40417-.4622-.68325-.95451-.35593-.6277-.66242-1.37176-.66242-1.37176s-.31816-.62588.28165-.9701c.59141-.33942.85484.00518.9832.20862.10969.17388.33069.59624.4375.80283.0372.07196.06126.11186.07973.09085z" fill="#1d58bf" fill-rule="nonzero"/>
|
49 |
+
</g>
|
50 |
+
<circle cx="88.506" cy="368.331" r="25.699" fill="#1d58bf" transform="translate(-33.01933 -198.67066) scale(1.24681)"/>
|
51 |
+
<g>
|
52 |
+
<path d="M90.30982 281.9644c-1.13192 2.18278-3.0103 3.88831-5.2925 4.80303-1.34913.49254-2.77015.76175-4.20647.7954-1.55256.11472-3.11125-.078-4.58887-.56596-1.9671-.77399-3.65733-2.12312-4.8489-3.86995-1.17629-1.74683-2.12313-3.63897-2.81452-5.62902-.465-.99272-.65926-2.08946-.56596-3.18161 1.2084-.14685 2.30974-.7694 3.05925-1.72848.44512-.9652.47266-2.07264.07648-3.05925-.09177-.30592-.18355-.59655-.29063-.87188-.22944-.67304-1.02484-1.94263-.47418-2.50859.55067-.56596 1.83555-.55066 2.34033-.7801 1.49597-.8933 3.0929-1.60764 4.75713-2.12618 1.5082-.20038 3.04242-.10249 4.51239.29063.20038.03365.39311.10554.56596.21414.19273.16061.33652.37323.413.61185.4283 1.04015.67303 2.18736 1.00955 3.2581a6.71716 6.71716 0 0 0 1.68259 2.98277c.69904.5935 1.48832 1.06768 2.34032 1.40725l2.0497.93307c.35946.14379.6868.3564.96366.62715.26157.37017.42065.80305.45889 1.2543.37935 2.4428-.02142 4.9422-1.14722 7.14334z" fill="#cc959f" fill-rule="nonzero"/>
|
53 |
+
<path d="M83.94658 267.66242c-3.33764 3.46613-8.63167 4.25389-12.83354 1.91203-.09178-.30592-.18356-.59655-.29063-.87188-.22945-.67304-1.02485-1.94263-.47419-2.50859.55067-.56596 1.83555-.55066 2.34033-.7801 1.49597-.8933 3.0929-1.60764 4.75713-2.12618 1.50821-.20039 3.04242-.10249 4.5124.29062.20037.03366.3931.10555.56595.21415.19274.16061.33652.37323.413.61185.4283 1.08603.67304 2.18736 1.00955 3.2581z" fill-opacity=".1" fill-rule="nonzero"/>
|
54 |
+
<circle cx="263.84" cy="289.36" r="6.94" fill="#d7a5ad" transform="matrix(1.52962 0 0 1.52962 -327.27714 -182.76549)"/>
|
55 |
+
<path d="M103.0883 280.35218c-11.84082 16.48476-36.14502 16.80904-49.00304 2.93382.1652-.8107.47418-1.59387.90554-2.30055.44818-.69904 1.2191-1.1304 2.0497-1.14722.44359 0 .94836.16826 1.26958-.15296.32122-.32122.21415-.58126.4436-.7954.22944-.21416.7801-.21416 1.2084-.18356.93307.03059 1.82025-.413 2.35562-1.17781.16367-.28451.36405-.5476.59655-.78011.4023-.1958.83824-.30899 1.28489-.33652 1.239-.27533 1.97321-1.52962 2.90628-2.30973.45736-.51548 1.17934-.71434 1.83555-.50478.1499.07801.27992.18662.3824.32122.25087.38547.42218.81682.50478 1.2696.55373 2.5407 7.78426 7.73836 9.81254 9.36435 1.57246 1.18852 9.01867-10.14447 9.10891-12.13298v-.26003c1.25888-.31205 2.59425-.04895 3.64051.71892 1.01567.77705 2.10017 1.45926 3.2428 2.0344 1.36137.53537 3.05925.53537 3.99232 1.52962.3977.3977.67304.94837 1.17781 1.19311.31358.12237.64397.20038.97896.22944 1.73.46654 1.3063 2.48717 1.3063 2.48717z" fill="#fff" fill-rule="nonzero"/>
|
56 |
+
<path d="M68.97156 242.62247c-.7388.59809-1.19157 1.4562-1.85084 2.14148-1.14416 1.19004-3.4753 6.8726-3.57167 8.3808-.29981 4.70207 1.2344 10.37545 2.74567 9.9961l1.78966-5.06917c.18356-.76482.45889-1.6673 1.239-1.92733a3.86232 3.86232 0 0 1 1.6214 0c2.11088.18356 4.01985.05966 6.10779-1.16251.66538-.12543 3.7537-3.6344 4.42826-3.59156 1.6214 0 .95143 3.46919 1.30324 4.98351 0 .24474.09178.55067.32122.67304.23403.06883.4849.06883.71892 0 1.02485-.10708 1.6367 1.05544 1.94263 2.0038l1.07073 3.47225c.16826.52008 1.6933-.76022 1.85085-1.25429.72351-2.26231 1.17016-4.58734.74952-6.86801-.42218-2.28985.55066-4.8948-1.04015-6.65387-.58126-.62714-1.34607-1.10133-1.88144-1.77436-.53537-.67304-.7801-1.39196-1.30018-2.0191-2.07723-1.82179-4.66994-2.95524-7.41868-3.2428-3.0669-.27075-6.14603.39616-8.82593 1.91202z" fill="#e4d2aa" fill-rule="nonzero"/>
|
57 |
+
</g>
|
58 |
+
</g>
|
59 |
+
<g>
|
60 |
+
<path d="M590.46 285.225c0-29.872-24.253-54.125-54.125-54.125h-327.2c-29.872 0-54.125 24.253-54.125 54.125s24.253 54.125 54.125 54.125h327.2c29.872 0 54.125-24.253 54.125-54.125z" fill="url(#_Linear3)" transform="matrix(.74209 0 0 .74209 82.16726 -61.16541)"/>
|
61 |
+
<path d="M519.43452 150.50373c0-21.17248-17.1897-38.36218-38.36218-38.36218H237.36359c-21.17248 0-38.36218 17.1897-38.36218 38.36218 0 21.17248 17.1897 38.36218 38.36218 38.36218h243.70875c21.17248 0 38.36218-17.1897 38.36218-38.36218z" fill="#fff"/>
|
62 |
+
<path d="M480.95184 131.25733c0-2.27186-1.84484-4.11652-4.11671-4.11652H285.58108c-2.27243 0-4.11671 1.84466-4.11671 4.11652v8.23348c0 2.27229 1.84428 4.11695 4.1167 4.11695h191.25406c2.27187 0 4.1167-1.84466 4.1167-4.11695v-8.23348z" fill="#3f3d56"/>
|
63 |
+
<path d="M480.95184 150.02525c0-1.51458-1.23008-2.74435-2.74448-2.74435H284.20884c-1.51495 0-2.74447 1.22977-2.74447 2.74435v5.48898c0 1.51486 1.22952 2.74463 2.74447 2.74463h193.99852c1.5144 0 2.74448-1.22977 2.74448-2.74463v-5.48898z" fill="#16bd83"/>
|
64 |
+
<path d="M342.00676 165.05111c0-1.51458-1.2299-2.74435-2.74448-2.74435h-55.05373c-1.51476 0-2.74449 1.22977-2.74449 2.74435v5.48898c0 1.51487 1.22973 2.74464 2.74449 2.74464h55.05373c1.51459 0 2.74448-1.22977 2.74448-2.74464v-5.48898z" fill="#9795b1"/>
|
65 |
+
<g serif:id="text" fill-rule="nonzero">
|
66 |
+
<path d="M358.2531 171.01984c.59163 0 .87848-.11696 1.16533-.26893l-.30478-.94122c-.1972.09875-.41235.15267-.55577.15267-.26892 0-.38545-.17998-.38545-.55605v-1.86494h1.19221v-.96784h-1.19221v-1.5596l-1.16533.12536v1.43424h-.51991v.96784h.51991v2.02601c0 .98605.49302 1.45246 1.246 1.45246zM362.29567 166.5021c-.51963 0-.9948.25072-1.32647.71713h-.00896v-.6457h-1.17429v4.37487h1.17429v-2.03511c0-.6457.39442-1.13871 1.12043-1.13871.06303 0 .18839 0 .30464.0091v-1.27317c-.0175-.0084-.05322-.0084-.08964-.0084zM365.55004 166.57353v2.12476c0 .84248-.45731 1.27247-.96854 1.27247-.54695 0-.78855-.26892-.78855-1.07568v-2.32155h-1.16533v2.6353c0 1.3362.6632 1.811 1.60442 1.811.49302 0 .96854-.20659 1.29979-.60997h.0182v.53854h1.17443v-4.37487h-1.17442zM368.83942 171.01984c1.14781 0 1.70316-.58267 1.70316-1.36282 0-.85998-.55535-1.06658-1.50568-1.41603-.43069-.16108-.6632-.28713-.6632-.46641 0-.2332.24162-.33125.43-.33125.32285 0 .70802.14356 1.04907.4657l.56446-.86068c-.49303-.38517-.98605-.54625-1.59532-.54625-.8964 0-1.57781.51964-1.57781 1.3089 0 .84247.62748 1.18282 1.3446 1.42513.57356.17928.79766.27803.79766.48392 0 .215-.19679.35856-.53784.35856-.47481 0-.85158-.17017-1.21014-.51123l-.57356.81587c.48392.41249 1.07568.63659 1.7746.63659zM372.3536 171.01984c.59176 0 .8782-.11696 1.16532-.26893l-.30464-.94122c-.19748.09875-.41248.15267-.55605.15267-.26892 0-.38517-.17998-.38517-.55605v-1.86494h1.19194v-.96784h-1.19194v-1.5596l-1.16532.12536v1.43424h-.52034v.96784h.52034v2.02601c0 .98605.49302 1.45246 1.24586 1.45246z" fill="#1d58bf"/>
|
67 |
+
<path d="M376.40562 166.5021c-.53784 0-.99515.1968-1.3271.57356h-.0175v-.50213h-1.17443v6.14947h1.17443v-2.26762h.0175c.30464.35786.73533.56446 1.29068.56446 1.21925 0 2.09745-.8964 2.09745-2.25012 0-1.3264-.8873-2.26762-2.06103-2.26762zm-.25141 3.46866c-.63659 0-1.13871-.47481-1.13871-1.19193 0-.69892.4664-1.22836 1.1387-1.22836.62749 0 1.12051.47552 1.12051 1.22836 0 .70802-.4573 1.19193-1.1205 1.19193zM381.81976 166.57353v2.12476c0 .84248-.4573 1.27247-.96854 1.27247-.54694 0-.78855-.26892-.78855-1.07568v-2.32155h-1.16533v2.6353c0 1.3362.6632 1.811 1.60442 1.811.49303 0 .96854-.20659 1.29979-.60997h.0182v.53854h1.17444v-4.37487h-1.17443zM383.74702 164.35073h1.1743v6.59753h-1.1743zM387.12605 171.01984c1.14781 0 1.70316-.58267 1.70316-1.36282 0-.85998-.55535-1.06658-1.50568-1.41603-.42999-.16108-.6632-.28713-.6632-.46641 0-.2332.24161-.33125.43-.33125.32284 0 .70802.14356 1.04907.4657l.56446-.86068c-.49303-.38517-.98605-.54625-1.59532-.54625-.8964 0-1.57781.51964-1.57781 1.3089 0 .84247.62748 1.18282 1.3446 1.42513.57356.17928.79766.27803.79766.48392 0 .215-.19679.35856-.53784.35856-.47481 0-.85158-.17017-1.21015-.51123l-.57355.81587c.48391.41249 1.07568.63659 1.7746.63659zM393.32033 168.7158c0-1.28158-.86068-2.2137-2.14226-2.2137-1.24586 0-2.16958.92302-2.16958 2.24942 0 1.37191.96854 2.26832 2.25011 2.26832.8782 0 1.51479-.34946 1.89156-.82498l-.76195-.70801c-.2423.29553-.58266.50212-1.04907.49302-.56445 0-.97694-.32285-1.1205-.84248h3.07508c.02661-.07213.02661-.27803.02661-.4216zm-2.10655-1.18283c.51123 0 .82498.30463.94123.76194h-1.92727c.13446-.50213.51123-.76194.98604-.76194z" fill="#00aded"/>
|
68 |
+
</g>
|
69 |
+
<g serif:id="mark">
|
70 |
+
<path d="M352.3362 165.0942c-.38985-.10526-.77051-.24529-1.1363-.4248-.31034-.15228-.6097-.32576-.90302-.50839a4.28059 4.28059 0 0 1-.01708.01058c-.77208.4791-1.59296.8661-2.50488 1.03731-.32904.06177-.66185.10054-.99532.12898l-.01063.0009c-.08214 1.83573.04032 3.72786 1.01521 5.302.59423.95947 1.51362 1.67795 2.48731 2.27517l.0254.01547c.39845-.2435.7898-.50318 1.15398-.79322h.82667c-.58592.55146-1.2694 1.0136-1.96423 1.42616-.03256-.02228-.03286 0-.03286 0-.87643-.52039-1.7297-1.09562-2.39376-1.85939-.45109-.51878-.80827-1.11492-1.06569-1.76016-.64686-1.62151-.68784-3.42666-.57505-5.12153.71687-.04271 1.44492-.11159 2.13114-.33286.6768-.21823 1.30011-.58061 1.90217-.97149l.01762-.01147c.01171.00765.02342.01524.03519.02288.75935.4919 1.56971.92602 2.4621 1.11205a6.70181 6.70181 0 0 0 .15359.03011l-.61155.4217zm-.18136 6.3196h-1.13481c-.18968-.00806-.20246-.10413-.20646-.19786-.00472-.11147.06756-.20944.20646-.21536h.97722l.3089-1.12615s.05963-.13943.17947-.15096c.09582-.00926.1782.03119.21793.14708l.46674 1.57933.28591-.89854s.09248-.1638.23932-.13955c.08005.0205.08328.0242.1297.088l.33232.5008h.79573c.00096.00011.14768.01995.1917.12957.05096.12676-.02968.27677-.1917.28364h-.9066c-.09857-.00406-.12671-.0297-.17211-.09236l-.15532-.234-.35934 1.1295s-.06332.13453-.18149.14337c-.09444.00705-.1745-.03333-.21356-.1475l-.45205-1.52962-.15873.5787s-.0721.14635-.19923.15191zm2.22392-6.0194c.04014.97769.0101 1.95688-.15741 2.9234-.07635.44076-.24279 1.04897-.38855 1.47276l-.52451-.1705c.4453-1.17471.553-2.4526.53371-3.7033l.53676-.52237z" fill="#00aded" fill-rule="nonzero"/>
|
71 |
+
<path d="M350.08965 167.9099c.03129-.03568.0394-.0591.08606-.12695.26903-.39144 1.0659-1.44673 2.07848-2.25844.44062-.35324.91685-.67436 1.33812-.88486.70208-.35081.92816-.39358 1.25422-.46954.06193-.01442.2862-.05445.3234.03392.0359.0853-.10399.17519-.15647.21643-.05901.04637-1.40842 1.05545-2.54368 2.55402-.98784 1.30389-1.63428 3.0147-1.63428 3.0147-.01986.03799-.24452.43946-.54593.45902-.27857.0181-.63633-.34424-.63633-.34424-.06877-.06417-.40417-.4622-.68325-.95451-.35593-.6277-.66242-1.37176-.66242-1.37176s-.31816-.62588.28165-.9701c.59141-.33942.85484.00518.9832.20862.10969.17388.33069.59624.4375.80283.0372.07196.06126.11186.07973.09085z" fill="#1d58bf" fill-rule="nonzero"/>
|
72 |
+
</g>
|
73 |
+
<g>
|
74 |
+
<circle cx="88.506" cy="368.331" r="25.699" fill="#16bd83" transform="matrix(1.24515 0 0 1.24515 128.79025 -308.60286)"/>
|
75 |
+
<g transform="matrix(.06627 0 0 .06536 219.03341 123.08496)">
|
76 |
+
<clipPath id="a">
|
77 |
+
<ellipse cx="301.161" cy="412.162" rx="482.83" ry="489.567"/>
|
78 |
+
</clipPath>
|
79 |
+
<g clip-path="url(#a)">
|
80 |
+
<path d="M204.8661 153.28986c56.75005-49.87448 141.04683-49.80035 197.71882.17006C516.35825 253.78882 687.788 404.96022 687.788 404.96022l-768.05126-1.10318S91.0711 253.29174 204.8661 153.28986z" fill="#caeafd"/>
|
81 |
+
<path d="M188.84657 730.71631c28.67426 34.82609 71.12188 54.94595 115.86795 54.91574 44.74173-.03625 87.16333-20.21049 115.78989-55.08491 112.74986-137.3407 267.28817-325.58526 267.28817-325.58526l-768.0556-1.10568S75.46356 593.00705 188.84658 730.7163z" fill="#b2e2fc"/>
|
82 |
+
<path d="M400.72664 653.43536l276.23198 247.19779c9.5224 8.55156 12.75423 22.0308 8.1293 33.91464-4.62491 11.88385-16.14612 19.7235-28.99552 19.7235H-48.07247c-12.90565 0-24.4831-7.87396-29.12532-19.80927-4.64223-11.9396-1.39743-25.47887 8.16824-34.06475l281.47126-247.18492 188.28493.22301z" fill="#eff9ff"/>
|
83 |
+
<path d="M212.44437 653.43536l-288.78911-243.8269-2.94202 515.45712c.61328 6.08131 5.11207 14.26834 7.90399 18.52697l283.82714-290.15719z" fill="#caeafd"/>
|
84 |
+
<path d="M212.4412 653.43536L-80.26343 403.85737l1.02498 521.20821 291.67967-271.63022z" fill="#f8fcff"/>
|
85 |
+
<path d="M399.64663 653.43536l288.14581-248.4758-.61756 522.13885c-.61328 6.0813-2.40593 9.1434-5.19784 13.40203L399.64663 653.43536z" fill="#caeafd"/>
|
86 |
+
<path d="M399.64663 653.43536l288.14581-248.4758-.83628 522.13885-287.30953-273.66305z" fill="#f8fcff"/>
|
87 |
+
</g>
|
88 |
+
</g>
|
89 |
+
</g>
|
90 |
+
</g>
|
91 |
+
<g>
|
92 |
+
<path d="M590.46 285.225c0-29.872-24.253-54.125-54.125-54.125h-327.2c-29.872 0-54.125 24.253-54.125 54.125s24.253 54.125 54.125 54.125h327.2c29.872 0 54.125-24.253 54.125-54.125z" fill="url(#_Linear5)" transform="matrix(.74209 0 0 .74209 -79.40377 -171.49611)"/>
|
93 |
+
<path d="M357.86349 40.17303c0-21.17248-17.1897-38.36218-38.36218-38.36218H75.79256c-21.17248 0-38.36218 17.1897-38.36218 38.36218 0 21.17248 17.1897 38.36218 38.36218 38.36218h243.70875c21.17248 0 38.36218-17.1897 38.36218-38.36218z" fill="#fff"/>
|
94 |
+
<path d="M319.3808 20.92663c0-2.27186-1.84483-4.11652-4.1167-4.11652H124.01005c-2.27243 0-4.11671 1.84466-4.11671 4.11652v8.23348c0 2.27229 1.84428 4.11695 4.1167 4.11695H315.2641c2.27187 0 4.1167-1.84466 4.1167-4.11695v-8.23348z" fill="#3f3d56"/>
|
95 |
+
<path d="M319.3808 39.69455c0-1.51458-1.23007-2.74435-2.74447-2.74435H122.63781c-1.51495 0-2.74447 1.22977-2.74447 2.74435v5.48898c0 1.51486 1.22952 2.74463 2.74447 2.74463h193.99852c1.5144 0 2.74448-1.22977 2.74448-2.74463v-5.48898z" fill="#6c63ff"/>
|
96 |
+
<path d="M180.43573 54.72041c0-1.51458-1.2299-2.74435-2.74448-2.74435h-55.05373c-1.51476 0-2.74449 1.22977-2.74449 2.74435v5.48898c0 1.51487 1.22973 2.74464 2.74449 2.74464h55.05373c1.51459 0 2.74448-1.22977 2.74448-2.74464v-5.48898z" fill="#9795b1"/>
|
97 |
+
<g serif:id="text" fill-rule="nonzero">
|
98 |
+
<path d="M196.68207 60.68914c.59163 0 .87848-.11696 1.16533-.26893l-.30478-.94122c-.1972.09875-.41235.15267-.55577.15267-.26892 0-.38545-.17998-.38545-.55605v-1.86494h1.19221v-.96784h-1.19221v-1.5596l-1.16533.12536v1.43424h-.51991v.96784h.51991v2.02601c0 .98605.49302 1.45246 1.246 1.45246zM200.72464 56.1714c-.51963 0-.9948.25072-1.32647.71713h-.00896v-.6457h-1.17429v4.37487h1.17429V58.5826c0-.6457.39442-1.13871 1.12043-1.13871.06303 0 .18839 0 .30464.0091v-1.27317c-.0175-.0084-.05322-.0084-.08964-.0084zM203.979 56.24283v2.12476c0 .84248-.4573 1.27247-.96853 1.27247-.54695 0-.78855-.26892-.78855-1.07568v-2.32155h-1.16533v2.6353c0 1.3362.6632 1.811 1.60442 1.811.49302 0 .96854-.20659 1.29979-.60997h.0182v.53854h1.17443v-4.37487h-1.17442zM207.26839 60.68914c1.14781 0 1.70316-.58267 1.70316-1.36282 0-.85998-.55535-1.06658-1.50568-1.41603-.43069-.16108-.6632-.28713-.6632-.46641 0-.2332.24162-.33125.43-.33125.32285 0 .70802.14356 1.04907.4657l.56446-.86068c-.49303-.38517-.98605-.54625-1.59532-.54625-.8964 0-1.57781.51964-1.57781 1.3089 0 .84247.62748 1.18282 1.3446 1.42513.57356.17928.79766.27803.79766.48392 0 .215-.19679.35856-.53784.35856-.47481 0-.85158-.17017-1.21014-.51123l-.57356.81587c.48392.41249 1.07568.63659 1.7746.63659zM210.78257 60.68914c.59176 0 .8782-.11696 1.16532-.26893l-.30464-.94122c-.19748.09875-.41248.15267-.55605.15267-.26892 0-.38517-.17998-.38517-.55605v-1.86494h1.19194v-.96784h-1.19194v-1.5596l-1.16532.12536v1.43424h-.52034v.96784h.52034v2.02601c0 .98605.49302 1.45246 1.24586 1.45246z" fill="#1d58bf"/>
|
99 |
+
<path d="M214.8346 56.1714c-.53785 0-.99516.1968-1.3271.57356h-.01751v-.50213h-1.17443v6.14947h1.17443v-2.26762h.0175c.30464.35786.73533.56446 1.29068.56446 1.21925 0 2.09745-.8964 2.09745-2.25012 0-1.3264-.8873-2.26762-2.06103-2.26762zm-.25142 3.46866c-.63659 0-1.13871-.47481-1.13871-1.19193 0-.69892.4664-1.22836 1.1387-1.22836.62749 0 1.12051.47552 1.12051 1.22836 0 .70802-.4573 1.19193-1.1205 1.19193zM220.24873 56.24283v2.12476c0 .84248-.4573 1.27247-.96854 1.27247-.54694 0-.78855-.26892-.78855-1.07568v-2.32155h-1.16533v2.6353c0 1.3362.6632 1.811 1.60442 1.811.49303 0 .96854-.20659 1.29979-.60997h.0182v.53854h1.17444v-4.37487h-1.17443zM222.176 54.02003h1.17428v6.59753H222.176zM225.55502 60.68914c1.14781 0 1.70316-.58267 1.70316-1.36282 0-.85998-.55535-1.06658-1.50568-1.41603-.42999-.16108-.6632-.28713-.6632-.46641 0-.2332.24161-.33125.43-.33125.32284 0 .70802.14356 1.04907.4657l.56446-.86068c-.49303-.38517-.98605-.54625-1.59532-.54625-.8964 0-1.57781.51964-1.57781 1.3089 0 .84247.62748 1.18282 1.3446 1.42513.57356.17928.79766.27803.79766.48392 0 .215-.19679.35856-.53784.35856-.47481 0-.85158-.17017-1.21015-.51123l-.57355.81587c.48391.41249 1.07568.63659 1.7746.63659zM231.7493 58.3851c0-1.28158-.86068-2.2137-2.14226-2.2137-1.24586 0-2.16958.92302-2.16958 2.24942 0 1.37191.96854 2.26832 2.25011 2.26832.8782 0 1.51479-.34946 1.89156-.82498l-.76195-.70801c-.2423.29553-.58266.50212-1.04907.49302-.56445 0-.97694-.32285-1.1205-.84248h3.07508c.02661-.07213.02661-.27803.02661-.4216zm-2.10655-1.18283c.51123 0 .82498.30463.94123.76194h-1.92727c.13446-.50213.51123-.76194.98604-.76194z" fill="#00aded"/>
|
100 |
+
</g>
|
101 |
+
<g serif:id="mark">
|
102 |
+
<path d="M190.76518 54.7635c-.38986-.10526-.77052-.24529-1.1363-.4248-.31035-.15228-.6097-.32576-.90303-.50839a4.28059 4.28059 0 0 1-.01708.01058c-.77208.4791-1.59296.8661-2.50488 1.03731-.32904.06177-.66185.10054-.99532.12898l-.01063.0009c-.08214 1.83573.04032 3.72786 1.01521 5.302.59423.95947 1.51362 1.67795 2.48731 2.27517l.0254.01547c.39845-.2435.7898-.50318 1.15398-.79322h.82667c-.58592.55146-1.2694 1.0136-1.96423 1.42616-.03256-.02228-.03286 0-.03286 0-.87643-.52039-1.7297-1.09562-2.39376-1.85939-.45109-.51878-.80827-1.11492-1.06569-1.76016-.64686-1.62151-.68784-3.42666-.57505-5.12153.71687-.04271 1.44492-.11159 2.13114-.33286.6768-.21823 1.30011-.58061 1.90217-.97149l.01762-.01147c.01171.00765.02342.01524.03519.02288.75935.4919 1.56971.92602 2.4621 1.11205a6.70181 6.70181 0 0 0 .15359.03011l-.61155.4217zm-.18137 6.3196H189.449c-.18968-.00806-.20246-.10413-.20646-.19786-.00472-.11147.06756-.20944.20646-.21536h.97722l.3089-1.12615s.05963-.13943.17947-.15096c.09582-.00926.1782.03119.21793.14708l.46674 1.57933.28591-.89854s.09248-.1638.23932-.13955c.08005.0205.08328.0242.1297.088l.33232.5008h.79573c.00096.00011.14768.01995.1917.12957.05096.12676-.02968.27677-.1917.28364h-.9066c-.09857-.00406-.12671-.0297-.17211-.09236l-.15532-.234-.35934 1.1295s-.06332.13453-.18149.14337c-.09444.00705-.1745-.03333-.21356-.1475l-.45205-1.52962-.15873.5787s-.0721.14635-.19923.15191zm2.22392-6.0194c.04014.97769.0101 1.95688-.15741 2.9234-.07635.44076-.24279 1.04897-.38855 1.47276l-.52451-.1705c.4453-1.17471.553-2.4526.53371-3.7033l.53676-.52237z" fill="#00aded" fill-rule="nonzero"/>
|
103 |
+
<path d="M188.51862 57.5792c.03129-.03568.0394-.0591.08606-.12695.26903-.39144 1.0659-1.44673 2.07848-2.25844.44062-.35324.91685-.67436 1.33812-.88486.70208-.35081.92816-.39358 1.25422-.46954.06193-.01442.2862-.05445.3234.03392.0359.0853-.10399.17519-.15647.21643-.05901.04637-1.40842 1.05545-2.54368 2.55402-.98784 1.30389-1.63428 3.0147-1.63428 3.0147-.01986.03799-.24452.43946-.54593.45902-.27857.0181-.63633-.34424-.63633-.34424-.06877-.06417-.40417-.4622-.68325-.95451-.35593-.6277-.66242-1.37176-.66242-1.37176s-.31816-.62588.28165-.9701c.59141-.33942.85484.00518.9832.20862.10969.17388.33069.59624.4375.80283.0372.07196.06126.11186.07973.09085z" fill="#1d58bf" fill-rule="nonzero"/>
|
104 |
+
</g>
|
105 |
+
<circle cx="88.506" cy="368.331" r="25.699" fill="#d1ceff" transform="translate(-33.01933 -419.33226) scale(1.24681)"/>
|
106 |
+
<g>
|
107 |
+
<path d="M72.70322 31.51997c-1.28829-2.16884-1.71512-4.9399-.9589-7.68535 1.39848-5.07718 6.31646-8.1573 10.97559-6.87397 4.65912 1.28332 7.30633 6.44723 5.90785 11.5244-.75622 2.74546-2.54174 4.90713-4.75886 6.11044 1.49218-1.30606 2.69146-3.18496 3.3083-5.42441 1.39844-5.07701-.7234-10.0962-4.73527-11.20125-4.01187-1.10504-8.4043 2.11984-9.80272 7.19685-.61685 2.23945-.54878 4.46744.064 6.3533z" fill="#4a41df"/>
|
108 |
+
<path d="M67.54961 23.68095l-2.53994-.31091-6.84307 32.05362 1.20437 2.33145 8.17864-34.07416z" fill="#342ada" fill-rule="nonzero"/>
|
109 |
+
<path d="M66.75708 23.13525l-7.36405 34.43968 26.80336 5.51828 7.2562-33.5586-26.69551-6.39936z" fill="#6c63ff" fill-rule="nonzero"/>
|
110 |
+
<path d="M67.8951 48.228l2.56138-1.89506c.5772.91782 1.27595 1.6768 2.09644 2.27698.82034.59993 1.65499 1.00499 2.50418 1.21502.83984.20772 1.56524.18375 2.17584-.07219.6108-.25589.99733-.71233 1.15991-1.36968.0926-.37435.10477-.71773.03673-1.03012-.06808-.31219-.23693-.6181-.50702-.91741-.2699-.29928-.58302-.5801-.9395-.8427-.35647-.26261-.83858-.57552-1.44626-.9389-.48891-.29537-.89627-.54865-1.22181-.76-.32555-.21135-.69053-.46883-1.09499-.77224-.40466-.30346-.73194-.5855-.98247-.8461-.25034-.26054-.49876-.56896-.74481-.92538-.24606-.35641-.42252-.71008-.52958-1.06105-.10687-.35093-.16607-.74835-.17745-1.19202-.01143-.44348.04273-.90731.1624-1.39112.35454-1.4335 1.11367-2.51478 2.27749-3.24423 1.16381-.72945 2.58532-.96402 4.26491-.70362l.8739-3.5333 2.53355.62663-.90776 3.67022c.82439.38805 1.61423.87648 2.36953 1.4653.7555.58885 1.3814 1.21117 1.87813 1.86686l-2.49301 1.91197c-.6086-.7123-1.27213-1.30031-1.99062-1.76386-.7185-.46355-1.41559-.77878-2.09124-.9459-.82173-.20323-1.51227-.19235-2.0716.03266-.5595.22477-.91604.6477-1.06962 1.26863-.149.60242-.00324 1.1496.43693 1.64124.4404.4915 1.20655 1.07576 2.29862 1.75282.42956.26126.79095.48395 1.0846.66798.29365.18403.61867.39752.975.64067.35652.24319.64851.46319.87597.65999.2275.1966.46861.42593.72363.68762.255.2617.4553.50986.6007.74424.14536.23457.28301.50113.41257.7996.12951.29865.21188.60238.24687.91135.03498.30896.04162.6448.0197 1.0075-.02195.36287-.08255.74492-.18193 1.14673-.36582 1.47908-1.13688 2.57932-2.31317 3.30072-1.17634.7216-2.61107.97956-4.304.77393l-.82982 3.3551-2.53356-.62663.83324-3.36892c-2.09856-.83857-3.75578-2.24653-4.972-4.22333z" fill="#fff" fill-rule="nonzero"/>
|
111 |
+
</g>
|
112 |
+
</g>
|
113 |
+
<defs>
|
114 |
+
<linearGradient id="_Linear1" x2="1" gradientUnits="userSpaceOnUse" gradientTransform="rotate(-90 356.05 -16.69) scale(108.26)">
|
115 |
+
<stop offset="0" stop-color="gray" stop-opacity=".24706"/>
|
116 |
+
<stop offset=".54" stop-color="gray" stop-opacity=".11765"/>
|
117 |
+
<stop offset="1" stop-color="gray" stop-opacity=".09804"/>
|
118 |
+
</linearGradient>
|
119 |
+
<linearGradient id="_Linear2" x2="1" gradientUnits="userSpaceOnUse" gradientTransform="rotate(-90 356.05 -16.69) scale(108.26)">
|
120 |
+
<stop offset="0" stop-color="gray" stop-opacity=".24706"/>
|
121 |
+
<stop offset=".54" stop-color="gray" stop-opacity=".11765"/>
|
122 |
+
<stop offset="1" stop-color="gray" stop-opacity=".09804"/>
|
123 |
+
</linearGradient>
|
124 |
+
<linearGradient id="_Linear3" x2="1" gradientUnits="userSpaceOnUse" gradientTransform="rotate(-90 356.05 -16.69) scale(108.26)">
|
125 |
+
<stop offset="0" stop-color="gray" stop-opacity=".24706"/>
|
126 |
+
<stop offset=".54" stop-color="gray" stop-opacity=".11765"/>
|
127 |
+
<stop offset="1" stop-color="gray" stop-opacity=".09804"/>
|
128 |
+
</linearGradient>
|
129 |
+
<linearGradient id="_Linear5" x2="1" gradientUnits="userSpaceOnUse" gradientTransform="rotate(-90 356.05 -16.69) scale(108.26)">
|
130 |
+
<stop offset="0" stop-color="gray" stop-opacity=".24706"/>
|
131 |
+
<stop offset=".54" stop-color="gray" stop-opacity=".11765"/>
|
132 |
+
<stop offset="1" stop-color="gray" stop-opacity=".09804"/>
|
133 |
+
</linearGradient>
|
134 |
+
</defs>
|
135 |
+
</svg>
|
assets/css/images/features-fire.svg
ADDED
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="utf-8"?>
|
2 |
+
<svg viewBox="0 0 584 448" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.41421">
|
3 |
+
<path d="M189.59818 18.37229s-66.37622-41.54605-106.72752 25.0658c-20.57684 33.96683 6.88083 88.82258 1.63307 87.80267-34.08952-6.27889-55.73244-1.19743-65.90882 14.34997 25.19084 7.2841 35.34685 21.19308 21.27964 52.57056-12.03466 26.84669-33.5644 51.6592-32.22785 80.84196 2.41847 61.18891 37.27982 95.34118 91.51387 110.31304-26.95745-23.4387-37.92038-68.15075-30.5167-89.71924 11.67478-34.0098 39.29428-49.14561 57.27836-74.00675 8.87378-12.26831 9.03675-26.31638 2.33586-48.2614 49.5793 40.46282 46.49765 79.46814 17.82225 116.48678 19.27877 10.77916 37.61482 3.65675 54.82594-24.84757 16.92366 50.56354-4.30731 87.20452-33.88242 119.22877 64.3097-18.3154 98.7444-61.7113 99.07373-132.00817-2.32907-55.40867-30.75436-104.52828-91.25131-160.70584-34.04765-31.6172-21.50372-75.01762 14.7519-77.11058z" fill="#ed4500"/>
|
4 |
+
<path d="M583.79669 80.02688v292.83723c-.00695 7.44431-6.13186 13.56391-13.56379 13.56043H98.05177c-7.4368 0-13.55684-6.12795-13.55684-13.57436V80.02688c0-7.45058 6.12283-13.58132 13.5638-13.58132H570.2329c7.43888 0 13.56379 6.13074 13.56379 13.58132z" fill="#fff" fill-rule="nonzero"/>
|
5 |
+
<path d="M561.1278 107.46498c0-2.94215-2.38806-5.33112-5.33142-5.33112H113.58244c-2.94337 0-5.33142 2.38897-5.33142 5.33112v45.02798c0 2.94215 2.38805 5.33069 5.33142 5.33069h442.21394c2.94336 0 5.33142-2.38854 5.33142-5.33069v-45.02798z" fill="#d2def2"/>
|
6 |
+
<path d="M304.51417 141.38434c-1.39732 1.9698-3.31104 3.19358-5.70392 3.19358-3.57855 0-5.5883-1.95022-4.89943-7.60996l1.43553-11.91277h5.85678l-1.24445 10.15347c-.38216 3.09763-.13327 4.11092 1.24445 4.11092 1.66483 0 3.96168-2.81078 4.30562-5.5452l1.072-8.71919h5.87637l-2.35466 19.15951h-5.8754l.34394-2.83036h-.05683zm17.02356-16.32915h3.96266l-.57422 4.761h-3.98127l-.93775 7.85863c-.13425 1.09063.23027 1.587.86132 1.587.5164 0 1.16802-.20951 1.93331-.59231l.95637 4.5319c-1.68442.93693-3.36885 1.37651-5.16792 1.37651-2.96612 0-5.10913-1.70154-4.57313-6.1189l1.0328-8.64283h-1.91372l.57422-4.761h1.93331l.70846-5.58337 6.02826-1.1856-.8427 6.76897zm-74.75845 19.52273c3.65595 0 6.31634-1.47245 8.3065-4.22645l-4.57412-2.86756c-1.12883 1.3579-2.1822 1.85427-3.32965 1.85427-1.11021 0-2.58396-.66867-2.58396-3.3463 0-3.19358 1.79907-6.04254 4.287-6.06115.95637 0 2.04796.24868 2.79366 1.4147l4.49767-3.34631c-1.39633-2.1421-3.88426-3.30812-6.9464-3.30812-6.54565 0-10.56514 5.41106-10.56514 11.54955 0 5.41107 3.11996 8.33737 8.11542 8.33737h-.00098zm37.66682-19.86734c-6.77493 0-10.58375 5.46883-10.58375 11.62591 0 5.23876 3.2346 8.24143 8.09582 8.24143 7.34914 0 10.66018-5.45023 10.66018-11.68368 0-5.23876-3.2346-8.18366-8.17225-8.18366zm-84.79837 15.06816l-4.42124-4.09232c-1.43554 1.7593-3.50212 2.88714-5.79897 2.88714-3.13857 0-5.0905-2.10294-5.0905-6.1189 0-5.00967 3.04254-10.40214 7.65486-10.40214 2.39289 0 3.9999 1.43427 5.14833 3.5568l5.01407-3.7477c-2.66039-4.3596-6.18112-5.83206-9.8939-5.83206-8.45936 0-14.52682 7.59136-14.52682 16.5974 0 8.06913 4.88081 11.95096 11.2922 11.95096 4.43987 0 8.07623-1.85525 10.62197-4.79918zm62.24237 4.43596h-5.8754l3.54033-28.8352h5.8754l-2.1244 17.41978h.09603c3.10036-2.12253 4.49768-4.64645 5.24435-7.74507h6.08608c-.74668 3.92002-2.6986 7.13318-5.3786 9.6757l.51738 1.64476c.87994 2.754 1.8755 3.21218 3.57855 3.3659l-1.32089 4.77959c-.42135.03818-.8035.05776-1.72264.05776-3.00433-.01958-4.42027-2.27525-5.45405-5.52561l-.26848-.88015h-.03822c-.70748.4014-1.43455.76462-2.18123 1.10924l-.57421 4.9333zm-32.07853-4.49372c-.99459 0-2.06658-.53553-2.58396-1.7779l.24889-.34462c5.6461-.86057 10.88947-3.07806 10.88947-7.45723 0-3.72813-3.32965-5.44926-6.50644-5.44926-6.60247 0-10.54553 5.50604-10.54553 11.70228 0 5.1624 3.02392 8.1641 8.038 8.1641 3.75199 0 6.31635-1.4147 8.3261-4.2059l-4.36344-2.56309c-1.0916 1.41567-2.23904 1.93162-3.5031 1.93162zm-22.80391 4.49372h-5.85678l3.5413-28.8352h5.85679l-1.53157 12.4101h.13327c1.68442-2.00797 3.80882-3.07902 6.35456-3.07902 3.63636 0 5.12872 2.42896 4.42125 7.78226l-1.55018 11.72186h-5.85678l1.39732-10.38255c.34394-2.63945.13326-3.86323-1.14843-3.86323-1.74224 0-4.21057 2.3712-4.88081 7.03723l-.87994 7.20855zm76.96025-14.26536c1.0524 0 2.71723.44056 2.71723 3.3277 0 3.13582-1.68443 6.06114-4.287 6.06114-1.2817 0-2.60258-.91734-2.60258-3.32672 0-2.94491 1.55018-6.06212 4.17235-6.06212zm-52.54835-.34364c.84172 0 1.32089.45916 1.32089 1.08965 0 1.7407-2.4311 2.65805-5.24435 3.17498l-.2489-.1723c.70846-2.6003 2.4311-4.09233 4.17236-4.09233z" fill="#fff" fill-rule="nonzero"/>
|
7 |
+
<path d="M402.2168 176.1176c0-1.10118-.89386-1.9952-1.99462-1.9952H110.24521c-1.10076 0-1.99462.89402-1.99462 1.9952v15.59036c0 1.10118.89386 1.99503 1.99462 1.99503h289.97697c1.10076 0 1.99462-.89385 1.99462-1.99503v-15.59037zM561.12665 176.1176c0-1.10118-.89418-1.9952-1.99526-1.9952H445.53555c-1.10108 0-1.99526.89402-1.99526 1.9952v15.59036c0 1.10118.89418 1.99503 1.99526 1.99503h113.59584c1.10108 0 1.99526-.89385 1.99526-1.99503v-15.59037zM402.2168 205.48833c0-1.10117-.89386-1.99518-1.99462-1.99518H110.24521c-1.10076 0-1.99462.894-1.99462 1.99518v15.59037c0 1.10117.89386 1.99503 1.99462 1.99503h289.97697c1.10076 0 1.99462-.89386 1.99462-1.99503v-15.59037zM561.12665 205.48833c0-1.10117-.89418-1.99518-1.99526-1.99518H445.53555c-1.10108 0-1.99526.894-1.99526 1.99518v15.59037c0 1.10117.89418 1.99503 1.99526 1.99503h113.59584c1.10108 0 1.99526-.89386 1.99526-1.99503v-15.59037zM402.2168 234.85907c0-1.10118-.89386-1.99519-1.99462-1.99519H110.24521c-1.10076 0-1.99462.89401-1.99462 1.99519v15.59036c0 1.10118.89386 1.99504 1.99462 1.99504h289.97697c1.10076 0 1.99462-.89386 1.99462-1.99504v-15.59036zM561.12665 234.85907c0-1.10118-.89418-1.99519-1.99526-1.99519H445.53555c-1.10108 0-1.99526.89401-1.99526 1.99519v15.59036c0 1.10118.89418 1.99504 1.99526 1.99504h113.59584c1.10108 0 1.99526-.89386 1.99526-1.99504v-15.59036zM561.12665 283.811c0-1.10118-.89418-1.9952-1.99526-1.9952H445.53555c-1.10108 0-1.99526.89402-1.99526 1.9952v15.59036c0 1.10117.89418 1.99503 1.99526 1.99503h113.59584c1.10108 0 1.99526-.89386 1.99526-1.99503v-15.59037zM400.21898 283.811c0-1.10118-.89385-1.9952-1.99514-1.9952h-93.99827c-1.1013 0-1.99515.89402-1.99515 1.9952v15.59036c0 1.10117.89386 1.99503 1.99515 1.99503h93.99827c1.10129 0 1.99514-.89386 1.99514-1.99503v-15.59037z" fill="#d2def2"/>
|
8 |
+
<path d="M561.12587 335.46628c0-1.68715-1.36918-3.0569-3.057-3.0569H111.4404c-1.68782 0-3.057 1.36975-3.057 3.0569v23.88655c0 1.68715 1.36918 3.05666 3.057 3.05666h446.62846c1.68783 0 3.057-1.36951 3.057-3.05666v-23.88655z" fill="#b1f6dc"/>
|
9 |
+
<g transform="matrix(.34795 0 0 .32413 77.16395 71.70824)">
|
10 |
+
<circle cx="186.632" cy="234.546" r="10.39" fill="#fff"/>
|
11 |
+
<circle cx="186.632" cy="234.546" r="10.39" fill="#fff" transform="translate(42)"/>
|
12 |
+
<path d="M151.22262 144.6002c2.00801-.17762 3.95468 1.0272 4.63305 3.01951l20.8177 61.13133h63.95896c2.4731 0 4.4804 2.0073 4.4804 4.47968v.05279c0 2.47239-2.0073 4.47969-4.4804 4.47969h-67.16321c-1.99803 0-3.69218-1.31038-4.26926-3.11867-.0856-.17333-.1605-.3538-.2247-.54212l-20.59942-60.49005h-15.39572c-2.47239 0-4.47969-2.0073-4.47969-4.47969v-.05278c0-2.47239 2.0073-4.47969 4.4797-4.47969h18.2426z" fill="#fff"/>
|
13 |
+
<path d="M200.7482 118.73991c-.83199-1.95645-3.01793-2.90164-4.87745-2.11087l-28.63923 12.17895c-1.85951.79076-2.69402 3.02042-1.86204 4.97687l18.02561 42.38784c.83199 1.95644 3.01682 2.90211 4.87634 2.11135l28.63922-12.17896c1.85952-.79076 2.69515-3.0209 1.86316-4.97734l-18.0256-42.38784z" fill="#fff"/>
|
14 |
+
<path d="M245.72468 136.85363c-.1633-1.8178-1.67331-3.17057-3.36862-3.01828l-26.1101 2.34559c-1.69531.1523-2.93902 1.75245-2.77572 3.57024l3.04851 33.935c.1633 1.8178 1.6723 3.17066 3.3676 3.01837l26.11011-2.34559c1.6953-.1523 2.94003-1.75254 2.77673-3.57034l-3.04851-33.935z" fill="#fff"/>
|
15 |
+
<path d="M230.54506 149.70948c.7378-1.81209-.06063-3.85311-1.78099-4.55355l-26.49594-10.7878c-1.72036-.70044-3.71635.20284-4.45414 2.01493l-15.96242 39.20534c-.73779 1.8121.0596 3.8527 1.77996 4.55313l26.49594 10.7878c1.72036.70044 3.71738-.20242 4.45517-2.0145l15.96242-39.20535z" fill="#eaf0f9"/>
|
16 |
+
<path d="M251.34 170.774c.195-2.488-.547-4.956-2.058-6.854-1.512-1.897-3.668-3.067-5.988-3.247-14.863-1.153-45.056-3.497-62.463-4.848-2.894-.225-5.697 1.139-7.447 3.624-1.75 2.484-2.209 5.751-1.219 8.679 3.002 8.88 6.807 20.136 9.121 26.977 1.248 3.694 4.518 6.154 8.179 6.154h51.673c4.421 0 8.104-3.636 8.474-8.365.505-6.462 1.204-15.406 1.728-22.12z" fill="#fff"/>
|
17 |
+
</g>
|
18 |
+
<path d="M581.2833 66.06111H87.03028c-1.39079 0-2.53493 1.20616-2.53493 2.67232v11.3004h499.30178V68.75567v-.02223c0-1.45783-1.13308-2.6601-2.51385-2.67232z" fill="#3f3d56" fill-rule="nonzero"/>
|
19 |
+
<circle cx="96.72" cy="164.18" r="6.5" fill="#fff" transform="matrix(.55606 0 0 .55558 41.2557 -18.16968)"/>
|
20 |
+
<circle cx="114.22" cy="164.18" r="6.5" fill="#fff" transform="matrix(.55606 0 0 .55558 41.2557 -18.16968)"/>
|
21 |
+
<circle cx="131.72" cy="164.18" r="6.5" fill="#fff" transform="matrix(.55606 0 0 .55558 41.2557 -18.16968)"/>
|
22 |
+
<g>
|
23 |
+
<path d="M590.46 285.225c0-29.872-24.182-54.125-53.968-54.125H208.978c-29.786 0-53.968 24.253-53.968 54.125s24.182 54.125 53.968 54.125h327.514c29.786 0 53.968-24.253 53.968-54.125z" fill="url(#_Linear1)" transform="matrix(.98606 0 0 .9832 -134.55633 114.13986)"/>
|
24 |
+
<path d="M445.60511 394.58452c0-28.05184-22.77435-50.82682-50.82627-50.82682H71.50959c-28.05192 0-50.82627 22.77498-50.82627 50.82682s22.77435 50.82681 50.82627 50.82681h323.26925c28.05192 0 50.82627-22.77497 50.82627-50.82681z" fill="#fff"/>
|
25 |
+
<path d="M208.17876 365.25134c0-1.12039-.9089-2.03063-2.03003-2.03063H134.623c-1.12114 0-2.03004.91024-2.03004 2.03063v15.81336c0 1.12039.9089 2.02949 2.03004 2.02949h71.52572c1.12114 0 2.03003-.9091 2.03003-2.0295v-15.81335z" fill="#ed4500" fill-opacity=".1"/>
|
26 |
+
<g font-family="'Averta-Semibold','Averta'" font-weight="600" font-size="13.333">
|
27 |
+
<text x="117.581" y="14.323" fill="#ed4500" transform="matrix(1.32609 0 0 1.32492 -22.46957 358.57658)">
|
28 |
+
4<tspan x="124.623px 130.545px 133.446px 141.054px 147.874px 155.209px 162.817px 165.776px" y="14.323px 14.323px 14.323px 14.323px 14.323px 14.323px 14.323px 14.323px">7 people</tspan>
|
29 |
+
</text>
|
30 |
+
<text x="175.498" y="14.323" fill="#3f3d56" transform="matrix(1.32609 0 0 1.32492 -22.46957 358.57658)">
|
31 |
+
<tspan x="175.498px 183.106px 190.141px 194.435px 200.865px 208.174px 215.658px 220.974px 227.795px 235.396px 238.297px 243.614px 250.922px 258.257px 265.077px 270.394px 273.295px 276.254px 283.498px 286.399px 290.595px 297.904px" y="14.323px 14.323px 14.323px 14.323px 14.323px 14.323px 14.323px 14.323px 14.323px 14.323px 14.323px 14.323px 14.323px 14.323px 14.323px 14.323px 14.323px 14.323px 14.323px 14.323px 14.323px 14.323px">purchased shoes in the</tspan>
|
32 |
+
</text>
|
33 |
+
<text x="117.581" y="31.656" fill="#3f3d56" transform="matrix(1.32609 0 0 1.32492 -22.46957 358.57658)">
|
34 |
+
l<tspan x="120.541px 128.025px 133.342px 137.538px 140.439px 146.869px 153.911px 156.812px 164.12px 171.455px 178.49px 182.784px" y="31.656px 31.656px 31.656px 31.656px 31.656px 31.656px 31.656px 31.656px 31.656px 31.656px 31.656px 31.656px">ast 24 hours</tspan>
|
35 |
+
</text>
|
36 |
+
</g>
|
37 |
+
<g fill-rule="nonzero">
|
38 |
+
<path d="M217.29198 421.7667c.78455 0 1.16493-.15494 1.54532-.3563l-.40416-1.24704c-.26152.13083-.5468.20228-.737.20228-.35661 0-.51114-.23846-.51114-.73672v-2.4709h1.58098v-1.2823H217.185v-2.06635l-1.54532.16609v1.90026h-.68946v1.2823h.68946v2.6843c0 1.30643.65378 1.92439 1.6523 1.92439zM222.65277 415.78107c-.68908 0-1.31918.33218-1.759.95013h-.0119v-.85548h-1.5572v5.79635h1.5572v-2.69637c0-.85549.52304-1.5087 1.4858-1.5087.08358 0 .24981 0 .40397.01206v-1.68685c-.02321-.01114-.07058-.01114-.11887-.01114zM226.96834 415.87572v2.81513c0 1.11621-.60643 1.68592-1.28436 1.68592-.7253 0-1.0457-.3563-1.0457-1.4252v-3.07585h-1.54531v3.49154c0 1.77036.87945 2.39945 2.1276 2.39945.65379 0 1.28436-.27372 1.72362-.80817h.02415v.71353h1.5574v-5.79635h-1.5574zM231.33034 421.7667c1.5221 0 2.25854-.77197 2.25854-1.80561 0-1.13941-.73644-1.41313-1.99665-1.87614-.57114-.2134-.87946-.38042-.87946-.61795 0-.30898.3204-.43888.5702-.43888.42813 0 .9389.19021 1.39117.61703l.74851-1.14034c-.65379-.51033-1.30758-.72374-2.11553-.72374-1.1887 0-2.0923.68848-2.0923 1.73418 0 1.11621.83209 1.56716 1.78305 1.8882.76059.23753 1.05777.36836 1.05777.64115 0 .28485-.26096.47506-.71323.47506-.62964 0-1.12927-.22547-1.60475-.67734l-.76059 1.08096c.64172.54651 1.42645.84343 2.35327.84343zM235.99045 421.7667c.78473 0 1.16456-.15494 1.54532-.3563l-.40398-1.24704c-.26189.13083-.54699.20228-.73737.20228-.35661 0-.51077-.23846-.51077-.73672v-2.4709h1.5806v-1.2823h-1.5806v-2.06635l-1.54532.16609v1.90026h-.69001v1.2823h.69v2.6843c0 1.30643.6538 1.92439 1.65213 1.92439z" fill="#1d58bf"/>
|
39 |
+
<path d="M241.36378 415.78107c-.71323 0-1.31965.26073-1.75985.75992h-.02321v-.66527h-1.5574v8.14755h1.5574v-3.00442h.02321c.40398.47414.97511.74786 1.71156.74786 1.61682 0 2.78139-1.18766 2.78139-2.98122 0-1.75737-1.17664-3.00442-2.7331-3.00442zm-.3334 4.5957c-.84417 0-1.51003-.62909-1.51003-1.57922 0-.926.6185-1.62747 1.51003-1.62747.8321 0 1.48589.63002 1.48589 1.62747 0 .93807-.60643 1.57922-1.48589 1.57922zM248.54339 415.87572v2.81513c0 1.11621-.60643 1.68592-1.28437 1.68592-.7253 0-1.04569-.3563-1.04569-1.4252v-3.07585h-1.54532v3.49154c0 1.77036.87946 2.39945 2.1276 2.39945.6538 0 1.28437-.27372 1.72363-.80817h.02415v.71353h1.55739v-5.79635h-1.5574zM251.0991 412.93068h1.55722v8.7412h-1.55721zM255.57998 421.7667c1.5221 0 2.25854-.77197 2.25854-1.80561 0-1.13941-.73644-1.41313-1.99665-1.87614-.57021-.2134-.87946-.38042-.87946-.61795 0-.30898.3204-.43888.5702-.43888.42813 0 .9389.19021 1.39117.61703l.74851-1.14034c-.65379-.51033-1.30758-.72374-2.11553-.72374-1.1887 0-2.0923.68848-2.0923 1.73418 0 1.11621.83209 1.56716 1.78305 1.8882.76059.23753 1.05777.36836 1.05777.64115 0 .28485-.26096.47506-.71323.47506-.62964 0-1.12927-.22547-1.60475-.67734l-.7606 1.08096c.64173.54651 1.42646.84343 2.35328.84343zM263.79414 418.71404c0-1.69798-1.14135-2.93297-2.84083-2.93297-1.65212 0-2.87704 1.22293-2.87704 2.9803 0 1.81768 1.28436 3.00534 2.98384 3.00534 1.16456 0 2.00873-.463 2.50836-1.09302l-1.0104-.93807c-.32133.39156-.77266.66528-1.39116.65321-.74852 0-1.29551-.42774-1.48589-1.11621h4.07783c.03529-.09557.03529-.36836.03529-.55858zm-2.79347-1.56715c.67794 0 1.09399.40362 1.24815 1.0095h-2.55573c.17831-.66527.67794-1.0095 1.30758-1.0095z" fill="#00aded"/>
|
40 |
+
</g>
|
41 |
+
<path d="M209.44567 413.91572c-.51699-.13946-1.02178-.325-1.50684-.56284-.41154-.20175-.80851-.4316-1.19748-.67356a5.67728 5.67728 0 0 1-.02266.014c-1.02383.63479-2.11239 1.14752-3.32168 1.37437-.43634.08184-.87767.1332-1.31988.17088l-.0141.00119c-.10892 2.4322.05348 4.93912 1.34626 7.02472.788 1.27123 2.00719 2.22316 3.29839 3.01443l.03367.0205c.5284-.32262 1.04736-.66669 1.53028-1.05096h1.09625c-.777.73064-1.68334 1.34294-2.60475 1.88955-.04317-.02952-.04357 0-.04357 0-1.16223-.68948-2.29372-1.45161-3.17433-2.46354-.59819-.68734-1.07184-1.47718-1.4132-2.33208-.85779-2.14837-.91213-4.54004-.76257-6.7856.95064-.0566 1.91609-.14786 2.82609-.44103.89748-.28913 1.72405-.76926 2.52243-1.28714l.02337-.0152c.01553.01014.03105.02019.04666.03032 1.00696.65172 2.08157 1.2269 3.26496 1.47338a8.89413 8.89413 0 0 0 .20367.03989l-.81097.55872zm-.24051 8.37296h-1.50486c-.25152-.01069-.26847-.13796-.27378-.26215-.00626-.14769.0896-.2775.27378-.28533h1.29588l.40964-1.49206s.07906-.18473.23798-.20001c.12707-.01227.2363.04132.289.19487l.61893 2.09249.37915-1.1905s.12263-.21703.31735-.1849c.10616.02715.11043.03206.17199.1166l.4407.6635h1.0552c.00127.00017.19583.02644.25422.17168.06757.16796-.03937.3667-.25422.3758h-1.20223c-.13072-.00537-.16803-.03933-.22824-.12236l-.20597-.31003-.4765 1.4965s-.08398.17824-.24067.18995c-.12525.00934-.2314-.04416-.28321-.19542l-.59946-2.02664-.21048.76673s-.09562.19392-.2642.20128zm2.9491-7.97523c.05324 1.29537.0134 2.59271-.20874 3.87328-.10124.58397-.32194 1.3898-.51524 1.95129l-.69555-.2259c.5905-1.5564.73334-3.2495.70775-4.90659l.71179-.69208z" fill="#00aded" fill-rule="nonzero"/>
|
42 |
+
<path d="M206.46654 417.64628c.0415-.04726.05226-.07829.11412-.16818.35676-.51863 1.41349-1.91681 2.75625-2.99226.5843-.46801 1.21582-.89348 1.77446-1.17236.93102-.4648 1.23082-.52146 1.6632-.62212.08212-.0191.37952-.07213.42887.04495.0476.11302-.1379.23211-.20751.28676-.07825.06143-1.86768 1.39838-3.37313 3.38386-1.30996 1.72755-2.1672 3.99424-2.1672 3.99424-.02634.05034-.32425.58226-.72395.60816-.3694.024-.84382-.45608-.84382-.45608-.0912-.08502-.53596-.61239-.90605-1.26466-.472-.83164-.87842-1.81746-.87842-1.81746s-.42192-.82925.37349-1.2853c.78425-.44972 1.13359.00686 1.3038.2764.14545.23037.43852.78997.58015 1.06368.04935.09534.08125.14821.10574.12037z" fill="#1d58bf" fill-rule="nonzero"/>
|
43 |
+
<text x="35.99" y="29.951" font-family="'Averta-Semibold','Averta'" font-weight="600" font-size="9.333" fill="#a9b6d4" transform="matrix(1.32609 0 0 1.32492 85.82303 382.12314)">
|
44 |
+
P<tspan x="41.398px 46.532px 53.261px 58.035px 61.041px 65.816px 71.137px 73.167px 78.493px" y="29.951px 29.951px 29.951px 29.951px 29.951px 29.951px 29.951px 29.951px 29.951px">owered by</tspan>
|
45 |
+
</text>
|
46 |
+
<g transform="matrix(1.65338 0 0 1.65193 -72.73905 -214.22319)">
|
47 |
+
<circle cx="88.506" cy="368.331" r="25.699" fill="#fbdacc"/>
|
48 |
+
</g>
|
49 |
+
<g>
|
50 |
+
<path d="M82.59618 363.67917s-11.32535-7.08874-18.21024 4.27682c-3.5109 5.79554 1.17403 15.15523.27864 14.9812-5.81647-1.07132-9.50927-.2043-11.2456 2.44845 4.29815 1.24284 6.031 3.61604 3.63081 8.96978-2.0534 4.58068-5.72688 8.81428-5.49883 13.79354.41265 10.44028 6.36082 16.26746 15.61442 18.82201-4.59957-3.9992-6.4701-11.62813-5.20686-15.30822 1.99199-5.80287 6.70453-8.3854 9.77304-12.6273 1.51407-2.09326 1.54188-4.4902.39855-8.23453 8.4594 6.90391 7.9336 13.55914 3.0409 19.8754 3.2894 1.83917 6.41797.62392 9.3546-4.23959 2.88757 8.62733-.73493 14.87915-5.78115 20.34324 10.97276-3.12504 16.84813-10.5294 16.90432-22.5237-.3974-9.45403-5.24742-17.835-15.56963-27.42021-5.80933-5.39464-3.66904-12.79978 2.51703-13.15689z" fill="#ed4500"/>
|
51 |
+
</g>
|
52 |
+
</g>
|
53 |
+
<defs>
|
54 |
+
<linearGradient id="_Linear1" x2="1" gradientUnits="userSpaceOnUse" gradientTransform="rotate(-90 356.05 -16.69) scale(108.26)">
|
55 |
+
<stop offset="0" stop-color="gray" stop-opacity=".24706"/>
|
56 |
+
<stop offset=".54" stop-color="gray" stop-opacity=".11765"/>
|
57 |
+
<stop offset="1" stop-color="gray" stop-opacity=".09804"/>
|
58 |
+
</linearGradient>
|
59 |
+
</defs>
|
60 |
+
</svg>
|
assets/css/images/gravity-forms.png
ADDED
Binary file
|
assets/css/images/home-flexible.svg
ADDED
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="utf-8"?>
|
2 |
+
<svg viewBox="0 0 561 420" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="1.5">
|
3 |
+
<path d="M541.04438 349.44386c0 3.9122-3.17788 7.0878-7.0878 7.0878H10.49218c-3.91163 0-7.0878-3.1756-7.0878-7.0878V10.53238c0-3.91163 3.1756-7.0878 7.0878-7.0878h523.4644c3.90992 0 7.0878 3.17617 7.0878 7.0878v338.91148z" fill="#f5f5f7"/>
|
4 |
+
<path d="M538.31483-.00001H6.11126c-1.49757 0-2.72957 1.232-2.72957 2.72957v11.5425h537.64V2.72956c0-1.48906-1.22007-2.71709-2.70686-2.72957z" fill="#3f3d56" fill-rule="nonzero"/>
|
5 |
+
<circle cx="96.72" cy="164.18" r="6.5" fill="#fff" transform="translate(-40.74542 -86.03535) scale(.56748)"/>
|
6 |
+
<circle cx="114.22" cy="164.18" r="6.5" fill="#fff" transform="translate(-40.74542 -86.03535) scale(.56748)"/>
|
7 |
+
<circle cx="131.72" cy="164.18" r="6.5" fill="#fff" transform="translate(-40.74542 -86.03535) scale(.56748)"/>
|
8 |
+
<path fill="#dcdbdc" d="M28.37284 38.86226h488.82123V161.9703H28.37284z"/>
|
9 |
+
<path fill="#fff" d="M32.93322 42.81193h479.8486v114.89474H32.93323z"/>
|
10 |
+
<path d="M478.03484 71.437c0-3.40211-2.76264-6.16449-6.16477-6.16449h-286.4028c-3.40296 0-6.16477 2.76238-6.16477 6.1645v12.32963c0 3.40276 2.76181 6.16513 6.16476 6.16513h286.4028c3.40214 0 6.16478-2.76237 6.16478-6.16513V71.437z" fill="#16bd83"/>
|
11 |
+
<path d="M478.03484 99.54337c0-2.26808-1.84204-4.10966-4.10985-4.10966H183.41234c-2.26863 0-4.10984 1.84158-4.10984 4.10966v8.21975c0 2.2685 1.8412 4.11008 4.10984 4.11008H473.925c2.26781 0 4.10985-1.84158 4.10985-4.11008v-8.21975z" fill="#6c63ff"/>
|
12 |
+
<path d="M269.96526 122.04447c0-2.26808-1.84177-4.10966-4.10987-4.10966h-82.44321c-2.26835 0-4.10987 1.84158-4.10987 4.10966v8.21974c0 2.2685 1.84152 4.1101 4.10987 4.1101h82.4432c2.2681 0 4.10988-1.8416 4.10988-4.1101v-8.21974z" fill="#9795b1"/>
|
13 |
+
<g fill-rule="nonzero">
|
14 |
+
<path d="M294.29306 130.98143c.88596 0 1.31552-.17513 1.74507-.4027l-.4564-1.40949c-.29532.14787-.61749.22862-.83226.22862-.40271 0-.57722-.26952-.57722-.83268v-2.79275h1.78534v-1.44933h-1.78534v-2.3355l-1.74507.18772v2.14778h-.77857v1.44933h.77857v3.03395c0 1.4766.7383 2.17505 1.86588 2.17505zm6.05374-6.7653c-.77814 0-1.4897.37544-1.98638 1.0739h-.01342v-.96693h-1.7585v6.55136h1.7585v-3.04758c0-.96692.59064-1.70522 1.67785-1.70522.09438 0 .2821 0 .4562.01363v-1.90658c-.02623-.01258-.07971-.01258-.13424-.01258zm4.87342.10697v3.18182c0 1.26161-.68482 1.90553-1.45039 1.90553-.81905 0-1.18086-.40271-1.18086-1.61084v-3.47651h-1.74507v3.94634c0 2.00096.99314 2.712 2.40262 2.712.7383 0 1.45038-.30938 1.94643-.91344h.02727v.80646h1.7587v-6.55136h-1.7587zm4.92584 6.65833c1.71885 0 2.5505-.87253 2.5505-2.04081 0-1.28783-.83165-1.5972-2.25476-2.12051-.64496-.24121-.99314-.42998-.99314-.69845 0-.34923.3618-.49605.64392-.49605.48346 0 1.06025.21499 1.57098.6974l.84527-1.28888c-.7383-.5768-1.4766-.818-2.38899-.818-1.34236 0-2.36277.77815-2.36277 1.96006 0 1.26161.93966 1.7713 2.01355 2.13415.8589.26847 1.1945.41634 1.1945.72467 0 .32195-.2947.53694-.80543.53694-.71103 0-1.27524-.25484-1.81219-.76557l-.8589 1.22176c.72467.6177 1.61084.9533 2.65746.9533zm5.26248 0c.88617 0 1.3151-.17513 1.74508-.4027l-.4562-1.40949c-.29574.14787-.6177.22862-.83268.22862-.40271 0-.5768-.26952-.5768-.83268v-2.79275h1.78493v-1.44933h-1.78493v-2.3355l-1.74507.18772v2.14778h-.7792v1.44933h.7792v3.03395c0 1.4766.7383 2.17505 1.86567 2.17505z" fill="#1d58bf"/>
|
15 |
+
<path d="M321.47645 124.21613c-.80542 0-1.49024.2947-1.98733.8589h-.02622v-.75193h-1.7587v9.20882h1.7587v-3.39576h.02622c.4562.5359 1.10116.84527 1.9328.84527 1.82582 0 3.14091-1.34236 3.14091-3.36954 0-1.98628-1.32873-3.39576-3.08638-3.39576zm-.3765 5.19432c-.95328 0-1.70522-.71104-1.70522-1.78493 0-1.04662.69845-1.83945 1.70523-1.83945.93965 0 1.67795.71208 1.67795 1.83945 0 1.06026-.68481 1.78493-1.67795 1.78493zm8.48416-5.08735v3.18182c0 1.26161-.68481 1.90553-1.45038 1.90553-.81905 0-1.18086-.40271-1.18086-1.61084v-3.47651h-1.74507v3.94634c0 2.00096.99314 2.712 2.40262 2.712.7383 0 1.45038-.30938 1.94643-.91344h.02726v.80646h1.7587v-6.55136h-1.7587zm2.88609-3.32864h1.7585v9.8798h-1.7585zm5.06008 9.98697c1.71885 0 2.55049-.87253 2.55049-2.04081 0-1.28783-.83164-1.5972-2.25476-2.12051-.64391-.24121-.99313-.42998-.99313-.69845 0-.34923.3618-.49605.64391-.49605.48346 0 1.06026.21499 1.57099.6974l.84527-1.28888c-.7383-.5768-1.4766-.818-2.389-.818-1.34236 0-2.36276.77815-2.36276 1.96006 0 1.26161.93965 1.7713 2.01354 2.13415.8589.26847 1.1945.41634 1.1945.72467 0 .32195-.2947.53694-.80542.53694-.71103 0-1.27525-.25484-1.8122-.76557l-.8589 1.22176c.72467.6177 1.61084.9533 2.65747.9533zm9.27594-3.45029c0-1.91916-1.28888-3.31501-3.20804-3.31501-1.86568 0-3.24894 1.38222-3.24894 3.3685 0 2.05444 1.45038 3.3968 3.36954 3.3968 1.3151 0 2.26839-.52331 2.8326-1.2354l-1.14101-1.06025c-.36286.44256-.87254.75193-1.57099.7383-.84527 0-1.46296-.48346-1.67795-1.26161h4.60494c.03985-.10802.03985-.41634.03985-.63133zm-3.15456-1.7713c.76557 0 1.2354.4562 1.40948 1.14102h-2.88608c.20136-.75194.76557-1.14101 1.4766-1.14101z" fill="#00aded"/>
|
16 |
+
</g>
|
17 |
+
<path d="M285.43252 122.1078c-.58382-.15763-1.15386-.36732-1.70162-.63615-.46474-.22803-.91303-.48782-1.35227-.7613a6.41018 6.41018 0 0 1-.02559.01583c-1.15618.71747-2.38544 1.297-3.75105 1.55338-.49274.0925-.99112.15056-1.49049.19315l-.01592.00134c-.123 2.749.06038 5.58247 1.52028 7.93973.88986 1.43682 2.26664 2.51275 3.72475 3.40708l.03802.02317c.5967-.36464 1.18274-.75352 1.7281-1.18785h1.23794c-.87743.8258-1.90094 1.51787-2.94144 2.13568-.04876-.03337-.0492 0-.0492 0-1.31247-.77929-2.59022-1.6407-3.58466-2.78444-.6755-.77687-1.21039-1.66959-1.59587-2.63584-.96867-2.42821-1.03004-5.13142-.86114-7.66948 1.07352-.06396 2.16376-.16711 3.19139-.49847 1.01349-.3268 1.94691-.86946 2.84849-1.4548l.02639-.01717c.01753.01145.03506.02281.05269.03426 1.13712.73661 2.35064 1.38672 3.687 1.6653.07648.01592.15315.03095.23.04508l-.9158.6315zm-.2716 9.4636h-1.69938c-.28404-.01208-.30318-.15594-.30918-.2963-.00706-.16693.10118-.31364.30918-.3225h1.46338l.4626-1.6864s.08928-.2088.26873-.22607c.1435-.01387.26686.0467.32635.22025l.69895 2.36505.42816-1.34557s.13848-.2453.35837-.20898c.11988.03069.12471.03624.19422.13178l.49767.74994h1.1916c.00143.00018.22114.02988.28708.19404.0763.18983-.04447.41447-.28708.42475h-1.35764c-.14761-.00608-.18975-.04446-.25774-.1383l-.2326-.35042-.5381 1.69142s-.09482.20146-.27177.2147c-.14144.01056-.26131-.04991-.31982-.22087l-.67694-2.29062-.2377.8666s-.10797.21917-.29834.2275zm3.33032-9.01406c.06011 1.4641.01511 2.93043-.23573 4.3778-.11433.66003-.36357 1.57082-.58185 2.20545l-.78545-.25532c.66683-1.75913.82812-3.67277.79923-5.5457l.8038-.78223z" fill="#00aded" fill-rule="nonzero"/>
|
18 |
+
<path d="M282.0683 126.3243c.04685-.05343.05901-.0885.12887-.1901.40287-.58618 1.5962-2.16649 3.11253-3.38201.65983-.52898 1.37298-1.00987 2.00383-1.32508 1.05137-.52534 1.38992-.58938 1.8782-.70314.09273-.02159.42857-.08153.4843.0508.05375.12774-.15573.26235-.23434.3241-.08836.06943-2.1091 1.58053-3.80914 3.82464-1.4793 1.95257-2.44735 4.51451-2.44735 4.51451-.02974.0569-.36616.6581-.81752.68738-.41715.02713-.9529-.51549-.9529-.51549-.103-.09609-.60524-.69215-1.02317-1.42938-.533-.93997-.99197-2.0542-.99197-2.0542s-.47645-.93727.42177-1.45273c.88563-.50829 1.28012.00776 1.47234.31241.16425.26038.4952.89287.65514 1.20223.05573.10776.09175.16752.1194.13605z" fill="#1d58bf" fill-rule="nonzero"/>
|
19 |
+
<path fill="#dce0ed" fill-opacity=".5" d="M27.83207 174.56487h487.8311v1.6297H27.83207zm0 37.84138h487.8311v1.6297H27.83207zm0 37.85225h487.8311v1.62968H27.83207zm0 37.84137h487.8311v1.6297H27.83207zm0 37.84138h487.8311v1.6297H27.83207z"/>
|
20 |
+
<path d="M515.67403 327.56008H27.23451v-13.98165c15.2137 5.88861 31.87998 8.9231 48.09973 6.38404 15.89056-4.09052 30.1775-8.70472 42.61745-13.9208l37.54478-24.79084c14.09355-11.14598 27.834-21.49125 39.00063-25.99897 9.17406-4.4534 18.35682-8.61019 27.68733-8.6254l26.3021-1.60905 26.03156-.08148 20.54386-.67904 37.2786-20.43304 39.30048-13.03968c12.74417-3.0258 26.2456-4.53814 38.4335-3.72873l32.83606 1.0267 26.49223-2.35218c8.68624-1.30267 18.27098-5.0792 28.54889-10.76464l17.72232-20.20054v152.7953z" fill="#16bd83" fill-opacity=".3" fill-rule="nonzero"/>
|
21 |
+
<path d="M370.919 601.569s60.278 43.615 172.315-49.33c75.552-62.676 139.168-17.37 179.667-44.589 117.436-78.927 199.455 3.832 256.65-77.309" fill="none" stroke="#16bd83" stroke-width="5" transform="matrix(.79937 0 0 .80095 -268.1162 -169.22389)"/>
|
22 |
+
<circle cx="647.55" cy="275.37" r="11.13" fill="#16bd83" transform="translate(-490.77973 -52.8303) scale(1.08646)"/>
|
23 |
+
<circle cx="647.55" cy="275.37" r="11.13" fill="#16bd83" transform="translate(-362.86099 -81.7835) scale(1.08646)"/>
|
24 |
+
<circle cx="647.55" cy="275.37" r="11.13" fill="#16bd83" transform="translate(-607.09042 9.68565) scale(1.08646)"/>
|
25 |
+
<circle cx="647.55" cy="275.37" r="11.13" fill="#16bd83" transform="translate(-246.76292 -94.28274) scale(1.08646)"/>
|
26 |
+
<g>
|
27 |
+
<circle cx="88.506" cy="368.331" r="25.699" fill="#6c63ff" transform="matrix(2.15937 0 -.44436 2.15937 80.43453 -678.27047)"/>
|
28 |
+
<path d="M121.98366 154.09019c-2.61326 3.6077-6.29794 6.42663-10.3811 7.93848-2.39737.81407-4.83762 1.25903-7.22302 1.31465-2.60512.18961-5.11578-.12894-7.39204-.93543-2.988-1.27925-5.32277-3.5091-6.69809-6.39629-1.35004-2.88718-2.27143-6.01454-2.73732-9.3037-.43092-1.64078-.37897-3.45349.1467-5.2586 2.04721-.24271 4.07924-1.27168 5.64425-2.85685 1.06398-1.59528 1.48615-3.42568 1.16692-5.05636-.04764-.50563-.10049-.98599-.18381-1.44106-.15032-1.1124-1.03316-3.21079.06948-4.14621 1.10264-.93543 3.2211-.91015 4.13344-1.28938 2.77639-1.47645 5.65877-2.65711 8.58579-3.51416 2.56094-.3312 5.0634-.1694 7.35928.48035.31975.05562.61384.17444.8626.35394.26391.26546.42925.61688.4745 1.01128.35412 1.71916.36843 3.6153.56046 5.38502.10354 1.85568.7121 3.55462 1.7665 4.92995.95352.98093 2.09678 1.76467 3.38948 2.32592l3.0704 1.54219c.54522.23765 1.01394.58907 1.37945 1.03655.30642.61182.42212 1.3273.33185 2.07311-.20386 4.0375-1.71634 8.16855-4.32572 11.8066z" fill="#f2bfc8" fill-rule="nonzero"/>
|
29 |
+
<path d="M116.3308 130.45171c-6.69538 5.72886-15.71333 7.03087-21.86173 3.16023-.04764-.50564-.10048-.986-.18381-1.44107-.15032-1.1124-1.03316-3.21078.06948-4.1462 1.10264-.93543 3.2211-.91015 4.13344-1.28938 2.77639-1.47646 5.65877-2.65712 8.5858-3.51417 2.56093-.33119 5.0634-.16939 7.35927.48036.31975.05562.61385.17444.8626.35394.26392.26546.42925.61688.4745 1.01127.3385 1.795.36843 3.6153.56046 5.38502z" fill-opacity=".1" fill-rule="nonzero"/>
|
30 |
+
<circle cx="263.84" cy="289.36" r="6.94" fill="#eebdbc" transform="matrix(2.52818 0 -.52025 2.52818 -410.14515 -614.02026)"/>
|
31 |
+
<path d="M143.65241 151.42549c-25.1774 27.24618-65.45793 27.78215-81.99058 4.84904.54877-1.33993 1.32584-2.63436 2.27914-3.80238.97851-1.15538 2.39943-1.86832 3.77795-1.89613.73317 0 1.51024.2781 2.15041-.25282.64017-.53092.55164-.9607 1.0037-1.31465.45207-.35395 1.36221-.35395 2.0597-.30339 1.53178.05057 3.149-.6826 4.29399-1.9467.36728-.47023.78796-.90508 1.25132-1.28936.7315-.32361 1.49053-.5107 2.23812-.5562 2.14148-.45508 3.7816-2.52818 5.58913-3.81755.93125-.852 2.19218-1.18066 3.2055-.8343.22122.12893.39918.30843.52279.53091.28352.6371.41996 1.35005.40249 2.0984.05106 4.1993-1.27003 4.6114 1.52931 7.29885 2.19473 1.9644 23.10548 2.98325 26.64105-2.29306 1.8501-3.05657 3.21938-6.29517 4.04487-9.5818l.08844-.4298c2.18682-.51574 4.30444-.0809 5.77255 1.18825 1.41442 1.28432 2.97487 2.41189 4.6678 3.36248 2.06799.88486 4.87427.88486 6.0783 2.52818.52205.65733.78983 1.56747 1.5409 1.97198.47665.20225.9962.3312 1.53999.37923 2.7007.7711 1.31313 4.11082 1.31313 4.11082z" fill="#3f3d56" fill-rule="nonzero"/>
|
32 |
+
<path d="M100.09649 89.06542c-1.42453.98852-2.46474 2.40683-3.78745 3.53945-2.29584 1.96693-8.08153 11.35911-8.75377 13.8519-2.09478 7.77162-1.48864 17.14863 1.13822 16.52165-3.0469-2.197 6.9098-20.07627 11.56564-18.14222.92388-.1896 15.01883 4.82124 18.886 2.7987 1.1419-.20478-.8238-1.2919.31469-1.43095 4.97034-.6017 3.88945 8.11545 2.80855 10.01412l.58875 5.73896c.10121.85958 3.05726-1.2565 3.4857-2.0731 1.96528-3.73918 3.4943-7.58201 3.57475-11.35153.08104-3.78468 2.57495-8.09017.54394-10.99758-.7474-1.03655-1.85022-1.82029-2.50617-2.93268-.65595-1.1124-.81594-2.30065-1.46221-3.3372-2.81365-3.01106-6.7134-4.88444-11.15873-5.35974-4.97692-.44749-10.29297.6548-15.23791 3.16022z" fill="#6e2e16" fill-rule="nonzero"/>
|
33 |
+
</g>
|
34 |
+
<g>
|
35 |
+
<ellipse cx="140.04" cy="838.19" rx="100.11" ry="24.73" fill="#1d58bf" fill-opacity=".1" transform="translate(-25.71766 -135.89034) scale(.64406)"/>
|
36 |
+
<path d="M78.778 409.97841l9.09264-2.84603c2.55246-1.90823 1.85114-4.21605.6687-5.93672-.82528-1.11476-2.09824-1.81608-3.48212-1.91638-.60753-.1003-1.18653-.33109-1.6962-.67685-.55535-.33598-1.0218-.8008-1.36186-1.3537-.61243-1.06503-.92068-2.27846-.88888-3.50658.0318-1.22812-9.73686-3.26193-12.54212-.48114-.49582.50479-.9158 1.07889-1.2477 1.70436-.96226 1.96042-1.4752 4.11167-1.50048 6.29553-.02528 2.18386-.61977 3.10699-1.57388 6.65434-.95412 3.54735 14.5319 2.06317 14.5319 2.06317zm-43.71804-6.10796l9.09264-2.84604c2.55246-1.90823 1.85114-4.21605.6687-5.92856-.82527-1.12047-2.10232-1.82424-3.49027-1.92454-.3523-.04648-.69398-.15168-1.0112-.30988-.23241-.10846-.45912-.2316-.67685-.36697-2.44645-1.47602-2.25889-4.8929-2.25889-4.8929s-9.73687-3.26193-12.54213-.48113c-.37593.37512-.71028.79102-.99489 1.23953-1.14004 2.07214-1.74513 4.39545-1.76144 6.76035-.0163 2.3649-.62792 3.11515-1.57388 6.65434-.94596 3.5392 14.54821 2.0958 14.54821 2.0958z" fill="#2d293d" fill-rule="nonzero"/>
|
37 |
+
<path d="M22.55046 376.4213c.6483 1.23055 1.19305 2.5125 1.63096 3.83276l-.39959 9.89996c2.3486 4.24051 15.44525 3.3598 17.28824 1.1743 1.843-2.1855 3.94694-8.0162 1.98163-9.09264-1.96532-1.07643-3.40872-6.16505-3.40872-6.16505s2.1121.58715 5.65945-3.26193 2.87865-12.82754 2.32413-14.98042c-.55453-2.15287.36696-9.2802.36696-9.2802s.06524-5.02337 1.13352-6.61356c1.06829-1.5902 3.5555-10.78884 3.5555-10.78884s.11418-3.1396 1.9327-4.69718c1.81853-1.55757 3.1967-7.91834 3.1967-7.91834 1.0903-1.55676 1.6065-3.44623 1.45971-5.34141-.2528-3.14777 2.38121-6.44232 2.38121-6.44232l4.78689-13.37392 4.4036-10.00597 2.03056 5.97749s.09785 13.82243-.51376 16.68478c-.61161 2.86234-1.63096 10.4871-1.63096 10.4871s2.31597 5.11308 1.0275 9.33729c-1.28846 4.2242-1.27215 13.38207-1.27215 13.38207s-1.8593 18.89474-.91334 20.436c.94596 1.54126.67685 5.30064.67685 5.30064s-5.5616 10.83777-3.99587 12.41165c1.56573 1.57388.91335 5.70838.91335 5.70838s-3.50658-.13863-2.06318 1.4271c1.4434 1.56572 2.21812 9.45144 2.21812 9.45144l15.09459 2.34044a31.93975 31.93975 0 0 0 3.63705-6.27106c2.1855-4.55855-.21203-4.15081-2.20996-4.7298-1.99793-.579-.67685-1.78591 1.76144-3.1967 2.4383-1.41078 1.1906-4.85212 1.1906-4.85212s-3.40055-6.28737-2.12025-6.73589c1.28031-.44852 1.72883-9.10079 1.72883-9.10079s2.90312-10.19354 2.3812-12.97433c-.5219-2.7808 2.37306-9.32913 2.37306-9.32913l1.1743-7.86125c2.85827-4.37588 4.04316-9.63901 3.33532-14.81733l.47298-12.167s4.43623-23.3962 5.43112-35.33488c.61977-7.6166.92965-18.03032 1.06828-24.52972.08155-3.65337.11417-6.0672.11417-6.0672l-53.9605-7.73077c-.18757 2.70332-.6214 5.38381-1.29662 8.00804-.66054 2.9602-1.6799 6.77666-3.26193 11.53908-4.41992 13.64303-2.44645 24.01597-2.44645 24.01597l-.17125 17.45134s-5.2191 11.482-4.36284 15.53495a33.17357 33.17357 0 0 1 .71763 7.33934c-.03425 2.4652-11.61248 25.01902-10.76438 32.43176.8481 7.41274-4.24866 18.92736-4.24866 18.92736s-1.57388 8.25268-.40774 10.5605z" fill="#575988" fill-rule="nonzero"/>
|
38 |
+
<path d="M56.04234 312.2754l-16.40752-2.85418s8.97847 9.91627 16.40752 2.85419z" fill-opacity=".05" fill-rule="nonzero"/>
|
39 |
+
<path d="M76.29078 318.39153s10.3811 2.78895 10.53604 6.99684c.15494 4.2079-10.53604-6.99684-10.53604-6.99684z" fill-opacity=".1" fill-rule="nonzero"/>
|
40 |
+
<path d="M46.34625 117.0488l.76655 4.61563-.13048 2.0387-.09785 1.5005 5.21093.74209.62792-1.06013c1.15799-1.91639 3.5555-5.82255 4.3139-6.4097.9949-.7747 3.21301-13.43916 1.10906-12.77046-1.28275.442-2.35756 1.34228-3.01728 2.528-.65973 1.1857-10.32402.78286-8.78275 8.81537z" fill="#ffcdd3" fill-rule="nonzero"/>
|
41 |
+
<path d="M46.88447 125.20363l5.21093.74209.62792-1.06013c-1.3806-1.6856-3.77487-2.17816-5.70838-1.1743l-.13047 1.49234z" fill-opacity=".1" fill-rule="nonzero"/>
|
42 |
+
<path d="M45.46553 127.63376l6.8419 1.86746.1794-1.0275.49745-2.74819c-.88806-1.27541-2.34778-2.03789-3.90209-2.03789-.98265 0-1.94166.30418-2.7441.87175l-.39143 1.39448-.48113 1.6799z" fill="#dce6f2" fill-rule="nonzero"/>
|
43 |
+
<path d="M157.62705 121.86015l7.20886 4.2405s.30173-.57899.72578-1.37c.7584-1.4434 1.88377-3.6126 2.2018-4.39546.48114-1.19876 3.6126-2.62585 3.6126-2.62585 7.99988-7.07024-.94596-13.74904-.94596-13.74904-4.48516-9.97336-10.40557 2.91942-10.40557 2.91942s-1.01935 6.87453-.5056 7.33935c.51376.46483.44037 2.37306.44037 2.37306a27.72058 27.72058 0 0 0-1.94085 4.14265c-.2528.67685-.39143 1.12537-.39143 1.12537z" fill="#ffcdd3" fill-rule="nonzero"/>
|
44 |
+
<path d="M156.7871 124.03749l8.15483 4.39545.22833-1.77775.1631-1.22323s-4.63194-4.28944-6.05088-4.19158a7.70816 7.70816 0 0 1-2.16919-.0897l-.14679 1.48417-.1794 1.40264z" fill="#dce6f2" fill-rule="nonzero"/>
|
45 |
+
<path d="M65.24099 148.23286s35.93833 5.46374 29.27583 3.01729c-4.6401-1.71251-6.39338-4.77058-6.65434-8.09775-.0897-2.855.46809-5.69288 1.63097-8.30161.94433-2.24258 2.11047-4.38404 3.48211-6.39339 1.37164-2.00935-27.0088-16.23626-22.01804-2.22627a22.1168 22.1168 0 0 1 1.31293 6.59726 18.6016 18.6016 0 0 1-.96227 6.5891c-1.17185 3.44053-3.27172 6.49206-6.0672 8.81537z" fill="#ffcdd3" fill-rule="nonzero"/>
|
46 |
+
<path d="M70.99014 126.23113a22.1168 22.1168 0 0 1 1.31293 6.59726c2.51169 2.2752 5.36588 2.24258 9.0274 2.38121 2.81341.11417 5.89594.91334 8.15482-.35881.94433-2.24258 2.11047-4.38404 3.48212-6.39339 1.37164-2.00935-26.96802-16.23626-21.97727-2.22627z" fill-opacity=".1" fill-rule="nonzero"/>
|
47 |
+
<circle cx="183.01" cy="496.73" r="18.31" fill="#ffcdd3" transform="translate(-66.88348 -283.81029) scale(.81548)"/>
|
48 |
+
<path d="M65.24099 148.23286s35.93833 5.46374 29.27583 3.01729c-4.6401-1.71251-6.39338-4.77058-6.65434-8.09775-1.72067-2.01424-5.27617-3.5555-7.56768-4.39545-2.086-.7853-4.36446-.9109-6.52386-.35881a8.9808 8.9808 0 0 0-2.44645 1.01935c-1.17593 3.44297-3.28232 6.4945-6.0835 8.81537zm-19.77546-20.5991l6.8419 1.86746.1794-1.0275c-1.42465-2.12353-4.04153-3.13472-6.52386-2.51985l-.49744 1.6799zm111.32157-3.59627l8.15483 4.39545.22833-1.77775c-2.64298-1.52822-5.39605-2.85827-8.23638-3.97956l-.14678 1.36186z" fill-opacity=".1" fill-rule="nonzero"/>
|
49 |
+
<path d="M33.65733 234.80453s45.71597 9.67163 50.71489 8.3587c4.9989-1.31293 30.29519 1.28846 30.29519 1.28846 11.11503 8.0896 6.78481-3.3761 6.78481-3.3761s1.23138-5.85516 0-10.67467c-.78857-3.53022-1.28275-7.11998-1.47602-10.73175-.19327-3.61178.54637-7.51876-.76655-9.32097-1.31293-1.80222-2.44645-14.41774-2.44645-14.41774s-.9215-8.57073-.72578-10.44634c.19571-1.8756-.09786-7.1681-.09786-7.1681l-1.29662-8.83983c9.45145-.88887 38.71913-17.34532 38.71913-17.34532 1.63097-5.83886 12.79493-19.22909 12.79493-19.22909.2006-1.1539.53985-2.27927 1.0112-3.35163.81548-1.97347-10.29955-6.41785-10.29955-6.41785s-8.81537 9.95705-10.64206 12.64814c-1.82668 2.6911-8.08143 7.6003-8.08143 7.6003-.93128-.12966-1.8805-.04322-2.77264.2528h-.1468a22.42072 22.42072 0 0 0-5.70837 3.00913c-2.82402-.17614-5.6089.75106-7.7634 2.58508-2.1545 1.83402-5.11308-.94596-6.01826-.10601-.90519.83995-5.26802-.20387-5.26802-.20387s-4.07742-9.4433-7.02131-6.85821c-2.9439 2.58508-15.22507 1.98978-15.22507 1.98978-1.54126-2.23443-5.45558-3.93879-7.90202-4.83582-2.0852-.7902-4.36447-.91497-6.52387-.35881-.93699.23078-1.8275.61977-2.634 1.14983l-7.69817 6.98053s-2.03055-2.83788-1.75328-3.45764c.27726-.61977-2.44645-1.22323-2.44645-1.22323s-3.59628-1.27215-4.95814-1.6962c-1.36186-.42405-2.6911 1.0112-2.80526 1.14167.62221-1.7598.89948-3.62319.81548-5.4882-.28542-2.39752 1.67174-4.46069 1.67174-4.46069-3.9714-10.95193-14.22202-2.29966-14.22202-2.29966s-1.36186 5.84701-.44036 8.15483c.9215 2.30782-1.27215 6.98053-1.07644 8.24453.19572 1.264-.62792 3.36795-.71762 5.74916-.0897 2.3812.98673 6.94791 1.63096 8.9703.64423 2.0224 6.52387 6.78483 6.52387 6.78483s.106 7.15994 2.57692 11.41676.30173 18.34836.30173 18.34836-2.93574 10.93563-6.20582 14.32804c-3.2701 3.3924-8.7012 23.3065-8.7012 23.3065z" fill="#656691" fill-rule="nonzero"/>
|
50 |
+
<path d="M102.54933 188.85207c.12232-.13864-29.52048 34.47046-50.6741 12.9988 0 0 34.49492 6.03457 50.6741-12.9988z" fill-opacity=".1" fill-rule="nonzero"/>
|
51 |
+
<path d="M110.25564 170.95222c-1.8854 3.93144-4.23072 7.62395-6.98869 11.00086-3.0132 3.7341-6.61682 6.95118-10.66651 9.52484-4.04969 2.57367 17.28008-18.24235 17.6552-20.5257z" fill-opacity=".1" fill-rule="nonzero"/>
|
52 |
+
<path d="M85.8727 134.94865c-.1533.79101-.59856 1.4964-1.24769 1.97347-.44606.19571-.9329.28215-1.41894.2528-4.55854.11416-9.30466.13047-13.43915-1.78591a5.0721 5.0721 0 0 1-1.99794-1.43525c-.71762-.94596-.81548-2.19365-1.06828-3.35164-.5056-2.25073-1.68805-4.28128-2.51169-6.44231-1.38713-3.63787-1.74513-7.58889-1.03566-11.41676a7.63626 7.63626 0 0 1 1.264-3.26193c1.27215-1.67174 3.49842-2.28336 5.1457-3.59628 1.64727-1.31293 2.75633-3.36795 4.66456-4.33022 1.71251-.86441 3.75937-.67685 5.64314-.27726 3.6974.7747 7.21295 2.25073 10.35663 4.34652 1.05198.70947 2.20996 1.5168 3.4658 1.32924 1.07644-.29847 2.01588-.96146 2.65848-1.87561.80733 2.07377 1.10416 4.31146.86441 6.52386a2.81735 2.81735 0 0 0 0 .97858 2.98752 2.98752 0 0 0 .65239 1.06828c1.06828 1.34555 1.6962 3.43319.53822 4.70534-.5056.55453-1.264.81548-1.7533 1.41078-.88071 1.0112-.66053 2.528-.69315 3.87355.02935.46727-.10275.93128-.37512 1.31293-.51376.43546-1.21834.5741-1.8593.36696-.62874-.21447-1.29418-.30336-1.95716-.26095-.70703.20305-1.32598.64015-1.7533 1.23953-2.20995 2.56062-3.1233 5.4719-4.14265 8.65228z" fill="#2d293d" fill-rule="nonzero"/>
|
53 |
+
<path d="M88.18052 144.09836s-18.7561 1.7533-20.30552-1.1172" fill-opacity=".1" fill-rule="nonzero"/>
|
54 |
+
</g>
|
55 |
+
<g>
|
56 |
+
<path fill="#535461" d="M526.25682 301.60485h2.1798v49.02164h-2.1798z"/>
|
57 |
+
<path d="M542.11714 350.47574l-.13758 2.20989-.18918 3.11705-.08169 1.28982-.19347 3.11706-.08169 1.28981-.19347 3.11276-2.19699 35.44847c-.19605 3.148-2.83501 5.6352-5.98905 5.6451h-11.41487c-3.14974-.00903-5.78655-2.48892-5.98905-5.6322l-2.2013-35.44847-.18916-3.11276-.0817-1.28981-.19776-3.11706-.0774-1.28982-.19347-3.11706-.13758-2.20988a3.07748 3.07748 0 0 1-.00559-.18917c0-1.70514 1.4029-3.10846 3.10846-3.10846h23.34827c1.7004 0 3.09986 1.39945 3.09986 3.09986 0 .06148-.00172.12339-.0056.18487z" fill="#3f3d56" fill-rule="nonzero"/>
|
58 |
+
<path d="M541.98399 352.6859l-.19347 3.11705h-28.8876l-.18917-3.11705h29.27024zm-.27086 4.41547l-.19348 3.12135h-28.34157l-.19347-3.12135h28.72852zm-.27946 4.41977l-.18918 3.11706h-27.79125l-.19347-3.11706h28.1739z" fill="#9d9cb5" fill-rule="nonzero"/>
|
59 |
+
<path d="M509.38586 319.98049c12.6789 9.1706 17.95856 23.52196 17.95856 23.52196s-15.28004-.52452-27.94604-9.69942-17.99295-23.52197-17.99295-23.52197 15.29723.52453 27.98043 9.69943z" fill="#16bd83" fill-rule="nonzero"/>
|
60 |
+
<path d="M481.40543 310.28106s15.86045 8.80515 20.94663 16.09262c5.08618 7.28747 24.97516 17.12877 24.97516 17.12877" fill="none" stroke="#fff" stroke-width=".85988" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="10"/>
|
61 |
+
<path d="M517.5676 301.4974c6.90482 4.9916 9.77682 12.8036 9.77682 12.8036s-8.31502-.28807-15.21985-5.27966c-6.90482-4.9916-9.77251-12.80358-9.77251-12.80358s8.31502.28376 15.21554 5.27965z" fill="#16bd83" fill-rule="nonzero"/>
|
62 |
+
<path d="M502.35206 296.21776s8.62888 4.79382 11.40198 8.75785c2.77311 3.96404 13.59038 9.32538 13.59038 9.32538" fill="none" stroke="#fff" stroke-width=".85988" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="10"/>
|
63 |
+
<path d="M537.3749 313.90115c-7.92808 8.71486-9.60484 20.09965-9.60484 20.09965s11.17841-2.74301 19.10649-11.45788c7.92807-8.71486 9.60483-20.09535 9.60483-20.09535s-11.17841 2.73871-19.10649 11.45358z" fill="#16bd83" fill-rule="nonzero"/>
|
64 |
+
<path d="M556.48138 302.44757s-10.31853 8.92984-12.95406 15.08656c-2.63552 6.15673-15.75726 16.46667-15.75726 16.46667" fill="none" stroke="#fff" stroke-width=".85988" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="10"/>
|
65 |
+
</g>
|
66 |
+
</svg>
|
assets/css/images/home-smart-targeting.svg
ADDED
@@ -0,0 +1,126 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="utf-8"?>
|
2 |
+
<svg viewBox="0 0 600 500" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:serif="http://www.serif.com/" fill-rule="evenodd" clip-rule="evenodd" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="1.5">
|
3 |
+
<path d="M272.91048 457.96044c43.8601-24.27188 93.96317-32.02863 142.92805-21.62559 69.38399 14.75093 156.58632 8.96893 173.47704-104.83287 28.84739-194.3571-92.03964-245.65527-92.03964-245.65527s-80.39026-6.73239-127.92672-32.3644C301.82617 17.06027 224.6456 12.42216 156.7811 43.23861c-43.39914 19.69067-79.13826 47.10964-85.24464 84.75523C54.4636 233.27629 82.50289 291.28408 30.04947 325.65169c-52.45343 34.3676-7.62587 128.72345 32.58634 125.45685 40.2122-3.2666 131.0795-39.10247 166.48855 2.40727 12.57699 14.72247 28.48887 12.91275 43.78612 4.44463z" fill="#1d58bf" fill-opacity=".1" fill-rule="nonzero"/>
|
4 |
+
<path fill="url(#_Linear1)" d="M155.01 231.1h435.45v108.25H155.01z" transform="matrix(.74209 0 0 .74209 49.55684 49.0428)"/>
|
5 |
+
<path fill="#fff" d="M166.39116 222.35002h320.43358v76.72447H166.39116z"/>
|
6 |
+
<path d="M448.34178 241.46528c0-2.27186-1.84483-4.11653-4.1167-4.11653H252.97083c-2.27242 0-4.1167 1.84467-4.1167 4.11653v8.2335c0 2.27229 1.84428 4.11695 4.1167 4.11695h191.25423c2.27188 0 4.11671-1.84466 4.11671-4.11696v-8.23349z" fill="#3f3d56"/>
|
7 |
+
<path d="M448.34178 260.23417c0-1.51458-1.23007-2.74435-2.74447-2.74435H251.5986c-1.51495 0-2.74448 1.22977-2.74448 2.74435v5.48898c0 1.51487 1.22953 2.74464 2.74448 2.74464h193.9987c1.5144 0 2.74447-1.22977 2.74447-2.74464v-5.48898z" fill="#16bd83"/>
|
8 |
+
<path d="M309.39697 275.25996c0-1.51457-1.2299-2.74435-2.7445-2.74435H251.5985c-1.51476 0-2.7445 1.22978-2.7445 2.74435v5.489c0 1.51485 1.22974 2.74463 2.7445 2.74463h55.05397c1.5146 0 2.7445-1.22978 2.7445-2.74464v-5.48899z" fill="#9795b1"/>
|
9 |
+
<g fill-rule="nonzero">
|
10 |
+
<path d="M325.6426 281.2279c.59162 0 .87847-.11696 1.16532-.26893l-.30477-.94122c-.19721.09874-.41235.15267-.55578.15267-.26892 0-.38545-.17998-.38545-.55605v-1.86494h1.19222v-.96784h-1.19222v-1.5596l-1.16532.12535v1.43425h-.51992v.96784h.51992v2.02601c0 .98604.49302 1.45246 1.246 1.45246zM329.68517 276.71016c-.51963 0-.9948.25071-1.32647.71712h-.00896v-.64569h-1.1743v4.37487h1.1743v-2.03511c0-.6457.39442-1.13872 1.12043-1.13872.06303 0 .18839 0 .30464.0091v-1.27317c-.0175-.0084-.05322-.0084-.08964-.0084zM332.93954 276.78159v2.12476c0 .84248-.4573 1.27247-.96854 1.27247-.54695 0-.78855-.26892-.78855-1.07568v-2.32155h-1.16533v2.63529c0 1.3362.6632 1.81102 1.60442 1.81102.49303 0 .96854-.2066 1.29979-.60998h.0182v.53854h1.17444v-4.37487h-1.17443zM336.22892 281.2279c1.14782 0 1.70317-.58267 1.70317-1.36282 0-.85999-.55535-1.06658-1.50568-1.41604-.4307-.16107-.6632-.28713-.6632-.4664 0-.23321.24161-.33126.43-.33126.32284 0 .70801.14357 1.04907.46571l.56445-.86069c-.49302-.38517-.98604-.54624-1.59532-.54624-.8964 0-1.5778.51963-1.5778 1.30889 0 .84248.62748 1.18283 1.3446 1.42514.57356.17928.79766.27803.79766.48392 0 .215-.19679.35856-.53784.35856-.47482 0-.85159-.17018-1.21015-.51123l-.57356.81587c.48392.41248 1.07569.63659 1.7746.63659zM339.7431 281.2279c.59177 0 .8782-.11696 1.16533-.26893l-.30464-.94122c-.19748.09874-.41248.15267-.55605.15267-.26892 0-.38517-.17998-.38517-.55605v-1.86494h1.19194v-.96784h-1.19194v-1.5596l-1.16533.12535v1.43425h-.52033v.96784h.52033v2.02601c0 .98604.49303 1.45246 1.24587 1.45246z" fill="#1d58bf"/>
|
11 |
+
<path d="M343.79513 276.71016c-.53784 0-.99514.19679-1.3271.57356h-.0175v-.50213h-1.17443v6.14947h1.17443v-2.26762h.0175c.30464.35786.73534.56446 1.29069.56446 1.21925 0 2.09744-.8964 2.09744-2.25012 0-1.3264-.8873-2.26762-2.06103-2.26762zm-.25141 3.46866c-.63659 0-1.13871-.47481-1.13871-1.19194 0-.69891.4664-1.22835 1.13871-1.22835.62748 0 1.1205.47551 1.1205 1.22835 0 .70802-.4573 1.19194-1.1205 1.19194zM349.20928 276.78159v2.12476c0 .84248-.45731 1.27247-.96854 1.27247-.54695 0-.78856-.26892-.78856-1.07568v-2.32155h-1.16532v2.63529c0 1.3362.6632 1.81102 1.60442 1.81102.49302 0 .96854-.2066 1.29979-.60998h.0182v.53854h1.17444v-4.37487h-1.17443zM351.13654 274.55879h1.1743v6.59753h-1.1743zM354.51557 281.2279c1.14782 0 1.70317-.58267 1.70317-1.36282 0-.85999-.55535-1.06658-1.50568-1.41604-.43-.16107-.6632-.28713-.6632-.4664 0-.23321.2416-.33126.43-.33126.32284 0 .70801.14357 1.04907.46571l.56445-.86069c-.49302-.38517-.98604-.54624-1.59532-.54624-.8964 0-1.57781.51963-1.57781 1.30889 0 .84248.62748 1.18283 1.3446 1.42514.57356.17928.79767.27803.79767.48392 0 .215-.1968.35856-.53785.35856-.47481 0-.85158-.17018-1.21014-.51123l-.57356.81587c.48392.41248 1.07568.63659 1.7746.63659zM360.70986 278.92386c0-1.28158-.86069-2.2137-2.14226-2.2137-1.24587 0-2.16958.92301-2.16958 2.24941 0 1.37192.96853 2.26833 2.25011 2.26833.8782 0 1.51479-.34946 1.89156-.82498l-.76195-.70802c-.2423.29554-.58266.50213-1.04907.49303-.56446 0-.97694-.32285-1.1205-.84248h3.07508c.02661-.07214.02661-.27803.02661-.4216zm-2.10655-1.18284c.51123 0 .82497.30464.94123.76195h-1.92727c.13446-.50213.51123-.76195.98604-.76195z" fill="#00aded"/>
|
12 |
+
</g>
|
13 |
+
<path d="M319.7257 275.30226c-.38986-.10527-.77052-.2453-1.1363-.42481-.31036-.15228-.60971-.32576-.90303-.50838a4.2806 4.2806 0 0 1-.01709.01057c-.77207.47911-1.59295.8661-2.50487 1.03732-.32905.06177-.66186.10054-.99532.12897l-.01064.0009c-.08214 1.83573.04033 3.72786 1.01522 5.302.59422.95948 1.51362 1.67796 2.48731 2.27518l.02539.01547c.39846-.2435.78982-.50318 1.15399-.79322h.82667c-.58592.55146-1.2694 1.0136-1.96423 1.42616-.03256-.02228-.03286 0-.03286 0-.87644-.52039-1.7297-1.09562-2.39376-1.85939-.4511-.51878-.80828-1.11492-1.0657-1.76017-.64685-1.6215-.68783-3.42665-.57505-5.12152.71688-.04272 1.44492-.1116 2.13115-.33287.67679-.21823 1.30011-.58061 1.90217-.97149l.01762-.01147c.0117.00765.02342.01524.03519.02289.75934.49189 1.56971.92602 2.4621 1.11205a6.70182 6.70182 0 0 0 .15359.0301l-.61155.4217zm-.18137 6.3196h-1.13481c-.18968-.00807-.20246-.10413-.20646-.19786-.00472-.11147.06756-.20944.20646-.21536h.97721l.30892-1.12615s.05962-.13943.17946-.15096c.09582-.00926.1782.03118.21793.14708l.46674 1.57933.28591-.89854s.09248-.1638.23932-.13955c.08005.02049.08328.0242.1297.088l.33232.5008h.79574c.00095.00011.14767.01994.1917.12957.05096.12676-.0297.27677-.1917.28364h-.90661c-.09857-.00406-.1267-.0297-.17211-.09236l-.15532-.234-.35934 1.1295s-.06332.13453-.18149.14337c-.09444.00705-.1745-.03333-.21356-.1475l-.45205-1.52962-.15873.5787s-.0721.14635-.19923.1519zm2.22392-6.01941c.04015.9777.0101 1.95688-.15741 2.92341-.07635.44076-.24278 1.04897-.38855 1.47276l-.52451-.1705c.4453-1.17472.553-2.4526.53371-3.70331l.53676-.52236z" fill="#00aded" fill-rule="nonzero"/>
|
14 |
+
<path d="M317.47913 278.11795c.0313-.03567.03942-.0591.08607-.12694.26902-.39144 1.0659-1.44674 2.07848-2.25845.44062-.35324.91685-.67436 1.33812-.88485.70208-.35082.92816-.39358 1.25422-.46955.06193-.01441.2862-.05444.3234.03392.0359.0853-.10398.1752-.15647.21644-.05901.04636-1.40842 1.05544-2.54368 2.55401-.98784 1.3039-1.63428 3.0147-1.63428 3.0147-.01987.038-.24452.43947-.54593.45902-.27857.01812-.63633-.34423-.63633-.34423-.06877-.06417-.40417-.4622-.68325-.95452-.35593-.62769-.66242-1.37175-.66242-1.37175s-.31816-.62589.28165-.9701c.5914-.33943.85484.00518.9832.20862.10968.17387.33068.59624.4375.80282.0372.07196.06126.11187.07972.09086z" fill="#1d58bf" fill-rule="nonzero"/>
|
15 |
+
<g>
|
16 |
+
<circle cx="88.506" cy="368.331" r="25.699" fill="#16bd83" transform="matrix(1.18365 0 0 1.18365 100.94546 -175.28964)"/>
|
17 |
+
<use xlink:href="#_Image2" x="181.346" y="244.303" width="49.842" height="52.476" transform="matrix(.99684 0 0 .99012 -.00022 -.0002)"/>
|
18 |
+
</g>
|
19 |
+
<g>
|
20 |
+
<path d="M170.49794 160.88521a7.8653 7.8653 0 0 1-2.90097 1.10064c-3.78148.11007-6.89472-10.12589-6.89472-10.12589s1.07705-1.08491 2.7909-2.61008c5.06295-4.51263 15.72343-12.83032 20.67631-8.17619 5.57396 5.22018-7.16988 16.28947-13.67152 19.81152zM113.06026 404.85777l-13.93881 15.02374s-12.90108.1415-10.37747-6.97334a26.13126 26.13126 0 0 0 1.0692-4.71703c.64073-5.05273.94498-10.1424.91196-15.236 0-3.34123-.05504-5.68402-.05504-5.68402s20.31467-8.89946 18.23918.3695c-.25944 1.1596-.39938 2.342-.41667 3.5299-.00393 3.434.7901 6.82319 2.3192 9.8979.62344 1.33414 1.3766 2.60302 2.24845 3.78935z" fill="#ecb4b6" fill-rule="nonzero"/>
|
21 |
+
<path d="M145.41122 427.53095c-4.72961 4.02992-10.77684 6.19032-16.98917 6.06925-11.49382-.17296-33.0192-.50315-37.97994-.71542-6.66673-.28302-4.45759-5.98276-4.23746-9.91362v-.39309c.07076-3.93085.88837-12.45295 2.19342-13.78944 1.30504-1.3365 5.88842 5.92773 5.88842 5.92773s8.89946 2.60223 11.34446-5.18873c2.44499-7.79096 7.42931-8.51424 7.42931-8.51424 2.26418-.98271 2.35852 4.88999 2.35852 4.88999l18.86811 9.70922 11.05357 1.7453c.35378.1651.68397.33019.98272.48742 4.95287 2.75946 2.74373 6.51736-.91196 9.68563z" fill="#6c63ff" fill-rule="nonzero"/>
|
22 |
+
<circle cx="169.35" cy="649.12" r="1.04" fill="#fff" fill-opacity=".25" transform="translate(-22.52281 -98.55965) scale(.78617)"/>
|
23 |
+
<circle cx="179.06" cy="653.93" r="1.04" fill="#fff" fill-opacity=".25" transform="translate(-22.52281 -98.55965) scale(.78617)"/>
|
24 |
+
<circle cx="184.06" cy="656.17" r="1.04" fill="#fff" fill-opacity=".25" transform="translate(-22.52281 -98.55965) scale(.78617)"/>
|
25 |
+
<circle cx="194.44" cy="660.15" r="1.04" fill="#fff" fill-opacity=".25" transform="translate(-22.52281 -98.55965) scale(.78617)"/>
|
26 |
+
<circle cx="189.16" cy="658.45" r="1.04" fill="#fff" fill-opacity=".25" transform="translate(-22.52281 -98.55965) scale(.78617)"/>
|
27 |
+
<path d="M145.41122 427.53095c-4.72961 4.02992-10.77684 6.19032-16.98917 6.06925-11.49382-.17296-33.0192-.50315-37.97994-.71542-6.66673-.28302-4.45759-5.98276-4.23746-9.91362l41.9108 2.5865s17.16212-2.60222 18.18414-7.7202c4.97646 2.76732 2.76732 6.52522-.88837 9.6935z" fill="#6c63ff" fill-rule="nonzero"/>
|
28 |
+
<path d="M145.41122 427.358c-4.72647 4.0362-10.77527 6.19738-16.98917 6.06924-11.49382-.1651-33.0192-.49529-37.97207-.70756-6.6746-.29088-4.46546-5.99062-4.24533-9.92148l41.9108 2.5865s17.16212-2.60222 18.18414-7.71234c4.97646 2.76733 2.76732 6.52523-.88837 9.68564z" fill="#fff" fill-opacity=".25" fill-rule="nonzero"/>
|
29 |
+
<path d="M67.3837 367.04293c-1.5464 1.25316-2.956 2.66512-4.206 4.21388-4.15886 4.83495-9.30042 12.06773-11.85547 15.72342l-1.57235 2.31135-5.57395-.85693s-6.00635-9.19034-5.92773-9.43406c.07861-.2437 4.71703-10.08657 4.71703-10.08657l1.80819-2.1148 5.69188-6.65888 2.57864-3.0189s19.38699 6.28938 14.33977 9.92149z" fill="#ecb4b6" fill-rule="nonzero"/>
|
30 |
+
<path d="M45.08789 398.65488s-3.71073 8.01109-5.71547 12.57874c-2.00473 4.56766-1.25787 7.93247-1.25787 7.93247a7.31259 7.31259 0 0 1-.6368 1.72172c-.91196 1.81605-3.0189 4.46545-7.59442 4.8035a2.65628 2.65628 0 0 1-.35377 0c-6.76108-.18082-8.90732-19.80365-8.90732-19.80365s1.02988-37.3746 2.956-39.74883c.26966-.26572.61164-.44654.98271-.51887 1.9678-.34199 3.97567-.39545 5.95918-.15724 6.11642.44026 13.97027 1.94185 13.97027 1.94185h1.4151c-4.97646 5.18873.36165 16.60394.36165 16.60394s2.35851.22799 4.2296 3.56135c1.87109 3.33337-5.40886 11.08502-5.40886 11.08502z" fill="#6c63ff" fill-rule="nonzero"/>
|
31 |
+
<circle cx="75.64" cy="618.27" r="1.04" fill="#fff" fill-opacity=".25" transform="translate(-22.52281 -98.55965) scale(.78617)"/>
|
32 |
+
<circle cx="75.13" cy="626.51" r="1.04" fill="#fff" fill-opacity=".25" transform="translate(-22.52281 -98.55965) scale(.78617)"/>
|
33 |
+
<path d="M36.94315 420.73843c-1.44734 2.87818-4.37347 4.73197-7.59441 4.81137h-.35378c-6.76107-.1651-8.91518-19.81938-8.91518-19.81938s1.03774-37.36672 2.96386-39.74096c.26573-.27202.60929-.45598.98272-.52674 1.96621-.33412 3.97016-.3868 5.95131-.15723-.11006 6.7139-.43239 27.9484.03931 30.05533.4717 2.10694 4.23747 19.7329 6.92617 25.37761z" fill="#6c63ff" fill-rule="nonzero"/>
|
34 |
+
<path d="M37.43058 420.87994c-1.44813 2.8766-4.37504 4.72725-7.59442 4.80351a2.65628 2.65628 0 0 1-.35377 0c-6.76894-.18082-8.91519-19.80366-8.91519-19.80366s1.03775-37.37458 2.96387-39.74882c.26494-.2673.60535-.44812.97485-.51887 1.96779-.34199 3.97567-.39466 5.95918-.15724-.11006 6.7139-.4324 27.9484 0 30.05533.4324 2.10694 4.26891 19.71718 6.96548 25.36975z" fill="#fff" fill-opacity=".25" fill-rule="nonzero"/>
|
35 |
+
<path d="M28.99496 425.5498c-6.76107-.1651-8.91518-19.81938-8.91518-19.81938s1.03774-37.36672 2.96386-39.74096c.26573-.27202.60929-.45598.98272-.52674 1.4151 2.1148 2.65726 6.78466 1.57234 17.05992-2.1148 19.4656.4324 20.68417.4324 20.68417s3.1211 16.53318 2.96386 22.343z" fill="#6c63ff" fill-rule="nonzero"/>
|
36 |
+
<path d="M28.93993 425.5498c-6.76108-.1651-8.91518-19.81938-8.91518-19.81938s1.03774-37.36672 2.96386-39.74096c.26573-.27202.60928-.45598.98272-.52674 1.4151 2.1148 2.65725 6.78466 1.57234 17.05992-2.1148 19.4656.4324 20.68417.4324 20.68417s3.11323 16.53318 2.96386 22.343z" fill-opacity=".1" fill-rule="nonzero"/>
|
37 |
+
<path d="M146.24456 157.20593s3.14468.22013 5.11797-1.11636c1.9733-1.3365 10.56615-5.00792 10.78627-7.4529 0 0 5.11798 12.4608 8.0111 12.90106 0 0-8.89947 7.01265-9.56771 9.23752-.66825 2.22486-18.01905 7.67303-18.01905 7.67303l3.67142-21.24235z" fill="#ff748e" fill-rule="nonzero"/>
|
38 |
+
<path d="M146.24456 157.20593s3.14468.22013 5.11797-1.11636c1.9733-1.3365 10.56615-5.00792 10.78627-7.4529 0 0 5.11798 12.4608 8.0111 12.90106 0 0-8.89947 7.01265-9.56771 9.23752-.66825 2.22486-18.01905 7.67303-18.01905 7.67303l3.67142-21.24235z" fill="#6c63ff" fill-rule="nonzero"/>
|
39 |
+
<path d="M99.12145 303.94481S88.24083 318.47326 84.2628 320.1085c-3.97803 1.63523-33.63241 37.96421-33.63241 37.96421s6.37585 11.71396 18.08194 13.64008c0 0 6.37585-2.52361 8.75009-8.1526 2.37423-5.62899 21.08511-21.50965 21.08511-21.50965l.5739-38.10573z" fill="#5e5a6b" fill-rule="nonzero"/>
|
40 |
+
<path d="M99.12145 303.94481S88.24083 318.47326 84.2628 320.1085c-3.97803 1.63523-33.63241 37.96421-33.63241 37.96421s6.37585 11.71396 18.08194 13.64008c0 0 6.37585-2.52361 8.75009-8.1526 2.37423-5.62899 21.08511-21.50965 21.08511-21.50965l.5739-38.10573z" fill-opacity=".1" fill-rule="nonzero"/>
|
41 |
+
<path d="M144.93165 194.20315l-.22799 4.10382-1.83178 34.46575s-1.48586 7.71234-.88837 22.5474c.59749 14.83505-8.30983 38.2551-8.30983 38.2551s-4.30036 15.8728-5.63685 23.13702c-1.3365 7.26422-5.5032 9.48909-5.5032 9.48909s1.03775 8.16045-1.92612 11.0064c-2.96387 2.84594-3.14469 7.56296-3.14469 7.56296s-4.5991 25.5034-6.0771 28.02701c-1.478 2.52361-1.3365 15.8728-1.3365 15.8728-9.63845 11.41521-23.72664 1.03775-23.72664 1.03775l.14937-35.73935s4.00161-32.92486 6.96548-37.52396c2.96386-4.5991 2.96386-17.20143 2.96386-17.20143l-1.3129-29.3635s-1.05347-3.14469-.14938-4.88999c.9041-1.7453-2.53933-6.6746-2.53933-6.6746-8.30197-10.08657-9.48909-32.77548-7.07554-37.2252 2.41354-4.44974 9.61487-22.2408 9.61487-22.2408l9.92149-5.78621 17.9247.5346 22.14645.60534z" fill="#5e5a6b" fill-rule="nonzero"/>
|
42 |
+
<path d="M142.57314 141.18376v9.82714l-6.46233-2.78305-6.43874-2.77518-14.01744-13.78945s-11.08502-7.20919-17.02061-13.77372c-3.3884-3.74218-5.09439-7.27995-2.10694-9.14317 1.44341-.9497 2.74767-2.09594 3.87583-3.40413a63.32041 63.32041 0 0 0 7.73592-11.40734l.27516-.50315c2.88525-5.29094 4.79565-9.81928 4.79565-9.81928s8.129 2.61009 13.36491 6.28937c.42453.29088.82548.59749 1.20284.9041 2.9167 2.39782 4.36325 5.16514 1.6824 7.9246a19.3845 19.3845 0 0 0-1.91825 2.28776c-.4316.603-.82862 1.23036-1.18712 1.87895-.1651.28302-.31447.5739-.45598.86479-1.79954 3.67928-2.42062 7.82634-1.77674 11.87119l18.45144 25.55057z" fill="#ecb4b6" fill-rule="nonzero"/>
|
43 |
+
<path d="M129.45194 98.69906a19.3845 19.3845 0 0 0-1.91826 2.28776c-.4316.60299-.82863 1.23035-1.18712 1.87894-.1651.28303-.31447.57391-.45598.8648-6.93717-.37816-13.3539-3.84203-17.47659-9.43406-.09434-.13365-.18868-.25944-.27516-.39309l.27516-.50315c2.88525-5.29093 4.79565-9.81928 4.79565-9.81928s8.129 2.61009 13.36491 6.28937c.42453.29089.82548.5975 1.20284.9041 2.90884 2.39782 4.3554 5.20445 1.67455 7.9246z" fill-opacity=".1" fill-rule="nonzero"/>
|
44 |
+
<path d="M150.56064 79.52434v.01572c0 12.80437-10.53706 23.34143-23.34143 23.34143h-.9041c-12.48911-.4544-22.51594-10.85231-22.51594-23.3493 0-12.81773 10.54727-23.365 23.365-23.365 12.81775 0 23.36502 10.54727 23.36502 23.365v.00787l.03145-.01572z" fill="#ecb4b6" fill-rule="nonzero"/>
|
45 |
+
<path d="M130.70981 137.2529s11.79257 6.64315 8.75009 1.03775l-15.34607-22.65746 17.42156 22.39802s11.12433 15.2753 5.03936 25.80214c0 0-.88837 8.7501.14937 10.82558 1.03775 2.0755-.29874 24.17477-.29874 24.17477s-4.15099-3.8601-6.37585-3.14468c-2.22487.71541-17.91685 2.07549-17.91685 2.07549l8.57713-60.51161z" fill="#464353" fill-rule="nonzero"/>
|
46 |
+
<path d="M136.99918 148.65238c-.69183 7.12272-3.62425 15.6055-3.62425 15.6055s-2.06763 21.06154-4.71703 27.29588c-2.6494 6.23434-1.48586 14.82719-2.96386 30.66068-.5346 5.71547-2.35852 9.63846-4.85854 12.28786-4.0881 4.35539-9.91362 5.26735-14.52059 5.00005l-1.09277-.08648c-7.4136-.739-14.52845-36.47835-14.52845-36.47835s-3.41198-30.40125-2.0755-34.55223c1.3365-4.15099-1.33648-27.8855-2.22486-33.07423-.56604-3.2862 1.13209-8.64789 2.45286-12.16207.78617-2.0126 1.39938-3.41199 1.39938-3.41199s2.52361-8.00322 6.6746-12.1542c1.15567-1.18713 2.7461-1.85459 4.40256-1.84751 1.9552.06997 3.85617.6651 5.5032 1.72172l.18868.12578s26.98926 27.5789 29.505 33.95474c.67612 1.80034.74687 4.34753.47957 7.11485z" fill-opacity=".1" fill-rule="nonzero"/>
|
47 |
+
<path d="M136.1108 148.18854c-.69182 7.13058-3.62424 15.61337-3.62424 15.61337s-2.0755 21.06153-4.71703 27.288c-2.64153 6.22648-1.48586 14.8272-2.97173 30.66069-.52673 5.7076-2.35851 9.6306-4.85854 12.28786-4.08023 4.35539-9.90576 5.25948-14.51272 4.99218-.37736 0-.73114-.04717-1.09278-.08647-7.4136-.739-14.52844-36.47836-14.52844-36.47836s-3.41199-30.40124-2.0755-34.55223c1.3365-4.15098-1.33649-27.87763-2.22486-33.07423-.56605-3.2862 1.13208-8.64788 2.45285-12.1542.78617-2.02047 1.39939-3.41199 1.39939-3.41199s2.5236-8.01109 6.6746-12.16207c1.1541-1.18476 2.74059-1.85222 4.3947-1.8475 1.95441.07468 3.85459.66903 5.50319 1.72171l.19654.12579s26.98927 27.58675 29.50501 33.9626c.65253 1.81606.74687 4.36325.47957 7.11485z" fill="#6c63ff" fill-rule="nonzero"/>
|
48 |
+
<path d="M105.8668 256.74309s-6.11642 5.45603-8.23122 5.22804c-2.1148-.228 8.23122-5.22804 8.23122-5.22804zM107.49417 261.97899s-6.4466 2.99531-8.37272 3.44343c-1.92612.44812 5.88842-4.21388 8.37272-3.44343zM110.54452 252.427s-6.10856 26.58046 6.17144 28.24714c12.28 1.66669 8.50638-30.25187 8.50638-30.25187l-14.67782 2.00474z" fill-opacity=".1" fill-rule="nonzero"/>
|
49 |
+
<path d="M110.0964 251.96316s-6.10855 26.58046 6.1793 28.255c12.28786 1.67455 8.49852-30.25973 8.49852-30.25973l-14.67782 2.00473z" fill="#ecb4b6" fill-rule="nonzero"/>
|
50 |
+
<path d="M120.60751 140.374c-.62894-15.975-22.98765-19.27692-28.19997-4.1667l-.11006.3066c-3.40412 10.22023-1.92612 36.16388-1.92612 36.16388s.44812 17.39797 2.0755 23.17633c1.62737 5.77836 6.22647 22.39803 6.22647 25.06315 0 2.66512 4.26105 12.90107 6.06138 13.64793 1.80033.74686 2.70443 6.52522 3.14469 7.56297.44025 1.03775 1.76888 14.52845 1.76888 14.52845s16.76117-1.03775 17.05992-3.70287c.29874-2.66512-3.71073-15.72343-3.71073-15.72343s-2.956-5.3381-3.33337-9.63846c-.37736-4.30036-2.74373-6.22648-2.30348-9.19034.44026-2.96387-1.33649-4.44973-1.33649-6.38371s-1.32863-7.11485-1.32863-7.11485-2.82235-2.22487-2.35851-4.88999c.46384-2.66512-4.00162-8.01109-2.8145-9.9372 1.18712-1.92613 1.478-6.6746 1.478-6.6746s1.47015-21.38386 2.4843-27.16222c1.01417-5.77836 7.07555-15.12594 7.07555-15.12594s.0629-.2673.04717-.739z" fill-opacity=".1" fill-rule="nonzero"/>
|
51 |
+
<path d="M119.91568 234.07777c-4.08023 4.35538-9.90576 5.25948-14.51272 4.99218-.52674-2.02046-1.30505-4.50476-2.445-4.97646-1.80033-.739-6.06138-11.0064-6.06138-13.64007 0-2.63368-4.5991-19.28479-6.22648-25.06315-1.62737-5.77836-2.07549-23.15274-2.07549-23.15274s-1.48586-25.94366 1.92612-36.16389c.03931-.1022.07076-.2044.1022-.31447 5.22018-15.1102 27.57103-11.79257 28.20783 4.17457v.73114s-6.08496 9.33972-7.07554 15.12594c-.99058 5.78622-2.52361 27.13864-2.52361 27.13864s-.29875 4.71702-1.48586 6.6746c-1.18712 1.95756 3.2626 7.27208 2.82235 9.9372-.44025 2.66512 2.35852 4.89784 2.35852 4.89784s1.33649 5.18087 1.33649 7.11486c0 1.93398 1.77674 3.41198 1.33649 6.37585-.44026 2.96386 1.92612 4.88998 2.30348 9.1982a24.11451 24.11451 0 0 0 2.0126 6.94976z" fill-opacity=".1" fill-rule="nonzero"/>
|
52 |
+
<path d="M119.71914 139.93374c-.6368-15.975-22.98765-19.28478-28.20783-4.1667 0 .1022-.0629.2044-.1022.3066-3.41199 10.22023-1.92612 36.16389-1.92612 36.16389s.44811 17.3901 2.07549 23.17633c1.62737 5.78622 6.20289 22.36657 6.20289 25.03956 0 2.67298 4.26105 12.90107 6.06138 13.64007 1.80033.739 2.70443 6.52522 3.14469 7.56297.44025 1.03774 1.80033 14.5363 1.80033 14.5363s16.76117-1.03774 17.05206-3.71072c.29088-2.67299-3.70287-15.72343-3.70287-15.72343s-2.956-5.3381-3.33337-9.63846c-.37736-4.30036-2.7516-6.23434-2.30348-9.1982.44812-2.96387-1.3365-4.44974-1.3365-6.37586s-1.32862-7.1227-1.32862-7.1227-2.82236-2.22487-2.35852-4.89c.46385-2.66512-4.00947-8.01108-2.82235-9.9372 1.18712-1.92612 1.48586-6.6746 1.48586-6.6746s1.48587-21.35241 2.52361-27.13863c1.03775-5.78622 7.07555-15.12594 7.07555-15.12594s.05503-.25157 0-.72328z" fill="#6c63ff" fill-rule="nonzero"/>
|
53 |
+
<path d="M83.71249 106.19913c.20047.22956.3522.49686.44812.78617.32783-1.02595.16195-2.14782-.44812-3.03462-.39309-.44812-.97485-.72328-1.32863-1.20284 0-.03931-.04717-.08648-.07862-.12579-.39702.74293-.36636 1.64389.07862 2.35852.35378.51887.93554.78617 1.32863 1.21856zM95.03336 77.39381c0-.8412.0393-1.6824 0-2.51575-.14938-3.02676-.71542-6.13213-.8412-9.16675-.18083 3.71859.65251 7.618.8412 11.39162v.29088z" fill-rule="nonzero"/>
|
54 |
+
<path d="M173.73697 154.53295l.45598.31447c-.82784-.5692-1.0409-1.71936-.4717-2.5472l20.61341-29.92168c.57233-.82941 1.72486-1.04168 2.55506-.4717l-.46384-.31447c.80897.54796 1.29482 1.46385 1.29482 2.44106 0 .58963-.17767 1.16668-.50865 1.65489l-19.35554 28.0899c-.54482.80661-1.45678 1.2909-2.43006 1.2909-.60456 0-1.19498-.1879-1.68948-.53617z" fill="#464353" fill-rule="nonzero"/>
|
55 |
+
<path d="M196.52585 121.6438l.47911.33001-22.69098 32.94175-.45968-.31663c-.6183-.4259-.77646-1.28423-.35056-1.90254l21.139-30.68866c.42055-.61054 1.26544-.77413 1.88311-.36394z" fill="#9f9eff" fill-rule="nonzero"/>
|
56 |
+
<path d="M192.32025 126.13702c.05378-.07735.03471-.18335-.04265-.23713l-.0232-.01613c-.07736-.05378-.18336-.03471-.23714.04265l-1.6652 2.39557c-.05378.07735-.03471.18335.04265.23713l.0232.01613c.07737.05378.18336.03471.23714-.04265l1.6652-2.39557z" fill="#464353"/>
|
57 |
+
<path d="M153.4852 75.79788c-.3302-1.57234-1.63524-2.77518-2.53148-4.1274-2.24845-3.3884-1.89467-7.8617-.8412-11.79257a8.41365 8.41365 0 0 0 .4717-3.34122c-.30031-1.45206-1.20048-2.7123-2.47644-3.46702-2.7516-1.81606-6.28937-1.83964-9.38688-2.97959-4.4969-1.66668-8.56927-5.7705-13.26271-4.77206-2.56292.54246-4.53621 2.52361-6.75322 3.93086-2.44577 1.54482-5.26105 2.40804-8.1526 2.50002-2.42926.07076-4.88998-.40094-7.27994 0-.43003.07312-.85142.18868-1.25787.34592-2.02282-.69734-4.1502-1.0409-6.28937-1.01416-2.10616-.04796-4.18008.52988-5.95918 1.65882-3.23117 2.2799-4.0881 6.69032-4.04092 10.64476.04717 3.95444.71541 8.01895-.4953 11.79257-1.50158 4.67772-5.7469 8.2548-6.59597 13.09761-.58963 3.2862.50315 6.6117 1.47014 9.81142 2.78305 9.19035 4.62269 19.34768.92768 28.2157-.93554 2.24844-2.35851 4.4733-4.55193 5.5032l7.86171-.46385c.34513 2.31056-1.2673 4.49769-3.57708 4.85068a18.21192 18.21192 0 0 0 5.75478-1.3129c1.85222-.78382 3.20758-2.42692 3.62425-4.3947.14937-1.05347-.07076-2.16198.22013-3.19186.511-1.76102 2.35851-2.73588 3.78148-3.8601 3.82866-2.9796 5.63685-8.00323 5.78622-12.8539.14938-4.85068-1.13995-9.62274-2.51575-14.27688-1.3758-4.65413-2.8538-9.34757-3.07393-14.19039a18.40753 18.40753 0 0 1 .48743-5.28307c.28302.52673.5975 1.0456.91982 1.57234 1.89467 2.89311 4.11168 5.63685 5.27521 8.8916.40645 1.54011.95913 3.03855 1.65096 4.47331.78617 1.3758 2.31134 2.51575 3.89155 2.27204 1.5802-.24371 2.75946-1.94184 3.27833-3.56136.51888-1.6195.74687-3.3884 1.72958-4.77206 1.87109-2.61009 5.6054-2.84594 8.81298-2.7516 6.76108.21227 16.08507 1.24215 21.376-3.93085 1.0063-.98272 1.48586-2.49217 3.0582-2.12267 1.40725.3302 2.19343 2.61796 3.69501 3.14469 2.41355.77045 5.53465-1.52517 4.9686-4.24533z" fill="#464353" fill-rule="nonzero"/>
|
58 |
+
<path d="M85.72509 61.87479c0 .51101-.03931 1.02988 0 1.53303 0 1.65096.1415 3.31765.19654 4.97647.04717-2.14625-.12579-4.33967-.19654-6.5095zM83.04424 113.825c.2044-6.10856-1.18712-12.41365-2.97173-18.32566a34.98924 34.98924 0 0 1-1.57234-6.52522c-.3302 3.06606.65252 6.14786 1.57234 9.11958a63.14764 63.14764 0 0 1 2.97173 15.7313zM149.34207 64.18613a23.36905 23.36905 0 0 1 .78617-4.30822 8.41365 8.41365 0 0 0 .4717-3.34122c-.03065-.20048-.07782-.3978-.1415-.58963-.09434.44812-.21227.89623-.3302 1.34435-.65566 2.23587-.92139 4.56844-.78617 6.89472z" fill-rule="nonzero"/>
|
59 |
+
</g>
|
60 |
+
<g>
|
61 |
+
<path d="M590.46 285.225c0-29.872-24.253-54.125-54.125-54.125h-327.2c-29.872 0-54.125 24.253-54.125 54.125s24.253 54.125 54.125 54.125h327.2c29.872 0 54.125-24.253 54.125-54.125z" fill="url(#_Linear3)" transform="matrix(.74209 0 0 .74209 82.6893 -118.21955)"/>
|
62 |
+
<path d="M519.95786 93.45023c0-21.17255-17.18975-38.3623-38.36229-38.3623H237.8861c-21.17254 0-38.3623 17.18975-38.3623 38.3623 0 21.17254 17.18976 38.36229 38.3623 38.36229h243.70947c21.17254 0 38.3623-17.18975 38.3623-38.3623z" fill="#fff"/>
|
63 |
+
<path d="M481.47507 74.20377c0-2.27187-1.84484-4.11654-4.11672-4.11654H286.10373c-2.27243 0-4.11672 1.84467-4.11672 4.11654v8.2335c0 2.2723 1.84429 4.11696 4.11672 4.11696h191.25462c2.27188 0 4.11672-1.84466 4.11672-4.11696v-8.2335z" fill="#3f3d56"/>
|
64 |
+
<path d="M481.47507 92.97174c0-1.51458-1.23008-2.74436-2.74448-2.74436h-193.9991c-1.51496 0-2.74448 1.22978-2.74448 2.74436v5.489c0 1.51486 1.22952 2.74464 2.74448 2.74464h193.9991c1.5144 0 2.74448-1.22978 2.74448-2.74464v-5.489z" fill="#6c63ff"/>
|
65 |
+
<path d="M342.52958 107.99765c0-1.51458-1.2299-2.74436-2.7445-2.74436H284.7312c-1.51476 0-2.74449 1.22978-2.74449 2.74436v5.489c0 1.51486 1.22973 2.74464 2.7445 2.74464h55.05389c1.5146 0 2.74449-1.22978 2.74449-2.74464v-5.489z" fill="#9795b1"/>
|
66 |
+
<g serif:id="text" fill-rule="nonzero">
|
67 |
+
<path d="M358.77597 113.96639c.59162 0 .87847-.11695 1.16532-.26892l-.30477-.94123c-.19721.09875-.41235.15267-.55578.15267-.26892 0-.38545-.17998-.38545-.55605v-1.86495h1.19222v-.96783h-1.19222v-1.55961l-1.16533.12536v1.43425h-.51991v.96783h.51991v2.02602c0 .98605.49303 1.45246 1.246 1.45246zM362.81855 109.44864c-.51964 0-.9948.25072-1.32647.71713h-.00897v-.6457h-1.17429v4.37489h1.1743v-2.03512c0-.6457.39441-1.13872 1.12043-1.13872.06303 0 .18839 0 .30464.0091v-1.27317c-.0175-.0084-.05323-.0084-.08964-.0084zM366.07292 109.52008v2.12476c0 .84248-.4573 1.27247-.96854 1.27247-.54694 0-.78855-.26892-.78855-1.07568v-2.32155h-1.16533v2.63529c0 1.3362.6632 1.81102 1.60443 1.81102.49302 0 .96853-.2066 1.29978-.60998h.01821v.53855h1.17443v-4.37488h-1.17443zM369.36231 113.96639c1.14782 0 1.70317-.58266 1.70317-1.36282 0-.85999-.55535-1.06658-1.50568-1.41604-.4307-.16107-.6632-.28713-.6632-.46641 0-.2332.24161-.33125.43-.33125.32284 0 .70802.14356 1.04907.46571l.56446-.86069c-.49303-.38517-.98605-.54625-1.59533-.54625-.8964 0-1.57781.51964-1.57781 1.3089 0 .84248.62748 1.18283 1.3446 1.42514.57357.17928.79767.27803.79767.48392 0 .215-.19679.35856-.53784.35856-.47482 0-.85159-.17017-1.21015-.51123l-.57356.81587c.48392.41249 1.07569.63659 1.7746.63659zM372.8765 113.96639c.59177 0 .8782-.11695 1.16533-.26892l-.30464-.94123c-.19749.09875-.41248.15267-.55605.15267-.26892 0-.38517-.17998-.38517-.55605v-1.86495h1.19194v-.96783h-1.19194v-1.55961l-1.16533.12536v1.43425h-.52034v.96783h.52034v2.02602c0 .98605.49302 1.45246 1.24586 1.45246z" fill="#1d58bf"/>
|
68 |
+
<path d="M376.92854 109.44864c-.53784 0-.99515.1968-1.3271.57356h-.01751v-.50212h-1.17443v6.14948h1.17443v-2.26763h.0175c.30465.35787.73534.56446 1.2907.56446 1.21925 0 2.09744-.8964 2.09744-2.25012 0-1.3264-.8873-2.26763-2.06103-2.26763zm-.25141 3.46867c-.6366 0-1.13872-.47481-1.13872-1.19194 0-.69891.46641-1.22835 1.13872-1.22835.62748 0 1.1205.47551 1.1205 1.22835 0 .70803-.4573 1.19194-1.1205 1.19194zM382.3427 109.52008v2.12476c0 .84248-.45732 1.27247-.96855 1.27247-.54694 0-.78855-.26892-.78855-1.07568v-2.32155h-1.16533v2.63529c0 1.3362.6632 1.81102 1.60443 1.81102.49302 0 .96853-.2066 1.29978-.60998h.01821v.53855h1.17443v-4.37488h-1.17443zM384.26997 107.29727h1.17429v6.59755h-1.1743zM387.649 113.96639c1.14782 0 1.70317-.58266 1.70317-1.36282 0-.85999-.55535-1.06658-1.50568-1.41604-.43-.16107-.6632-.28713-.6632-.46641 0-.2332.2416-.33125.42999-.33125.32285 0 .70802.14356 1.04907.46571l.56446-.86069c-.49302-.38517-.98605-.54625-1.59532-.54625-.8964 0-1.57782.51964-1.57782 1.3089 0 .84248.62749 1.18283 1.34461 1.42514.57356.17928.79766.27803.79766.48392 0 .215-.19679.35856-.53784.35856-.47482 0-.85159-.17017-1.21015-.51123l-.57356.81587c.48392.41249 1.07569.63659 1.7746.63659zM393.8433 111.66235c0-1.28158-.86069-2.2137-2.14227-2.2137-1.24586 0-2.16958.92301-2.16958 2.24941 0 1.37192.96854 2.26833 2.25012 2.26833.8782 0 1.51478-.34946 1.89155-.82497l-.76194-.70802c-.24231.29553-.58266.50212-1.04908.49302-.56445 0-.97694-.32285-1.1205-.84248h3.07509c.02661-.07214.02661-.27803.02661-.4216zm-2.10655-1.18284c.51123 0 .82497.30464.94122.76195h-1.92727c.13446-.50213.51123-.76195.98605-.76195z" fill="#00aded"/>
|
69 |
+
</g>
|
70 |
+
<g serif:id="mark">
|
71 |
+
<path d="M352.85905 108.04074c-.38986-.10526-.77052-.2453-1.1363-.42481-.31035-.15228-.6097-.32576-.90303-.50838a4.2806 4.2806 0 0 1-.01708.01057c-.77208.47911-1.59296.8661-2.50489 1.03732-.32904.06177-.66185.10054-.99532.12898l-.01063.0009c-.08214 1.83573.04032 3.72787 1.01521 5.302.59423.95948 1.51363 1.67797 2.48732 2.27519l.0254.01547c.39846-.2435.78981-.50319 1.15398-.79322h.82668c-.58593.55145-1.2694 1.0136-1.96424 1.42616-.03256-.02228-.03286 0-.03286 0-.87644-.52039-1.7297-1.09562-2.39376-1.8594-.4511-.51877-.80828-1.11491-1.0657-1.76016-.64686-1.62152-.68784-3.42667-.57505-5.12154.71687-.04271 1.44492-.1116 2.13115-.33287.67679-.21823 1.30011-.5806 1.90217-.97149l.01762-.01147c.01171.00765.02342.01524.03519.02288.75935.4919 1.56972.92603 2.4621 1.11206a6.70183 6.70183 0 0 0 .1536.0301l-.61156.4217zm-.18137 6.31962h-1.1348c-.18968-.00807-.20247-.10413-.20647-.19786-.00472-.11148.06757-.20945.20646-.21536h.97722l.30892-1.12616s.05962-.13943.17945-.15096c.09583-.00926.1782.03119.21793.14708l.46675 1.57934.28591-.89855s.09248-.1638.23932-.13955c.08005.0205.08328.0242.1297.088l.33233.5008h.79573c.00095.00012.14767.01995.1917.12957.05096.12677-.02969.27677-.1917.28365h-.90661c-.09857-.00407-.1267-.0297-.17211-.09236l-.15532-.234-.35934 1.1295s-.06332.13453-.18149.14337c-.09444.00705-.1745-.03334-.21357-.1475l-.45205-1.52963-.15872.5787s-.0721.14636-.19924.15192zm2.22393-6.01943c.04015.9777.0101 1.9569-.15741 2.92342-.07635.44076-.24278 1.04897-.38855 1.47276l-.52451-.1705c.4453-1.17472.553-2.4526.53371-3.70332l.53676-.52236z" fill="#00aded" fill-rule="nonzero"/>
|
72 |
+
<path d="M350.61249 110.85644c.03129-.03568.03941-.0591.08606-.12694.26903-.39144 1.06591-1.44674 2.07849-2.25845.44062-.35324.91685-.67437 1.33812-.88486.70209-.35082.92816-.39358 1.25422-.46955.06193-.01441.2862-.05444.32341.03392.0359.0853-.10399.1752-.15648.21644-.059.04636-1.40842 1.05544-2.54368 2.55402-.98784 1.3039-1.63429 3.0147-1.63429 3.0147-.01986.038-.24452.43948-.54593.45903-.27857.01811-.63633-.34424-.63633-.34424-.06877-.06416-.40417-.4622-.68325-.95451-.35593-.6277-.66242-1.37177-.66242-1.37177s-.31817-.62588.28165-.9701c.5914-.33942.85484.00518.9832.20863.10969.17387.33069.59623.4375.80282.0372.07196.06126.11187.07973.09086z" fill="#1d58bf" fill-rule="nonzero"/>
|
73 |
+
</g>
|
74 |
+
<circle cx="88.506" cy="368.331" r="25.699" fill="#d1ceff" transform="matrix(1.24682 0 0 1.24682 129.07388 -366.05644)"/>
|
75 |
+
<g>
|
76 |
+
<path d="M234.79674 84.79714c-1.28828-2.16885-1.71512-4.93991-.9589-7.68538 1.39849-5.07719 6.31648-8.15732 10.97562-6.87399 4.65914 1.28333 7.30636 6.44725 5.90788 11.52444-.75623 2.74547-2.54175 4.90715-4.75888 6.11045 1.49218-1.30605 2.69147-3.18496 3.30831-5.42442 1.39844-5.07703-.7234-10.09624-4.73528-11.20128-4.01188-1.10505-8.40432 2.11984-9.80276 7.19687-.61684 2.23946-.54878 4.46745.06401 6.35331z" fill="#4a41df"/>
|
77 |
+
<path d="M229.64312 76.9581l-2.53994-.31092-6.8431 32.05372 1.20438 2.33146 8.17866-34.07426z" fill="#342ada" fill-rule="nonzero"/>
|
78 |
+
<path d="M228.85059 76.4124l-7.36407 34.43978 26.80343 5.5183 7.25622-33.5587-26.69558-6.39939z" fill="#6c63ff" fill-rule="nonzero"/>
|
79 |
+
<path d="M229.98862 101.50522l2.56138-1.89507c.5772.91783 1.27595 1.6768 2.09644 2.27698.82035.59994 1.655 1.005 2.5042 1.21503.83984.20772 1.56523.18376 2.17584-.07218.6108-.2559.99734-.71234 1.15992-1.3697.09259-.37434.10476-.71773.03673-1.03012-.06809-.31219-.23693-.61809-.50703-.91741-.2699-.29928-.58302-.5801-.9395-.8427-.35648-.26262-.83858-.57552-1.44626-.9389-.48892-.29537-.89628-.54866-1.22182-.76-.32555-.21136-.69053-.46883-1.095-.77225-.40465-.30346-.73193-.5855-.98246-.8461-.25034-.26054-.49876-.56897-.74482-.92538-.24605-.35642-.42252-.71009-.52958-1.06106-.10687-.35093-.16607-.74835-.17745-1.19202-.01143-.44348.04273-.90732.1624-1.39112.35454-1.4335 1.11368-2.51479 2.2775-3.24424 1.16382-.72945 2.58533-.96402 4.26492-.70362l.8739-3.53332 2.53356.62663-.90776 3.67024c.82439.38805 1.61423.87648 2.36954 1.4653.7555.58885 1.3814 1.21118 1.87813 1.86687l-2.49302 1.91197c-.6086-.7123-1.27213-1.30032-1.99062-1.76387-.7185-.46355-1.4156-.77878-2.09125-.94589-.82173-.20324-1.51227-.19235-2.07161.03265-.55949.22477-.91604.64771-1.06962 1.26864-.149.60242-.00324 1.1496.43693 1.64125.44041.4915 1.20656 1.07575 2.29863 1.75282.42956.26126.79095.48395 1.0846.66798.29366.18403.61867.39752.975.64067.35653.2432.64852.46319.87598.66.2275.1966.46861.42592.72363.68762.25501.2617.4553.50985.6007.74423.14536.23458.28302.50114.41258.7996.1295.29866.21188.6024.24686.91136.03499.30896.04162.64481.01971 1.0075-.02196.36288-.08255.74493-.18193 1.14674-.36583 1.47908-1.13688 2.57932-2.31318 3.30073-1.17635.7216-2.61108.97956-4.30402.77394l-.82982 3.3551-2.53356-.62663.83324-3.36893c-2.09857-.83857-3.7558-2.24653-4.97201-4.22334z" fill="#fff" fill-rule="nonzero"/>
|
80 |
+
</g>
|
81 |
+
</g>
|
82 |
+
<g transform="matrix(.9544 0 0 .9544 -317.20694 -197.00686)">
|
83 |
+
<path d="M926.79 654.4s-3.59 21.65-21.79 24.86c-18.2 3.21-78.94 2.56-78.94 2.56s-34.73-5-47.29-34.34c-12.56-29.34-20.63-41-9.87-41.53 10.76-.53 68.82 19.61 72.15 19.87 3.33.26 88.94-44.6 85.74 28.58z" fill="#65617d" fill-rule="nonzero"/>
|
84 |
+
<path d="M926.79 654.4s-3.59 21.65-21.79 24.86c-18.2 3.21-78.94 2.56-78.94 2.56s-34.73-5-47.29-34.34c-12.56-29.34-20.63-41-9.87-41.53 10.76-.53 68.82 19.61 72.15 19.87 3.33.26 88.94-44.6 85.74 28.58z" fill-opacity=".05" fill-rule="nonzero"/>
|
85 |
+
<path d="M763.9 678.49s1.81 4.77 6.8 5.12c.732.052 1.468.011 2.19-.12 6.67-1.16 22.3-3.85 27.81-2.82 3.32.61 9.45-.3 13.82-1.12 2.9-.55 5-1.06 5-1.06s-5.12-17-5.77-17.56c-.65-.56-23.06-14-23.06-14l-17.79-1.24c-2.379.367-4.528 1.635-6 3.54-1.87 2.27-3.48 6-3.59 12.1-.31 14.98.59 17.16.59 17.16z" fill="#3f3d56" fill-rule="nonzero"/>
|
86 |
+
<path d="M763.9 678.49s1.81 4.77 6.8 5.12a73.811 73.811 0 0 1-4.82-7l.09-12.43c-.728-6.907 1.874-13.764 7-18.45h-.07s-9.35.64-9.61 15.64c-.26 15 .61 17.12.61 17.12z" fill-opacity=".05" fill-rule="nonzero"/>
|
87 |
+
<path d="M840.9 651.32l16.53-12.94 26-25.63s-2.81-.14-7.05-.32c-1 .67-4 2.78-4.12 5.35-.12 3.14-7 .22-10.62 2-3.62 1.78-21.1 24.28-24.18 24.12-3.08-.16-5.51-1.56-6.79.62l-.09.14 10.32 6.66z" fill-opacity=".1" fill-rule="nonzero"/>
|
88 |
+
<path d="M731.99 612.49c1.67 4.1 15.64 19.86 15.64 19.86s8.84 11.54 21.4 16.92c12.56 5.38 28.06 16.66 29.22 18.71.74 1.32 10.75 7.35 17.8 11.49l1.58.92 3.5 2 1.85 1.07s4.29-3.45 8.57-6.92c4.28-3.47 8.41-6.86 8.48-7 .12-.38 1.79-4.74 1.4-5-.2-.13-1.08-1.91-2.69-4-1.723-2.287-3.96-4.137-6.53-5.4-5.9-2.69-8.46-8.82-8.46-8.82s-.56-.4-1.41-.94c-1.747-1.208-3.704-2.079-5.77-2.57-2.82-.35-8.07-6.12-8.07-6.12s-3.59-2.31-5-5.25c-1.41-2.94-21.22-16.46-23.06-17.73l48.18 30.95 11.53 7.41 16.54-12.94 26-25.63s-3.5-.17-8.58-.39c-12.65-.55-35.1-1.41-37.94-.77-2.292.536-4.657.692-7 .46-2.343-.232-6.4.29-10.63-1.94s-10.9-3.28-11.67-4.93c-.77-1.65-23.45-9.61-23.45-9.61s-30.88-16.4-41.91-6.66c-11.03 9.74-11.18 18.73-9.52 22.83z" fill="#65617d" fill-rule="nonzero"/>
|
89 |
+
<path d="M831.57 518.43l4 13.19 5.13 29.74 18.83 1.28 5.46-9 5.44-9s3.39-12 5.83-23.64c2.15-10.28 3.56-20.26 1.22-21.34-2.08-1-3.45-4.43-4.34-8.15-.11-.46-.22-.93-.31-1.39-.624-3.156-1.042-6.35-1.25-9.56-.208-3.21-39.47-2.05-34 14.23.987 2.777 1.491 5.703 1.49 8.65-.01.735-.056 1.469-.14 2.2-.567 5.099-3.236 9.738-7.36 12.79z" fill="#ee8e9e" fill-rule="nonzero"/>
|
90 |
+
<path d="M823.36 516.25l1.42 22.42 3.2 19.1 3.59 8.84 3.2 48.38s30.9 3.57 38.42-.06c.54-.231 1.009-.6 1.36-1.07 9.07-13.7 6.1-53.4 6.1-53.4l3.46-25.63-2.31-13.3-5.57-.6-4.29-.45s-1 1.19-2.37 3c-3.8 5-10.79 14.88-10.32 19 .64 5.64-.77 11.4-3 12.3-2.23.9-4 2.44-4.35.9-.35-1.54-.77-1.92-.39-4.1.38-2.18-1.67-8.85-1.67-8.85s-3.46-7.81-3.2-11.15c.26-3.34-.38-7.17-1.41-8.07-1.03-.9-2.43-1.79-1.28-5.89 1.15-4.1-5.05-12.05-5.05-12.05l-15.54 10.68z" fill="#e3e8f4" fill-rule="nonzero"/>
|
91 |
+
<path d="M872.9 490.58s6.46.8 8.51 3.5 7.43 3.07 7.43 3.07 6.15 2 6 2.56c-.15.56 1.79 1.29 5.63 2.31s10.26 4.74 10.26 5.64c0 .9 10.17 10.89 10.17 11.92 0 1.03 3.08 4.87 2.69 11.66-.39 6.79-.77 15.38.77 16.79 1.54 1.41 0 6.92 0 6.92-.844 1.22-.895 2.829-.13 4.1 1.28 2.31-.25 11.92-.25 11.92l.12 10s-1.41 6.28.26 6.54c1.67.26-.26 3.08-.26 3.08s-1.41 5.12.39 7.43c1.8 2.31 2.31 12.17 2.31 12.17l27.42 39.86s.39 7.3-8.33 7.18c-8.72-.12-8.59 1.66-8.33 3.33.26 1.67-2.43 3.46-2.43 3.46s-3.46 1.79-1.41 4 7.94 7.18-1.8 10.51c-1.148-1.587-2.095-3.31-2.82-5.13-.826-2.262-1.511-4.573-2.05-6.92-.539-2.347-.9-9.74-2.69-11-1.79-1.26-1.54-7.43-1.54-7.43s2.57-5-1-7.05-55.62-30.89-55.62-30.89l-1.3-38.37s-.9-28.32 4.48-37.81c0 0-.64-4.1.26-6.41.9-2.31-.13-9.74-.13-9.74l3.39-27.2zM838.9 505.57s-12.88-2.65-16.34-.86c-3.46 1.79-10.22 3.19-11.24 4.19-1.02 1-3.59.26-5.9 6.28-2.31 6.02-2.56 12.18-5.51 15-2.95 2.82-4.48 4.74-4.61 6.79-.13 2.05.38 2.56-.77 3.2-1.15.64-2.82 3.33-2.31 4.36.51 1.03 26.68 23.62 26.68 23.62s1.28 8.58 2.44 10.76c1.16 2.18-1.29 32.17-3.85 34.22-2.56 2.05 17.3 1.86 17.3 1.86s.9-19.67 1.67-20.7c.77-1.03-.52-22-.52-22s-.12-17.94 1.54-22.68c1.66-4.74 1.42-20.55 1.42-20.55s1.47-9.46 3.26-11.66c1.79-2.2-3.26-11.83-3.26-11.83z" fill="#3f3d56" fill-rule="nonzero"/>
|
92 |
+
<path d="M837.59 494.72c.987 2.777 1.491 5.703 1.49 8.65 12.923 3.846 26.914-1.681 33.72-13.32-.624-3.156-1.042-6.35-1.25-9.56-.208-3.21-39.47-2.05-33.96 14.23z" fill-opacity=".1" fill-rule="nonzero"/>
|
93 |
+
<path d="M818.11 474.47c.002 16.099 13.251 29.346 29.35 29.346 16.101 0 29.35-13.249 29.35-29.35s-13.249-29.35-29.35-29.35c-13.809 0-25.842 9.746-28.71 23.254-.426 2.005-.64 4.05-.64 6.1z" fill="#ee8e9e" fill-rule="nonzero"/>
|
94 |
+
<path d="M799.27 542.39l-7 2.18s.65 2.56-1.41 3.84c-1.233.876-1.915 2.342-1.79 3.85s-.77 2.82-2.56 3.46c-1.79.64-2.95 4.87-2.95 4.87l-5.9 6.79s-2.17 1.79-1.79 2.69c.38.9-2.31 1.15-2.31 1.15l1.34 22.82 12.18 2.3 7.56-.77 6.15-2.3 5.38-3.21 2.44-6.28 10.76-16.4-20.1-24.99z" fill="#3f3d56" fill-rule="nonzero"/>
|
95 |
+
<path d="M775.31 573.02s-15.64-22.56-27.3-10.38c-11.66 12.18 4.74 31.91 8.59 31.27 3.85-.64 22.17-1.67 22.17-1.67l-3.46-19.22z" fill="#ee8e9e" fill-rule="nonzero"/>
|
96 |
+
<path d="M813.29749 565.70272c.40506-.7936.08977-1.76626-.70383-2.17132L742.58372 527.798c-.7936-.40506-1.76625-.08978-2.17131.70383l-27.41856 53.71923c-.40506.7936-.08978 1.76626.70383 2.17132l70.00993 35.73341c.7936.40506 1.76626.08978 2.17132-.70383l27.41856-53.71923z" fill="#3f3d56"/>
|
97 |
+
<path fill="#16bd83" d="M744.3983 535.1576l61.2616 31.26821-23.56254 46.16441-61.2616-31.26821z"/>
|
98 |
+
<circle cx="730.3" cy="557" r="1.13" fill="#e6e8ec"/>
|
99 |
+
<circle cx="796.61" cy="590.97" r="1.86" fill="#e6e8ec"/>
|
100 |
+
<path d="M765.18 577.76c-.12 16.92 34.86 20.5 34.86 20.5l8.94 1.42 4 .64 1.67-16.54s-1.83-.27-4.12-.8c-3.39-.79-7.78-2.16-8.7-4.07-1.53-3.2-36.52-18.07-36.65-1.15z" fill="#ee8e9e" fill-rule="nonzero"/>
|
101 |
+
<path d="M855.96 486.61c-.143-.605-.143-1.235 0-1.84.327-1.764-.117-3.585-1.22-5-1.65-1.86-4.42-2-6.88-2.34-2.46-.34-5.3-1.26-6-3.64-.51-1.71.26-3.8-.84-5.21-.508-.575-1.166-.997-1.9-1.22-1.797-.814-3.819-.99-5.73-.5-3.27 1.06-5.24 4.91-8.65 5.39-.516.097-1.05.034-1.53-.18-1.29-.64-1.34-2.5-2.33-3.55-1.56-1.65-4.51-.58-6.42-1.81-1.24-.8-1.72-2.36-2.07-3.79-.67-2.79-1.22-5.71-.56-8.5 1.11-4.77 5.37-8 8.09-12.11 2.54-3.79 4-8.59 7.77-11.11 3.77-2.52 8.7-1.94 13-.66 1.982.698 4.019 1.23 6.09 1.59 3.46.43 6.94-.51 10.43-.63 4.923-.155 9.763 1.315 13.77 4.18.903.592 1.67 1.37 2.25 2.28.581 1.287.92 2.67 1 4.08.412 2.651 1.332 5.198 2.71 7.5 1.07 1.8 2.43 3.43 3.4 5.3 1.083 1.827 1.413 4.005.92 6.07-.33 1.05-1 2-1.23 3.09-.57 2.5 1.08 4.89 2.21 7.2 1.089 2.106 1.606 4.461 1.5 6.83-.13 2.384-1.247 4.61-3.08 6.14-1.898 1.334-4.17 2.035-6.49 2-2.811.086-5.614-.345-8.27-1.27-.983-.445-2.064-.631-3.14-.54-1.49.3-1.3 1.22-1.94 2.32-.86 1.56-4.18 1.85-4.86-.07z" fill="#3f3d56" fill-rule="nonzero"/>
|
102 |
+
<path d="M840.15 652.09l16.54-12.94 26-25.63s-3.5-.17-8.58-.39c-1.009.909-1.655 2.152-1.82 3.5-.12 3.13-7 .22-10.62 2-3.62 1.78-21.13 24.27-24.21 24.13-3.08-.14-5.51-1.56-6.79.62l-.09.14c-.525.591-1.226.998-2 1.16l11.57 7.41z" fill-opacity=".1" fill-rule="nonzero"/>
|
103 |
+
<path d="M806.83 651.19l8.31 26.52 1.3 4.16 4-1.08 8.72-2.4L868 667.72c4.882-.211 9.66-1.484 14-3.73 7.346-4.108 15.751-5.939 24.14-5.26 5.13.48 10.84-1.73 15.58-10.49 0 0 10.76-31.78-16.41-40.88-27.17-9.1-28.46 4.84-28.46 4.84l-.37.23c-1 .67-4 2.78-4.12 5.35-.12 3.14-7 .22-10.62 2-3.62 1.78-21.2 24.28-24.28 24.12-3.08-.16-5.51-1.56-6.79.62l-.09.14c-.95 1.31-3.81 1.61-5.69 1.67h-1.78l-.24.07-2 .59-14.04 4.2z" fill="#65617d" fill-rule="nonzero"/>
|
104 |
+
<path d="M913.46 519.83s11.92-3.46 9 30.38c-2.92 33.84-25 55.23-25 55.23s-25.38 11.15-36.78 9.36c-11.4-1.79-19.78-2.18-19.78-2.18a28.99603 28.99603 0 0 0-11.53-3.08c-6.41-.25-19.86-4.23-20.12-5.51-.26-1.28 3.33-20.12 1.79-21.53 0 0 17.94.74 19.74 2 1.8 1.26 4.36.36 6.28 0s7.82-5.5 19.48-1c0 0 4 .38 5.51-.64 1.51-1.02 4-.26 4-.26.987-.339 1.923-.814 2.78-1.41.38-.51 3.46 0 3.46 0 .186.091.391.139.598.139.626 0 1.174-.431 1.322-1.039.409-1.049 1.021-2.007 1.8-2.82.779-.813 3.46-19.48 10-26.78 0 0 1.93-1.67 1.41-3.72-.52-2.05 10.66-31.24 26.04-27.14z" fill="#3f3d56" fill-rule="nonzero"/>
|
105 |
+
<path d="M820.9 646.98l16.92 20.48c.07-.06.11-.1.11-.12.13-.38 1.79-4.74 1.41-5-.38-.26-3.33-6.67-9.23-9.36-2.992-1.465-5.505-3.756-7.24-6.6l-1.97.6z" fill-opacity=".1" fill-rule="nonzero"/>
|
106 |
+
<path d="M835.28 688.9l2.44 1.41 24.73.64c2.776 1.684 5.71 3.094 8.76 4.21.405.128.82.221 1.24.28 2.292.179 4.593.222 6.89.13 1.9 0 3.36-.13 3.36-.13s-1.17-31.2-2-34.48c-.42-1.57-2.5-1.22-4.54-.44-1.536.623-3.018 1.372-4.43 2.24-1.412.868-10.51 1-12.18 1.93-1.67.93-6.4-.52-9.35 0-2.95.52-8.2-3.47-8.2-3.47-14.36-4.74-6.28 4.1-5.26 4.48 0 0-14-3.2-14.73 12-.73 15.2 13.27 11.2 13.27 11.2z" fill="#3f3d56" fill-rule="nonzero"/>
|
107 |
+
<path d="M871.04 676.82c.27 6.46 5.3 14.48 8.3 18.72 1.9 0 3.36-.13 3.36-.13s-1.17-31.2-2-34.48c-.42-1.57-2.5-1.22-4.54-.44-2.53 4.65-5.34 11.13-5.12 16.33z" fill="#565387" fill-rule="nonzero"/>
|
108 |
+
<path d="M871.04 676.82c.27 6.46 5.3 14.48 8.3 18.72 1.9 0 3.36-.13 3.36-.13s-1.17-31.2-2-34.48c-.42-1.57-2.5-1.22-4.54-.44-2.53 4.65-5.34 11.13-5.12 16.33z" fill-opacity=".1" fill-rule="nonzero"/>
|
109 |
+
<path d="M866.81 677.68c1.7 6.23 1.68 13.22 4.4 17.45.405.128.82.221 1.24.28 2.292.179 4.593.222 6.89.13 1.9 0 3.36-.13 3.36-.13s-1.17-31.2-2-34.48c-.42-1.57-2.5-1.22-4.54-.44-1.536.623-3.018 1.372-4.43 2.24-1.412.868-7.1 6.97-4.92 14.95z" fill-opacity=".05" fill-rule="nonzero"/>
|
110 |
+
<path d="M781.48 614.45s12.29 4 22.7 18.16l-22.7-18.16z" fill-opacity=".1" fill-rule="nonzero"/>
|
111 |
+
<path d="M881.31 460.67c0 .1 0 .19-.07.28-.124.364-.268.721-.43 1.07.126-.464.294-.916.5-1.35z" fill-rule="nonzero"/>
|
112 |
+
<path d="M883.3 557.03c-2.35 3.17-5 6.1-7.11 9.45-2.11 3.35-3.54 7.27-3.11 11.19 2.15-2.2 3.13-5.25 4.49-8 2.29-4.68 5.72-8.65 8.62-13 .55-.82 4.09-5.57 2.3-5.8-1.48-.17-4.39 5.08-5.19 6.16z" fill-opacity=".1" fill-rule="nonzero"/>
|
113 |
+
</g>
|
114 |
+
<defs>
|
115 |
+
<linearGradient id="_Linear1" x2="1" gradientUnits="userSpaceOnUse" gradientTransform="rotate(-90 356.05 -16.69) scale(108.26)">
|
116 |
+
<stop offset="0" stop-color="gray" stop-opacity=".24706"/>
|
117 |
+
<stop offset=".54" stop-color="gray" stop-opacity=".11765"/>
|
118 |
+
<stop offset="1" stop-color="gray" stop-opacity=".09804"/>
|
119 |
+
</linearGradient>
|
120 |
+
<linearGradient id="_Linear3" x2="1" gradientUnits="userSpaceOnUse" gradientTransform="rotate(-90 356.05 -16.69) scale(108.26)">
|
121 |
+
<stop offset="0" stop-color="gray" stop-opacity=".24706"/>
|
122 |
+
<stop offset=".54" stop-color="gray" stop-opacity=".11765"/>
|
123 |
+
<stop offset="1" stop-color="gray" stop-opacity=".09804"/>
|
124 |
+
</linearGradient>
|
125 |
+
</defs>
|
126 |
+
</svg>
|
assets/css/images/logo-edd.png
ADDED
Binary file
|
assets/css/images/logo-formidable.png
ADDED
Binary file
|
assets/css/images/logo-om.png
ADDED
Binary file
|
assets/css/images/memberpress-logo.svg
ADDED
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="utf-8"?>
|
2 |
+
<!-- Generator: Adobe Illustrator 20.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3 |
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
4 |
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
5 |
+
viewBox="0 0 252 40" style="enable-background:new 0 0 252 40;" xml:space="preserve">
|
6 |
+
<style type="text/css">
|
7 |
+
.st0{fill:#20D1CC;}
|
8 |
+
.st1{fill:#05D0E0;}
|
9 |
+
.st2{fill:#01A9B2;}
|
10 |
+
.st3{fill:#0282C9;}
|
11 |
+
.st4{fill:#016BB1;}
|
12 |
+
.st5{fill:#06429E;}
|
13 |
+
.st6{fill:#01569A;}
|
14 |
+
.st7{fill:#008C9D;}
|
15 |
+
.st8{fill:#03ABA3;}
|
16 |
+
</style>
|
17 |
+
<g>
|
18 |
+
<g>
|
19 |
+
<path class="st0" d="M48,17.5c0-4.1,3.3-7.4,7.4-7.4s7.4,3.3,7.4,7.4V35c0,2.8,2.3,5,5,5c2.8,0,5-2.3,5-5V17.5
|
20 |
+
C72.9,7.8,65.1,0,55.4,0C50.6,0,46.2,2,43,5.2C46.1,8.4,48,12.7,48,17.5L48,17.5z"/>
|
21 |
+
<path class="st1" d="M38,17.5c0-4.8,1.9-9.1,5-12.3C39.8,2,35.4,0,30.6,0c-4.9,0-9.3,2-12.4,5.2c3.1,3.1,5,7.5,5,12.2
|
22 |
+
c0-4.1,3.3-7.4,7.4-7.4C34.7,10.1,38,13.4,38,17.5L38,17.5z"/>
|
23 |
+
<path class="st2" d="M48,35V17.5c0-4.8-1.9-9.1-5-12.3c-3.1,3.2-5,7.5-5,12.3V35c0,1.4,0.6,2.6,1.5,3.6c0.9,0.9,2.2,1.5,3.6,1.5
|
24 |
+
C45.8,40,48,37.7,48,35z"/>
|
25 |
+
<path class="st3" d="M5.7,0c-2.8,0-5,2.3-5,5c0,2.8,2.3,5,5,5c4.1,0,7.4,3.3,7.4,7.4c0-4.8,1.9-9.1,5-12.2C15,2,10.6,0,5.7,0z"/>
|
26 |
+
<path class="st4" d="M13.1,17.4C13.1,17.4,13.1,17.4,13.1,17.4l0,17.5c0,2.8,2.3,5,5,5c0.9,0,1.7-0.2,2.4-0.6
|
27 |
+
c1.6-0.9,2.6-2.5,2.6-4.4V17.5c0,0,0,0,0,0c0-4.8-1.9-9.1-5-12.2C15,8.4,13.1,12.7,13.1,17.4z"/>
|
28 |
+
</g>
|
29 |
+
<circle class="st5" cx="5.7" cy="5" r="5"/>
|
30 |
+
<circle class="st6" cx="18.1" cy="35" r="5"/>
|
31 |
+
<circle class="st7" cx="43" cy="35" r="5"/>
|
32 |
+
<circle class="st8" cx="67.9" cy="35" r="5"/>
|
33 |
+
</g>
|
34 |
+
<g>
|
35 |
+
<path class="st5" d="M101,15.6c-1.8,0-3.6,0.8-4.5,2.8c-0.6-2.1-2.3-2.8-4.3-2.8c-1.5,0-3,0.6-3.8,2.1c0,0,0-0.8,0-0.8
|
36 |
+
c0-0.6-0.5-1.1-1.1-1.1c-0.6,0-1.1,0.5-1.1,1.1c0,0,0,10.9,0,10.9c0,0.6,0.5,1.1,1.1,1.1c0.6,0,1.1-0.5,1.1-1.1h0v-6.5
|
37 |
+
c0-2.1,1.4-3.7,3.5-3.7c2.3,0,3.5,1.6,3.5,3.7v6.5h0c0,0.6,0.5,1.1,1.1,1.1s1.1-0.5,1.1-1.1v-6.5c0-2.1,1.4-3.7,3.5-3.7
|
38 |
+
c2.3,0,3.4,1.5,3.4,3.7v6.5h0c0,0.6,0.5,1.1,1.1,1.1c0.6,0,1.1-0.5,1.1-1.1v-6.5C106.4,17.8,104.5,15.6,101,15.6z"/>
|
39 |
+
<path class="st5" d="M138.3,15.6c-1.8,0-3.6,0.8-4.5,2.8c-0.6-2.1-2.3-2.8-4.3-2.8c-1.5,0-3,0.6-3.8,2.1c0,0,0-0.8,0-0.8
|
40 |
+
c0-0.6-0.5-1.1-1.1-1.1c-0.6,0-1.1,0.5-1.1,1.1c0,0,0,10.9,0,10.9c0,0.6,0.5,1.1,1.1,1.1c0.6,0,1.1-0.5,1.1-1.1h0v-6.5
|
41 |
+
c0-2.1,1.4-3.7,3.5-3.7c2.3,0,3.5,1.6,3.5,3.7v6.5h0c0,0.6,0.5,1.1,1.1,1.1c0.6,0,1.1-0.5,1.1-1.1v-6.5c0-2.1,1.4-3.7,3.5-3.7
|
42 |
+
c2.3,0,3.4,1.5,3.4,3.7v6.5h0c0,0.6,0.5,1.1,1.1,1.1c0.6,0,1.1-0.5,1.1-1.1v-6.5C143.7,17.8,141.9,15.6,138.3,15.6z"/>
|
43 |
+
<path class="st5" d="M120.5,23.1c0.5,0,1-0.4,1-1c0-4.5-2.8-6.6-6.5-6.6c-3.9,0-6.7,2.8-6.7,6.7c0,4.1,2.8,6.7,6.8,6.7
|
44 |
+
c1.9,0,4-0.7,5.3-2c0.2-0.2,0.3-0.4,0.3-0.7c0-0.5-0.4-1-1-1c-0.3,0-0.5,0.1-0.7,0.3c-0.9,0.9-2.5,1.4-3.9,1.4
|
45 |
+
c-2.5,0-4.4-1.5-4.7-3.8L120.5,23.1z M110.5,21.3c0.4-2.5,2.3-3.8,4.5-3.8c2.5,0,4.2,1.3,4.3,3.8H110.5z"/>
|
46 |
+
<path class="st5" d="M173.4,23.1c0.5,0,1-0.4,1-1c0-4.5-2.8-6.6-6.5-6.6c-3.9,0-6.7,2.8-6.7,6.7c0,4.1,2.8,6.7,6.8,6.7
|
47 |
+
c1.9,0,4-0.7,5.3-2c0.2-0.2,0.3-0.4,0.3-0.7c0-0.5-0.4-1-1-1c-0.3,0-0.5,0.1-0.7,0.3c-0.9,0.9-2.5,1.4-3.9,1.4
|
48 |
+
c-2.5,0-4.4-1.5-4.7-3.8L173.4,23.1z M163.4,21.3c0.4-2.5,2.3-3.8,4.5-3.8c2.5,0,4.2,1.3,4.3,3.8H163.4z"/>
|
49 |
+
<path class="st5" d="M225.1,23.1c0.5,0,1-0.4,1-1c0-4.5-2.8-6.6-6.5-6.6c-3.9,0-6.7,2.8-6.7,6.7c0,4.1,2.8,6.7,6.8,6.7
|
50 |
+
c1.9,0,4-0.7,5.3-2c0.2-0.2,0.3-0.4,0.3-0.7c0-0.5-0.4-1-1-1c-0.3,0-0.5,0.1-0.7,0.3c-0.9,0.9-2.5,1.4-3.9,1.4
|
51 |
+
c-2.5,0-4.4-1.5-4.7-3.8L225.1,23.1z M215.1,21.3c0.4-2.5,2.3-3.8,4.5-3.8c2.5,0,4.2,1.3,4.3,3.8H215.1z"/>
|
52 |
+
<path class="st5" d="M153.3,15.6c-1.8,0-3.9,0.8-4.8,2.5l0-6.6c0-0.6-0.5-1.1-1.1-1.1c-0.6,0-1.1,0.5-1.1,1.1v16.3
|
53 |
+
c0,0.6,0.5,1.1,1.1,1.1c0.6,0,1.1-0.5,1.1-1.1l0-1.4c1,1.7,2.9,2.4,4.8,2.4c3.7,0,6.6-2.4,6.6-6.6C159.9,17.9,157,15.6,153.3,15.6z
|
54 |
+
M153.2,26.9c-2.5,0-4.5-1.9-4.5-4.7c0-2.8,2-4.7,4.5-4.7c2.5,0,4.5,1.6,4.5,4.7C157.7,25.2,155.7,26.9,153.2,26.9z"/>
|
55 |
+
<path class="st5" d="M194.4,15.6c-1.9,0-3.8,0.8-4.8,2.4l0-1.4c0-0.6-0.5-1.1-1.1-1.1c-0.6,0-1.1,0.5-1.1,1.1c0,0,0,16.5,0,17.1
|
56 |
+
c0,0.6,0.5,1.1,1.1,1.1c0.6,0,1.1-0.5,1.1-1.1s0-7.4,0-7.4c0.9,1.7,3,2.5,4.8,2.5c3.7,0,6.5-2.3,6.5-6.7
|
57 |
+
C200.9,18,198.1,15.6,194.4,15.6z M194.3,26.9c-2.5,0-4.5-1.9-4.5-4.7c0-2.8,2-4.7,4.5-4.7c2.5,0,4.5,1.7,4.5,4.6
|
58 |
+
C198.8,25.3,196.8,26.9,194.3,26.9z"/>
|
59 |
+
<path class="st5" d="M185.1,16.1c-0.7-0.3-1.4-0.5-2.3-0.5c-1.6,0-3.2,0.6-4,2v-0.9c0-0.6-0.5-1-1-1c-0.6,0-1,0.5-1,1
|
60 |
+
c0,0,0,10.6,0,11.2c0,0.6,0.5,1.1,1.1,1.1c0.6,0,1.1-0.5,1.1-1.1c0-0.6,0-6.3,0-6.3c0-2.4,1.4-3.8,3.8-3.8c0.6,0,1.1,0.1,1.6,0.3
|
61 |
+
c0.1,0.1,0.3,0.1,0.4,0.1c0.6,0,1-0.5,1-1C185.7,16.6,185.4,16.3,185.1,16.1z"/>
|
62 |
+
<path class="st5" d="M211.7,16.1c-0.7-0.3-1.4-0.5-2.3-0.5c-1.6,0-3.2,0.6-4,2v-0.9c0-0.6-0.5-1-1-1c-0.6,0-1,0.5-1,1
|
63 |
+
c0,0,0,10.6,0,11.2c0,0.6,0.5,1.1,1.1,1.1c0.6,0,1.1-0.5,1.1-1.1c0-0.6,0-6.3,0-6.3c0-2.4,1.4-3.8,3.8-3.8c0.6,0,1.1,0.1,1.6,0.3
|
64 |
+
c0.1,0.1,0.3,0.1,0.4,0.1c0.6,0,1-0.5,1-1C212.3,16.6,212,16.3,211.7,16.1z"/>
|
65 |
+
<path class="st5" d="M233.2,21.1c-1.6-0.2-3.2-0.5-3.2-1.8c0-1.4,1.4-2.1,3.2-2.1c0.8,0,2.2,0.2,2.9,0.5l0.6,0.3l0,0
|
66 |
+
c0.1,0.1,0.3,0.1,0.4,0.1c0.5,0,1-0.4,1-1c0-0.4-0.3-0.8-0.6-0.9c-0.2-0.1-0.4-0.2-0.6-0.2c-1.2-0.4-2.5-0.6-3.6-0.6
|
67 |
+
c-2.5,0-5.3,1.1-5.3,3.9c0,2.7,2.7,3.3,5.2,3.7c2,0.2,3.6,0.6,3.6,2.1c-0.1,1.7-2.1,2-3.4,2c-1.2,0-2.4-0.3-3.4-0.8l0,0
|
68 |
+
c-0.1-0.1-0.3-0.1-0.5-0.1c-0.6,0-1,0.5-1,1c0,0.4,0.2,0.8,0.6,0.9l0,0c0,0,0,0,0,0c0,0,0,0,0,0c1.3,0.6,2.6,0.9,4.2,0.9
|
69 |
+
c2.9,0,5.4-1.2,5.5-3.9C238.8,21.9,235.6,21.5,233.2,21.1z"/>
|
70 |
+
<path class="st5" d="M245.8,21.1c-1.6-0.2-3.2-0.5-3.2-1.8c0-1.4,1.4-2.1,3.2-2.1c0.8,0,2.2,0.2,2.9,0.5l0.6,0.3l0,0
|
71 |
+
c0.1,0.1,0.3,0.1,0.4,0.1c0.5,0,1-0.4,1-1c0-0.4-0.3-0.8-0.6-0.9c-0.2-0.1-0.4-0.2-0.6-0.2c-1.2-0.4-2.5-0.6-3.6-0.6
|
72 |
+
c-2.5,0-5.3,1.1-5.3,3.9c0,2.7,2.7,3.3,5.2,3.7c2,0.2,3.6,0.6,3.6,2.1c-0.1,1.7-2.1,2-3.4,2c-1.2,0-2.4-0.3-3.4-0.8l0,0
|
73 |
+
c-0.1-0.1-0.3-0.1-0.5-0.1c-0.6,0-1,0.5-1,1c0,0.4,0.2,0.8,0.6,0.9l0,0c0,0,0,0,0,0c0,0,0,0,0,0c1.3,0.6,2.6,0.9,4.2,0.9
|
74 |
+
c2.9,0,5.4-1.2,5.5-3.9C251.4,21.9,248.2,21.5,245.8,21.1z"/>
|
75 |
+
</g>
|
76 |
+
</svg>
|
assets/css/images/ninja-forms.png
ADDED
Binary file
|
assets/css/images/om-step-1-sm.png
ADDED
Binary file
|
assets/css/images/om-step-1.png
ADDED
Binary file
|
assets/css/images/om-step-2-sm.png
ADDED
Binary file
|
assets/css/images/om-step-2.png
ADDED
Binary file
|
assets/css/images/om-step-3-sm.png
ADDED
Binary file
|
assets/css/images/om-step-3.png
ADDED
Binary file
|
assets/css/images/om-step-4-sm.png
ADDED
Binary file
|
assets/css/images/om-step-4.png
ADDED
Binary file
|
assets/css/images/tp-video-cta-button.png
ADDED
Binary file
|
assets/css/images/trustpulse-admin-icon.svg
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2 |
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
3 |
+
<svg width="100%" height="100%" viewBox="0 0 151 169" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;"><g id="mark" transform="matrix(0.461143,0,0,0.461143,-106.676,-1411.44)"><g transform="matrix(2.16852,0,0,2.16852,230.412,3060.73)"> <path d="M103.188,26.561C96.662,24.799 90.29,22.455 84.167,19.45C78.972,16.901 73.961,13.997 69.051,10.94C68.956,10.999 68.861,11.058 68.765,11.117C55.841,19.137 42.1,25.615 26.835,28.481C21.327,29.515 15.756,30.164 10.174,30.64L9.996,30.655C8.621,61.384 10.671,93.057 26.99,119.407C36.937,135.468 52.327,147.495 68.626,157.492L69.051,157.751C75.721,153.675 82.272,149.328 88.368,144.473L102.206,144.473C92.398,153.704 80.957,161.44 69.326,168.346C68.781,167.973 68.776,168.346 68.776,168.346C54.105,159.635 39.822,150.006 28.706,137.221C21.155,128.537 15.176,118.558 10.867,107.757C0.039,80.614 -0.647,50.397 1.241,22.026C13.241,21.311 25.428,20.158 36.915,16.454C48.244,12.801 58.678,6.735 68.756,0.192L69.051,0C69.247,0.128 69.443,0.255 69.64,0.383C82.351,8.617 95.916,15.884 110.854,18.998C111.709,19.176 112.566,19.344 113.425,19.502L103.188,26.561ZM100.152,132.347L81.156,132.347C77.981,132.212 77.767,130.604 77.7,129.035C77.621,127.169 78.831,125.529 81.156,125.43L97.514,125.43L102.685,106.579C102.685,106.579 103.683,104.245 105.689,104.052C107.293,103.897 108.672,104.574 109.337,106.514L117.15,132.951L121.936,117.91C121.936,117.91 123.484,115.168 125.942,115.574C127.282,115.917 127.336,115.979 128.113,117.047L133.676,125.43L146.996,125.43C147.012,125.432 149.468,125.764 150.205,127.599C151.058,129.721 149.708,132.232 146.996,132.347L131.82,132.347C130.17,132.279 129.699,131.85 128.939,130.801L126.339,126.884L120.324,145.791C120.324,145.791 119.264,148.043 117.286,148.191C115.705,148.309 114.365,147.633 113.711,145.722L106.144,120.117L103.487,129.804C103.487,129.804 102.28,132.254 100.152,132.347ZM137.379,31.586C138.051,47.952 137.548,64.343 134.744,80.522C133.466,87.9 130.68,98.081 128.24,105.175L119.46,102.321C126.914,82.657 128.717,61.266 128.394,40.33L137.379,31.586Z" style="fill:white;fill-rule:nonzero;"/></g><g transform="matrix(0.746317,0,0,0.746317,244.486,3011.77)"> <path d="M171.699,279.729C173.221,277.994 173.616,276.855 175.885,273.555C188.97,254.516 227.729,203.188 276.979,163.708C298.41,146.527 321.573,130.908 342.063,120.67C376.211,103.607 387.207,101.527 403.066,97.832C406.078,97.131 416.986,95.184 418.796,99.482C420.542,103.631 413.738,108.003 411.185,110.009C408.315,112.264 342.682,161.344 287.465,234.232C239.418,297.651 207.976,380.862 207.976,380.862C207.01,382.71 196.083,402.237 181.423,403.188C167.874,404.069 150.473,386.445 150.473,386.445C147.128,383.324 130.815,363.964 117.241,340.019C99.929,309.489 85.022,273.299 85.022,273.299C85.022,273.299 69.547,242.857 98.721,226.115C127.486,209.606 140.299,226.367 146.542,236.262C151.877,244.719 162.626,265.262 167.821,275.31C169.631,278.81 170.801,280.751 171.699,279.729Z" style="fill:white;fill-rule:nonzero;"/></g></g></svg>
|
assets/css/images/video-background.png
ADDED
Binary file
|
assets/css/images/woocommerce_logo.png
ADDED
Binary file
|
assets/css/images/wpforms.png
ADDED
Binary file
|
assets/css/pointer.css
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.wp-pointer {
|
2 |
+
width: 415px !important;
|
3 |
+
}
|
4 |
+
|
5 |
+
.wp-pointer-content h3:before {
|
6 |
+
content: "\f488";
|
7 |
+
}
|
8 |
+
|
9 |
+
.om-pointer-close-link a.close {
|
10 |
+
position: absolute;
|
11 |
+
top: 30px;
|
12 |
+
right: 25px;
|
13 |
+
}
|
14 |
+
|
15 |
+
/* This style is included in later versions of */
|
16 |
+
.wp-pointer-content h4 {
|
17 |
+
margin: 1.33em 20px 1em;
|
18 |
+
font-size: 1.15em;
|
19 |
+
}
|
20 |
+
|
21 |
+
.om-pointer-close-link a.close:before {
|
22 |
+
background: 0 0;
|
23 |
+
color: #fff;
|
24 |
+
content: "\f153";
|
25 |
+
display: block!important;
|
26 |
+
font: normal 16px/1 dashicons;
|
27 |
+
speak: none;
|
28 |
+
margin: 1px 0;
|
29 |
+
text-align: center;
|
30 |
+
-webkit-font-smoothing: antialiased!important;
|
31 |
+
width: 10px;
|
32 |
+
height: 100%;
|
33 |
+
position: absolute;
|
34 |
+
left: -4px;
|
35 |
+
top: -15px;
|
36 |
+
}
|
assets/css/settings.css
CHANGED
@@ -408,6 +408,8 @@ body.omapi-welcome {
|
|
408 |
background: #fff;
|
409 |
padding: 15px 30px;
|
410 |
display: inline-block;
|
|
|
|
|
411 |
}
|
412 |
|
413 |
.omapi-content {
|
@@ -478,11 +480,13 @@ body.omapi-welcome {
|
|
478 |
padding: 6px 8px;
|
479 |
}
|
480 |
|
481 |
-
.omapi-field-desc {
|
482 |
font-size: 12px;
|
483 |
font-style: italic;
|
|
|
484 |
color: #666;
|
485 |
vertical-align: middle;
|
|
|
486 |
}
|
487 |
|
488 |
.omapi-back {
|
408 |
background: #fff;
|
409 |
padding: 15px 30px;
|
410 |
display: inline-block;
|
411 |
+
/* Match the minimum height of our tabs */
|
412 |
+
min-height: 197px;
|
413 |
}
|
414 |
|
415 |
.omapi-content {
|
480 |
padding: 6px 8px;
|
481 |
}
|
482 |
|
483 |
+
.omapi-field-wrap .omapi-field-desc {
|
484 |
font-size: 12px;
|
485 |
font-style: italic;
|
486 |
+
font-weight: normal;
|
487 |
color: #666;
|
488 |
vertical-align: middle;
|
489 |
+
margin-bottom: 0;
|
490 |
}
|
491 |
|
492 |
.omapi-back {
|
assets/css/trustpulse-admin.min.css
ADDED
@@ -0,0 +1,416 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#wpcontent #wpcontent{
|
2 |
+
padding-left:0
|
3 |
+
}
|
4 |
+
#wpcontent .main-navigation{
|
5 |
+
display:-webkit-box;
|
6 |
+
display:-ms-flexbox;
|
7 |
+
display:flex;
|
8 |
+
-webkit-box-pack:end;
|
9 |
+
-ms-flex-pack:end;
|
10 |
+
justify-content:flex-end
|
11 |
+
}
|
12 |
+
#wpcontent .navbar-header{
|
13 |
+
width:100%;
|
14 |
+
background-color:#fff;
|
15 |
+
border-bottom:1px solid #e5ecf6
|
16 |
+
}
|
17 |
+
#wpcontent .navbar-brand{
|
18 |
+
height:38px
|
19 |
+
}
|
20 |
+
#wpcontent .navbar{
|
21 |
+
display:-webkit-box;
|
22 |
+
display:-ms-flexbox;
|
23 |
+
display:flex;
|
24 |
+
margin:0 auto;
|
25 |
+
font-size:16px;
|
26 |
+
-webkit-box-align:center;
|
27 |
+
-ms-flex-align:center;
|
28 |
+
align-items:center;
|
29 |
+
background:transparent;
|
30 |
+
-webkit-box-pack:justify;
|
31 |
+
-ms-flex-pack:justify;
|
32 |
+
justify-content:space-between;
|
33 |
+
padding:10px 20px;
|
34 |
+
line-height:1
|
35 |
+
}
|
36 |
+
#wpcontent .navbar img{
|
37 |
+
max-height:100%
|
38 |
+
}
|
39 |
+
#wpcontent .navbar .hover-underline{
|
40 |
+
border-bottom:2px solid transparent
|
41 |
+
}
|
42 |
+
#wpcontent .navbar .navbar-menu{
|
43 |
+
text-align:right
|
44 |
+
}
|
45 |
+
#wpcontent .navbar a{
|
46 |
+
font-weight:400
|
47 |
+
}
|
48 |
+
#wpcontent .navbar .menu-top-navbar-menu-container{
|
49 |
+
height:38px
|
50 |
+
}
|
51 |
+
#wpcontent a.navbar-item{
|
52 |
+
text-decoration:none;
|
53 |
+
color:#364150;
|
54 |
+
margin-right:10px
|
55 |
+
}
|
56 |
+
#wpcontent a.navbar-item.is-active,#wpcontent a.navbar-item:hover{
|
57 |
+
background-color:transparent;
|
58 |
+
height:calc($navbar-height + 2px);
|
59 |
+
color:#3a546f
|
60 |
+
}
|
61 |
+
#wpcontent a.navbar-item.is-active .hover-underline,#wpcontent a.navbar-item:hover .hover-underline{
|
62 |
+
border-bottom:2px solid #0db1eb
|
63 |
+
}
|
64 |
+
@media screen and (max-width:1087px){
|
65 |
+
#wpcontent .navbar-brand{
|
66 |
+
width:100%
|
67 |
+
}
|
68 |
+
|
69 |
+
}
|
70 |
+
@media screen and (max-width:1087px){
|
71 |
+
#wpcontent .navbar-menu.is-active{
|
72 |
+
display:block;
|
73 |
+
position:absolute;
|
74 |
+
top:65px
|
75 |
+
}
|
76 |
+
#wpcontent .navbar-menu.is-active .navbar{
|
77 |
+
display:-webkit-box;
|
78 |
+
display:-ms-flexbox;
|
79 |
+
display:flex;
|
80 |
+
-webkit-box-orient:vertical;
|
81 |
+
-webkit-box-direction:normal;
|
82 |
+
-ms-flex-direction:column;
|
83 |
+
flex-direction:column;
|
84 |
+
width:100vw;
|
85 |
+
text-align:left;
|
86 |
+
-webkit-box-align:start;
|
87 |
+
-ms-flex-align:start;
|
88 |
+
align-items:flex-start;
|
89 |
+
padding-right:0
|
90 |
+
}
|
91 |
+
#wpcontent .navbar-menu.is-active .navbar-item{
|
92 |
+
width:100%;
|
93 |
+
border-top:1px solid #e5ecf6
|
94 |
+
}
|
95 |
+
|
96 |
+
}
|
97 |
+
#adminmenu .toplevel-page-trustpulse-settings div.wp-menu-image{
|
98 |
+
height:30px
|
99 |
+
}
|
100 |
+
.tp-works-on{
|
101 |
+
margin-top:60px
|
102 |
+
}
|
103 |
+
.tp-works-on .tp-heading{
|
104 |
+
line-height:36px
|
105 |
+
}
|
106 |
+
.tp-works-on__icons{
|
107 |
+
display:-webkit-box;
|
108 |
+
display:-ms-flexbox;
|
109 |
+
display:flex;
|
110 |
+
-ms-flex-wrap:wrap;
|
111 |
+
flex-wrap:wrap;
|
112 |
+
-webkit-box-pack:justify;
|
113 |
+
-ms-flex-pack:justify;
|
114 |
+
justify-content:space-between;
|
115 |
+
-webkit-box-align:center;
|
116 |
+
-ms-flex-align:center;
|
117 |
+
align-items:center;
|
118 |
+
margin-bottom:30px
|
119 |
+
}
|
120 |
+
.tp-works-on__icon{
|
121 |
+
width:200px;
|
122 |
+
height:auto;
|
123 |
+
margin-bottom:20px
|
124 |
+
}
|
125 |
+
#tpVideo{
|
126 |
+
display:none
|
127 |
+
}
|
128 |
+
.omapi-trustpulse #wpwrap{
|
129 |
+
background:#f7faff
|
130 |
+
}
|
131 |
+
.omapi-trustpulse #wpcontent{
|
132 |
+
padding:0
|
133 |
+
}
|
134 |
+
.omapi-trustpulse #wpbody{
|
135 |
+
font-family:Averta,Helvetica,sans-serif;
|
136 |
+
color:#364150
|
137 |
+
}
|
138 |
+
.omapi-trustpulse #wpbody .text-center{
|
139 |
+
text-align:center
|
140 |
+
}
|
141 |
+
.omapi-trustpulse #wpbody .notice{
|
142 |
+
margin-top:20px
|
143 |
+
}
|
144 |
+
.omapi-trustpulse #wpbody .update-nag{
|
145 |
+
display:none
|
146 |
+
}
|
147 |
+
.omapi-trustpulse #wpbody p{
|
148 |
+
font-size:16px
|
149 |
+
}
|
150 |
+
.omapi-trustpulse #wpbody a{
|
151 |
+
color:#364150;
|
152 |
+
-webkit-text-decoration-color:#0db1eb;
|
153 |
+
text-decoration-color:#0db1eb;
|
154 |
+
font-weight:500
|
155 |
+
}
|
156 |
+
.omapi-trustpulse #wpbody a:hover{
|
157 |
+
color:#0db1eb
|
158 |
+
}
|
159 |
+
.omapi-trustpulse #wpbody .trustpulse-wrap{
|
160 |
+
max-width:720px;
|
161 |
+
margin:0 auto
|
162 |
+
}
|
163 |
+
.omapi-trustpulse #wpbody .tp-admin-box{
|
164 |
+
position:relative;
|
165 |
+
-webkit-box-sizing:border-box;
|
166 |
+
box-sizing:border-box;
|
167 |
+
background:#fff;
|
168 |
+
max-width:840px;
|
169 |
+
margin:0 auto;
|
170 |
+
padding:30px;
|
171 |
+
border-radius:10px;
|
172 |
+
border:1px solid #e5ecf6;
|
173 |
+
text-align:center
|
174 |
+
}
|
175 |
+
.omapi-trustpulse #wpbody .tp-admin-box p{
|
176 |
+
margin-bottom:30px
|
177 |
+
}
|
178 |
+
.omapi-trustpulse #wpbody .tp-admin-box--video{
|
179 |
+
margin-top:40px;
|
180 |
+
height:360px
|
181 |
+
}
|
182 |
+
.omapi-trustpulse #wpbody .tp-admin-box--video .tp-video-button{
|
183 |
+
cursor:pointer;
|
184 |
+
position:absolute;
|
185 |
+
left:calc(50% - 125px);
|
186 |
+
top:calc(50% - 40px);
|
187 |
+
width:250px;
|
188 |
+
z-index:1
|
189 |
+
}
|
190 |
+
.omapi-trustpulse #wpbody .tp-admin-box--video .tp-video-background{
|
191 |
+
position:absolute;
|
192 |
+
left:0;
|
193 |
+
bottom:0;
|
194 |
+
width:100%;
|
195 |
+
opacity:.3
|
196 |
+
}
|
197 |
+
.omapi-trustpulse #wpbody .tp-admin-box--video p{
|
198 |
+
margin-top:0
|
199 |
+
}
|
200 |
+
.omapi-trustpulse #wpbody .tp-or-line{
|
201 |
+
margin:5px auto
|
202 |
+
}
|
203 |
+
.omapi-trustpulse #wpbody .tp-admin-box-group{
|
204 |
+
display:-webkit-box;
|
205 |
+
display:-ms-flexbox;
|
206 |
+
display:flex;
|
207 |
+
-webkit-box-pack:justify;
|
208 |
+
-ms-flex-pack:justify;
|
209 |
+
justify-content:space-between;
|
210 |
+
width:840px;
|
211 |
+
margin:20px auto
|
212 |
+
}
|
213 |
+
.omapi-trustpulse #wpbody .tp-admin-box-group .tp-admin-box{
|
214 |
+
width:32%
|
215 |
+
}
|
216 |
+
.omapi-trustpulse #wpbody .tp-heading{
|
217 |
+
font-size:28px;
|
218 |
+
font-weight:700;
|
219 |
+
letter-spacing:-1px;
|
220 |
+
text-align:center;
|
221 |
+
margin-top:50px
|
222 |
+
}
|
223 |
+
.omapi-trustpulse #wpbody .tp-subheading{
|
224 |
+
text-align:center;
|
225 |
+
margin-top:-15px;
|
226 |
+
margin-bottom:70px
|
227 |
+
}
|
228 |
+
.omapi-trustpulse #wpbody .tp-features{
|
229 |
+
max-width:840px;
|
230 |
+
margin:0 auto
|
231 |
+
}
|
232 |
+
.omapi-trustpulse #wpbody .tp-features .tp-feature{
|
233 |
+
display:-webkit-box;
|
234 |
+
display:-ms-flexbox;
|
235 |
+
display:flex;
|
236 |
+
-ms-flex-wrap:wrap;
|
237 |
+
flex-wrap:wrap;
|
238 |
+
-webkit-box-pack:justify;
|
239 |
+
-ms-flex-pack:justify;
|
240 |
+
justify-content:space-between;
|
241 |
+
margin-bottom:20px
|
242 |
+
}
|
243 |
+
.omapi-trustpulse #wpbody .tp-features .tp-feature.tp-feature--text-left{
|
244 |
+
-webkit-box-orient:horizontal;
|
245 |
+
-webkit-box-direction:reverse;
|
246 |
+
-ms-flex-direction:row-reverse;
|
247 |
+
flex-direction:row-reverse
|
248 |
+
}
|
249 |
+
.omapi-trustpulse #wpbody .tp-features .tp-feature__image{
|
250 |
+
width:325px
|
251 |
+
}
|
252 |
+
@media screen and (max-width:400px){
|
253 |
+
.omapi-trustpulse #wpbody .tp-features .tp-feature__image{
|
254 |
+
width:100%;
|
255 |
+
margin-bottom:20px
|
256 |
+
}
|
257 |
+
|
258 |
+
}
|
259 |
+
.omapi-trustpulse #wpbody .tp-features .tp-feature__text{
|
260 |
+
display:-webkit-box;
|
261 |
+
display:-ms-flexbox;
|
262 |
+
display:flex;
|
263 |
+
-webkit-box-orient:vertical;
|
264 |
+
-webkit-box-direction:normal;
|
265 |
+
-ms-flex-direction:column;
|
266 |
+
flex-direction:column;
|
267 |
+
-webkit-box-pack:center;
|
268 |
+
-ms-flex-pack:center;
|
269 |
+
justify-content:center;
|
270 |
+
width:350px
|
271 |
+
}
|
272 |
+
@media screen and (max-width:400px){
|
273 |
+
.omapi-trustpulse #wpbody .tp-features .tp-feature__text{
|
274 |
+
width:100%
|
275 |
+
}
|
276 |
+
|
277 |
+
}
|
278 |
+
.omapi-trustpulse #wpbody .tp-features .tp-feature__text h3{
|
279 |
+
font-size:22px;
|
280 |
+
font-weight:700;
|
281 |
+
margin-bottom:0
|
282 |
+
}
|
283 |
+
.omapi-trustpulse #wpbody .tp-content-row{
|
284 |
+
display:-webkit-box;
|
285 |
+
display:-ms-flexbox;
|
286 |
+
display:flex;
|
287 |
+
-ms-flex-line-pack:center;
|
288 |
+
align-content:center;
|
289 |
+
-webkit-box-pack:center;
|
290 |
+
-ms-flex-pack:center;
|
291 |
+
justify-content:center
|
292 |
+
}
|
293 |
+
.omapi-trustpulse #wpbody .tp-content-row__item{
|
294 |
+
display:-webkit-box;
|
295 |
+
display:-ms-flexbox;
|
296 |
+
display:flex;
|
297 |
+
-webkit-box-align:center;
|
298 |
+
-ms-flex-align:center;
|
299 |
+
align-items:center;
|
300 |
+
margin:0 5px
|
301 |
+
}
|
302 |
+
.omapi-trustpulse #wpbody .tp-button{
|
303 |
+
cursor:pointer;
|
304 |
+
display:-webkit-inline-box;
|
305 |
+
display:-ms-inline-flexbox;
|
306 |
+
display:inline-flex;
|
307 |
+
font-weight:700;
|
308 |
+
background-color:#16bd83;
|
309 |
+
font-size:18px;
|
310 |
+
border-radius:100px;
|
311 |
+
border-color:transparent;
|
312 |
+
color:#fff;
|
313 |
+
-webkit-box-align:center;
|
314 |
+
-ms-flex-align:center;
|
315 |
+
align-items:center;
|
316 |
+
-webkit-box-pack:center;
|
317 |
+
-ms-flex-pack:center;
|
318 |
+
justify-content:center;
|
319 |
+
padding:10px 25px;
|
320 |
+
text-align:center;
|
321 |
+
white-space:nowrap;
|
322 |
+
min-width:100px;
|
323 |
+
text-decoration:none
|
324 |
+
}
|
325 |
+
.omapi-trustpulse #wpbody .tp-button:hover{
|
326 |
+
background-color:#19d191;
|
327 |
+
color:#fff
|
328 |
+
}
|
329 |
+
.omapi-trustpulse #wpbody .tp-button--full{
|
330 |
+
width:100%
|
331 |
+
}
|
332 |
+
.omapi-trustpulse #wpbody .tp-button--large{
|
333 |
+
padding:15px 60px;
|
334 |
+
font-size:22px
|
335 |
+
}
|
336 |
+
.omapi-trustpulse #wpbody .tp-button--blue{
|
337 |
+
cursor:pointer;
|
338 |
+
background:#fff;
|
339 |
+
border:1px solid #e5ecf6;
|
340 |
+
border-radius:100px;
|
341 |
+
padding:10px 25px;
|
342 |
+
color:#364150;
|
343 |
+
font-weight:700
|
344 |
+
}
|
345 |
+
.omapi-trustpulse #wpbody .tp-button--blue:hover{
|
346 |
+
background-color:#205fbd;
|
347 |
+
border-color:#205fbd
|
348 |
+
}
|
349 |
+
.omapi-trustpulse #wpbody .tp-button--white{
|
350 |
+
color:#364150;
|
351 |
+
background-color:#fff;
|
352 |
+
border:1px solid #e5ecf6
|
353 |
+
}
|
354 |
+
.omapi-trustpulse #wpbody .tp-button--white:hover{
|
355 |
+
background-color:#205fbd
|
356 |
+
}
|
357 |
+
@font-face {
|
358 |
+
font-family: 'Averta';
|
359 |
+
src: url( '../fonts/Averta-Regular.eot');
|
360 |
+
src: url( '../fonts/Averta-Regular.eot?#iefix') format('embedded-opentype'),
|
361 |
+
url( '../fonts/Averta-Regular.woff') format('woff'),
|
362 |
+
url( '../fonts/Averta-Regular.ttf') format('truetype');
|
363 |
+
font-weight: normal;
|
364 |
+
font-style: normal;
|
365 |
+
}
|
366 |
+
@font-face {
|
367 |
+
font-family: 'Averta';
|
368 |
+
src: url( '../fonts/Averta-Light.eot');
|
369 |
+
src: url( '../fonts/Averta-Light.eot?#iefix') format('embedded-opentype'),
|
370 |
+
url( '../fonts/Averta-Light.woff') format('woff'),
|
371 |
+
url( '../fonts/Averta-Light.ttf') format('truetype');
|
372 |
+
font-weight: 300;
|
373 |
+
font-style: normal;
|
374 |
+
}
|
375 |
+
|
376 |
+
@font-face {
|
377 |
+
font-family: 'Averta';
|
378 |
+
src: url( '../fonts/Averta-Semibold.eot');
|
379 |
+
src: url( '../fonts/Averta-Semibold.eot?#iefix') format('embedded-opentype'),
|
380 |
+
url( '../fonts/Averta-Semibold.woff') format('woff'),
|
381 |
+
url( '../fonts/Averta-Semibold.ttf') format('truetype');
|
382 |
+
font-weight: 500;
|
383 |
+
font-style: normal;
|
384 |
+
}
|
385 |
+
|
386 |
+
@font-face {
|
387 |
+
font-family: 'Averta';
|
388 |
+
src: url( '../fonts/Averta-Semibold.eot');
|
389 |
+
src: url( '../fonts/Averta-Semibold.eot?#iefix') format('embedded-opentype'),
|
390 |
+
url( '../fonts/Averta-Semibold.woff') format('woff'),
|
391 |
+
url( '../fonts/Averta-Semibold.ttf') format('truetype');
|
392 |
+
font-weight: 600;
|
393 |
+
font-style: normal;
|
394 |
+
}
|
395 |
+
|
396 |
+
@font-face {
|
397 |
+
font-family: 'Averta';
|
398 |
+
src: url( '../fonts/Averta-Bold.eot');
|
399 |
+
src: url( '../fonts/Averta-Bold.eot?#iefix') format('embedded-opentype'),
|
400 |
+
url( '../fonts/Averta-Bold.woff') format('woff'),
|
401 |
+
url( '../fonts/Averta-Bold.ttf') format('truetype');
|
402 |
+
font-weight: bold;
|
403 |
+
font-style: normal;
|
404 |
+
}
|
405 |
+
|
406 |
+
@font-face {
|
407 |
+
font-family: 'Averta';
|
408 |
+
src: url( '../fonts/Averta-ExtraBoldItalic.eot');
|
409 |
+
src: url( '../fonts/Averta-ExtraBoldItalic.eot?#iefix') format('embedded-opentype'),
|
410 |
+
url( '../fonts/Averta-ExtraBoldItalic.woff') format('woff'),
|
411 |
+
url( '../fonts/Averta-ExtraBoldItalic.ttf') format('truetype');
|
412 |
+
font-weight: bold;
|
413 |
+
font-style: italic, oblique;
|
414 |
+
}
|
415 |
+
|
416 |
+
|
assets/fonts/Averta-Bold.eot
ADDED
Binary file
|
assets/fonts/Averta-Bold.ttf
ADDED
Binary file
|
assets/fonts/Averta-Bold.woff
ADDED
Binary file
|
assets/fonts/Averta-ExtraBoldItalic.ttf
ADDED
Binary file
|
assets/fonts/Averta-ExtraBoldItalic.woff
ADDED
Binary file
|
assets/fonts/Averta-Light.eot
ADDED
Binary file
|
assets/fonts/Averta-Light.ttf
ADDED
Binary file
|
assets/fonts/Averta-Light.woff
ADDED
Binary file
|
assets/fonts/Averta-Regular.eot
ADDED
Binary file
|
assets/fonts/Averta-Regular.ttf
ADDED
Binary file
|
assets/fonts/Averta-Regular.woff
ADDED
Binary file
|
assets/fonts/Averta-Semibold.eot
ADDED
Binary file
|
assets/fonts/Averta-Semibold.ttf
ADDED
Binary file
|
assets/fonts/Averta-Semibold.woff
ADDED
Binary file
|
assets/js/helper.js
CHANGED
@@ -1,73 +1,13 @@
|
|
1 |
/* ==========================================================
|
2 |
* helper.js
|
3 |
* ==========================================================
|
4 |
-
* Copyright
|
5 |
* https://awesomemotive.com
|
6 |
* ========================================================== */
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
$.each(omapi_localized.slugs, function(i, v) {
|
13 |
-
|
14 |
-
if ( ! v.mailpoet ) {
|
15 |
-
return;
|
16 |
-
}
|
17 |
-
|
18 |
-
if ( i !== slug ) {
|
19 |
-
return;
|
20 |
-
}
|
21 |
-
|
22 |
-
// Send a request to force optin to work even if no provider is set.
|
23 |
-
var data = optin.optin_data;
|
24 |
-
object.setProp('optin_data', data);
|
25 |
-
|
26 |
-
data.optin = optin.original_optin;
|
27 |
-
|
28 |
-
// Post to MailPoet.
|
29 |
-
postToMailPoet(data);
|
30 |
-
|
31 |
-
return false;
|
32 |
-
});
|
33 |
-
});
|
34 |
-
|
35 |
-
// Default Campaigns
|
36 |
-
document.addEventListener('om.Optin.init.submit', function(event){
|
37 |
-
var campaign = event.detail.Campaign;
|
38 |
-
var optin = event.detail.Optin;
|
39 |
-
|
40 |
-
$.each(omapi_localized.slugs, function(i, v) {
|
41 |
-
|
42 |
-
if ( ! v.mailpoet ) {
|
43 |
-
return;
|
44 |
-
}
|
45 |
-
|
46 |
-
if ( i !== campaign.id ) {
|
47 |
-
return;
|
48 |
-
}
|
49 |
-
|
50 |
-
// Send a request to force optin to work even if no provider is set.
|
51 |
-
var data = optin.data;
|
52 |
-
data.optin = campaign.id;
|
53 |
-
|
54 |
-
if ( data.fields ) {
|
55 |
-
$.extend( data, data.fields );
|
56 |
-
}
|
57 |
-
|
58 |
-
// Post to MailPoet.
|
59 |
-
postToMailPoet(data);
|
60 |
-
|
61 |
-
return false;
|
62 |
-
});
|
63 |
-
});
|
64 |
-
|
65 |
-
function postToMailPoet(data) {
|
66 |
-
// Now make an ajax request to make the optin locally.
|
67 |
-
data.action = 'mailpoet';
|
68 |
-
data.nonce = omapi_localized.nonce;
|
69 |
-
data.no_provider = true;
|
70 |
-
|
71 |
-
$.post(omapi_localized.ajax, data, function(){}, 'json');
|
72 |
}
|
73 |
});
|
1 |
/* ==========================================================
|
2 |
* helper.js
|
3 |
* ==========================================================
|
4 |
+
* Copyright 2019 Awesome Motive.
|
5 |
* https://awesomemotive.com
|
6 |
* ========================================================== */
|
7 |
+
document.addEventListener('om.Styles.positionFloating', function(event) {
|
8 |
+
var campaign = event.detail.Campaign;
|
9 |
+
if ('floating' === campaign.Types.type && 'top' === campaign.options.position && document.getElementById('wpadminbar')) {
|
10 |
+
const marginTop = window.matchMedia('(max-width: 782px)').matches ? '46px' : '32px';
|
11 |
+
campaign.contain.style.marginTop = marginTop;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
}
|
13 |
});
|
assets/js/mailpoet.js
ADDED
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* ==========================================================
|
2 |
+
* mailpoet.js
|
3 |
+
* ==========================================================
|
4 |
+
* Copyright 2019 Awesome Motive.
|
5 |
+
* https://awesomemotive.com
|
6 |
+
* ========================================================== */
|
7 |
+
jQuery(document).ready(function($){
|
8 |
+
// Legacy Campaigns
|
9 |
+
$(document).on('OptinMonsterPreOptin', function(event, optin, object){
|
10 |
+
var slug = optin.optin.replace('-', '_');
|
11 |
+
$.each(omapi_localized.slugs, function(i, v) {
|
12 |
+
|
13 |
+
if ( ! v.mailpoet ) {
|
14 |
+
return;
|
15 |
+
}
|
16 |
+
|
17 |
+
if ( i !== slug ) {
|
18 |
+
return;
|
19 |
+
}
|
20 |
+
|
21 |
+
// Send a request to force optin to work even if no provider is set.
|
22 |
+
var data = optin.optin_data;
|
23 |
+
object.setProp('optin_data', data);
|
24 |
+
|
25 |
+
data.optin = optin.original_optin;
|
26 |
+
|
27 |
+
// Post to MailPoet.
|
28 |
+
postToMailPoet(data);
|
29 |
+
|
30 |
+
return false;
|
31 |
+
});
|
32 |
+
});
|
33 |
+
|
34 |
+
// Default Campaigns
|
35 |
+
document.addEventListener('om.Optin.init.submit', function(event){
|
36 |
+
var campaign = event.detail.Campaign;
|
37 |
+
var optin = event.detail.Optin;
|
38 |
+
|
39 |
+
$.each(omapi_localized.slugs, function(i, v) {
|
40 |
+
|
41 |
+
if ( ! v.mailpoet ) {
|
42 |
+
return;
|
43 |
+
}
|
44 |
+
|
45 |
+
if ( i !== campaign.id ) {
|
46 |
+
return;
|
47 |
+
}
|
48 |
+
|
49 |
+
// Send a request to force optin to work even if no provider is set.
|
50 |
+
var data = optin.data;
|
51 |
+
data.optin = campaign.id;
|
52 |
+
|
53 |
+
if ( data.fields ) {
|
54 |
+
$.extend( data, data.fields );
|
55 |
+
}
|
56 |
+
|
57 |
+
// Post to MailPoet.
|
58 |
+
postToMailPoet(data);
|
59 |
+
|
60 |
+
return false;
|
61 |
+
});
|
62 |
+
});
|
63 |
+
|
64 |
+
function postToMailPoet(data) {
|
65 |
+
// Now make an ajax request to make the optin locally.
|
66 |
+
$.post(omapi_localized.ajax, {
|
67 |
+
action: 'mailpoet',
|
68 |
+
nonce: omapi_localized.nonce,
|
69 |
+
no_provider: true,
|
70 |
+
optinData: data,
|
71 |
+
}, function(){}, 'json');
|
72 |
+
}
|
73 |
+
});
|
assets/js/notice.js
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery( document ).ready( function( $ ) {
|
2 |
+
|
3 |
+
$( document ).on( 'click', '.om-review-btns', function( event ) {
|
4 |
+
event.preventDefault();
|
5 |
+
|
6 |
+
var target = $( this ).data( 'res' );
|
7 |
+
|
8 |
+
$( '.om-steps' ).hide();
|
9 |
+
$( '.om-step-' + target ).show();
|
10 |
+
} );
|
11 |
+
|
12 |
+
$( document ).on( 'click', '.om-dismiss-review-notice, .om-review-notice .notice-dismiss', function( event ) {
|
13 |
+
|
14 |
+
if ( '#' === $( this ).attr( 'href' ) ) {
|
15 |
+
event.preventDefault();
|
16 |
+
}
|
17 |
+
|
18 |
+
var later = false;
|
19 |
+
|
20 |
+
if ( $( this ).hasClass( 'notice-dismiss' ) || $( this ).hasClass( 'om-dismiss-review-notice-delay' ) ) {
|
21 |
+
later = true;
|
22 |
+
}
|
23 |
+
|
24 |
+
$.post(
|
25 |
+
ajaxurl,
|
26 |
+
{
|
27 |
+
action : 'omapi_dismiss_review',
|
28 |
+
nonce : omNotice.nonce,
|
29 |
+
later : later
|
30 |
+
},
|
31 |
+
function( response ) {}
|
32 |
+
);
|
33 |
+
|
34 |
+
$( '.om-review-notice' ).remove();
|
35 |
+
} );
|
36 |
+
});
|
assets/js/pointer.js
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
jQuery(document).ready( function($) {
|
2 |
+
omapi_open_pointer();
|
3 |
+
|
4 |
+
// Trigger a pointer close when clicking on the link in the pointer
|
5 |
+
$('#omPointerButton, .om-pointer-close-link').click(function () {
|
6 |
+
omapiPointer;
|
7 |
+
$(omapiPointer.target).pointer('close');
|
8 |
+
});
|
9 |
+
|
10 |
+
function omapi_open_pointer() {
|
11 |
+
pointer = omapiPointer;
|
12 |
+
options = $.extend(pointer.options, {
|
13 |
+
close: function() {
|
14 |
+
$.post( ajaxurl, {
|
15 |
+
pointer: pointer.id,
|
16 |
+
action: 'dismiss-wp-pointer'
|
17 |
+
});
|
18 |
+
}
|
19 |
+
});
|
20 |
+
|
21 |
+
$(pointer.target).pointer( options ).pointer('open');
|
22 |
+
}
|
23 |
+
});
|
assets/js/settings.js
CHANGED
@@ -6,301 +6,296 @@
|
|
6 |
* ========================================================== */
|
7 |
jQuery(document).ready(function ($) {
|
8 |
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
function omapiFindTooltips() {
|
301 |
-
$('[data-toggle="tooltip"]').tooltip()
|
302 |
-
}
|
303 |
-
|
304 |
-
|
305 |
|
306 |
});
|
6 |
* ========================================================== */
|
7 |
jQuery(document).ready(function ($) {
|
8 |
|
9 |
+
// Initialize Select2.
|
10 |
+
omapiSelect();
|
11 |
+
|
12 |
+
// Hide/show any state specific settings.
|
13 |
+
omapiToggleSettings();
|
14 |
+
|
15 |
+
// Support Toggles on content
|
16 |
+
omapiSettingsToggle();
|
17 |
+
|
18 |
+
// Confirm resetting settings.
|
19 |
+
omapiResetSettings();
|
20 |
+
|
21 |
+
// Copy to clipboard Loading
|
22 |
+
omapiClipboard();
|
23 |
+
|
24 |
+
// Recognize Copy to Clipboard Buttons
|
25 |
+
omapiCopytoClipboardBtn();
|
26 |
+
|
27 |
+
// Support PDF generation
|
28 |
+
omapiBuildSupportPDF();
|
29 |
+
|
30 |
+
// Run Tooltip lib on any tooltips
|
31 |
+
omapiFindTooltips();
|
32 |
+
|
33 |
+
// Add "Connect to OptinMonster" functionality
|
34 |
+
omapiHandleApiKeyConnect();
|
35 |
+
|
36 |
+
/**
|
37 |
+
* Add the listeners necessary for the connect to OptinMonster button
|
38 |
+
*/
|
39 |
+
function omapiHandleApiKeyConnect() {
|
40 |
+
function updateForm(val, $btn) {
|
41 |
+
var field = document.getElementById('omapi-field-apikey');
|
42 |
+
field.value = val;
|
43 |
+
|
44 |
+
// Start spinner.
|
45 |
+
$('.om-api-key-spinner').remove();
|
46 |
+
$btn.after('<div class="om-api-key-spinner spinner is-active" style="float: none;margin-top: 13px;"></div>');
|
47 |
+
|
48 |
+
HTMLFormElement.prototype.submit.call(field.form)
|
49 |
+
}
|
50 |
+
|
51 |
+
$('#omapiAuthorizeButton').click(function (e) {
|
52 |
+
e.preventDefault();
|
53 |
+
var w = window.open(OMAPI.app_url + 'wordpress/connect/', '_blank', 'location=no,width=500,height=730,scrollbars=0');
|
54 |
+
w.focus();
|
55 |
+
});
|
56 |
+
|
57 |
+
window.addEventListener('message', function(msg) {
|
58 |
+
if (msg.origin.replace(/\/$/, '') !== OMAPI.app_url.replace(/\/$/, '')) {
|
59 |
+
return;
|
60 |
+
}
|
61 |
+
|
62 |
+
if (!msg.data || 'string' !== typeof msg.data) {
|
63 |
+
console.error('Messages from "' + OMAPI.app_url + '" must contain an api key string.');
|
64 |
+
return;
|
65 |
+
}
|
66 |
+
|
67 |
+
updateForm(msg.data, $('#omapiAuthorizeButton'));
|
68 |
+
});
|
69 |
+
|
70 |
+
// Also initialize the "Click Here to enter an API Key" link
|
71 |
+
$('#omapiShowApiKey').click(function (e) {
|
72 |
+
e.preventDefault();
|
73 |
+
$('#omapi-form-api .omapi-hidden').removeClass('omapi-hidden');
|
74 |
+
$('#omapi-field-apikey').focus().select();
|
75 |
+
|
76 |
+
});
|
77 |
+
|
78 |
+
// Add the listener for disconnecting the API Key.
|
79 |
+
$('#omapiDisconnectButton').click(function (e) {
|
80 |
+
e.preventDefault();
|
81 |
+
updateForm('', $(this));
|
82 |
+
});
|
83 |
+
}
|
84 |
+
|
85 |
+
/**
|
86 |
+
* Dynamic Toggle functionality
|
87 |
+
*/
|
88 |
+
function omapiSettingsToggle() {
|
89 |
+
|
90 |
+
$('.omapi-ui-toggle-controller').click(function (e) {
|
91 |
+
var thisToggle = e.currentTarget;
|
92 |
+
$(thisToggle).toggleClass("toggled");
|
93 |
+
$(thisToggle).next(".omapi-ui-toggle-content").toggleClass("visible");
|
94 |
+
});
|
95 |
+
|
96 |
+
}
|
97 |
+
|
98 |
+
/**
|
99 |
+
* Confirms the settings reset for the active tab.
|
100 |
+
*
|
101 |
+
* @since 1.0.0
|
102 |
+
*/
|
103 |
+
function omapiResetSettings() {
|
104 |
+
$(document).on('click', 'input[name=reset]', function (e) {
|
105 |
+
return confirm(omapi.confirm);
|
106 |
+
});
|
107 |
+
}
|
108 |
+
|
109 |
+
/**
|
110 |
+
* Toggles the shortcode list setting.
|
111 |
+
*
|
112 |
+
* @since 1.1.4
|
113 |
+
*/
|
114 |
+
function omapiToggleSettings() {
|
115 |
+
var $automatic = $('#omapi-field-automatic');
|
116 |
+
var $mpSetting = $('#omapi-field-mailpoet');
|
117 |
+
var $mpPhone = $('#omapi-field-mailpoet_use_phone');
|
118 |
+
|
119 |
+
var toggleAutoSetting = function() {
|
120 |
+
var method = $automatic.is(':checked') ? 'hide' : 'show';
|
121 |
+
$('.omapi-field-box-automatic_shortcode')[method]();
|
122 |
+
};
|
123 |
+
|
124 |
+
var toggleMpPhoneSetting = function() {
|
125 |
+
var method = $mpPhone.is(':checked') ? 'show' : 'hide';
|
126 |
+
$('.omapi-field-box-mailpoet_phone_field')[method]();
|
127 |
+
};
|
128 |
+
|
129 |
+
var toggleMpSettings = function() {
|
130 |
+
var show = $mpSetting.is(':checked');
|
131 |
+
var method = show ? 'show' : 'hide';
|
132 |
+
$('.omapi-field-box-mailpoet_list')[method]();
|
133 |
+
$('.omapi-field-box-mailpoet_use_phone')[method]();
|
134 |
+
$('.omapi-field-box-mailpoet_phone_field')[method]();
|
135 |
+
|
136 |
+
if ( show ) {
|
137 |
+
toggleMpPhoneSetting();
|
138 |
+
}
|
139 |
+
};
|
140 |
+
|
141 |
+
toggleAutoSetting();
|
142 |
+
toggleMpSettings();
|
143 |
+
$(document).on('change', '#omapi-field-automatic', toggleAutoSetting);
|
144 |
+
$(document).on('change', '#omapi-field-mailpoet', toggleMpSettings);
|
145 |
+
$(document).on('change', '#omapi-field-mailpoet_use_phone', toggleMpPhoneSetting);
|
146 |
+
}
|
147 |
+
|
148 |
+
/**
|
149 |
+
* Initializes the Select2 replacement for select fields.
|
150 |
+
*
|
151 |
+
* @since 1.0.0
|
152 |
+
*/
|
153 |
+
function omapiSelect() {
|
154 |
+
$('.omapi-select').each(function (i, el) {
|
155 |
+
var data = $(this).attr('id').indexOf('taxonomies') > -1 ? OMAPI.tags : OMAPI.posts;
|
156 |
+
$(this).select2({
|
157 |
+
minimumInputLength: 1,
|
158 |
+
multiple: true,
|
159 |
+
data: data,
|
160 |
+
initSelection: function (el, cb) {
|
161 |
+
var ids = $(el).val();
|
162 |
+
ids = ids.split(',');
|
163 |
+
items = data.filter(function(d) {
|
164 |
+
return ids.indexOf(d.id) > -1;
|
165 |
+
});
|
166 |
+
cb(items);
|
167 |
+
}
|
168 |
+
}).on('change select2-removed', function () {});
|
169 |
+
});
|
170 |
+
}
|
171 |
+
|
172 |
+
/**
|
173 |
+
* Generate support PDF from localized data
|
174 |
+
*
|
175 |
+
* @since 1.1.5
|
176 |
+
*/
|
177 |
+
function omapiBuildSupportPDF() {
|
178 |
+
var selector = $('#js--omapi-support-pdf');
|
179 |
+
|
180 |
+
selector.click(function (e) {
|
181 |
+
e.preventDefault();
|
182 |
+
|
183 |
+
var doc = new jsPDF('p', 'mm', 'letter');
|
184 |
+
|
185 |
+
var supportData = omapi.supportData;
|
186 |
+
var serverData = supportData.server;
|
187 |
+
var optinData = supportData.optins;
|
188 |
+
|
189 |
+
// Doc Title
|
190 |
+
doc.text(10, 10, 'OptinMonster Support Assistance');
|
191 |
+
|
192 |
+
// Server Info
|
193 |
+
i = 10;
|
194 |
+
$.each(serverData, function (key, value) {
|
195 |
+
i += 10;
|
196 |
+
doc.text(10, i, key + ' : ' + value);
|
197 |
+
});
|
198 |
+
|
199 |
+
// Optin Info
|
200 |
+
$.each(optinData, function (key, value) {
|
201 |
+
|
202 |
+
//Move down 10mm
|
203 |
+
i = 10;
|
204 |
+
// Add a new page
|
205 |
+
doc.addPage();
|
206 |
+
//Title as slug
|
207 |
+
doc.text(10, 10, key);
|
208 |
+
$.each(value, function (key, value) {
|
209 |
+
|
210 |
+
// Keep from outputing ugly Object text
|
211 |
+
output = ($.isPlainObject(value) ? '' : value);
|
212 |
+
// new line
|
213 |
+
i += 10;
|
214 |
+
doc.text(10, i, key + ' : ' + output);
|
215 |
+
//Output any object data from the value
|
216 |
+
if ($.isPlainObject(value)) {
|
217 |
+
$.each(value, function (key, value) {
|
218 |
+
i += 10;
|
219 |
+
doc.text(20, i, key + ' : ' + value);
|
220 |
+
});
|
221 |
+
}
|
222 |
+
});
|
223 |
+
|
224 |
+
});
|
225 |
+
|
226 |
+
// Save the PDF
|
227 |
+
doc.save('OMSupportHelp.pdf');
|
228 |
+
|
229 |
+
});
|
230 |
+
}
|
231 |
+
|
232 |
+
/**
|
233 |
+
* Clipboard Helpers
|
234 |
+
*
|
235 |
+
* @since 1.1.5
|
236 |
+
*/
|
237 |
+
function omapiClipboard() {
|
238 |
+
var ompaiClipboard = new Clipboard('.omapi-copy-button');
|
239 |
+
|
240 |
+
ompaiClipboard.on('success', function (e) {
|
241 |
+
setTooltip(e.trigger, 'Copied to Clipboard!');
|
242 |
+
hideTooltip(e.trigger);
|
243 |
+
});
|
244 |
+
ompaiClipboard.on('error', function (e) {
|
245 |
+
var fallbackMessage = '';
|
246 |
+
|
247 |
+
if(/iPhone|iPad/i.test(navigator.userAgent)) {
|
248 |
+
fallbackMessage = 'Unable to Copy on this device';
|
249 |
+
}
|
250 |
+
else if (/Mac/i.test(navigator.userAgent)) {
|
251 |
+
fallbackMessage = 'Press ⌘-C to Copy';
|
252 |
+
}
|
253 |
+
else {
|
254 |
+
fallbackMessage = 'Press Ctrl-C to Copy';
|
255 |
+
}
|
256 |
+
setTooltip(e.trigger, fallbackMessage);
|
257 |
+
hideTooltip(e.trigger);
|
258 |
+
});
|
259 |
+
}
|
260 |
+
|
261 |
+
/**
|
262 |
+
* Standardize Copy to clipboard button
|
263 |
+
*
|
264 |
+
* @since 1.1.5
|
265 |
+
*/
|
266 |
+
function omapiCopytoClipboardBtn() {
|
267 |
+
$('omapi-copy-button').tooltip({
|
268 |
+
trigger: 'click',
|
269 |
+
placement: 'top',
|
270 |
+
|
271 |
+
});
|
272 |
+
}
|
273 |
+
/**
|
274 |
+
* Set BS Tooltip based on Clipboard data
|
275 |
+
*
|
276 |
+
* @since 1.1.5
|
277 |
+
* @param btn
|
278 |
+
* @param message
|
279 |
+
*/
|
280 |
+
function setTooltip(btn, message) {
|
281 |
+
$(btn).attr('data-original-title', message)
|
282 |
+
.tooltip('show');
|
283 |
+
}
|
284 |
+
|
285 |
+
/**
|
286 |
+
* Remove tooltip after Clipboard message shown
|
287 |
+
*
|
288 |
+
* @since 1.1.5
|
289 |
+
* @param btn
|
290 |
+
*/
|
291 |
+
function hideTooltip(btn) {
|
292 |
+
setTimeout(function() {
|
293 |
+
$(btn).tooltip('destroy');
|
294 |
+
}, 2000);
|
295 |
+
}
|
296 |
+
|
297 |
+
function omapiFindTooltips() {
|
298 |
+
$('[data-toggle="tooltip"]').tooltip()
|
299 |
+
}
|
|
|
|
|
|
|
|
|
|
|
300 |
|
301 |
});
|
includes/class-am-notification.php
CHANGED
@@ -377,6 +377,8 @@ if ( ! class_exists( 'AM_Notification' ) ) {
|
|
377 |
$key = is_array( $option ) && isset( $option['api']['key'] ) ? $option['api']['key'] : '';
|
378 |
}
|
379 |
break;
|
|
|
|
|
380 |
}
|
381 |
|
382 |
// Possibly set the level to 'none' if the key is empty and no level has been set.
|
@@ -447,4 +449,4 @@ if ( ! class_exists( 'AM_Notification' ) ) {
|
|
447 |
}
|
448 |
}
|
449 |
}
|
450 |
-
}
|
377 |
$key = is_array( $option ) && isset( $option['api']['key'] ) ? $option['api']['key'] : '';
|
378 |
}
|
379 |
break;
|
380 |
+
default:
|
381 |
+
break;
|
382 |
}
|
383 |
|
384 |
// Possibly set the level to 'none' if the key is empty and no level has been set.
|
449 |
}
|
450 |
}
|
451 |
}
|
452 |
+
}
|
optin-monster-wp-api.php
CHANGED
@@ -2,14 +2,16 @@
|
|
2 |
/**
|
3 |
* Plugin Name: OptinMonster API
|
4 |
* Plugin URI: https://optinmonster.com
|
5 |
-
* Description: OptinMonster
|
6 |
* Author: OptinMonster Team
|
7 |
* Author URI: https://optinmonster.com
|
8 |
-
* Version: 1.
|
9 |
* Text Domain: optin-monster-api
|
10 |
* Domain Path: languages
|
|
|
|
|
11 |
*
|
12 |
-
* OptinMonster is
|
13 |
* it under the terms of the GNU General Public License as published by
|
14 |
* the Free Software Foundation, either version 2 of the License, or
|
15 |
* any later version.
|
@@ -60,7 +62,7 @@ class OMAPI {
|
|
60 |
*
|
61 |
* @var string
|
62 |
*/
|
63 |
-
public $version = '1.
|
64 |
|
65 |
/**
|
66 |
* The name of the plugin.
|
@@ -89,6 +91,13 @@ class OMAPI {
|
|
89 |
*/
|
90 |
public $file = __FILE__;
|
91 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
92 |
/**
|
93 |
* OMAPI_Ajax object
|
94 |
*
|
@@ -117,6 +126,13 @@ class OMAPI {
|
|
117 |
*/
|
118 |
public $shortcode;
|
119 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
/**
|
121 |
* OMAPI_Actions object (loaded only in the admin)
|
122 |
*
|
@@ -152,6 +168,13 @@ class OMAPI {
|
|
152 |
*/
|
153 |
public $refresh;
|
154 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
155 |
/**
|
156 |
* OMAPI_Validate object (loaded only in the admin)
|
157 |
*
|
@@ -166,6 +189,13 @@ class OMAPI {
|
|
166 |
*/
|
167 |
public $welcome;
|
168 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
169 |
/**
|
170 |
* OMAPI_Review object (loaded only in the admin)
|
171 |
*
|
@@ -173,6 +203,13 @@ class OMAPI {
|
|
173 |
*/
|
174 |
public $review;
|
175 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
176 |
/**
|
177 |
* AM_Notification object (loaded only in the admin)
|
178 |
*
|
@@ -196,6 +233,12 @@ class OMAPI {
|
|
196 |
// Load the plugin.
|
197 |
add_action( 'init', array( $this, 'init' ) );
|
198 |
|
|
|
|
|
|
|
|
|
|
|
|
|
199 |
}
|
200 |
|
201 |
/**
|
@@ -233,16 +276,18 @@ class OMAPI {
|
|
233 |
public function init() {
|
234 |
|
235 |
// Define necessary plugin constants.
|
236 |
-
if ( ! defined( 'OPTINMONSTER_APIJS_URL' ) ) {
|
237 |
-
define( 'OPTINMONSTER_APIJS_URL', 'https://a.optmnstr.com/app/js/api.min.js' );
|
238 |
-
}
|
239 |
-
|
240 |
if ( ! defined( 'OPTINMONSTER_APP_URL' ) ) {
|
241 |
define( 'OPTINMONSTER_APP_URL', 'https://app.optinmonster.com' );
|
242 |
}
|
243 |
|
244 |
-
if ( ! defined( '
|
245 |
-
define( '
|
|
|
|
|
|
|
|
|
|
|
|
|
246 |
}
|
247 |
|
248 |
// Load our global option.
|
@@ -251,6 +296,8 @@ class OMAPI {
|
|
251 |
// Load global components.
|
252 |
$this->load_global();
|
253 |
|
|
|
|
|
254 |
// Load admin only components.
|
255 |
if ( is_admin() ) {
|
256 |
$this->load_admin();
|
@@ -258,22 +305,45 @@ class OMAPI {
|
|
258 |
|
259 |
// Run hook once OptinMonster has been fully loaded.
|
260 |
do_action( 'optin_monster_api_loaded' );
|
261 |
-
|
262 |
}
|
263 |
|
264 |
/**
|
265 |
-
* Sets our
|
266 |
*
|
267 |
* @since 1.0.0
|
268 |
*/
|
269 |
public function load_option() {
|
270 |
|
|
|
271 |
$option = get_option( 'optin_monster_api' );
|
272 |
-
if (
|
273 |
$option = OMAPI::default_options();
|
274 |
update_option( 'optin_monster_api', $option );
|
275 |
}
|
276 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
277 |
}
|
278 |
|
279 |
/**
|
@@ -284,16 +354,35 @@ class OMAPI {
|
|
284 |
public function load_global() {
|
285 |
|
286 |
// Register global components.
|
287 |
-
$this->ajax
|
288 |
-
$this->type
|
289 |
-
$this->output
|
290 |
-
$this->shortcode
|
|
|
|
|
291 |
|
292 |
// Fire a hook to say that the global classes are loaded.
|
293 |
do_action( 'optin_monster_api_global_loaded' );
|
294 |
|
295 |
}
|
296 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
297 |
/**
|
298 |
* Loads all admin related classes into scope.
|
299 |
*
|
@@ -312,9 +401,19 @@ class OMAPI {
|
|
312 |
$this->refresh = new OMAPI_Refresh();
|
313 |
$this->validate = new OMAPI_Validate();
|
314 |
$this->welcome = new OMAPI_Welcome();
|
|
|
315 |
$this->review = new OMAPI_Review();
|
|
|
|
|
316 |
$this->notifications = new AM_Notification( 'om', $this->version );
|
317 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
318 |
// Fire a hook to say that the admin classes are loaded.
|
319 |
do_action( 'optin_monster_api_admin_loaded' );
|
320 |
|
@@ -414,7 +513,6 @@ class OMAPI {
|
|
414 |
$user = false;
|
415 |
$apikey = false;
|
416 |
|
417 |
-
|
418 |
// Attempt to grab the new API Key
|
419 |
if ( empty( $option['api']['apikey'] ) ) {
|
420 |
if ( defined( 'OPTINMONSTER_REST_API_LICENSE_KEY' ) ) {
|
@@ -449,7 +547,6 @@ class OMAPI {
|
|
449 |
}
|
450 |
}
|
451 |
|
452 |
-
|
453 |
// Return the API credentials.
|
454 |
return apply_filters( 'optin_monster_api_creds',
|
455 |
array(
|
@@ -461,6 +558,18 @@ class OMAPI {
|
|
461 |
|
462 |
}
|
463 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
464 |
/**
|
465 |
* Check to see if we have any optins to migrate to the SaaS
|
466 |
*
|
@@ -505,7 +614,36 @@ class OMAPI {
|
|
505 |
* @return bool
|
506 |
*/
|
507 |
public static function is_woocommerce_active() {
|
508 |
-
return class_exists( 'WooCommerce' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
509 |
}
|
510 |
|
511 |
/**
|
@@ -516,7 +654,7 @@ class OMAPI {
|
|
516 |
* @return bool
|
517 |
*/
|
518 |
public static function is_mailpoet_active() {
|
519 |
-
return class_exists( 'WYSIJA_object' ) || class_exists( '
|
520 |
}
|
521 |
|
522 |
/**
|
@@ -546,6 +684,36 @@ class OMAPI {
|
|
546 |
|
547 |
}
|
548 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
549 |
/**
|
550 |
* Loads the default plugin options.
|
551 |
*
|
@@ -561,14 +729,14 @@ class OMAPI {
|
|
561 |
'is_expired' => false,
|
562 |
'is_disabled' => false,
|
563 |
'is_invalid' => false,
|
|
|
|
|
564 |
'welcome' => array(
|
565 |
-
'status'
|
566 |
-
|
567 |
-
'version' => '1141', //base to check against
|
568 |
-
)
|
569 |
);
|
570 |
-
return apply_filters( 'optin_monster_api_default_options', $options );
|
571 |
|
|
|
572 |
}
|
573 |
|
574 |
/**
|
@@ -593,6 +761,51 @@ class OMAPI {
|
|
593 |
|
594 |
}
|
595 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
596 |
/**
|
597 |
* Returns the singleton instance of the class.
|
598 |
*
|
@@ -639,22 +852,21 @@ function optin_monster_api_activation_hook( $network_wide ) {
|
|
639 |
switch_to_blog( $site->blog_id );
|
640 |
|
641 |
// Set default option.
|
642 |
-
$
|
643 |
-
if ( ! $option || empty( $option ) ) {
|
644 |
-
update_option( 'optin_monster_api', OMAPI::default_options() );
|
645 |
-
}
|
646 |
|
647 |
restore_current_blog();
|
648 |
}
|
649 |
} else {
|
650 |
// Set default option.
|
651 |
-
$
|
652 |
-
if ( ! $option || empty( $option ) ) {
|
653 |
-
update_option( 'optin_monster_api', OMAPI::default_options() );
|
654 |
-
}
|
655 |
-
|
656 |
}
|
657 |
|
|
|
|
|
|
|
|
|
|
|
|
|
658 |
}
|
659 |
|
660 |
register_uninstall_hook( __FILE__, 'optin_monster_api_uninstall_hook' );
|
2 |
/**
|
3 |
* Plugin Name: OptinMonster API
|
4 |
* Plugin URI: https://optinmonster.com
|
5 |
+
* Description: OptinMonster is the best WordPress popup plugin that helps you grow your email list and sales with email popups, exit intent popups, floating bars and more!
|
6 |
* Author: OptinMonster Team
|
7 |
* Author URI: https://optinmonster.com
|
8 |
+
* Version: 1.9.9
|
9 |
* Text Domain: optin-monster-api
|
10 |
* Domain Path: languages
|
11 |
+
* WC requires at least: 3.2.0
|
12 |
+
* WC tested up to: 4.2.2
|
13 |
*
|
14 |
+
* OptinMonster is free software: you can redistribute it and/or modify
|
15 |
* it under the terms of the GNU General Public License as published by
|
16 |
* the Free Software Foundation, either version 2 of the License, or
|
17 |
* any later version.
|
62 |
*
|
63 |
* @var string
|
64 |
*/
|
65 |
+
public $version = '1.9.9';
|
66 |
|
67 |
/**
|
68 |
* The name of the plugin.
|
91 |
*/
|
92 |
public $file = __FILE__;
|
93 |
|
94 |
+
/**
|
95 |
+
* The assets base URL for this plugin.
|
96 |
+
*
|
97 |
+
* @var string
|
98 |
+
*/
|
99 |
+
public $url;
|
100 |
+
|
101 |
/**
|
102 |
* OMAPI_Ajax object
|
103 |
*
|
126 |
*/
|
127 |
public $shortcode;
|
128 |
|
129 |
+
/**
|
130 |
+
* OMAPI_WooCommerce object.
|
131 |
+
*
|
132 |
+
* @var OMAPI_WooCommerce
|
133 |
+
*/
|
134 |
+
public $woocommerce;
|
135 |
+
|
136 |
/**
|
137 |
* OMAPI_Actions object (loaded only in the admin)
|
138 |
*
|
168 |
*/
|
169 |
public $refresh;
|
170 |
|
171 |
+
/**
|
172 |
+
* OMAPI_Sites object (loaded only in the REST API and admin)
|
173 |
+
*
|
174 |
+
* @var OMAPI_Sites
|
175 |
+
*/
|
176 |
+
public $sites;
|
177 |
+
|
178 |
/**
|
179 |
* OMAPI_Validate object (loaded only in the admin)
|
180 |
*
|
189 |
*/
|
190 |
public $welcome;
|
191 |
|
192 |
+
/**
|
193 |
+
* OMAPI_TrustPulse object (loaded only in the admin)
|
194 |
+
*
|
195 |
+
* @var OMAPI_TrustPulse
|
196 |
+
*/
|
197 |
+
public $trustpulse;
|
198 |
+
|
199 |
/**
|
200 |
* OMAPI_Review object (loaded only in the admin)
|
201 |
*
|
203 |
*/
|
204 |
public $review;
|
205 |
|
206 |
+
/**
|
207 |
+
* OMAPI_RestApi object (loaded only in the REST API)
|
208 |
+
*
|
209 |
+
* @var OMAPI_RestApi
|
210 |
+
*/
|
211 |
+
public $rest_api;
|
212 |
+
|
213 |
/**
|
214 |
* AM_Notification object (loaded only in the admin)
|
215 |
*
|
233 |
// Load the plugin.
|
234 |
add_action( 'init', array( $this, 'init' ) );
|
235 |
|
236 |
+
// Hide the unrelated admin notices.
|
237 |
+
add_action( 'admin_print_scripts', array( $this, 'hide_unrelated_admin_notices' ) );
|
238 |
+
|
239 |
+
// Filter the WooCommerce category/tag REST API responses.
|
240 |
+
add_filter( 'woocommerce_rest_prepare_product_cat', 'OMAPI_WooCommerce::add_category_base_to_api_response' );
|
241 |
+
add_filter( 'woocommerce_rest_prepare_product_tag', 'OMAPI_WooCommerce::add_tag_base_to_api_response' );
|
242 |
}
|
243 |
|
244 |
/**
|
276 |
public function init() {
|
277 |
|
278 |
// Define necessary plugin constants.
|
|
|
|
|
|
|
|
|
279 |
if ( ! defined( 'OPTINMONSTER_APP_URL' ) ) {
|
280 |
define( 'OPTINMONSTER_APP_URL', 'https://app.optinmonster.com' );
|
281 |
}
|
282 |
|
283 |
+
if ( ! defined( 'OPTINMONSTER_CDN_URL' ) ) {
|
284 |
+
define( 'OPTINMONSTER_CDN_URL', is_admin()
|
285 |
+
? 'https://a.omwpapi.com'
|
286 |
+
: 'https://a.omappapi.com' );
|
287 |
+
}
|
288 |
+
|
289 |
+
if ( ! defined( 'OPTINMONSTER_APIJS_URL' ) ) {
|
290 |
+
define( 'OPTINMONSTER_APIJS_URL', OPTINMONSTER_CDN_URL . '/app/js/api.min.js' );
|
291 |
}
|
292 |
|
293 |
// Load our global option.
|
296 |
// Load global components.
|
297 |
$this->load_global();
|
298 |
|
299 |
+
add_action( 'rest_api_init', array( $this, 'load_rest' ) );
|
300 |
+
|
301 |
// Load admin only components.
|
302 |
if ( is_admin() ) {
|
303 |
$this->load_admin();
|
305 |
|
306 |
// Run hook once OptinMonster has been fully loaded.
|
307 |
do_action( 'optin_monster_api_loaded' );
|
|
|
308 |
}
|
309 |
|
310 |
/**
|
311 |
+
* Sets our options if not found in the DB.
|
312 |
*
|
313 |
* @since 1.0.0
|
314 |
*/
|
315 |
public function load_option() {
|
316 |
|
317 |
+
// Check/set the plugin options.
|
318 |
$option = get_option( 'optin_monster_api' );
|
319 |
+
if ( empty( $option ) ) {
|
320 |
$option = OMAPI::default_options();
|
321 |
update_option( 'optin_monster_api', $option );
|
322 |
}
|
323 |
|
324 |
+
$review = get_option( 'omapi_review' );
|
325 |
+
$review_installed = ! empty( $review['time'] ) && is_numeric( $review['time'] );
|
326 |
+
$review_dismissed = ! empty( $review['dismissed'] );
|
327 |
+
|
328 |
+
if ( ! $review_installed ) {
|
329 |
+
$review = array(
|
330 |
+
'time' => time(),
|
331 |
+
'dismissed' => $review_dismissed,
|
332 |
+
);
|
333 |
+
update_option( 'omapi_review', $review );
|
334 |
+
}
|
335 |
+
|
336 |
+
// Check/set the installation date.
|
337 |
+
if ( empty( $option['installed'] ) ) {
|
338 |
+
|
339 |
+
// If the review was dismissed, we know the plugin was installed at least a day
|
340 |
+
// before the notice was shown and dismissed. Otherwise, the review timestamp
|
341 |
+
// should be pretty close to the install date.
|
342 |
+
$option['installed'] = $review_dismissed ? $review['time'] - DAY_IN_SECONDS : $review['time'];
|
343 |
+
|
344 |
+
// Store the plugin install date.
|
345 |
+
update_option( 'optin_monster_api', $option );
|
346 |
+
}
|
347 |
}
|
348 |
|
349 |
/**
|
354 |
public function load_global() {
|
355 |
|
356 |
// Register global components.
|
357 |
+
$this->ajax = new OMAPI_Ajax();
|
358 |
+
$this->type = new OMAPI_Type();
|
359 |
+
$this->output = new OMAPI_Output();
|
360 |
+
$this->shortcode = new OMAPI_Shortcode();
|
361 |
+
$this->woocommerce = new OMAPI_WooCommerce();
|
362 |
+
$this->url = plugin_dir_url( __FILE__ );
|
363 |
|
364 |
// Fire a hook to say that the global classes are loaded.
|
365 |
do_action( 'optin_monster_api_global_loaded' );
|
366 |
|
367 |
}
|
368 |
|
369 |
+
/**
|
370 |
+
* Loads all REST API related classes into scope.
|
371 |
+
*
|
372 |
+
* @since 1.8.0
|
373 |
+
*/
|
374 |
+
public function load_rest() {
|
375 |
+
|
376 |
+
// Register global components.
|
377 |
+
$this->sites = new OMAPI_Sites();
|
378 |
+
$this->rest_api = new OMAPI_RestApi();
|
379 |
+
$this->refresh = new OMAPI_Refresh();
|
380 |
+
$this->save = new OMAPI_Save();
|
381 |
+
|
382 |
+
// Fire a hook to say that the global classes are loaded.
|
383 |
+
do_action( 'optin_monster_api_rest_loaded' );
|
384 |
+
}
|
385 |
+
|
386 |
/**
|
387 |
* Loads all admin related classes into scope.
|
388 |
*
|
401 |
$this->refresh = new OMAPI_Refresh();
|
402 |
$this->validate = new OMAPI_Validate();
|
403 |
$this->welcome = new OMAPI_Welcome();
|
404 |
+
$this->trustpulse = new OMAPI_TrustPulse();
|
405 |
$this->review = new OMAPI_Review();
|
406 |
+
$this->pointer = new OMAPI_Pointer();
|
407 |
+
$this->sites = new OMAPI_Sites();
|
408 |
$this->notifications = new AM_Notification( 'om', $this->version );
|
409 |
|
410 |
+
if ( $this->menu->has_trial_link() ) {
|
411 |
+
$this->cc = new OMAPI_ConstantContact();
|
412 |
+
}
|
413 |
+
|
414 |
+
$this->save->maybe_save();
|
415 |
+
$this->refresh->maybe_refresh();
|
416 |
+
|
417 |
// Fire a hook to say that the admin classes are loaded.
|
418 |
do_action( 'optin_monster_api_admin_loaded' );
|
419 |
|
513 |
$user = false;
|
514 |
$apikey = false;
|
515 |
|
|
|
516 |
// Attempt to grab the new API Key
|
517 |
if ( empty( $option['api']['apikey'] ) ) {
|
518 |
if ( defined( 'OPTINMONSTER_REST_API_LICENSE_KEY' ) ) {
|
547 |
}
|
548 |
}
|
549 |
|
|
|
550 |
// Return the API credentials.
|
551 |
return apply_filters( 'optin_monster_api_creds',
|
552 |
array(
|
558 |
|
559 |
}
|
560 |
|
561 |
+
/**
|
562 |
+
* Returns the API credentials for OptinMonster.
|
563 |
+
*
|
564 |
+
* @since 1.9.2
|
565 |
+
*
|
566 |
+
* @return string The API url to use for embedding on the page.
|
567 |
+
*/
|
568 |
+
public function get_api_url() {
|
569 |
+
$customApiUrl = $this->get_option( 'customApiUrl' );
|
570 |
+
return ! empty( $customApiUrl ) ? $customApiUrl : OPTINMONSTER_APIJS_URL;
|
571 |
+
}
|
572 |
+
|
573 |
/**
|
574 |
* Check to see if we have any optins to migrate to the SaaS
|
575 |
*
|
614 |
* @return bool
|
615 |
*/
|
616 |
public static function is_woocommerce_active() {
|
617 |
+
return class_exists( 'WooCommerce', true );
|
618 |
+
}
|
619 |
+
|
620 |
+
/**
|
621 |
+
* Return the WooCommerce versions string.
|
622 |
+
*
|
623 |
+
* @since 1.6.5
|
624 |
+
*
|
625 |
+
* @return string
|
626 |
+
*/
|
627 |
+
public static function woocommerce_version() {
|
628 |
+
return OMAPI_WooCommerce::version();
|
629 |
+
}
|
630 |
+
|
631 |
+
/**
|
632 |
+
* Determines if the passed version string passes the operator compare
|
633 |
+
* against the currently installed version of WooCommerce.
|
634 |
+
*
|
635 |
+
* Defaults to checking if the current WooCommerce version is greater than
|
636 |
+
* the passed version.
|
637 |
+
*
|
638 |
+
* @since 1.7.0
|
639 |
+
*
|
640 |
+
* @param string $version The version to check.
|
641 |
+
* @param string $operator The operator to use for comparison.
|
642 |
+
*
|
643 |
+
* @return string
|
644 |
+
*/
|
645 |
+
public static function woocommerce_version_compare( $version = '', $operator = '>=' ) {
|
646 |
+
return OMAPI_WooCommerce::version_compare( $version, $operator );
|
647 |
}
|
648 |
|
649 |
/**
|
654 |
* @return bool
|
655 |
*/
|
656 |
public static function is_mailpoet_active() {
|
657 |
+
return class_exists( 'WYSIJA_object' ) || class_exists( 'MailPoet\\API\\API' );
|
658 |
}
|
659 |
|
660 |
/**
|
684 |
|
685 |
}
|
686 |
|
687 |
+
/**
|
688 |
+
* Get and include a view file for output.
|
689 |
+
*
|
690 |
+
* @since 1.9.0
|
691 |
+
*
|
692 |
+
* @param string $file The view file.
|
693 |
+
* @param mixed $data Arbitrary data to be made available to the view file.
|
694 |
+
*
|
695 |
+
* @return void
|
696 |
+
*/
|
697 |
+
public function output_view( $file, $data = array() ) {
|
698 |
+
require dirname( $this->file ) . '/views/' . $file;
|
699 |
+
}
|
700 |
+
|
701 |
+
/**
|
702 |
+
* Get and include a view file with css and minify the output.
|
703 |
+
*
|
704 |
+
* @since 1.9.0
|
705 |
+
*
|
706 |
+
* @param string $file The view file.
|
707 |
+
* @param mixed $data Arbitrary data to be made available to the view file.
|
708 |
+
*
|
709 |
+
* @return void
|
710 |
+
*/
|
711 |
+
public function output_min_css( $file, $data = array() ) {
|
712 |
+
ob_start();
|
713 |
+
$this->output_view( $file, $data );
|
714 |
+
echo str_replace( array( "\n", "\r", "\t" ), '', ob_get_clean() );
|
715 |
+
}
|
716 |
+
|
717 |
/**
|
718 |
* Loads the default plugin options.
|
719 |
*
|
729 |
'is_expired' => false,
|
730 |
'is_disabled' => false,
|
731 |
'is_invalid' => false,
|
732 |
+
'installed' => time(),
|
733 |
+
'connected' => '',
|
734 |
'welcome' => array(
|
735 |
+
'status' => 'none',
|
736 |
+
),
|
|
|
|
|
737 |
);
|
|
|
738 |
|
739 |
+
return apply_filters( 'optin_monster_api_default_options', $options );
|
740 |
}
|
741 |
|
742 |
/**
|
761 |
|
762 |
}
|
763 |
|
764 |
+
/**
|
765 |
+
* Hides unrelated admin notices.
|
766 |
+
*
|
767 |
+
* @since 1.9.7
|
768 |
+
*/
|
769 |
+
public function hide_unrelated_admin_notices() {
|
770 |
+
// Bail if we're not on a OptinMonster screen.
|
771 |
+
if ( empty( $_REQUEST['page'] ) || ! preg_match( '/optin-monster-/', esc_html( $_REQUEST['page'] ) ) ) {
|
772 |
+
return;
|
773 |
+
}
|
774 |
+
|
775 |
+
global $wp_filter;
|
776 |
+
|
777 |
+
$notices_type = array(
|
778 |
+
'user_admin_notices',
|
779 |
+
'admin_notices',
|
780 |
+
'all_admin_notices',
|
781 |
+
);
|
782 |
+
|
783 |
+
foreach ( $notices_type as $type ) {
|
784 |
+
if ( empty( $wp_filter[ $type ]->callbacks ) || ! is_array( $wp_filter[ $type ]->callbacks ) ) {
|
785 |
+
continue;
|
786 |
+
}
|
787 |
+
|
788 |
+
foreach ( $wp_filter[ $type ]->callbacks as $priority => $hooks ) {
|
789 |
+
foreach ( $hooks as $name => $arr ) {
|
790 |
+
if ( is_object( $arr['function'] ) && $arr['function'] instanceof Closure ) {
|
791 |
+
unset( $wp_filter[ $type ]->callbacks[ $priority ][ $name ] );
|
792 |
+
continue;
|
793 |
+
}
|
794 |
+
|
795 |
+
$class = ! empty( $arr['function'][0] ) && is_object( $arr['function'][0] ) ? strtolower( get_class( $arr['function'][0] ) ) : '';
|
796 |
+
|
797 |
+
if ( ! empty( $class ) && preg_match( '/^(?:omapi|am_notification)/', $class ) ) {
|
798 |
+
continue;
|
799 |
+
}
|
800 |
+
|
801 |
+
if ( ! empty( $name ) && ! preg_match( '/^(?:omapi|am_notification)/', $name ) ) {
|
802 |
+
unset( $wp_filter[ $type ]->callbacks[ $priority ][ $name ] );
|
803 |
+
}
|
804 |
+
}
|
805 |
+
}
|
806 |
+
}
|
807 |
+
}
|
808 |
+
|
809 |
/**
|
810 |
* Returns the singleton instance of the class.
|
811 |
*
|
852 |
switch_to_blog( $site->blog_id );
|
853 |
|
854 |
// Set default option.
|
855 |
+
$instance->load_option();
|
|
|
|
|
|
|
856 |
|
857 |
restore_current_blog();
|
858 |
}
|
859 |
} else {
|
860 |
// Set default option.
|
861 |
+
$instance->load_option();
|
|
|
|
|
|
|
|
|
862 |
}
|
863 |
|
864 |
+
// If we don't have api credentials, set up the redirect on plugin activation.
|
865 |
+
if ( ! $instance->get_api_credentials() ) {
|
866 |
+
$options = $instance->get_option();
|
867 |
+
$options['welcome']['status'] = 'none';
|
868 |
+
update_option( 'optin_monster_api', $options );
|
869 |
+
}
|
870 |
}
|
871 |
|
872 |
register_uninstall_hook( __FILE__, 'optin_monster_api_uninstall_hook' );
|
readme.txt
CHANGED
@@ -1,470 +1,499 @@
|
|
1 |
-
===
|
2 |
Contributors: optinmonster, griffinjt, smub
|
3 |
-
Tags:
|
4 |
-
Requires at least:
|
5 |
-
Tested up to: 5.
|
6 |
Requires PHP: 5.3
|
7 |
-
Stable tag: 1.
|
8 |
License: GNU General Public License v2.0 or later
|
9 |
|
10 |
-
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
-
= WordPress Popup Plugin =
|
15 |
-
Did you know that over 70% of website visitors who leave your website will never return? Why? Because most people find your blog, read, and leave (that's just a natural pattern).
|
16 |
|
17 |
-
|
18 |
|
19 |
-
|
20 |
|
21 |
-
|
22 |
-
> OptinMonster is a standalone application that integrates with all website platforms including WordPress. You must have an OptinMonster account in order to take advantage of this plugin. <a href="https://optinmonster.com/wp/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend" title="Click here to learn more about OptinMonster">Click here to learn more about OptinMonster.</a>
|
23 |
|
24 |
-
OptinMonster
|
25 |
|
26 |
-
|
27 |
|
28 |
-
|
29 |
|
30 |
-
|
|
|
31 |
|
32 |
-
|
33 |
|
34 |
-
|
35 |
|
36 |
-
|
37 |
-
or start from scratch with a blank canvas. Customize all the details
|
38 |
-
with our easy to use drag-and-drop builder - no code needed.
|
39 |
|
40 |
-
|
41 |
|
42 |
-
|
43 |
|
44 |
-
|
45 |
|
46 |
-
|
|
|
47 |
|
48 |
-
|
49 |
|
50 |
-
|
51 |
|
52 |
-
|
53 |
|
54 |
-
|
55 |
|
56 |
-
|
57 |
|
58 |
-
|
|
|
59 |
|
60 |
-
|
61 |
|
62 |
-
|
63 |
-
> Michael Stelzner - Founder of Social Media Examiner
|
64 |
|
65 |
-
=
|
66 |
|
67 |
-
|
68 |
-
show your perfect offer to the right people at the exact right time
|
69 |
-
to maximize your website conversions.
|
70 |
|
71 |
-
|
72 |
|
73 |
-
|
74 |
|
75 |
-
|
76 |
|
77 |
-
>
|
78 |
-
>
|
79 |
|
80 |
-
=
|
81 |
|
82 |
-
|
83 |
|
84 |
-
|
85 |
|
86 |
-
You can
|
87 |
|
88 |
-
|
89 |
-
> Ian Cleary - Founder of RazorSocial
|
90 |
|
91 |
-
|
|
|
92 |
|
93 |
-
OptinMonster's <a href="https://optinmonster.com/features/conversion-analytics/" rel="friend" title="conversion analytics">conversion analytics</a> is easy to understand and give you the stats that matter, so you can take action to improve your lead-generation strategy.
|
94 |
|
95 |
-
=
|
96 |
|
97 |
-
|
98 |
|
99 |
-
|
100 |
|
|
|
101 |
|
102 |
-
|
103 |
-
* Drag-and-drop campaign builder to easily customize any campaign, no code needed.
|
104 |
-
* 5 different types of email opt in forms.
|
105 |
-
* Powerful page level targeting to build a hyper-segmented email list.
|
106 |
-
* Custom user-centric output settings to target visitors, logged-in users or a mixture of both.
|
107 |
-
* Category, tag and custom taxonomy output controls for robust campaign segmenting.
|
108 |
-
* Custom analytics with Google Analytics to tell you which campaigns are converting the best.
|
109 |
-
* Our signature Exit Intent™ technology to convert abandoning website visitors into subscribers and customers.
|
110 |
-
* Powerful A/B testing that helps you eliminate guess work and make data driven decisions on what works best.
|
111 |
-
* MonsterLinks™ popup on click technology **which is proven to boost conversions by as much as 785%!**
|
112 |
-
* Mobile specific popup forms that are specifically targeted towards mobile visitors.
|
113 |
-
* Scroll triggered popup and optin forms for enhanced conversion rates.
|
114 |
-
* Timed popup forms - display opt-ins after a certain time or on second pageview.
|
115 |
-
* Canvas popup forms - use Canvas to add facebook like box, WooCommerce products, or anything else that you like.
|
116 |
-
* MonsterEffects™ technology for eye-catching popup animations.
|
117 |
-
* Success messages and redirects
|
118 |
-
* Easy integration with over 25 different email marketing service providers
|
119 |
|
|
|
|
|
120 |
|
121 |
-
= Credits =
|
122 |
-
|
123 |
-
This plugin is created by <a href="https://thomasgriffin.io" rel="friend" title="Thomas Griffin">Thomas Griffin</a> and <a href="https://syedbalkhi.com" rel="friend" title="Syed Balkhi">Syed Balkhi</a>.
|
124 |
-
|
125 |
-
= What's Next =
|
126 |
-
|
127 |
-
If you like this plugin, then consider checking out our other projects:
|
128 |
-
|
129 |
-
* <a href="https://wpforms.com/" rel="friend" title="WPForms">WPForms</a> - Best WordPress Contact Form Plugin
|
130 |
-
* <a href="https://www.monsterinsights.com/" rel="friend" title="MonsterInsights">MonsterInsights</a> - Best Google Analytics Plugin for WordPress
|
131 |
-
* <a href="https://www.seedprod.com/" rel="friend" title="SeedProd">SeedProd</a> - Best Coming Soon & Maintenance Most Plugin for WordPress
|
132 |
-
|
133 |
-
Visit WPBeginner to learn from our <a href="http://www.wpbeginner.com/category/wp-tutorials/" rel="friend" title="WordPress Tutorials">WordPress Tutorials</a> and find out about other <a href="http://www.wpbeginner.com/category/plugins/" rel="friend" title="Best WordPress Plugins">best WordPress plugins</a>.
|
134 |
-
|
135 |
-
To get the most value out of your growing email list, see our <a href="https://optinmonster.com/beginners-guide-to-email-marketing/" rel="friend" title="Email Marketing Guide">beginner's guide to email marketing</a>.
|
136 |
-
|
137 |
-
= Press & Brand Assets =
|
138 |
-
|
139 |
-
If you are interested in writing about OptinMonster, then we have have prepared a <a href="https://optinmonster.com/press/" rel="friend" title="OptinMonster Press Page">Press & Brand Assets page</a> where you can download our logo, screenshots, and other relevant assets.
|
140 |
-
|
141 |
-
When mentioning OptinMonster please know that OptinMonster is one word with a Capital O and M.
|
142 |
-
|
143 |
-
Please avoid using any variations like: Optinmonster, optinmonster, or worst Optin monster.
|
144 |
-
|
145 |
-
OptinMonster® and Exit-Intent® are registered trademarks of Retyp, LLC.
|
146 |
-
|
147 |
-
== Installation ==
|
148 |
-
|
149 |
-
1. Install OptinMonster either via the WordPress.org plugin repository or by uploading the files to your server.
|
150 |
-
2. Activate OptinMonster.
|
151 |
-
3. Navigate to the OptinMonster tab at the bottom of your admin menu and enter your OptinMonster API Username and API Key to connect your OptinMonster account to your WordPress site.
|
152 |
-
4. Click on the Campaigns tab and configure the output settings for each campaign you have created in your OptinMonster account.
|
153 |
-
|
154 |
-
== Frequently Asked Questions ==
|
155 |
-
|
156 |
-
= I downloaded this plugin but don't have an OptinMonster account. How can I get one? =
|
157 |
-
|
158 |
-
You can sign up for an OptinMonster account by <a href="https://optinmonster.com/wp/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend" title="Click here to learn more about OptinMonster">visiting our overview page</a> and following the instructions on the screen.
|
159 |
-
|
160 |
-
== Screenshots ==
|
161 |
-
|
162 |
-
1. The OptinMonster WordPress popup plugin allows you to control how and where your popups load on your website.
|
163 |
-
2. Create and customize your popups with our drag-and-drop popup builder.
|
164 |
-
3. Manage your popups and other campaigns from the OptinMonster dashboard.
|
165 |
-
4. Get detailed analytics on how each popup and split test is converting.
|
166 |
-
|
167 |
-
== Notes ==
|
168 |
-
|
169 |
-
OptinMonster is the <a href="https://optinmonster.com" rel="friend" title="OptinMonster">best WordPress lead generation and WordPress popup plugin solution</a> on the market. No other WordPress popup plugin or WordPress optin form solution compares to OptinMonster and the features it offers.
|
170 |
-
|
171 |
-
= Testimonial =
|
172 |
-
|
173 |
-
> OptinMonster is unlike most plugins. Most plugins cost you money. OptinMonster makes you money. Most barely get updated - OptinMonster just keeps getting better.<br>
|
174 |
-
> Chris Lema - VP of Product at Liquid Web
|
175 |
-
|
176 |
-
== Changelog ==
|
177 |
-
|
178 |
-
= 1.5.2 =
|
179 |
-
* Fixed potential privilege escalation bug.
|
180 |
-
* Bumped for 5.0.
|
181 |
-
|
182 |
-
= 1.5.1 =
|
183 |
-
* Fixed a possible security issue with admin notices.
|
184 |
-
* Updated outdated URLs in the admin.
|
185 |
|
186 |
-
=
|
187 |
-
* Refactored WordPress rules system, and a new `[optin-monster]` shortcode parameter, `followrules=true`. This means if you have specific WordPress display rules (e.g. which categories/posts/pages to display the campaign), and use the shortcode to output the campaign, you can have the shortcode follow the rules you have setup. Example shortcode usage: `[optin-monster slug="XXXXXXXXXXXXXXXXXXXX" followrules=true]`
|
188 |
|
189 |
-
|
190 |
-
* Fixed a bug that caused issues with PHP versions under 5.6.
|
191 |
|
192 |
-
=
|
193 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
194 |
|
195 |
-
|
196 |
-
* Updated to work with OptinMonster 5.0 campaigns.
|
197 |
-
* Fix PHP notices.
|
198 |
|
199 |
-
=
|
200 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
201 |
|
202 |
-
|
203 |
-
|
204 |
|
205 |
-
|
206 |
-
* Fixed an issue that prevented campaigns from showing on some custom taxonomy terms.
|
207 |
-
* Performance improvements when retrieving, and determining when to display, campaigns.
|
208 |
-
* All URLs updated to use HTTPS.
|
209 |
-
* Updated notifications.
|
210 |
|
211 |
-
=
|
212 |
-
*
|
|
|
|
|
|
|
|
|
213 |
|
214 |
-
|
215 |
-
|
216 |
|
217 |
-
= 1.3.0 =
|
218 |
-
* Is it "campaign"? Or "optin"? No, it's definitely "campaign".
|
219 |
-
* OptinMonster now works with the shiny new MailPoet 3.
|
220 |
-
* We're feeling a little lighter after removing some deprecated code.
|
221 |
|
222 |
-
|
223 |
-
* Updated API calls to always be done over HTTPS.
|
224 |
-
* Updated error responses from the OptinMonster API to be more informative.
|
225 |
|
226 |
-
=
|
227 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
228 |
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
233 |
|
234 |
-
=
|
235 |
-
* Updated version numbers to prevent possible asset caching errors.
|
236 |
-
|
237 |
-
= 1.1.8 =
|
238 |
-
* Fixed possible undefined errors for API credentials.
|
239 |
-
|
240 |
-
= 1.1.7 =
|
241 |
-
* Updated the API script domain for adblock.
|
242 |
-
* Added new authentication method for the new OptinMonster REST API.
|
243 |
-
|
244 |
-
= 1.1.6.2 =
|
245 |
-
* Fixed undefined index errors when API responses returned an error.
|
246 |
-
|
247 |
-
= 1.1.6.1 =
|
248 |
-
* General plugin enhancements and bug fixes.
|
249 |
-
|
250 |
-
= 1.1.6 =
|
251 |
-
* Compatibility updates for WordPress 4.7.
|
252 |
-
|
253 |
-
= 1.1.5.9 =
|
254 |
-
* Added the async attribute to the OptinMonster API script output for improved performance.
|
255 |
-
* Fixed a bug that caused the debugging report to not properly grab shortcodes.
|
256 |
-
* Added helper to remove faulty admin scripts from the OptinMonster settings area that would cause things to fail in some cases.
|
257 |
-
|
258 |
-
= 1.1.5.8 =
|
259 |
-
* Fixed bug that caused the MailPoet integration to fail in some scenarios.
|
260 |
-
|
261 |
-
= 1.1.5.7 =
|
262 |
-
* Improved checks for when to output and localize the OptinMonster API script.
|
263 |
-
|
264 |
-
= 1.1.5.6 =
|
265 |
-
* Fixed bug that caused people to have to define two constants to set the OptinMonster license key in config files.
|
266 |
-
|
267 |
-
= 1.1.5.5 =
|
268 |
-
* Fixed bug that redirected people already using the plugin to the Welcome screen on update.
|
269 |
-
|
270 |
-
= 1.1.5.4 =
|
271 |
-
* Fixed bug that caused issues with viewing the Welcome screen.
|
272 |
-
|
273 |
-
= 1.1.5.3 =
|
274 |
-
* Fixed issue with notices appearing oddly on OM screens.
|
275 |
-
* Updated support video.
|
276 |
-
|
277 |
-
= 1.1.5.2 =
|
278 |
-
* Fixed bug with post category selections causing campaigns to load globally.
|
279 |
-
|
280 |
-
= 1.1.5.1 =
|
281 |
-
* Improved welcome screen for new installs.
|
282 |
-
* Bug fixes and enhancements.
|
283 |
-
|
284 |
-
= 1.1.5 =
|
285 |
-
* Campaigns will now load on the archive pages of individual taxonomies (if selected) by default.
|
286 |
-
* Clarified language regarding how the "load exclusively on" and "never load optin on" settings work.
|
287 |
-
* Removed after post optins from RSS feeds.
|
288 |
-
* Removed the test mode setting in favor of using the "show only to logged-in users" setting for testing campaign output.
|
289 |
-
* When going live, campaigns will load globally by default unless other advanced output settings are specified.
|
290 |
-
* Automatically adding an after post optin after a post is now checked on by default for new after post campaigns.
|
291 |
-
* Added a new "Support" tab with a helpful video, links to documentation and ability to send support details when submitting a ticket.
|
292 |
-
* Migration tab is now only shown if the old plugin exists on the site.
|
293 |
-
* Added helpful tooltips in various areas of the admin.
|
294 |
-
* Moved all advanced output rules into a toggle field to make working with output settings easier.
|
295 |
-
* Fixed the clear local cookies function (it actually works now!).
|
296 |
-
* Removed the confusing Delete button - campaigns should be deleted from the app.
|
297 |
-
* Added an inline shortcode "copy to clipboard" button for after post campaigns.
|
298 |
-
* Improved shortcode processing - it is now automated (no longer need to enter in a setting) and supports non self-closing shortcodes!
|
299 |
-
* Improved individual campaign action links by always making them visible.
|
300 |
-
|
301 |
-
= 1.1.4.7 =
|
302 |
-
* Updated compatibility for WordPress 4.6.
|
303 |
-
|
304 |
-
= 1.1.4.6 =
|
305 |
-
* Removed shortcode ajax method that could possibly be exploited by other plugins to run malicious shortcode.
|
306 |
-
|
307 |
-
= 1.1.4.5 =
|
308 |
-
* Added new feature to allow reviews to be given for OptinMonster.
|
309 |
-
|
310 |
-
= 1.1.4.4 =
|
311 |
-
* Allow API credentials to be force resaved to clean out stale messages about accounts being expired or invalid.
|
312 |
-
|
313 |
-
= 1.1.4.3 =
|
314 |
-
* Fixed API script getting cached by CloudFlare Rocket Loader.
|
315 |
-
* Fixed omhide=true conflicting with MonsterLinks in some cases.
|
316 |
-
* Fixed pre 4.1 installs getting incorrect API ID.
|
317 |
-
* Updated Readme so OptinMonster App and account requirement is clearly stated.
|
318 |
-
|
319 |
-
= 1.1.4.2 =
|
320 |
-
* Added Welcome page on first install.
|
321 |
-
* Updated error messages.
|
322 |
-
* Updated debug code for better error handling.
|
323 |
-
|
324 |
-
= 1.1.4.1 =
|
325 |
-
* Added No-Cache headers on API requests.
|
326 |
-
|
327 |
-
= 1.1.4 =
|
328 |
-
* Fixed bug with adblock.
|
329 |
-
* Added new API script with easier updates.
|
330 |
-
|
331 |
-
= 1.1.3.9 =
|
332 |
-
* Fixed conflict with jQuery and Modernizr when the optin object was not set properly.
|
333 |
-
|
334 |
-
= 1.1.3.8 =
|
335 |
-
* Fixed bug with canvas slide-in not being able to be closed.
|
336 |
|
337 |
-
=
|
338 |
-
* Fixed issue with contact forms not displaying properly in optins. <a href="https://optinmonster.com/docs/how-to-use-wordpress-shortcodes-with-optinmonster/" rel="friend" title="How to use WordPress shortcodes with OptinMonster">See this doc on how to update shortcode support in your optins.</a>
|
339 |
|
340 |
-
=
|
341 |
-
* Fixed possible issue with sending empty names that caused bugs with provider integrations.
|
342 |
|
343 |
-
|
344 |
-
* Fixed JS error with analytics if GA was not yet defined.
|
345 |
|
346 |
-
|
347 |
-
*
|
348 |
-
*
|
349 |
-
*
|
350 |
-
* Various bug fixes and improvements.
|
351 |
|
352 |
-
|
353 |
-
* Fixed bug where fullscreen wouldn't work on mobile if exit intent setting was checked.
|
354 |
-
* Fixed bug with analytics not tracking if multiple spaces were contained in a campaign name.
|
355 |
-
* Fixed bug with clearing local cookies not working in some instances.
|
356 |
|
357 |
-
|
358 |
-
* Fixed bug where shortcode would not parse for optins inserted via widget, shortcode or template tag.
|
359 |
-
* Fixed bug where Mailpoet helper would not output for optins inserted via widget, shortcode or template tag.
|
360 |
|
361 |
-
=
|
362 |
-
* Fixed issues revolving around split tests not loading properly for mobile devices.
|
363 |
|
364 |
-
|
365 |
-
* Fixed bug with freezing and not working in IE10/11.
|
366 |
|
367 |
-
=
|
368 |
-
*
|
|
|
|
|
|
|
369 |
|
370 |
-
=
|
371 |
-
* Fixed bug with lightbox and mobile optins in API script.
|
372 |
|
373 |
-
=
|
374 |
-
* Fixed bug with GA not tracking data.
|
375 |
-
* Added 13 new mobile themes!
|
376 |
|
377 |
-
= 1.1.2.4 =
|
378 |
-
* Fixed bug with cookies and split tests.
|
379 |
-
* Fixed bug with allowing split tests to be made primary.
|
380 |
-
|
381 |
-
= 1.1.2.3 =
|
382 |
-
* Added support for a new optin type - fullscreen optins!
|
383 |
-
* Fixed a bug with embedded HubSpot forms.
|
384 |
-
* Fixed bug where dropdown options would not show on Safari for post targeting.
|
385 |
-
|
386 |
-
= 1.1.2.2 =
|
387 |
-
* Fixed issue with API script not grabbing checkbox and radio fields properly inside an optin.
|
388 |
|
389 |
-
|
390 |
-
* Fixed issue for defining API url with function before filters can be applied to it.
|
391 |
|
392 |
-
|
393 |
-
|
394 |
-
|
|
|
|
|
395 |
|
396 |
-
|
397 |
-
* Added option to move floating bar to top of the page. No custom CSS needed!
|
398 |
-
* Added option for a privacy statement below optin form.
|
399 |
-
* Added option to exclude by page slug
|
400 |
-
* Shortcode parsing now available for all optin types.
|
401 |
-
* Various bug fixes
|
402 |
|
403 |
-
=
|
404 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
405 |
|
406 |
-
= 1.1.0.4 =
|
407 |
-
* Fixed bug that caused paused split tests to continue to run.
|
408 |
-
* Fixed bug with passing optin data to a redirect URL with query args.
|
409 |
-
* Added ability to submit lightbox optin forms with the enter button.
|
410 |
|
411 |
-
|
412 |
-
* Fixed bug that caused site verification to fail.
|
413 |
|
414 |
-
|
415 |
-
|
416 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
417 |
|
418 |
-
|
419 |
-
* Fixed fixed bug with bounce rate in GA.
|
420 |
|
421 |
-
=
|
422 |
-
* Fixed focus bug.
|
423 |
|
424 |
-
|
425 |
-
* Fixed analytics bug that caused bounce rates to go whacky in GA.
|
426 |
-
* Fixed "powered by" link placement when using display effects.
|
427 |
-
* Added focus effect for input fields when an optin is loaded.
|
428 |
|
429 |
-
=
|
430 |
-
* Clear out global cookie when clearing local cookies.
|
431 |
-
* Fixed bug with not loading in IE7-9.
|
432 |
-
* Fixed bug with placeholder shims not working in IE7-9.
|
433 |
-
* Fixed bug with GA clashes when using multiple tracking scripts on a page.
|
434 |
|
435 |
-
|
436 |
-
* Fixed bug with possible duplicate submissions in some configurations.
|
437 |
-
* Added enhanced conversion tracking with GA.
|
438 |
|
439 |
-
|
440 |
-
|
441 |
|
442 |
-
|
443 |
-
* Fixed bug with passing lead data to redirect URLs.
|
444 |
-
* Added improved UX by being able to create and edit optins from the plugin itself.
|
445 |
|
446 |
-
|
447 |
-
* Fixed another error with plugin update deploy.
|
448 |
|
449 |
-
= 1.
|
450 |
-
*
|
|
|
|
|
451 |
|
452 |
-
= 1.
|
453 |
-
*
|
|
|
|
|
|
|
|
|
|
|
454 |
|
455 |
-
= 1.
|
456 |
-
*
|
457 |
-
*
|
458 |
-
* Added extra XSS security checks with `esc_url_raw`.
|
459 |
-
* Added version number beside plugin header title for easy version checking.
|
460 |
|
461 |
-
= 1.
|
462 |
-
*
|
463 |
-
*
|
464 |
-
* Removed unused updater class reference and code.
|
465 |
|
466 |
-
=
|
467 |
-
*
|
|
|
468 |
|
469 |
-
|
470 |
-
* Initial release.
|
1 |
+
=== Marketing Toolkit by OptinMonster – Popups, Email Optin Forms & Newsletter Subscribers ===
|
2 |
Contributors: optinmonster, griffinjt, smub
|
3 |
+
Tags: marketing, popups, popup builder, newsletter, conversion, optin forms, forms, subscribers, exit intent popup, email marketing, crm, popup maker, popup plugin, cart abandonment, spin a wheel popup, conversion optimization, a/b testing, email opt-in, retargeting, ecommerce, cro, lightbox, promotion, shipping bar, announcement bar, advertising, mailing list, popup slide-in
|
4 |
+
Requires at least: 4.7.0
|
5 |
+
Tested up to: 5.4.2
|
6 |
Requires PHP: 5.3
|
7 |
+
Stable tag: 1.9.9
|
8 |
License: GNU General Public License v2.0 or later
|
9 |
|
10 |
+
Create popups, opt-in forms, & floating bars to get more email newsletter subscribers, leads, and increase sales conversion - #1 marketing popup plugin.
|
11 |
|
12 |
== Description ==
|
13 |
|
14 |
+
= The Best WordPress Popup and Marketing Plugin =
|
|
|
15 |
|
16 |
+
<a href="https://optinmonster.com/wp/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend" title="OptinMonster - WordPress Popup and Marketing Plugin">OptinMonster</a> is the ultimate popup builder and marketing plugin that helps you get more email subscribers, increase sales, and grow your business.
|
17 |
|
18 |
+
With OptinMonster popups and conversion toolkit, you can turn abandoning website visitors into subscribers and customers.
|
19 |
|
20 |
+
OptinMonster allows you to create beautiful popup forms, email subscription forms, sticky announcement bar (hello bar), gamified spin a wheel opt-in forms, and other types of interactive popups for your site in minutes, not hours!
|
|
|
21 |
|
22 |
+
At OptinMonster, user experience is our #1 priority. This is why unlike typical WordPress popup plugins, OptinMonster comes with smart targeting and personalization features that lets you show the right popup message, to the right user, at the right time.
|
23 |
|
24 |
+
OptinMonster popups and newsletter opt-in forms are 100% mobile responsive, so your marketing message modals will always look great on all devices (mobile, tablet, laptop, and desktop).
|
25 |
|
26 |
+
We understand the importance of speed when it comes SEO, marketing, and conversion optimization. This is why we made sure that OptinMonster popups and marketing tools are optimized for both web and server performance.
|
27 |
|
28 |
+
> <strong>OptinMonster App</strong><br />
|
29 |
+
> OptinMonster popups and marketing tools are part of the standalone OptinMonster app. You will need to create an OptinMonster account to access our popup builder, opt-in form builder, newsletter subscribers, and other powerful conversion tools. <a href="https://optinmonster.com/wp/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend" title="OptinMonster">Click here to purchase OptinMonster Pro now!</a>
|
30 |
|
31 |
+
We took the pain out of creating highly personalized popup forms and made it easy. Here's why smart business owners, designers, and developers love OptinMonster marketing toolkit, and you will too!
|
32 |
|
33 |
+
https://www.youtube.com/watch?v=qVrgFndEQIY&rel=0
|
34 |
|
35 |
+
= Drag & Drop Popup Maker =
|
|
|
|
|
36 |
|
37 |
+
We were tired of the bloated and slow popup maker plugins. That's why we built OptinMonster to adapt to your marketing workflow and allow you to create custom popups, newsletter opt-in forms, slide-ins popups, announcement bars, and other high converting lead generation forms within minutes.
|
38 |
|
39 |
+
By using our drag & drop popup maker, you can easily customize the look and feel of your opt-in popups, and even add dynamic popup elements like countdown timers, spin a wheel, etc that change based on user behavior (no code necessary).
|
40 |
|
41 |
+
But don't just take our word. See what one WordPress expert is saying:
|
42 |
|
43 |
+
> I was once a disbeliever myself. I didn't like popups at all. But we doubled our email signups, so the results speak for themselves, it just works. OptinMonster makes it super easy and is well worth the money.<br>
|
44 |
+
> Joost de Valk, Founder of Yoast SEO (<a href="https://optinmonster.com/case-study-how-yoast-doubled-his-email-signups-and-added-10000-email-subscribers-in-a-month/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">See Case Study</a>)
|
45 |
|
46 |
+
= Pre-built Popup Templates to Boost Conversions =
|
47 |
|
48 |
+
Building high-converting marketing popups can be time consuming. Why?
|
49 |
|
50 |
+
Because every other WordPress popup plugin requires you to build popups from scratch. The truth is it's often not necessary to create a popup or shipping bar from scratch unless you really want to.
|
51 |
|
52 |
+
Whether you're looking to create a newsletter popup, coupon popup, free shipping bar, announcement bar with countdown timer, gamified spin a wheel popup, fullscreen welcome mat popup, slide-in scroll popup, or any other advanced popup modal, we have a popup template for you inside our easy to use popup builder.
|
53 |
|
54 |
+
OptinMonster comes with hundreds of popup templates to help you save time. See our <a href="https://optinmonster.com/exit-intent-popup-examples/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">exit popup template gallery</a>.
|
55 |
|
56 |
+
> I have never before seen such effectiveness and efficiency in an optin tool than I have with OptinMonster. In under 2 hours of work, I doubled my daily optin rates thanks to OptinMonster’s incredible options.<br>
|
57 |
+
> Dave Chesson, Owner of Kindlepreneur (<a href="https://optinmonster.com/how-kindlepreneur-increased-customer-retention-using-content-upgrades/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">See Case Study</a>)
|
58 |
|
59 |
+
= Exit Intent Popups and OnSite Retargeting =
|
60 |
|
61 |
+
Did you know that over 70% of visitors abandoning your website will never return?
|
|
|
62 |
|
63 |
+
OptinMonster's signature <a href="https://optinmonster.com/features/exit-intent/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">exit-intent popup technology</a> can help you convert abandoning visitors into subscribers and customers.
|
64 |
|
65 |
+
With exit intent popups, your visitors see a targeted popup message at the precise moment they are about to leave.
|
|
|
|
|
66 |
|
67 |
+
Exit popups are proven to convert an additional 2 - 4% of your visitors into email subscribers and paying customers.
|
68 |
|
69 |
+
You can use exit intent popups combined with <a href="https://optinmonster.com/features/onsite-retargeting/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">OnSite retargeting</a> to show different popup messages to new visitors vs returning visitors.
|
70 |
|
71 |
+
These advanced popup triggers are highly effective in growing your email list, reducing WooCommerce cart abandonment, and saving you moeny on PPC advertising and retargeting ads.
|
72 |
|
73 |
+
> In only 7 months, we added more than 95,000 names to our email list using OptinMonster's Exit Intent™ technology. We strongly recommend it!<br>
|
74 |
+
> Michael Stelzner, Founder of Social Media Examiner (<a href="https://optinmonster.com/how-social-media-examiner-250000-subscribers-using-optinmonster-split-testing/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">See Case Study</a>)
|
75 |
|
76 |
+
= Smart Page Targeting and Behavior Based Personalization =
|
77 |
|
78 |
+
All OptinMonster popups comes with advanced page targeting and behavior based personalization.
|
79 |
|
80 |
+
This means you can show a custom popup for specific page or section of your site, show a custom popup based on users' geolocation, show a custom popup when users click a specific link, and more.
|
81 |
|
82 |
+
You can even show unique popups based on user's past behavior such as: have they clicked on an existing marketing popup, seen another popup campaign, closed a marketing popup, viewed X number of pages, etc.
|
83 |
|
84 |
+
These personalization features of OptinMonster popups make them highly effective in improving your lead generation, increasing subscribers, and growing sales.
|
|
|
85 |
|
86 |
+
> Using OptinMonster, I was able to increase sales $55,000 after capturing nearly 7% more leads with a single optin!<br>
|
87 |
+
> Cole Joseph, Owner of Cole's Classroom (<a href="https://optinmonster.com/coles-classroom-added-55494-sales?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">See Case Study</a>)
|
88 |
|
|
|
89 |
|
90 |
+
= Popup A/B Testing, Email Marketing Integration, and Popup Analytics =
|
91 |
|
92 |
+
Unlike other WordPress popup plugins, OptinMonster popups come with reliable A/B split testing and accurate popup analytics without slowing down your site.
|
93 |
|
94 |
+
Typical WordPress popup plugins use wp-ajax to setup popup analytics. This slows down your site and also results in unreliable popup analytics due to cache plugin settings.
|
95 |
|
96 |
+
Similarly, A/B testing in a basic WordPress popup plugin is broken because caching plugins can skew the data.
|
97 |
|
98 |
+
We fixed both these issues with our superior popup infrastructure, so you can have reliable A/B testing for popups, accurate popup conversion analytics, and seamless email marketing / CRM integrations for your popups (bonus: popup lead storage & lead backup for popup is now included too).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
99 |
|
100 |
+
> Since we started using OptinMonster our email list conversion rate increased by 300% and our sales by 20%. The best investment you can make for your online business!<br>
|
101 |
+
> Alex Chris, Digital Marketing Manager (<a href="https://optinmonster.com/case-study-how-reliablesoft-net-increased-conversions-by-300-using-optinmonster/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">See Case Study</a>)
|
102 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
103 |
|
104 |
+
= Full OptinMonster Feature List =
|
|
|
105 |
|
106 |
+
Popup Campaign Types for maximum conversions:
|
|
|
107 |
|
108 |
+
* <a href="https://optinmonster.com/features/lightbox-popups/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Lightbox Popups</a> - Create custom popups to grow your email list, show coupons in popup, make a WooCommerce popup modal for cross-sell or upsell products, and more.
|
109 |
+
* <a href="https://optinmonster.com/features/floating-bar/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Floating Bar Popups</a> - Create sticky header bars (also known as hello bar or floating footer bar) to show free shipping bar notice, website announcement alert, sale countdown timer, and more.
|
110 |
+
* <a href="https://optinmonster.com/features/slide-in-forms/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Slide-in Popups</a> - Create scroll box popups that slide out from bottom of the screen to highlight related WooCommerce products, related posts, and show coupon popup to reduce cart abandonment.
|
111 |
+
* <a href="https://optinmonster.com/features/fullscreen-welcome-gate/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Fullscreen Welcome Mat Popup</a> - Create full screen popups (also known as interstitials or welcome mats) to get maximum conversions. Great for getting new subscribers and marketing new products.
|
112 |
+
* <a href="https://optinmonster.com/features/coupon-wheel-optins/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Gamified Spin a Wheel Popup</a> - Create coupon wheel optins to increase WooCommerce conversions (with gamification). This adds an interactive spin a wheel popup that's proven to increase sales and lead generation.
|
113 |
+
* <a href="https://optinmonster.com/features/after-post-optin-forms/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Inline Signup Forms</a> - Unlike a popup, inline newsletter signup forms can be embedded inside your blog posts / page content. You can also use it to add an email opt-in form or custom call-to-action button (CTA) after your blog posts.
|
114 |
+
* <a href="https://optinmonster.com/features/sidebar-optin-forms/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Sidebar Subscribe Forms</a> - Unlike a popup, sidebar opt-in form lets you add an email newsletter signup form in your blog's sidebar to get more subscribers.
|
115 |
+
* <a href="https://optinmonster.com/features/content-lock/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Content Locker Popups</a> - Content locker popup turns any popular blog post into gated content, so you can get more email subscribers and boost marketing conversions.
|
116 |
+
* <a href="https://optinmonster.com/features/countdown-timer/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Countdown Timer Popup</a> - Boost urgency and scarcity for limited time offers with countdown timer popups (great for sales promotion, live events, webinars, and product launches). You can even create evergreen countdown timer popups to increase sales conversion.
|
117 |
+
* <a href="https://optinmonster.com/features/yes-no-forms/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Yes / No Popups</a> - Allows you to create multi-step popup and opt-in forms that results in better list segmentation and higher marketing conversions. Great for affiliate popups and showing different lead magnets.
|
118 |
+
* <a href="https://optinmonster.com/features/mobile-friendly-popups/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Mobile Popups</a> - Unlike other popup plugins, OptinMonster also lets you create mobile-specific popups that are only shown to users on smart phones and tablets. Great for mobile app download popup or simply boosting marketing conversions for mobile users.
|
119 |
+
* <a href="https://optinmonster.com/features/canvas/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Canvas Custom Popup</a> - Our blank canvas popup template allows you to create completely custom popup using our drag & drop popup builder for any use-case. Examples include: video popup, quiz popup, contest giveaway popup, social share popup, related post popup, related product popup, donations popup, and more.
|
120 |
|
121 |
+
Popup Targeting and Personalization features:
|
|
|
|
|
122 |
|
123 |
+
* <a href="https://optinmonster.com/features/page-level-targeting/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Popup Page Level Targeting</a> - Allows you to customize popups based on specific pages, category sections, and URL query / anchor tags.
|
124 |
+
* <a href="https://optinmonster.com/features/referrer-detection/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Referrer Detection for Popups</a> - Show custom marketing popups based on where the user is coming from (google, facebook, twitter, etc).
|
125 |
+
* <a href="https://optinmonster.com/features/geo-location-targeting/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Geolocation Targeting for Popups</a> - Personalize and translate popups based on visitors' physical location (geolocation).
|
126 |
+
* <a href="https://optinmonster.com/features/onsite-retargeting/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">OnSite Retargeting® for Popups</a> - Show different marketing popups to new vs returning visitors.
|
127 |
+
* <a href="https://optinmonster.com/features/onsite-follow-up-campaigns/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">OnSite Follow Up Campaigns® for Popups</a> - Create popup drip campaigns based on visitors' past behavior.
|
128 |
+
* <a href="https://optinmonster.com/features/device-based-targeting/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Device Based Targeting</a> - Create custom popups for desktop, tablet, and mobile users.
|
129 |
+
* <a href="https://optinmonster.com/features/cookie-retargeting/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Popup Cookie Retargeting</a> - Customize popup experience based on browser cookies.
|
130 |
+
* <a href="https://optinmonster.com/features/adblock-detection/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">AdBlock Detection Popup</a> - Recover adblock revenue with targeted popups only shown to users with adblock enabled.
|
131 |
+
* <a href="https://optinmonster.com/features/smart-tags/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Smart Tags for Popups</a> - Personalize your marketing popups with users' location, name, email, and add other dynamic content with popup smart tags.
|
132 |
+
* <a href="https://optinmonster.com/features/smart-success/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Smart Success for Popups</a> - Our popups subscriber recognition lets you show new sales popup offer to those who have already opted-in.
|
133 |
+
* <a href="https://optinmonster.com/features/canvas/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Popup Behavior Automation</a> - Customize popups based on # of pages viewed by users, how they interacted with other marketing popups, and more with real-time popup behavior automation.
|
134 |
+
* <a href="https://optinmonster.com/integrations/woocommerce/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">WooCommerce Popup</a> - Create custom WooCommerce popups based on what the user has in their cart, their order value, etc.
|
135 |
|
136 |
+
> Using OptinMonster we got a 300% improvement on our email conversion rates which translated into significant revenue. We have tried many similar lead generation plugins and nothing can compete with OptinMonster.<br>
|
137 |
+
> Ian Cleary, Founder RazorSocial (<a href="https://optinmonster.com/how-razorsocial-increased-conversions-by-520-using-content-upgrades/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">See Case Study</a>)
|
138 |
|
139 |
+
Popup Triggers and Behavior Detection:
|
|
|
|
|
|
|
|
|
140 |
|
141 |
+
* <a href="https://optinmonster.com/features/exit-intent/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Exit-Intent® Popups</a> - Shows popup only when user is about to leave a page.
|
142 |
+
* <a href="https://optinmonster.com/features/scroll-trigger/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Scroll Trigger Popup</a> - Shows popup only after the user has scrolled X% of page.
|
143 |
+
* <a href="https://optinmonster.com/features/monsterlinks/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Click to Load Popup</a> - Shows popup when user clicks on a link or image.
|
144 |
+
* <a href="https://optinmonster.com/features/inactivity-sensor-exit-intent-for-mobile/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Website Inactivity Sensor</a> - Shows popup only when user has been inactive for X seconds.
|
145 |
+
* <a href="https://optinmonster.com/features/timed-display-control/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Time on Site Popups</a> - Shows popup only after user has viewed your site or page for X seconds.
|
146 |
+
* <a href="https://optinmonster.com/features/campaign-scheduling/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Scheduled Popups</a> - Shows popup only on certain date / time (great for holiday popups or promotion / sales popup).
|
147 |
|
148 |
+
> Simply put, OptinMonster is my absolute favorite tool for digital marketers. Exit intent is genius and OptinMonster has helped us DOUBLE our clickthrough rates when we switched from their competitors (who were 5-10x more expensive!).<br>
|
149 |
+
> Justin Atlan, Co-Founder Clickbank (<a href="https://optinmonster.com/case-study-clickbank-doubled-sales/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">See Case Study</a>)
|
150 |
|
|
|
|
|
|
|
|
|
151 |
|
152 |
+
Other Powerful Popup Features:
|
|
|
|
|
153 |
|
154 |
+
* <a href="https://optinmonster.com/features/monstereffects/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Popup Animations</a> - Add popup animation effects to capture users' attention.
|
155 |
+
* <a href="https://optinmonster.com/docs/how-to-add-sound-effects-to-your-campaign/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Popup Sound Effects</a> - Add popup sound effects to grab users' attention.
|
156 |
+
* <a href="https://optinmonster.com/features/easy-ab-split-testing/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Smart A/B Testing for Popups</a> - A/B test popup ideas to increase conversions.
|
157 |
+
* <a href="https://optinmonster.com/features/conversion-analytics/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Reliable Popup Conversion Analytics</a> - See how your marketing popups are converting with reliable analytics.
|
158 |
+
* <a href="https://optinmonster.com/docs/how-optinmonster-uses-google-analytics-to-measure-conversion-analytics/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Advanced Google Analytics for Popups</a> - Connect popups with Google Analytics to see event tracking, enhanced eCommerce tracking, and more.
|
159 |
+
* <a href="https://optinmonster.com/features/lead-sharing/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Popup Lead Sharing</a> - Easily share popup leads with joint venture / co-marketing partners while using the same popup form.
|
160 |
+
* <a href="https://optinmonster.com/features/list-segmentation/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Popup List Segmentation</a> - Group email popup subscribers based on their interests for improved marketing automation.
|
161 |
+
* <a href="https://optinmonster.com/docs/connect-monster-leads-optinmonster/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Popup Lead Backup / Storage</a> - Always backup your popup subscribers with MonsterLeads.
|
162 |
+
* <a href="https://optinmonster.com/docs/how-to-create-a-shareable-monsterlink/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Share Popups on Social Media</a> - Create shareable popup links for social media using MonsterLinks.
|
163 |
+
* <a href="https://optinmonster.com/features/success-tracking-and-retargeting-scripts/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Popup Success Tracking Scripts</a> - Setup advertising conversion and retargeting pixels based on popup interaction to improve your PPC results.
|
164 |
|
165 |
+
> Within 1 month of setting up OptinMonster, our conversion rate of visitors to email subscribers shot up from 2.1% to 6.5% - I just wish we had signed up sooner!<br>
|
166 |
+
> Ben Philbaum, Founder Biddyco (<a href="https://optinmonster.com/case-study-how-biddyco-tripled-their-conversions-with-optinmonster/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">See Case Study</a>)
|
167 |
+
|
168 |
+
= Email Marketing and CRM Integrations =
|
169 |
+
|
170 |
+
* <a href="https://optinmonster.com/integrations/constant-contact/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Constant Contact Forms</a> - Create Constant Contact popups and newsletter sign up forms.
|
171 |
+
* <a href="https://optinmonster.com/integrations/mailchimp/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Mailchimp Forms</a> - Easily create MailChimp popup and email opt-in forms.
|
172 |
+
* <a href="https://optinmonster.com/integrations/aweber/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">AWeber Popup Forms</a>- Make AWeber popups and email marketing forms.
|
173 |
+
* <a href="https://optinmonster.com/integrations/aweber/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Infusionsoft (Keap)</a> - Create advanced Infusionsoft popups and lead generation forms.
|
174 |
+
* <a href="https://optinmonster.com/integrations/active-campaign/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">ActiveCampaign Popup Forms</a> - Create ActiveCampaign popup and newsletter signup form.
|
175 |
+
* <a href="https://optinmonster.com/integrations/convertkit/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">ConvertKit Popups</a> - Easily build ConvertKit popups and email signup forms.
|
176 |
+
* <a href="https://optinmonster.com/integrations/sendinblue/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Sendinblue Opt-in Popup</a> - Create Sendinblue popups and email subscription forms.
|
177 |
+
* <a href="https://optinmonster.com/integrations/getresponse/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">GetResponse Pop-ups</a> - Make GetResponse forms and popups with just a few clicks.
|
178 |
+
* <a href="https://optinmonster.com/integrations/campaign-monitor/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Campaign Monitor Forms</a> - Embed a Campaign Monitor popup and email marketing signup form.
|
179 |
+
* <a href="https://optinmonster.com/integrations/conversio/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">CM Commerce (formerly Conversio)</a> - Easily create exit intent popup for CM Commerce / Conversio.
|
180 |
+
* <a href="https://optinmonster.com/integrations/drip/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Drip Popups</a> - Create smart marketing automation popup forms for Drip CRM and email marketing service.
|
181 |
+
* <a href="https://optinmonster.com/integrations/eloqua/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Eloqua Forms</a> - Create dynamic popup and lead generation forms for Eloqua CRM.
|
182 |
+
* <a href="https://optinmonster.com/integrations/emma/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Emma Popups</a> - Create exit popups and inline forms for Emma newsletter service.
|
183 |
+
* <a href="https://optinmonster.com/integrations/hubspot/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">HubSpot Forms</a> - Create personalized popups forms to improve lead generation with HubSpot CRM.
|
184 |
+
* <a href="https://optinmonster.com/integrations/icontact/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">iContact Popup</a> - Create smart opt-in forms and popups for iContact marketing.
|
185 |
+
* <a href="https://optinmonster.com/docs/how-to-connect-optinmonster-with-jilt/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Jilt Pop-up Form</a> - Grow your WooCommere email list with smart Jilt popup and email marketing forms.
|
186 |
+
* <a href="https://optinmonster.com/integrations/klaviyo/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Klaviyo Popups</a> - Build smart eCommerce popups and flyout modals for Klaviyo to increase sales conversion.
|
187 |
+
* <a href="https://optinmonster.com/integrations/madmimi/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">MadMimi Signup Forms</a> - Create custom popups for Madmimi and get more email subscribers.
|
188 |
+
* <a href="https://optinmonster.com/integrations/mailerlite/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">MailerLite Popups</a> - Easily create newlsetter subscribe popup for Mailerlite and grow your email list.
|
189 |
+
* <a href="https://optinmonster.com/integrations/mailpoet/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">MailPoet Popup Form</a> - Use our popup maker to build smart MailPoet pop-up forms within minutes.
|
190 |
+
* <a href="https://optinmonster.com/integrations/marketo/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Marketo Lead Capture Forms</a> - Create exit popups and floating bars for Marketo to improve your lead generation / conversions.
|
191 |
+
* <a href="https://optinmonster.com/integrations/ontraport/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Ontraport Lightbox Popup</a> - Convert more leads with Ontraport CRM popups by OptinMonster.
|
192 |
+
* <a href="https://optinmonster.com/integrations/pardot/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Pardot (by Salesforce)</a> - Build custom popups for Pardot to capture more leads and improve conversions.
|
193 |
+
* <a href="https://optinmonster.com/integrations/sendloop/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Sendloop Forms</a> - Smart popup and floating bars for Sendloop email marketing.
|
194 |
+
* <a href="https://optinmonster.com/integrations/sendpulse/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">SendPulse Subscription Popup</a> - Create subscription forms and popups for SendPulse to boost your marketing conversions.
|
195 |
+
* <a href="https://optinmonster.com/integrations/sharp-spring/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">SharpSpring Forms</a> - Improve your marketing automation with powerful popups for SharpSpring.
|
196 |
+
* <a href="https://optinmonster.com/integrations/totalsend/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">TotalSend WordPress Popup</a> - Reduce bounce rate and generate more leads with TotalSend popups for WordPress.
|
197 |
+
* <a href="https://optinmonster.com/docs/how-to-connect-optinmonster-with-bronto/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Bronto (Oracle)</a> - Create email popups for Bronto (Oracle) to improve lead generation and conversions.
|
198 |
+
* <a href="https://optinmonster.com/integrations/ipost/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">iPost Popups</a> - Grow your email list faster with iPost popups and newlsetter forms.
|
199 |
+
* <a href="https://optinmonster.com/integrations/customer-io/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Customer.io</a> - Easily create smart popups and opt-in forms for customer.io.
|
200 |
+
* EmailOctopus Subsription Popup - Add EmailOctopus popup subscription forms to WordPress.
|
201 |
+
* <a href="https://optinmonster.com/integrations/feedblitz/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">FeedBlitz Popup</a> - Create smart email subscription popup and shopping cart popup for FeedBlitz.
|
202 |
+
* <a href="https://optinmonster.com/integrations/feedburner/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">FeedBurner Email Subscriptoin Form</a> - Easily create Feedburner popups for WordPress.
|
203 |
+
* <a href="https://optinmonster.com/integrations/custom-html-forms/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Custom HTML Forms Integration</a> - lets you embed any opt-in form inside OptinMonster's smart popup modals.
|
204 |
+
* <a href="https://optinmonster.com/integrations/webhooks/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Webhooks</a> - connect your popup with any custom CRM, email marketing service, or third-party application.
|
205 |
+
* <a href="https://optinmonster.com/docs/connect-optinmonster-with-zapier/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Zapier</a> - connect your WordPress popups with over 2000+ marketing apps. Route your popup form data to your favorite CRM, email marketing, etc.
|
206 |
+
|
207 |
+
= Additional Marketing Integrations =
|
208 |
+
|
209 |
+
* <a href="https://optinmonster.com/integrations/woocommerce/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">WooCommerce Popups</a> - Add upsell popups, cross sell popup, free shipping bar, announcement bar, wheel optin, and other WooCommerce popups.
|
210 |
+
* <a href="https://optinmonster.com/integrations/bigcommerce/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">BigCommerce Popups</a> - Coupon popups, gamified spin a wheel popup opt-in forms, exit popups, and more eCommerce popups to reduce cart abandonment and increase conversions.
|
211 |
+
* <a href="https://optinmonster.com/docs/connect-optinmonster-manychat/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">ManyChat Popups</a> - Create personalized popups for ManyChat to increase your chatbot subscribers on Facebook.
|
212 |
+
* <a href="https://optinmonster.com/integrations/shopify/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Shopify Popups</a> - Exit intent popup, cart abandonment popup, upsell popup, free shipping bar, discount wheel popups, and more customized popups for Shopify stores.
|
213 |
+
* <a href="https://optinmonster.com/integrations/magento/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Magento Popups</a> - Exit popups, cart abandonment popup, upsell popup, welcome mat popup, sticky hello bar, and more customized popups for Magento stores.
|
214 |
+
* <a href="https://optinmonster.com/docs/how-to-connect-optinmonster-with-wpforms/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">WPForms Popup</a> - Create contact form popups, survey form popups, poll popups, or basically embed any WPForms form inside lightbox popup modals.
|
215 |
+
* <a href="https://optinmonster.com/docs/how-to-use-wordpress-shortcodes-with-optinmonster/utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Gravity Forms Popup</a> - Create payment form popup, contact form popup, user registration popup, login form popup, and other Gravity Forms popup with just few clicks.
|
216 |
+
* <a href="https://optinmonster.com/docs/how-to-use-wordpress-shortcodes-with-optinmonster/utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Contact Form 7 Popup</a> - Easily create contact form 7 popups with OptinMonster.
|
217 |
+
* <a href="https://optinmonster.com/docs/how-to-use-wordpress-shortcodes-with-optinmonster/utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Ninja Form Popup</a> - Easily create contact form popups for Ninja Forms with OptinMonster.
|
218 |
+
|
219 |
+
After reading this feature list, you can probably imagine why OptinMonster is the best WordPress popup form plugin in the market.
|
220 |
+
|
221 |
+
<a href="https://optinmonster.com/wp/utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Give OptinMonster a try</a>.
|
222 |
|
223 |
+
= Credits =
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
224 |
|
225 |
+
This WordPress popup plugin is created by <a href="https://thomasgriffin.com/" rel="friend" title="Thomas Griffin">Thomas Griffin</a> and <a href="https://syedbalkhi.com/" rel="friend" title="Syed Balkhi">Syed Balkhi</a>.
|
|
|
226 |
|
227 |
+
= Branding Guideline =
|
|
|
228 |
|
229 |
+
OptinMonster® is a registered trademark of Retyp LLC. When writing about the popup plugin by OptinMonster, please make sure to uppercase the letter O and M.
|
|
|
230 |
|
231 |
+
* OptinMonster (correct)
|
232 |
+
* Optin Monster (incorrect)
|
233 |
+
* optinmonster (incorrect)
|
234 |
+
* optin monster (incorrect)
|
|
|
235 |
|
236 |
+
Exit-Intent®, OnSite Retargeting®, and OnSite Follow Up Campaigns® are also registered trademarks of Retyp LLC.
|
|
|
|
|
|
|
237 |
|
238 |
+
See our [Press & Brand Assets page](https://optinmonster.com/press/ "OptinMonster Press Page" ) for more details.
|
|
|
|
|
239 |
|
240 |
+
= What's Next =
|
|
|
241 |
|
242 |
+
If you like this popup plugin, then consider checking out our other projects:
|
|
|
243 |
|
244 |
+
* <a href="https://wpforms.com/" rel="friend" title="WPForms">WPForms</a> - Best WordPress form plugin (trusted by over 3 million users).
|
245 |
+
* <a href="https://www.monsterinsights.com/" rel="friend" title="MonsterInsights">MonsterInsights</a> - See the Stats that Matter and Grow Your Business with Confidence. Best Google Analytics Plugin for WordPress.
|
246 |
+
* <a href="https://www.seedprod.com/" rel="friend" title="SeedProd">SeedProd</a> - Jumpstart your website with the #1 Coming Soon & Maintenance Mode Plugin for WordPress.
|
247 |
+
* <a href="https://wpmailsmtp.com">WP Mail SMTP</a> - Improve email deliverability for your contact form and online store with the most popular SMTP plugin for WordPress.
|
248 |
+
* <a href="https://rafflepress.com/">RafflePress</a> - Best WordPress giveaway and contest plugin.
|
249 |
|
250 |
+
To get the most value out of your growing email list, see our <a href="https://optinmonster.com/beginners-guide-to-email-marketing/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">beginner's guide to email marketing</a>.
|
|
|
251 |
|
252 |
+
Visit <a href="http://www.wpbeginner.com/" rel="friend" title="WPBeginner">WPBeginner</a> to learn from our <a href="http://www.wpbeginner.com/category/wp-tutorials/" rel="friend" title="WordPress Tutorials">WordPress Tutorials</a> and find out about other <a href="http://www.wpbeginner.com/category/plugins/" rel="friend" title="Best WordPress Plugins">best WordPress plugins</a>.
|
|
|
|
|
253 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
254 |
|
255 |
+
== Installation ==
|
|
|
256 |
|
257 |
+
1. Install Popups by OptinMonster either via the WordPress.org plugin repository or by uploading the files to your server.
|
258 |
+
2. Activate OptinMonster Popups plugin.
|
259 |
+
3. Navigate to the OptinMonster tab in your WordPress admin and connect your OptinMonster account to your WordPress site to start displaying popups /email opt-in forms.
|
260 |
+
4. Click on the Campaigns tab to configure output settings for each popup or email optin campaign you have created in OptinMonster app.
|
261 |
+
5. Want more popup features? <a href="https://optinmonster.com/wp/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme">Upgrade to OptinMonster Pro or Growth plan</a>.
|
262 |
|
263 |
+
== Frequently Asked Questions ==
|
|
|
|
|
|
|
|
|
|
|
264 |
|
265 |
+
= Who should use OptinMonster Popups? =
|
266 |
+
|
267 |
+
OptinMonster popups are perfect for business owners, bloggers, eCommerce sites, designers, developers, marketing agencies, and basically everyone else.
|
268 |
+
|
269 |
+
If you want to create a custom WordPress popup, then you need to use OptinMonster drag & drop popup form builder.
|
270 |
+
|
271 |
+
Popular OptinMonster use-cases include: growing your email list, improve lead generation, increase sales conversion, reduce cart abandonment, show targeted offers, and get more pageviews.
|
272 |
+
|
273 |
+
= Do I need to have coding skills to use OptinMonster popups? =
|
274 |
+
|
275 |
+
Absolutely not. You can create and manage popups without any coding knowledge (100% drag and drop popup maker). OptinMonster is the most user friendly popup plugin in the market.
|
276 |
+
|
277 |
+
= What type of WordPress popups can I build with OptinMonster? =
|
278 |
+
|
279 |
+
OptinMonster is the most powerful popup builder in the market. Here are just some types of popup you can create:
|
280 |
+
|
281 |
+
* Email Opt-in Popup
|
282 |
+
* Exit Popup
|
283 |
+
* Announcement Popup
|
284 |
+
* Spin a Wheel Popup
|
285 |
+
* Slide-in Popup
|
286 |
+
* Fullscreen Popup (aka Welcome Mats)
|
287 |
+
* Video Popup
|
288 |
+
* Contact Form Popup
|
289 |
+
* Quiz Popup
|
290 |
+
* Disclaimer Popup
|
291 |
+
* WooCommerce Popup
|
292 |
+
* Upsell Popup
|
293 |
+
* Cross Sell Popup
|
294 |
+
* Coupon Popup
|
295 |
+
* Sales Popup
|
296 |
+
* Custom lightbox popup
|
297 |
+
* Survey Popup
|
298 |
+
* Newsletter Popup
|
299 |
+
* Popup on Click of Button or Image
|
300 |
+
* Facebook popup
|
301 |
+
* YouTube popup
|
302 |
+
* Login Popup
|
303 |
+
* Registration Popup
|
304 |
+
* Lead Generation Popup
|
305 |
+
|
306 |
+
... and a whole lot more. Basically, you can use our drag & drop popup builder to create any type of custom popup that you need.
|
307 |
+
|
308 |
+
= Can I integrate OptinMonster popups with my CRM or Email Marketing Service? =
|
309 |
+
|
310 |
+
Yes, OptinMonster popups offer seamless integration with over 2000+ popular <a href="https://www.wpbeginner.com/showcase/best-email-marketing-services/">email marketing</a> and <a href="https://www.wpbeginner.com/showcase/best-crm-software-for-small-businesses-compared/">CRM software</a>.
|
311 |
+
|
312 |
+
You can easily send data from your popup form to your favorite CRM, email newsletter, and other marketing platforms.
|
313 |
+
|
314 |
+
Here is a list of our popular marketing integrations:
|
315 |
+
|
316 |
+
* MailChimp popup forms
|
317 |
+
* AWeber popup forms
|
318 |
+
* Constant Contact popup forms
|
319 |
+
* ActiveCampagin popup forms
|
320 |
+
* ConvertKit popup forms
|
321 |
+
* HubSpot popup forms
|
322 |
+
* Campaign Monitor popup forms
|
323 |
+
* GetResponse popup forms
|
324 |
+
* SendinBlue popup forms
|
325 |
+
* Infusionsoft (Keap) popup forms
|
326 |
+
* Salesforce Pardot popup forms
|
327 |
+
* Drip popup forms
|
328 |
+
* Marketo popup forms
|
329 |
+
* MailerLite popup forms
|
330 |
+
* Klaviyo popup forms
|
331 |
+
* Eloqua (oracle) popup forms
|
332 |
+
* ManyChat messenger popup
|
333 |
+
|
334 |
+
and dozens of other <a href="https://optinmonster.com/integrations/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme">email marketing integrations</a>.
|
335 |
+
|
336 |
+
OptinMonster popups also offer custom HTML form popups, webhooks and Zapier integration, so you can easily connect your popups with over 2000+ marketing apps including:
|
337 |
+
|
338 |
+
* Google Sheets
|
339 |
+
* Pipedrive
|
340 |
+
* Zendesk
|
341 |
+
* Gmail
|
342 |
+
* Intercom
|
343 |
+
* Autopilot
|
344 |
+
* Freshdesk
|
345 |
+
* Act-on
|
346 |
+
* Drift
|
347 |
+
* Zoho CRM
|
348 |
+
* Kajabi
|
349 |
+
* Mailjet
|
350 |
+
* Slack
|
351 |
+
* Airtable
|
352 |
+
* Asana
|
353 |
+
* SMS (Twilio)
|
354 |
+
* Microsoft Excel
|
355 |
+
* Microsoft Office365
|
356 |
+
|
357 |
+
See all <a href="https://zapier.com/apps/optinmonster/integrations">OptinMonster Popup integrations with Zapier</a>.
|
358 |
+
|
359 |
+
= Can I use OptinMonster to make WooCommerce popups? =
|
360 |
+
|
361 |
+
Yes, you can easily create custom WooCommerce popups using OptinMonster popup maker.
|
362 |
+
|
363 |
+
Here are unique WooCommerce popups that you can create:
|
364 |
+
|
365 |
+
* WooCommerce discount popup
|
366 |
+
* WooCommerce spin a wheel coupon popup
|
367 |
+
* WooCommerce exit popup
|
368 |
+
* WooCommerce product popup
|
369 |
+
* WooCommerce upsell popups
|
370 |
+
* WooCommerce cross-sell popup
|
371 |
+
* WooCommerce cart abandonment popup
|
372 |
+
* WooCommerce sales popup
|
373 |
+
* WooCommerce free shipping popup
|
374 |
+
* WooCommerce countdown timer popup
|
375 |
+
|
376 |
+
... and many more.
|
377 |
+
|
378 |
+
The best part is that OptinMonster popup targeting feature lets you customize your popups based on specific WooCommerce triggers like: what items they have in cart, total shopping cart value, user's geolocation, and more.
|
379 |
+
|
380 |
+
= Which design elements / form fields can I add in OptinMonster popups? =
|
381 |
+
|
382 |
+
We made OptinMonster popup builder to be both easy and powerful.
|
383 |
+
|
384 |
+
Here are the popup fields that comes with the OptinMonster popup builder:
|
385 |
+
|
386 |
+
* Optin Form fields - great for newsletter popups
|
387 |
+
* Image field - great for adding images in popup
|
388 |
+
* Video field - great for creating video popups
|
389 |
+
* Button Field - great for adding call-to-action in popups
|
390 |
+
* Countdown Timer field - great for holiday sales popups
|
391 |
+
* Coupon Wheel field - great for spin to win coupon popups
|
392 |
+
* Chatbot field - great for creating messenger bot popups
|
393 |
+
* Yes / No field - great for creating multi-step popups
|
394 |
+
* Text field - easily add / customize text and headlines in popups
|
395 |
+
* HTML field - add any custom HTML or shortcode in popup
|
396 |
+
* Icon field - add custom FontAwesome icons inside popups
|
397 |
+
* Spacer field - add spacing in between popup elements
|
398 |
+
* Divider field - add divider styles in popups
|
399 |
+
* Columns field - create multi-column popup layouts
|
400 |
+
* Google ReCAPTCHA field - reduce popup form spam with Google ReCAPTCHA
|
401 |
+
* GDPR privacy checkbox - make your popup GDPR compliant
|
402 |
+
|
403 |
+
Using the HTML field, you can add tons of custom popup elements through iFrame embeds or WordPress shortcode. Here are some examples:
|
404 |
+
|
405 |
+
* Quiz popups
|
406 |
+
* Contact form popups
|
407 |
+
* Survey popups
|
408 |
+
* Popular post popups
|
409 |
+
* Related post popups
|
410 |
+
* WooCommerce product popups
|
411 |
+
* Payment form popups
|
412 |
+
* Webinar registration popup
|
413 |
+
* Image gallery popup
|
414 |
+
* Banner ad popup
|
415 |
+
* Live chat popup
|
416 |
+
* GDPR popup
|
417 |
+
* Terms and Conditions popup
|
418 |
+
* WordPress login form popup
|
419 |
+
* WordPress user registration popup
|
420 |
+
* Click to call popup
|
421 |
+
* Announcement notification popup
|
422 |
+
* Push notification popup
|
423 |
+
|
424 |
+
... and a whole lot more. Basically if another WordPress plugin or third-party apps provide a shortcode or iFrame, then you can embed that inside OptinMonster popups.
|
425 |
+
|
426 |
+
= Do popups really work? Show me the results =
|
427 |
+
|
428 |
+
Yes, popups are popular because they are proven to increase subscribers and sales.
|
429 |
+
|
430 |
+
Here are just a few popup success stories from OptinMonster customers:
|
431 |
+
|
432 |
+
> Before using OptinMonster, our website conversion rate was 2-3%, as expected. Since using OptinMonster, we have been able to improve conversion rates to 5.75%, a 189% increase.<br>
|
433 |
+
> Adam Rowles (<a href="https://optinmonster.com/case-study-inbound-marketing-increased-conversions-189-lead-magnets/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">See Case Study</a>)
|
434 |
+
|
435 |
+
> OptinMonster played a critical role in increasing my email optin conversion rate by 469%. In real numbers, that is the difference between $7,765 and $47,748 per month in revenue.<br>
|
436 |
+
> Matthew Woodward
|
437 |
+
|
438 |
+
> Exit-intent popups have doubled my email opt-in rate. When done right, you can see an instant 10% lift on driving sales. I highly recommend that you use OptinMonster for growing your email list and sales.<br>
|
439 |
+
> Neil Patel
|
440 |
+
|
441 |
+
<a href="https://optinmonster.com/testimonials/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend">Click here to see more popup case studies.</a>
|
442 |
|
|
|
|
|
|
|
|
|
443 |
|
444 |
+
== Screenshots ==
|
|
|
445 |
|
446 |
+
1. Select a Popup type (popup, full screen, floating bar, slide-in, inline, etc)
|
447 |
+
2. Create and customize your popup with our easy drag-and-drop popup builder
|
448 |
+
3. Smart popup targeting and personalization
|
449 |
+
4. The most powerful popup targeting and display rules engine
|
450 |
+
5. Boost conversions and engagement with spin a wheel popup (gamification)
|
451 |
+
6. Exit popup template gallery
|
452 |
+
7. Floating Bar (aka Hello Bar / Sticky Bar) gallery
|
453 |
+
8. Sidebar newsletter opt-in form template gallery
|
454 |
+
9. Reliable conversion analytics for popups
|
455 |
+
10. Free access to OptinMonster university (marketing courses)
|
456 |
|
457 |
+
== Notes ==
|
|
|
458 |
|
459 |
+
OptinMonster is hands down the <a href="https://optinmonster.com/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpreadme" rel="friend" title="Best WordPress popup plugin">best WordPress popup plugin</a> on the market. No other WordPress popup plugin, opt-in form plugin, or lead generation solution even comes close to OptinMonster and the features it offers.
|
|
|
460 |
|
461 |
+
We took the pain out of creating powerful popups and made it easy.
|
|
|
|
|
|
|
462 |
|
463 |
+
Also I'm the founder of <a href="https://syedbalkhi.com/companies/" rel="friend" title="Syed Balkhi Companies">several popular online businesses</a>, so it was a huge priority for me to make a WordPress popup plugin that can help us grow our subscribers & sales.
|
|
|
|
|
|
|
|
|
464 |
|
465 |
+
I feel that we have done that. I hope you enjoy using OptinMonster.
|
|
|
|
|
466 |
|
467 |
+
Thank you,
|
468 |
+
Syed Balkhi
|
469 |
|
470 |
+
== Changelog ==
|
|
|
|
|
471 |
|
472 |
+
**Most Recent Changes:**
|
|
|
473 |
|
474 |
+
= 1.9.9 =
|
475 |
+
* Fix issue where if multiple post tags were selected, popups and other campaigns would only appear on the first tag selected.
|
476 |
+
* Fix campaign shortcode suggestion in admin being incorrect.
|
477 |
+
* Full security audit to patch any potential issues.
|
478 |
|
479 |
+
= 1.9.8 =
|
480 |
+
* Fix compatibility with AMP.
|
481 |
+
* Update compatibility with popular caching plugins.
|
482 |
+
* Update to make all strings translatable.
|
483 |
+
* Fix bug where phone numbers wouldn't save when using MailPoet.
|
484 |
+
* Remove old jQuery dependencies.
|
485 |
+
* Update internal notices to be more friendly with other plugins.
|
486 |
|
487 |
+
= 1.9.7 =
|
488 |
+
* Update the OptinMonster API JS URL.
|
489 |
+
* Update trustpulse menu title.
|
|
|
|
|
490 |
|
491 |
+
= 1.9.6 =
|
492 |
+
* You can now use Gravity Forms AJAX submissions and form validation with your OptinMonster campaigns.
|
493 |
+
* Update admin notices to use the recommended classes
|
|
|
494 |
|
495 |
+
= 1.9.5 =
|
496 |
+
* Add support for www domains in Api.js embed code.
|
497 |
+
* Improve MailPoet error outputs.
|
498 |
|
499 |
+
**[View entire changelog](https://plugins.svn.wordpress.org/optinmonster/trunk/CHANGELOG.md)**
|
|
views/archie-css.php
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<style type="text/css">
|
2 |
+
@font-face{
|
3 |
+
font-family: 'archie';
|
4 |
+
src: url('<?php echo $this->url . 'assets/fonts/archie.eot?velzrt'; ?>');
|
5 |
+
src: url('<?php echo $this->url . 'assets/fonts/archie.eot?#iefixvelzrt'; ?>') format('embedded-opentype'),url('<?php echo $this->url . 'assets/fonts/archie.woff?velzrt'; ?>') format('woff'),url('<?php echo $this->url . 'assets/fonts/archie.ttf?velzrt'; ?>') format('truetype'),url('<?php echo $this->url . 'assets/fonts/archie.svg?velzrt#archie'; ?>') format('svg');
|
6 |
+
font-weight: normal;
|
7 |
+
font-style: normal;
|
8 |
+
}
|
9 |
+
#toplevel_page_optin-monster-api-settings .dashicons-before,
|
10 |
+
#toplevel_page_optin-monster-api-settings .dashicons-before:before,
|
11 |
+
#toplevel_page_optin-monster-api-welcome .dashicons-before,
|
12 |
+
#toplevel_page_optin-monster-api-welcome .dashicons-before:before{
|
13 |
+
font-family: 'archie';
|
14 |
+
speak: none;
|
15 |
+
font-style: normal;
|
16 |
+
font-weight: normal;
|
17 |
+
font-variant: normal;
|
18 |
+
text-transform: none;
|
19 |
+
line-height: 1;
|
20 |
+
-webkit-font-smoothing: antialiased;
|
21 |
+
-moz-osx-font-smoothing: grayscale;
|
22 |
+
}
|
23 |
+
#toplevel_page_optin-monster-api-settings .dashicons-before:before,
|
24 |
+
#toplevel_page_optin-monster-api-welcome .dashicons-before:before{
|
25 |
+
content: "\e600";
|
26 |
+
font-size: 38px;
|
27 |
+
margin-top: -9px;
|
28 |
+
margin-left: -8px;
|
29 |
+
}
|
30 |
+
</style>
|
views/cybermonday-notification-css.php
ADDED
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<style type="text/css">
|
2 |
+
#om-cybermonday-notice {
|
3 |
+
display: block;
|
4 |
+
text-align: center;
|
5 |
+
position: relative;
|
6 |
+
overflow: hidden;
|
7 |
+
}
|
8 |
+
#om-cybermonday-notice p {
|
9 |
+
font-size: 1.3em;
|
10 |
+
margin: 1.5em 0 1em;
|
11 |
+
}
|
12 |
+
#om-cybermonday-notice a {
|
13 |
+
border: 0;
|
14 |
+
text-decoration: none;
|
15 |
+
display: block;
|
16 |
+
margin: 15px auto 8px;
|
17 |
+
max-width: 510px;
|
18 |
+
background: #0b82de;
|
19 |
+
font-size: 1.2em;
|
20 |
+
padding: 0.65rem 1.25rem .75rem;
|
21 |
+
color: #fff;
|
22 |
+
text-align: center;
|
23 |
+
border-radius: 3px;
|
24 |
+
color: #fff !important;
|
25 |
+
}
|
26 |
+
#archie-peeking {
|
27 |
+
position: absolute;
|
28 |
+
bottom: -31px;
|
29 |
+
right: -44px;
|
30 |
+
width: 120px;
|
31 |
+
height: auto;
|
32 |
+
-webkit-transform: rotate(-18deg);
|
33 |
+
transform: rotate(-18deg);
|
34 |
+
-webkit-animation: omring 6.5s 1s ease-in-out infinite;
|
35 |
+
-webkit-transform-origin: 40% 150px;
|
36 |
+
-moz-animation: omring 6.5s 1s ease-in-out infinite;
|
37 |
+
-moz-transform-origin: 40% 150px;
|
38 |
+
animation: omring 6.5s 1s ease-in-out infinite;
|
39 |
+
transform-origin: 40% 150px;
|
40 |
+
}
|
41 |
+
@-webkit-keyframes omring{
|
42 |
+
0%{transform:rotate(-18deg)}
|
43 |
+
1%{transform:rotate(-20deg)}
|
44 |
+
2%{transform:rotate(-10deg)}
|
45 |
+
3%{transform:rotate(-20deg)}
|
46 |
+
4%{transform:rotate(-10deg)}
|
47 |
+
5%{transform:rotate(-18deg)}
|
48 |
+
6%{transform:rotate(-12deg)}
|
49 |
+
7%{transform:rotate(-17deg)}
|
50 |
+
8%{transform:rotate(-14deg)}
|
51 |
+
9%{transform:rotate(-16deg)}
|
52 |
+
10%{transform:rotate(-18deg)}
|
53 |
+
100%{transform:rotate(-18deg)}
|
54 |
+
}
|
55 |
+
@-moz-keyframes omring{
|
56 |
+
0%{transform:rotate(-18deg)}
|
57 |
+
1%{transform:rotate(-20deg)}
|
58 |
+
2%{transform:rotate(-10deg)}
|
59 |
+
3%{transform:rotate(-20deg)}
|
60 |
+
4%{transform:rotate(-10deg)}
|
61 |
+
5%{transform:rotate(-18deg)}
|
62 |
+
6%{transform:rotate(-12deg)}
|
63 |
+
7%{transform:rotate(-17deg)}
|
64 |
+
8%{transform:rotate(-14deg)}
|
65 |
+
9%{transform:rotate(-16deg)}
|
66 |
+
10%{transform:rotate(-18deg)}
|
67 |
+
100%{transform:rotate(-18deg)}
|
68 |
+
}
|
69 |
+
@keyframes omring{
|
70 |
+
0%{transform:rotate(-18deg)}
|
71 |
+
1%{transform:rotate(-20deg)}
|
72 |
+
2%{transform:rotate(-10deg)}
|
73 |
+
3%{transform:rotate(-20deg)}
|
74 |
+
4%{transform:rotate(-10deg)}
|
75 |
+
5%{transform:rotate(-18deg)}
|
76 |
+
6%{transform:rotate(-12deg)}
|
77 |
+
7%{transform:rotate(-17deg)}
|
78 |
+
8%{transform:rotate(-14deg)}
|
79 |
+
9%{transform:rotate(-16deg)}
|
80 |
+
10%{transform:rotate(-18deg)}
|
81 |
+
100%{transform:rotate(-18deg)}
|
82 |
+
}
|
83 |
+
</style>
|
views/cybermonday-notification-js.php
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<script type="text/javascript">
|
2 |
+
(function() {
|
3 |
+
var turnOff = function() {
|
4 |
+
window.setUserSetting( 'om_cybermonday_notice', 'off' );
|
5 |
+
};
|
6 |
+
if ( jQuery ) {
|
7 |
+
jQuery( function( $ ) {
|
8 |
+
$( '#om-cybermonday-notice' ).on( 'click', '.notice-dismiss', turnOff );
|
9 |
+
});
|
10 |
+
} else {
|
11 |
+
var el = document.getElementById( 'om-cybermonday-notice' );
|
12 |
+
el.addEventListener('click', function( e ) {
|
13 |
+
if ( ( ' ' + e.target.className + ' ' ).indexOf( ' notice-dismiss ' ) > -1 ) {
|
14 |
+
turnOff();
|
15 |
+
}
|
16 |
+
});
|
17 |
+
}
|
18 |
+
setTimeout( turnOff, 4000 );
|
19 |
+
})();
|
20 |
+
</script>
|
views/cybermonday-notification.php
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div id="om-cybermonday-notice" class="notice notice-info is-dismissible">
|
2 |
+
<p>
|
3 |
+
<img id="archie-peeking" src="<?php echo $this->url; ?>assets/css/images/dashboard-icon.png" alt="<?php esc_attr_e( 'Archie, OptinMonster Mascot', 'optin-monster-api' ); ?>">
|
4 |
+
OptinMonster Black Friday / Cyber Monday special - <strong>35% off</strong> all purchases, upgrades and pre-payments!
|
5 |
+
<a
|
6 |
+
href="<?php echo esc_url( $data['url'] ); ?>"
|
7 |
+
target="_blank" rel="noopener"
|
8 |
+
title="Click here to claim your Cyber Monday deal."
|
9 |
+
>Click here to claim your deal →</a>
|
10 |
+
</p>
|
11 |
+
</div>
|
views/cybermonday-pulse-css.php
ADDED
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<style type="text/css">
|
2 |
+
.om-pulse{
|
3 |
+
text-align: center;
|
4 |
+
cursor: pointer;
|
5 |
+
z-index: 99;
|
6 |
+
left: 123px;
|
7 |
+
top: 7px;
|
8 |
+
}
|
9 |
+
.om-pulse, .om-pulse:before {
|
10 |
+
display: inline-block;
|
11 |
+
width: 12px;
|
12 |
+
height: 12px;
|
13 |
+
border-radius: 100%;
|
14 |
+
background-color: #74ba0d;
|
15 |
+
position: absolute;
|
16 |
+
top: 7px;
|
17 |
+
right: 40px;
|
18 |
+
}
|
19 |
+
.om-pulse:before {
|
20 |
+
content: '';
|
21 |
+
border: 1px solid #74ba0d;
|
22 |
+
left: -3px;
|
23 |
+
top: -3px;
|
24 |
+
width: 16px;
|
25 |
+
height: 16px;
|
26 |
+
background: transparent;
|
27 |
+
}
|
28 |
+
.om-pulse:after{
|
29 |
+
content: '';
|
30 |
+
position: absolute;
|
31 |
+
top: -2px;
|
32 |
+
left: -2px;
|
33 |
+
width: 16px;
|
34 |
+
height: 16px;
|
35 |
+
background-color: #7dd004;
|
36 |
+
border-radius: 100%;
|
37 |
+
z-index: -1;
|
38 |
+
animation: ompulse 2s infinite;
|
39 |
+
will-change: transform;
|
40 |
+
}
|
41 |
+
|
42 |
+
.om-pulse:hover:after{
|
43 |
+
animation: none;
|
44 |
+
}
|
45 |
+
|
46 |
+
@-webkit-keyframes ompulse{
|
47 |
+
0%{transform: scale(1);opacity: 1;}
|
48 |
+
100%{transform: scale(2);opacity: 0;}
|
49 |
+
}
|
50 |
+
@-moz-keyframes ompulse{
|
51 |
+
0%{transform: scale(1);opacity: 1;}
|
52 |
+
100%{transform: scale(2);opacity: 0;}
|
53 |
+
}
|
54 |
+
@keyframes ompulse{
|
55 |
+
0%{transform: scale(1);opacity: 1;}
|
56 |
+
100%{transform: scale(2);opacity: 0;}
|
57 |
+
}
|
58 |
+
</style>
|
views/trustpulse-banner.php
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<header id="masthead" class="navbar-header">
|
2 |
+
<nav class="navbar" role="navigation" aria-label="main navigation">
|
3 |
+
<div class="navbar-brand">
|
4 |
+
<a class="navbar-item" href="<?php echo TRUSTPULSE_URL; ?>?utm_source=orgplugin&utm_medium=link&utm_campaign=wpdashboard">
|
5 |
+
<img src="<?php echo TRUSTPULSE_URL; ?>wp-content/themes/trustpulse/assets/images/logo@2x.png" width="170">
|
6 |
+
</a>
|
7 |
+
<a role="button" class="navbar-burger burger" aria-label="menu" aria-expanded="false" data-target="siteNavMenu">
|
8 |
+
<span aria-hidden="true"></span>
|
9 |
+
<span aria-hidden="true"></span>
|
10 |
+
<span aria-hidden="true"></span>
|
11 |
+
</a>
|
12 |
+
</div>
|
13 |
+
<div id="siteNavMenu" class="navbar-menu">
|
14 |
+
<div class="navbar-end">
|
15 |
+
<div class="menu-top-navbar-menu-container">
|
16 |
+
<ul id="primary-menu" class="navbar">
|
17 |
+
<a class="navbar-item" href="<?php echo TRUSTPULSE_APP_URL; ?>account/support/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpdashboard" target="_blank"><span class="hover-underline">Support</span></a>
|
18 |
+
<a class="navbar-item" href="<?php echo TRUSTPULSE_URL; ?>docs/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpdashboard" target="_blank"><span class="hover-underline">Documentation</span></a>
|
19 |
+
</ul>
|
20 |
+
</div>
|
21 |
+
</div>
|
22 |
+
</div>
|
23 |
+
</nav>
|
24 |
+
</header>
|
views/trustpulse-settings-page.php
ADDED
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div id="wrap" class="trustpulse-wrap">
|
2 |
+
<h1 class="tp-heading">Boost Your Sales and Conversions with Social Proof Notifications</h1>
|
3 |
+
<div class="tp-admin-box">
|
4 |
+
<p>
|
5 |
+
TrustPulse helps you leverage the true power of social proof to instantly increase trust, conversions and sales by up to 15%
|
6 |
+
</p>
|
7 |
+
<div class="tp-content-row">
|
8 |
+
<a target="_blank" rel="noopener" href="<?php echo TRUSTPULSE_APP_URL; ?>checkout/1/monthly/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpdashboard" class="tp-content-row__item tp-button tp-button--green">Get Started For Free</a>
|
9 |
+
</div>
|
10 |
+
</div>
|
11 |
+
<h2 class="tp-heading">Top 4 Reasons Why People Love TrustPulse</h2>
|
12 |
+
<p class="tp-subheading">Here's why smart business owners love TrustPulse, and you will too!</p>
|
13 |
+
<div class="tp-features">
|
14 |
+
<div class="tp-feature tp-feature--text-right">
|
15 |
+
<div class="tp-feature__image">
|
16 |
+
<img src="<?php echo $this->url . 'assets/css/images/features-event.svg'; ?>" alt="Real-Time Event Tracking">
|
17 |
+
</div>
|
18 |
+
<div class="tp-feature__text">
|
19 |
+
<h3>Real-Time Event Tracking</h3>
|
20 |
+
<p>Show a live stream of any action on your website, including purchases, demo registrations, email newsletter signups, and more.</p>
|
21 |
+
</div>
|
22 |
+
</div>
|
23 |
+
<div class="tp-feature tp-feature--text-left">
|
24 |
+
<div class="tp-feature__image">
|
25 |
+
<img src="<?php echo $this->url . 'assets/css/images/features-fire.svg'; ?>" alt="On Fire Notifications">
|
26 |
+
</div>
|
27 |
+
<div class="tp-feature__text">
|
28 |
+
<h3>"On Fire" Notifications</h3>
|
29 |
+
<p>Show how many people are taking action in a given period. Great for leveraging FOMO (Fear of Missing Out) on landing pages and checkouts.</p>
|
30 |
+
</div>
|
31 |
+
</div>
|
32 |
+
<div class="tp-feature tp-feature--text-right">
|
33 |
+
<div class="tp-feature__image">
|
34 |
+
<img src="<?php echo $this->url . 'assets/css/images/home-smart-targeting.svg'; ?>" alt="Real-Time Event Tracking">
|
35 |
+
</div>
|
36 |
+
<div class="tp-feature__text">
|
37 |
+
<h3>Smart Targeting</h3>
|
38 |
+
<p>Show your social proof notifications to the right people at the right time to boost conversions by using advanced targeting rules and timing controls.</p>
|
39 |
+
</div>
|
40 |
+
</div>
|
41 |
+
<div class="tp-feature tp-feature--text-left">
|
42 |
+
<div class="tp-feature__image">
|
43 |
+
<img src="<?php echo $this->url . 'assets/css/images/home-flexible.svg'; ?>" alt="Smart Targeting">
|
44 |
+
</div>
|
45 |
+
<div class="tp-feature__text">
|
46 |
+
<h3>Flexible Design Options</h3>
|
47 |
+
<p>Create attractive notifications designed to convert. Customize the message, colors, images, and more to match the look and feel of your website.</p>
|
48 |
+
</div>
|
49 |
+
</div>
|
50 |
+
</div>
|
51 |
+
<div class="tp-works-on">
|
52 |
+
<h2 class="tp-heading">TrustPulse works with all popular form and ecommerce plugins<br>for WordPress</h2>
|
53 |
+
<div class="tp-works-on__icons">
|
54 |
+
<img class="tp-works-on__icon" src="<?php echo $this->url . 'assets/css/images/wpforms.png'; ?>" alt="WP Forms">
|
55 |
+
<img class="tp-works-on__icon" src="<?php echo $this->url . 'assets/css/images/logo-om.png'; ?>" alt="OptinMonster">
|
56 |
+
<img class="tp-works-on__icon" src="<?php echo $this->url . 'assets/css/images/woocommerce_logo.png'; ?>" alt="WooCommerce">
|
57 |
+
<img class="tp-works-on__icon" src="<?php echo $this->url . 'assets/css/images/logo-edd.png'; ?>" alt="Easy Digital Downloads">
|
58 |
+
<img class="tp-works-on__icon" src="<?php echo $this->url . 'assets/css/images/BigCommerce-logo.png'; ?>" alt="BigCommerce">
|
59 |
+
<img class="tp-works-on__icon" src="<?php echo $this->url . 'assets/css/images/ninja-forms.png'; ?>" alt="Ninja Forms">
|
60 |
+
<img class="tp-works-on__icon" src="<?php echo $this->url . 'assets/css/images/gravity-forms.png'; ?>" alt="Gravity Forms">
|
61 |
+
<img class="tp-works-on__icon" src="<?php echo $this->url . 'assets/css/images/memberpress-logo.svg'; ?>" alt="MemberPress">
|
62 |
+
<img class="tp-works-on__icon" src="<?php echo $this->url . 'assets/css/images/logo-formidable.png'; ?>" alt="Formidable">
|
63 |
+
</div>
|
64 |
+
</div>
|
65 |
+
<div class="tp-admin-box">
|
66 |
+
<p>
|
67 |
+
Join other smart business owners who use TrustPulse to convert visitors into subscribers and customers.
|
68 |
+
</p>
|
69 |
+
<div class="tp-content-row">
|
70 |
+
<a target="_blank" rel="noopener" href="<?php echo TRUSTPULSE_APP_URL; ?>checkout/1/monthly/?utm_source=orgplugin&utm_medium=link&utm_campaign=wpdashboard" class="tp-content-row__item tp-button tp-button--green">Get Started For Free</a>
|
71 |
+
</div>
|
72 |
+
</div>
|
73 |
+
</div>
|