WP Maintenance Mode - Version 2.0.3

Version Description

(07/10/2014) = * WP_Super_Cache issue was fixed * fixed "Subscribe" button issue on Safari mobile * fixed color of subscribe-success message (same color as subscribe_text) * "Social networks" module edits: settings for links target + a new social network: linkedin * new module "Google Analytics" * loginform shortcode reintroduced * dashboard link on maintenance page reintroduced * the content editor accepts new css inline properties: min-height, max-height, min-width, max-width. Use them wisely! :) * Settings & sidebar view + old translation files edited * Update from old version 1.x to 2.x issue was fixed * Translate on activation issue was fixed * de_DE translation by Frank Bltge (http://bueltge.github.io/) * pt_PT translation (100% translated) by Pedro Mendona (http://www.pedromendonca.pt) * ru_RU translation (100% translated) by affectiosus (https://github.com/affectiosus) * nl_NL translation by dhunink (https://github.com/dhunink) * es_ES translation (100% translated) by Erick Ruiz de Chavez (http://erickruizdechavez.com/) * fr_FR translation by Florian TIAR (https://github.com/Mahjouba91) * pt_BR translation by Jonatas Arajo (http://www.designworld.com.br/) * sv_SE translation by Andras Lundgren (http://adevade.com/)

Download this release

Release Info

Developer GeorgeJipa
Plugin Icon 128x128 WP Maintenance Mode
Version 2.0.3
Comparing to
See all releases

Code changes from version 2.0.2 to 2.0.3

Files changed (37) hide show
  1. assets/css/style-admin.css +118 -133
  2. assets/css/style.css +462 -403
  3. assets/images/icn_sprite.png +0 -0
  4. assets/images/resources/startup-wordpress.jpg +0 -0
  5. assets/js/scripts.js +90 -79
  6. includes/classes/wp-maintenance-mode-admin.php +47 -9
  7. includes/classes/wp-maintenance-mode-shortcodes.php +76 -0
  8. includes/classes/wp-maintenance-mode.php +69 -29
  9. includes/functions/helpers.php +0 -24
  10. languages/wp-maintenance-mode-de_DE.mo +0 -0
  11. languages/wp-maintenance-mode-de_DE.po +459 -0
  12. languages/wp-maintenance-mode-en_US.mo +0 -0
  13. languages/wp-maintenance-mode-en_US.po +435 -390
  14. languages/wp-maintenance-mode-es_ES.mo +0 -0
  15. languages/wp-maintenance-mode-es_ES.po +464 -0
  16. languages/wp-maintenance-mode-fr_FR.mo +0 -0
  17. languages/wp-maintenance-mode-fr_FR.po +465 -0
  18. languages/wp-maintenance-mode-nl_NL.mo +0 -0
  19. languages/wp-maintenance-mode-nl_NL.po +460 -0
  20. languages/wp-maintenance-mode-pt_BR.mo +0 -0
  21. languages/wp-maintenance-mode-pt_BR.po +535 -0
  22. languages/wp-maintenance-mode-pt_PT.mo +0 -0
  23. languages/wp-maintenance-mode-pt_PT.po +463 -0
  24. languages/wp-maintenance-mode-ro_RO.mo +0 -0
  25. languages/wp-maintenance-mode-ro_RO.po +470 -414
  26. languages/wp-maintenance-mode-ru_RU.mo +0 -0
  27. languages/wp-maintenance-mode-ru_RU.po +463 -0
  28. languages/wp-maintenance-mode-sv_SE.mo +0 -0
  29. languages/wp-maintenance-mode-sv_SE.po +457 -0
  30. readme.md +105 -105
  31. readme.txt +364 -335
  32. uninstall.php +1 -0
  33. views/loginform.php +9 -0
  34. views/maintenance.php +17 -15
  35. views/settings.php +62 -13
  36. views/sidebar.php +8 -27
  37. wp-maintenance-mode.php +2 -1
assets/css/style-admin.css CHANGED
@@ -1,133 +1,118 @@
1
- h2.wpmm-title {
2
- background: url('../images/icon-48.png') no-repeat left center;
3
- line-height: 42px;
4
- margin-bottom: 30px;
5
- height: 48px;
6
- padding-left: 55px;
7
- }
8
-
9
- /* WRAP*/
10
- .wpmm-wrapper {
11
- display: table;
12
- width: 100%;
13
- }
14
-
15
- .wpmm-wrapper #content {
16
- min-width: 800px;
17
- }
18
-
19
- .wpmm-wrapper #sidebar {
20
- padding: 0 0 0 20px;
21
- width: 280px;
22
- }
23
-
24
- .wpmm-wrapper #sidebar .sidebar_box {
25
- background: none repeat scroll 0 0 #fff;
26
- border: 1px solid #e5e5e5;
27
- box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
28
- min-width: 255px;
29
- line-height: 1;
30
- margin-bottom: 20px;
31
- padding: 0;
32
- }
33
-
34
- .wpmm-wrapper #sidebar .sidebar_box h3 {
35
- margin: 0;
36
- padding: 8px 12px;
37
- border-bottom: 1px solid #ececec;
38
- }
39
-
40
- .wpmm-wrapper #sidebar .sidebar_box .inside {
41
- margin: 6px 0 0;
42
- font-size: 13px;
43
- line-height: 1.4em;
44
- padding: 0 12px 12px;
45
- }
46
-
47
- .wpmm-wrapper .wrapper-cell {
48
- display: table-cell;
49
- }
50
-
51
- .wpmm-wrapper .hidden {
52
- display: none;
53
- }
54
-
55
- /* TABS */
56
- .nav-tab-wrapper {
57
- border-bottom: 1px solid #ccc;
58
- padding-bottom: 0;
59
- padding-left: 10px;
60
- }
61
-
62
- .nav-tab-wrapper a {
63
- font-size: 15px;
64
- font-weight: 700;
65
- line-height: 24px;
66
- padding: 6px 10px;
67
- }
68
-
69
- /* TABS CONTENT */
70
- .tabs-content {
71
- margin-top: 20px;
72
- padding-left: 10px;
73
- }
74
-
75
- .tabs-content .wp-color-result {
76
- margin-bottom: -2px;
77
- }
78
-
79
- .tabs-content ul.bg_list {
80
- float: left;
81
- }
82
-
83
- .tabs-content ul.bg_list li {
84
- float: left;
85
- margin-right: 7px;
86
- opacity: 0.4;
87
- }
88
-
89
- .tabs-content ul.bg_list li.active {
90
- opacity: 1;
91
- }
92
-
93
- .tabs-content ul.bg_list li input {
94
- display: none;
95
- }
96
-
97
- .tabs-content .countdown_details input {
98
- width: 70px;
99
- }
100
-
101
- .tabs-content .countdown_details .margin_left {
102
- margin-left: 30px;
103
- }
104
-
105
- /* SIDEBARS */
106
- #sidebar .subscribe_box form {
107
- margin-top: 10px;
108
- }
109
-
110
- #sidebar .subscribe_box input {
111
- height: 40px;
112
- width: 100%;
113
- }
114
-
115
- #sidebar .subscribe_box .button {
116
- height: 30px;
117
- margin-top: 10px;
118
- width: 100%;
119
- }
120
-
121
- #sidebar .news_box ul, .info_box ul {
122
- margin-top: 10px;
123
- margin-bottom: -5px;
124
- }
125
-
126
- #sidebar .resources_box ul {
127
- margin-top: 10px;
128
- margin-bottom: -15px;
129
- }
130
-
131
- #sidebar .resources_box li {
132
- margin-bottom: 10px;
133
- }
1
+ h2.wpmm-title {
2
+ background: url('../images/icon-48.png') no-repeat left center;
3
+ line-height: 42px;
4
+ margin-bottom: 30px;
5
+ height: 48px;
6
+ padding-left: 55px;
7
+ }
8
+
9
+ /* WRAP*/
10
+ .wpmm-wrapper {
11
+ display: table;
12
+ width: 100%;
13
+ }
14
+
15
+ .wpmm-wrapper #content {
16
+ min-width: 800px;
17
+ }
18
+
19
+ .wpmm-wrapper #sidebar {
20
+ padding: 0 0 0 20px;
21
+ width: 280px;
22
+ }
23
+
24
+ .wpmm-wrapper #sidebar .sidebar_box {
25
+ background: none repeat scroll 0 0 #fff;
26
+ border: 1px solid #e5e5e5;
27
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
28
+ min-width: 255px;
29
+ line-height: 1;
30
+ margin-bottom: 20px;
31
+ padding: 0;
32
+ }
33
+
34
+ .wpmm-wrapper #sidebar .sidebar_box h3 {
35
+ margin: 0;
36
+ padding: 8px 12px;
37
+ border-bottom: 1px solid #ececec;
38
+ }
39
+
40
+ .wpmm-wrapper #sidebar .sidebar_box .inside {
41
+ margin: 6px 0 0;
42
+ font-size: 13px;
43
+ line-height: 1.4em;
44
+ padding: 0 12px 12px;
45
+ }
46
+
47
+ .wpmm-wrapper .wrapper-cell {
48
+ display: table-cell;
49
+ }
50
+
51
+ .wpmm-wrapper .hidden {
52
+ display: none;
53
+ }
54
+
55
+ /* TABS */
56
+ .nav-tab-wrapper {
57
+ border-bottom: 1px solid #ccc;
58
+ padding-bottom: 0;
59
+ padding-left: 10px;
60
+ }
61
+
62
+ .nav-tab-wrapper a {
63
+ font-size: 15px;
64
+ font-weight: 700;
65
+ line-height: 24px;
66
+ padding: 6px 10px;
67
+ }
68
+
69
+ /* TABS CONTENT */
70
+ .tabs-content {
71
+ margin-top: 20px;
72
+ padding-left: 10px;
73
+ }
74
+
75
+ .tabs-content .wp-color-result {
76
+ margin-bottom: -2px;
77
+ }
78
+
79
+ .tabs-content ul.bg_list {
80
+ float: left;
81
+ }
82
+
83
+ .tabs-content ul.bg_list li {
84
+ float: left;
85
+ margin-right: 7px;
86
+ opacity: 0.4;
87
+ }
88
+
89
+ .tabs-content ul.bg_list li.active {
90
+ opacity: 1;
91
+ }
92
+
93
+ .tabs-content ul.bg_list li input {
94
+ display: none;
95
+ }
96
+
97
+ .tabs-content .countdown_details input {
98
+ width: 70px;
99
+ }
100
+
101
+ .tabs-content .countdown_details .margin_left {
102
+ margin-left: 30px;
103
+ }
104
+
105
+ /* SIDEBARS */
106
+ #sidebar .info_box ul {
107
+ margin-top: 10px;
108
+ margin-bottom: -5px;
109
+ }
110
+
111
+ #sidebar .resources_box ul, #sidebar .themes_box ul {
112
+ margin-top: 10px;
113
+ margin-bottom: -15px;
114
+ }
115
+
116
+ #sidebar .resources_box li, #sidebar .themes_box li {
117
+ margin-bottom: 10px;
118
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
assets/css/style.css CHANGED
@@ -1,403 +1,462 @@
1
- html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
2
- margin: 0;
3
- padding: 0;
4
- border: 0;
5
- font-size: 100%;
6
- font: inherit;
7
- vertical-align: baseline;
8
- text-decoration: none;
9
- }
10
- article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
11
- display: block;
12
- }
13
- body {
14
- line-height: 1;
15
- }
16
- ol, ul {
17
- list-style: none;
18
- }
19
- blockquote, q {
20
- display: block;
21
- width: 400px;
22
- margin: 0 auto;
23
- text-align: left;
24
- position: relative;
25
- font-style: italic;
26
- }
27
- blockquote:before, blockquote:after, q:before, q:after {
28
- content: '"';
29
- content: none;
30
- }
31
- table {
32
- border-collapse: collapse;
33
- border-spacing: 0;
34
- }
35
- em, i {
36
- font-style: italic;
37
- }
38
- del {
39
- text-decoration: line-through;
40
- }
41
- strong, b {
42
- font-weight: bold;
43
- }
44
- ol {
45
- width: 500px;
46
- margin: 0 auto;
47
- text-align: left;
48
- }
49
- ol li {
50
- list-style-type:decimal;
51
- }
52
- ul {
53
- width: 500px;
54
- margin: 0 auto;
55
- text-align: left;
56
- }
57
- ul li {
58
- list-style:disc;
59
- }
60
- a {
61
- color: inherit;
62
- text-decoration: underline;
63
- }
64
- body, html {
65
- min-height: 100%;
66
- /*height: 100%;*/
67
- }
68
- body {
69
- background-color: #fff;
70
- color: #1b1f23;
71
- font-family: Helvetica Neue, Arial, sans-serif;
72
- }
73
- .wrap {
74
- width: 500xp;
75
- margin: 100px auto 0;
76
- text-align: center;
77
- }
78
- .wrap h1 {
79
- font-size: 30px;
80
- font-weight: 700;
81
- margin: 0 0 90px;
82
- }
83
- .wrap h2 {
84
- font-size: 24px;
85
- font-weight: 400;
86
- line-height: 45px;
87
- margin: 0 0 80px;
88
- }
89
- .wrap h3 {
90
- font-size: 24px;
91
- font-weight: 400px;
92
- margin: 0 0 45px;
93
- }
94
-
95
- .wrap .author_link {
96
- margin-top: 15px;
97
- color: #616161;
98
- margin: 0 0 50px;
99
- }
100
-
101
- .wrap .author_link a {
102
- color: #000;
103
- }
104
-
105
- /**
106
- * COUNTDOWN
107
- **/
108
- .wrap .countdown {
109
- margin: 0 0 85px;
110
- }
111
- .wrap .countdown span {
112
- font-size: 30px;
113
- }
114
-
115
- /**
116
- * SUBSCRIBE FORM
117
- **/
118
- .wrap form.subscribe_form {
119
- width: 465px;
120
- margin: 0 0 75px;
121
- display: inline-block;
122
- border: 3px solid #e0e0e0;
123
- box-sizing: border-box;
124
- }
125
- .wrap form.subscribe_form input {
126
- margin: 0;
127
- outline: 0;
128
- border: 0;
129
- float: left;
130
- font-size: 18px;
131
- padding: 20px 25px;
132
- box-sizing: content-box;
133
- }
134
- .wrap form.subscribe_form input[type="text"] {
135
- width: 245px;
136
- }
137
- .wrap form.subscribe_form input[type="submit"] {
138
- background: #000;
139
- color: #fff;
140
- float: right;
141
- cursor: pointer;
142
- padding: 20px 30px;
143
- border-left: 3px solid #e0e0e0;
144
- }
145
- .wrap form.subscribe_form input[type="submit"]:hover {
146
- background: #fff;
147
- color: #000;
148
- border-left: 3px solid #e0e0e0;
149
-
150
- }
151
- .wrap form.subscribe_form input[type="submit"]:active {
152
- background: #1e1e1e;
153
- color: #fff;
154
- }
155
- .wrap form.subscribe_form .error {
156
- color: red;
157
- }
158
- .wrap form.subscribe_form label.error {
159
- display: none !important;
160
- }
161
-
162
- /**
163
- * SOCIAL NETWORKS
164
- **/
165
- .wrap .social {
166
- margin: 0 0 70px;
167
- }
168
- .wrap .social a {
169
- width: 22px;
170
- height: 22px;
171
- margin: 0 0 20px 60px;
172
- background-image: url('../images/icn_sprite.png');
173
- background-repeat: no-repeat;
174
- display: inline-block;
175
- text-indent: -999em;
176
- }
177
- .wrap .social a:first-of-type {
178
- margin: 0 0 20px 0;
179
- }
180
- .wrap .social .git {
181
- background-position: 0 0;
182
- }
183
- .wrap .social .fb {
184
- background-position: -240px 0;
185
- }
186
- .wrap .social .tw {
187
- background-position: -162px 0px;
188
- }
189
- .wrap .social .rss {
190
- background-position: -402px 0;
191
- }
192
- .wrap .social .mail {
193
- background-position: -560px 0;
194
- }
195
- .wrap .social .pin {
196
- background-position: -322px 0;
197
- }
198
- .wrap .social .dribbble {
199
- background-position: -82px 0;
200
- }
201
- .wrap .social .gplus {
202
- background-position: -486px 0;
203
- }
204
-
205
- /**
206
- * CONTACT FORM
207
- **/
208
- .wrap .contact_us {
209
- color: #000;
210
- border: 3px solid #000;
211
- font-size: 18px;
212
- padding: 15px 40px;
213
- display: inline-block;
214
- margin: 0 0 70px;
215
- }
216
-
217
- .wrap .contact_us:hover {
218
- background: #000;
219
- color: #fff;
220
-
221
- }
222
-
223
- .contact_us {
224
- text-decoration: none;
225
- }
226
-
227
- .contact {
228
- position: fixed;
229
- display: none;
230
- top: 0;
231
- bottom: 0;
232
- left: 0;
233
- right: 0;
234
- background: rgba(27, 31, 35, 0.95);
235
- }
236
- .contact label.error {
237
- color: red;
238
- float: left;
239
- font-size: 11px;
240
- padding-top: 10px;
241
- }
242
- .contact .form {
243
- width: 520px;
244
- text-align: center;
245
- padding: 40px;
246
- background: #f9f9f9;
247
- box-sizing: border-box;
248
- margin: 100px auto;
249
- transition: 0.2s transform ease-in-out;
250
- }
251
- .contact .form input, .contact .form textarea {
252
- padding: 15px 20px;
253
- margin: 0;
254
- outline: 0;
255
- width: 100%;
256
- background: #f9f9f9;
257
- border: 3px solid #e0e0e0;
258
- font-size: 18px;
259
- font-family: Helvetica Neue, Arial, sans-serif;
260
- box-sizing: border-box;
261
- resize: none;
262
- }
263
- .contact .form textarea {
264
- height: 175px;
265
- padding: 20px;
266
- }
267
- .contact .form input[type="text"]::-webkit-input-placeholder, .contact .form textarea::-webkit-input-placeholder {
268
- color: #dadada;
269
- }
270
- .contact .form input[type="text"]::-moz-input-placeholder, .contact .form textarea::-moz-input-placeholder {
271
- color: #dadada;
272
- }
273
- .contact .form input[type="text"]::-ms-input-placeholder, .contact .form textarea::-ms-input-placeholder {
274
- color: #dadada;
275
- }
276
- .contact .form .col {
277
- width: 205px;
278
- margin: 0 0 30px;
279
- display: inline-block;
280
- float: left;
281
- }
282
- .contact .form .col.last {
283
- float: right;
284
- }
285
- .contact .form .submit {
286
- margin: 30px 0 0;
287
- text-align: center;
288
- clear: left;
289
- }
290
- .contact .form .submit input {
291
- cursor: pointer;
292
- display: inline-block;
293
- background: #1b1f24;
294
- color: #fff;
295
- border: 0;
296
- padding: 20px 45px;
297
- width: auto;
298
- }
299
-
300
- /*======= MOVE ANIMATION =======*/
301
- .contact .move_top {
302
- transform: perspective(1000px) translateY(-200px);
303
- }
304
- .contact .move_bottom {
305
- transform: perspective(1000px) translateY(0);
306
-
307
- }
308
-
309
- /*======= ZOOM ANIMATION =======*/
310
- .contact .zoom {
311
- transform: perspective(1000px) scale(0.5);
312
- transition: 0.3s transform ease-in-out;
313
- }
314
- .contact .zoomed {
315
- transform: perspective(1000px) scale(1);
316
- }
317
-
318
- /*======= FOLD ANIMATION =======*/
319
- .contact .fold {
320
- transform: perspective(1000px) rotateY(90deg);
321
- }
322
- .contact .unfold {
323
- transform: perspective(1000px) rotateY(0);
324
- }
325
-
326
- /**
327
- * EDITS WHEN HAVE BACKGROUND CLASS
328
- **/
329
- .background {
330
- background: url('../images/backgrounds/bg1.jpg') no-repeat center top fixed;
331
- background-size: cover;
332
- }
333
- .background .countdown span {
334
- color: #fff;
335
- }
336
- .background form.subscribe_form input[type="submit"] {
337
- color: #000;
338
- background: #fff;
339
- }
340
- .background form.subscribe_form input[type="text"] {
341
- background: transparent;
342
- color: #fff;
343
- }
344
- .background form.subscribe_form input.error[type="text"] {
345
- color: red;
346
- }
347
- .background form.subscribe_form input[type="text"]::-webkit-input-placeholder {
348
- color: #fff;
349
- }
350
- .background form.subscribe_form input[type="text"]::-moz-input-placeholder {
351
- color: #fff;
352
- }
353
- .background form.subscribe_form input[type="text"]::-ms-input-placeholder {
354
- color: #fff;
355
- }
356
- .background .contact_us {
357
- color: #fff;
358
- border-color: #fff;
359
- }
360
-
361
- /**
362
- * MEDIA QUERIES (RESPONSIVE)
363
- **/
364
- @media only screen and (max-width: 550px) {
365
- .wrap {
366
- width: 90%;
367
- margin: 50px auto 0;
368
- }
369
- .wrap h1 {
370
- margin: 0 0 50px;
371
- }
372
- .wrap h2, .wrap h3 {
373
- font-size: 18px;
374
- }
375
- .wrap form {
376
- box-sizing: border-box;
377
- width: 100%;
378
- }
379
- .wrap form input {
380
- box-sizing: border-box;
381
- }
382
- .wrap form input[type="text"], .wrap form input[type="submit"] {
383
- width: 100%;
384
- }
385
- .wrap .contact_us {
386
- margin: 0 0 50px;
387
- }
388
- .contact .form {
389
- width: 90%;
390
- }
391
- .contact .form p.col {
392
- width: 100%;
393
- }
394
- .contact .form input[type="submit"] {
395
- width: 100%;
396
- }
397
- ul, ol {
398
- width: 80%;
399
- }
400
- blockquote, q {
401
- width: 70%;
402
- }
403
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
2
+ margin: 0;
3
+ padding: 0;
4
+ border: 0;
5
+ font-size: 100%;
6
+ font: inherit;
7
+ vertical-align: baseline;
8
+ text-decoration: none;
9
+ }
10
+ article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section {
11
+ display: block;
12
+ }
13
+ body {
14
+ line-height: 1;
15
+ }
16
+ ol, ul {
17
+ list-style: none;
18
+ }
19
+ blockquote, q {
20
+ display: block;
21
+ width: 500px;
22
+ margin: 0 auto;
23
+ text-align: left;
24
+ position: relative;
25
+ font-style: italic;
26
+ }
27
+ blockquote:before, blockquote:after, q:before, q:after {
28
+ content: '"';
29
+ content: none;
30
+ }
31
+ input, button {
32
+ -webkit-appearance: none;
33
+ border-radius: 0;
34
+ }
35
+ table {
36
+ border-collapse: collapse;
37
+ border-spacing: 0;
38
+ }
39
+ em, i {
40
+ font-style: italic;
41
+ }
42
+ del {
43
+ text-decoration: line-through;
44
+ }
45
+ strong, b {
46
+ font-weight: bold;
47
+ }
48
+ ol {
49
+ width: 600px;
50
+ margin: 0 auto;
51
+ text-align: left;
52
+ }
53
+ ol li {
54
+ list-style-type: decimal;
55
+ }
56
+ ul {
57
+ width: 600px;
58
+ margin: 0 auto;
59
+ text-align: left;
60
+ }
61
+ ul li {
62
+ list-style: disc;
63
+ }
64
+ a {
65
+ color: inherit;
66
+ text-decoration: underline;
67
+ }
68
+ body, html {
69
+ min-height: 100%;
70
+ /*height: 100%;*/
71
+ }
72
+ body {
73
+ background-color: #fff;
74
+ color: #1b1f23;
75
+ font-family: Helvetica Neue, Arial, sans-serif;
76
+ }
77
+ .wrap {
78
+ width: 605px;
79
+ margin: 100px auto 0;
80
+ text-align: center;
81
+ }
82
+ .wrap h1 {
83
+ font-size: 30px;
84
+ font-weight: 700;
85
+ margin: 0 0 90px;
86
+ }
87
+ .wrap h2 {
88
+ font-size: 24px;
89
+ font-weight: 400;
90
+ line-height: 45px;
91
+ margin: 0 0 80px;
92
+ }
93
+ .wrap h3 {
94
+ font-size: 24px;
95
+ font-weight: 400px;
96
+ margin: 0 0 45px;
97
+ }
98
+ .wrap .author_link {
99
+ margin-top: 15px;
100
+ color: #616161;
101
+ margin: 0 0 50px;
102
+ }
103
+ .wrap .author_link a {
104
+ color: #000;
105
+ }
106
+ /**
107
+ * COUNTDOWN
108
+ **/
109
+
110
+ .wrap .countdown {
111
+ margin: 0 0 85px;
112
+ }
113
+ .wrap .countdown span {
114
+ font-size: 30px;
115
+ }
116
+ /**
117
+ * SUBSCRIBE FORM
118
+ **/
119
+
120
+ .wrap form.subscribe_form {
121
+ width: 465px;
122
+ margin: 0 0 75px;
123
+ display: inline-block;
124
+ border: 3px solid #e0e0e0;
125
+ box-sizing: border-box;
126
+ }
127
+ .wrap form.subscribe_form input {
128
+ margin: 0;
129
+ outline: 0;
130
+ border: 0;
131
+ float: left;
132
+ font-size: 18px;
133
+ padding: 20px 25px;
134
+ box-sizing: content-box;
135
+ }
136
+ .wrap form.subscribe_form input[type="text"] {
137
+ width: 245px;
138
+ }
139
+ .wrap form.subscribe_form input[type="submit"] {
140
+ background: #000;
141
+ color: #fff;
142
+ float: right;
143
+ cursor: pointer;
144
+ padding: 20px 30px;
145
+ border-left: 3px solid #e0e0e0;
146
+ }
147
+ .wrap form.subscribe_form input[type="submit"]:hover {
148
+ background: #fff;
149
+ color: #000;
150
+ border-left: 3px solid #e0e0e0;
151
+ }
152
+ .wrap form.subscribe_form input[type="submit"]:active {
153
+ background: #1e1e1e;
154
+ color: #fff;
155
+ }
156
+ .wrap form.subscribe_form .error {
157
+ color: red;
158
+ }
159
+ .wrap form.subscribe_form label.error {
160
+ display: none !important;
161
+ }
162
+ /**
163
+ * LOGIN FORM
164
+ **/
165
+
166
+ .wrap form.login_form {
167
+ width: 100%;
168
+ margin: 15px 0 0;
169
+ }
170
+ .wrap form.login_form input {
171
+ display: inline-block;
172
+ box-sizing: border-box;
173
+ -moz-box-sizing: border-box;
174
+ -webkit-box-sizing: border-box;
175
+ border: 3px solid #E2E2E2;
176
+ font-family: Helvetica Neue, Arial, sans-serif;
177
+ font-size: 16px;
178
+ margin: 0 10px 0 0;
179
+ outline: 0;
180
+ padding: 15px;
181
+ }
182
+ .wrap form.login_form input[type="submit"] {
183
+ background: #000;
184
+ color: #fff;
185
+ margin: 0;
186
+ border-color: #000;
187
+ font-weight: bold;
188
+ padding: 15px 30px;
189
+ cursor: pointer;
190
+ }
191
+ .wrap form.login_form input[type="submit"]:active {
192
+ position: relative;
193
+ top: 1px;
194
+ }
195
+ /**
196
+ * SOCIAL NETWORKS
197
+ **/
198
+
199
+ .wrap .social {
200
+ margin: 0 0 70px;
201
+ }
202
+ .wrap .social a {
203
+ width: 22px;
204
+ height: 22px;
205
+ margin: 0 0 20px 55px;
206
+ background-image: url('../images/icn_sprite.png');
207
+ background-repeat: no-repeat;
208
+ display: inline-block;
209
+ text-indent: -999em;
210
+ }
211
+ .wrap .social a:first-of-type {
212
+ margin: 0 0 20px 0;
213
+ }
214
+ .wrap .social .git {
215
+ background-position: 0 0;
216
+ }
217
+ .wrap .social .fb {
218
+ background-position: -240px 0;
219
+ }
220
+ .wrap .social .tw {
221
+ background-position: -162px 0px;
222
+ }
223
+ .wrap .social .rss {
224
+ background-position: -402px 0;
225
+ }
226
+ .wrap .social .mail {
227
+ background-position: -560px 0;
228
+ }
229
+ .wrap .social .pin {
230
+ background-position: -322px 0;
231
+ }
232
+ .wrap .social .dribbble {
233
+ background-position: -82px 0;
234
+ }
235
+ .wrap .social .gplus {
236
+ background-position: -486px 0;
237
+ }
238
+ .wrap .social .linkedin {
239
+ background-position: -633px 0;
240
+ }
241
+ /**
242
+ * CONTACT FORM
243
+ **/
244
+
245
+ .wrap .contact_us {
246
+ color: #000;
247
+ border: 3px solid #000;
248
+ font-size: 18px;
249
+ padding: 15px 40px;
250
+ display: inline-block;
251
+ margin: 0 0 70px;
252
+ }
253
+ .wrap .contact_us:hover {
254
+ background: #000;
255
+ color: #fff;
256
+ }
257
+ .contact_us {
258
+ text-decoration: none;
259
+ }
260
+ .contact {
261
+ position: fixed;
262
+ display: none;
263
+ top: 0;
264
+ bottom: 0;
265
+ left: 0;
266
+ right: 0;
267
+ background: rgba(27, 31, 35, 0.95);
268
+ }
269
+ .contact label.error {
270
+ color: red;
271
+ float: left;
272
+ font-size: 11px;
273
+ padding-top: 10px;
274
+ }
275
+ .contact .form {
276
+ width: 520px;
277
+ text-align: center;
278
+ padding: 40px;
279
+ background: #f9f9f9;
280
+ box-sizing: border-box;
281
+ margin: 100px auto;
282
+ transition: 0.2s transform ease-in-out;
283
+ }
284
+ .contact .form input, .contact .form textarea {
285
+ padding: 15px 20px;
286
+ margin: 0;
287
+ outline: 0;
288
+ width: 100%;
289
+ background: #f9f9f9;
290
+ border: 3px solid #e0e0e0;
291
+ font-size: 18px;
292
+ font-family: Helvetica Neue, Arial, sans-serif;
293
+ box-sizing: border-box;
294
+ resize: none;
295
+ }
296
+ .contact .form textarea {
297
+ height: 175px;
298
+ padding: 20px;
299
+ }
300
+ .contact .form input[type="text"]::-webkit-input-placeholder, .contact .form textarea::-webkit-input-placeholder {
301
+ color: #dadada;
302
+ }
303
+ .contact .form input[type="text"]::-moz-input-placeholder, .contact .form textarea::-moz-input-placeholder {
304
+ color: #dadada;
305
+ }
306
+ .contact .form input[type="text"]::-ms-input-placeholder, .contact .form textarea::-ms-input-placeholder {
307
+ color: #dadada;
308
+ }
309
+ .contact .form .col {
310
+ width: 205px;
311
+ margin: 0 0 30px;
312
+ display: inline-block;
313
+ float: left;
314
+ }
315
+ .contact .form .col.last {
316
+ float: right;
317
+ }
318
+ .contact .form .submit {
319
+ margin: 30px 0 0;
320
+ text-align: center;
321
+ clear: left;
322
+ }
323
+ .contact .form .submit input {
324
+ cursor: pointer;
325
+ display: inline-block;
326
+ background: #1b1f24;
327
+ color: #fff;
328
+ border: 0;
329
+ padding: 20px 45px;
330
+ width: auto;
331
+ }
332
+ /*======= MOVE ANIMATION =======*/
333
+
334
+ .contact .move_top {
335
+ transform: perspective(1000px) translateY(-200px);
336
+ }
337
+ .contact .move_bottom {
338
+ transform: perspective(1000px) translateY(0);
339
+ }
340
+ /*======= ZOOM ANIMATION =======*/
341
+
342
+ .contact .zoom {
343
+ transform: perspective(1000px) scale(0.5);
344
+ transition: 0.3s transform ease-in-out;
345
+ }
346
+ .contact .zoomed {
347
+ transform: perspective(1000px) scale(1);
348
+ }
349
+ /*======= FOLD ANIMATION =======*/
350
+
351
+ .contact .fold {
352
+ transform: perspective(1000px) rotateY(90deg);
353
+ }
354
+ .contact .unfold {
355
+ transform: perspective(1000px) rotateY(0);
356
+ }
357
+ /**
358
+ * EDITS WHEN HAVE BACKGROUND CLASS
359
+ **/
360
+
361
+ .background {
362
+ background: url('../images/backgrounds/bg1.jpg') no-repeat center top fixed;
363
+ background-size: cover;
364
+ }
365
+ .background .countdown span {
366
+ color: #fff;
367
+ }
368
+ .background form.subscribe_form input[type="submit"] {
369
+ color: #000;
370
+ background: #fff;
371
+ }
372
+ .background form.subscribe_form input[type="text"] {
373
+ background: transparent;
374
+ color: #fff;
375
+ }
376
+ .background form.subscribe_form input.error[type="text"] {
377
+ color: red;
378
+ }
379
+ .background form.subscribe_form input[type="text"]::-webkit-input-placeholder {
380
+ color: #fff;
381
+ }
382
+ .background form.subscribe_form input[type="text"]::-moz-input-placeholder {
383
+ color: #fff;
384
+ }
385
+ .background form.subscribe_form input[type="text"]::-ms-input-placeholder {
386
+ color: #fff;
387
+ }
388
+ .background .contact_us {
389
+ color: #fff;
390
+ border-color: #fff;
391
+ }
392
+ /**
393
+ * MEDIA QUERIES (RESPONSIVE)
394
+ **/
395
+
396
+ @media only screen and (max-width: 700px) {
397
+ .wrap form.login_form {
398
+ width: 80%;
399
+ margin: 15px auto 0;
400
+ }
401
+ .wrap form.login_form input {
402
+ width: 49%;
403
+ margin: 0 2% 0 0;
404
+ }
405
+ .wrap form.login_form input[type="password"] {
406
+ margin: 0;
407
+ }
408
+ .wrap form.login_form input[type="submit"] {
409
+ width: 100%;
410
+ margin: 15px 0 0;
411
+ }
412
+ }
413
+ @media only screen and (max-width: 550px) {
414
+ .wrap {
415
+ width: 90%;
416
+ margin: 50px auto 0;
417
+ }
418
+ .wrap h1 {
419
+ margin: 0 0 50px;
420
+ }
421
+ .wrap h2, .wrap h3 {
422
+ font-size: 18px;
423
+ }
424
+ .wrap form {
425
+ box-sizing: border-box;
426
+ width: 100%;
427
+ }
428
+ .wrap form input {
429
+ box-sizing: border-box;
430
+ }
431
+ .wrap form input[type="text"], .wrap form input[type="submit"] {
432
+ width: 100%;
433
+ }
434
+ .wrap .contact_us {
435
+ margin: 0 0 50px;
436
+ }
437
+ .contact .form {
438
+ width: 90%;
439
+ }
440
+ .contact .form p.col {
441
+ width: 100%;
442
+ }
443
+ .contact .form input[type="submit"] {
444
+ width: 100%;
445
+ }
446
+ .wrap form.login_form {
447
+ width: 90%;
448
+ }
449
+ .wrap form.login_form input {
450
+ width: 100%;
451
+ margin: 0 0 10px 0;
452
+ }
453
+ .wrap form.login_form input[type="submit"] {
454
+ margin: 10px 0 0;
455
+ }
456
+ ul, ol {
457
+ width: 80%;
458
+ }
459
+ blockquote, q {
460
+ width: 70%;
461
+ }
462
+ }
assets/images/icn_sprite.png CHANGED
Binary file
assets/images/resources/startup-wordpress.jpg ADDED
Binary file
assets/js/scripts.js CHANGED
@@ -1,80 +1,91 @@
1
- jQuery(function($) {
2
- /**
3
- * COUNTDOWN
4
- */
5
- if ($('.countdown').length > 0) {
6
- var countDate = new Date($('.countdown').data('start'));
7
- countDate = new Date($('.countdown').data('end'));
8
- $('.countdown').countdown({
9
- until: countDate,
10
- compact: true,
11
- layout: '<span class="day">{dn}</span> <span class="separator">:</span> <span class="hour">{hnn}</span> <span class="separator">:</span> <span class="minutes">{mnn}</span> <span class="separator">:</span> <span class="seconds">{snn}</span>'
12
- });
13
- }
14
-
15
- /**
16
- * SUBSCRIBE FORM
17
- */
18
- if ($('.subscribe_form').length > 0) {
19
- // validate form
20
- $('.subscribe_form').validate({
21
- submitHandler: function(form) {
22
- $.post(wpmm_vars.ajax_url, {
23
- action: 'wpmm_add_subscriber',
24
- email: $('.email_input', $('.subscribe_form')).val()
25
- }, function(data) {
26
- $('.subscribe_wrapper').html(data.response);
27
- }, 'json');
28
-
29
- return false;
30
- }
31
- });
32
- }
33
-
34
- /**
35
- * CONTACT FORM
36
- */
37
- if ($('.contact').length > 0) {
38
- // show form
39
- $('.contact_us').click(function() {
40
- var open_contact = $(this).data('open'),
41
- close_contact = $(this).data('close');
42
-
43
- $('.contact').fadeIn(200);
44
- $('.' + open_contact).addClass(close_contact);
45
- });
46
-
47
- // validate form
48
- $('.contact_form').validate({
49
- submitHandler: function(form) {
50
- $.post(wpmm_vars.ajax_url, {
51
- action: 'wpmm_send_contact',
52
- name: $('.name_input', $('.contact_form')).val(),
53
- email: $('.email_input', $('.contact_form')).val(),
54
- content: $('.content_textarea', $('.contact_form')).val()
55
- }, function(data) {
56
- $('.contact .form').append('<div class="response">' + data.response + '</div>');
57
- $('.contact .form .contact_form').hide();
58
- setTimeout(function() {
59
- $('.contact').hide();
60
- $('.contact .form .response').remove();
61
- $('.contact .form .contact_form').trigger('reset');
62
- $('.contact .form .contact_form').show();
63
- }, 2000);
64
- }, 'json');
65
-
66
- return false;
67
- }
68
- });
69
-
70
- // hide form
71
- $('body').on('click', '.contact', function(e) {
72
- if ($(e.target).hasClass('contact')) {
73
- var close_contact = $('.contact_us').data('close');
74
- $('.form', $(this)).removeClass(close_contact);
75
-
76
- $(this).hide();
77
- }
78
- });
79
- }
 
 
 
 
 
 
 
 
 
 
 
80
  });
1
+ jQuery(function($) {
2
+ /**
3
+ * COUNTDOWN
4
+ */
5
+ if ($('.countdown').length > 0) {
6
+ var countDate = new Date($('.countdown').data('start'));
7
+ countDate = new Date($('.countdown').data('end'));
8
+ $('.countdown').countdown({
9
+ until: countDate,
10
+ compact: true,
11
+ layout: '<span class="day">{dn}</span> <span class="separator">:</span> <span class="hour">{hnn}</span> <span class="separator">:</span> <span class="minutes">{mnn}</span> <span class="separator">:</span> <span class="seconds">{snn}</span>'
12
+ });
13
+ }
14
+
15
+ /**
16
+ * SOCIAL LINKS
17
+ */
18
+ if ($('.social').length > 0) {
19
+ var link_target = $('.social').data('target');
20
+
21
+ if (link_target == 1) {
22
+ $('.social a').attr('target', '_blank');
23
+ }
24
+ }
25
+
26
+ /**
27
+ * SUBSCRIBE FORM
28
+ */
29
+ if ($('.subscribe_form').length > 0) {
30
+ // validate form
31
+ $('.subscribe_form').validate({
32
+ submitHandler: function(form) {
33
+ $.post(wpmm_vars.ajax_url, {
34
+ action: 'wpmm_add_subscriber',
35
+ email: $('.email_input', $('.subscribe_form')).val()
36
+ }, function(data) {
37
+ $('.subscribe_wrapper').html(data.response);
38
+ }, 'json');
39
+
40
+ return false;
41
+ }
42
+ });
43
+ }
44
+
45
+ /**
46
+ * CONTACT FORM
47
+ */
48
+ if ($('.contact').length > 0) {
49
+ // show form
50
+ $('.contact_us').click(function() {
51
+ var open_contact = $(this).data('open'),
52
+ close_contact = $(this).data('close');
53
+
54
+ $('.contact').fadeIn(200);
55
+ $('.' + open_contact).addClass(close_contact);
56
+ });
57
+
58
+ // validate form
59
+ $('.contact_form').validate({
60
+ submitHandler: function(form) {
61
+ $.post(wpmm_vars.ajax_url, {
62
+ action: 'wpmm_send_contact',
63
+ name: $('.name_input', $('.contact_form')).val(),
64
+ email: $('.email_input', $('.contact_form')).val(),
65
+ content: $('.content_textarea', $('.contact_form')).val()
66
+ }, function(data) {
67
+ $('.contact .form').append('<div class="response">' + data.response + '</div>');
68
+ $('.contact .form .contact_form').hide();
69
+ setTimeout(function() {
70
+ $('.contact').hide();
71
+ $('.contact .form .response').remove();
72
+ $('.contact .form .contact_form').trigger('reset');
73
+ $('.contact .form .contact_form').show();
74
+ }, 2000);
75
+ }, 'json');
76
+
77
+ return false;
78
+ }
79
+ });
80
+
81
+ // hide form
82
+ $('body').on('click', '.contact', function(e) {
83
+ if ($(e.target).hasClass('contact')) {
84
+ var close_contact = $('.contact_us').data('close');
85
+ $('.form', $(this)).removeClass(close_contact);
86
+
87
+ $(this).hide();
88
+ }
89
+ });
90
+ }
91
  });
includes/classes/wp-maintenance-mode-admin.php CHANGED
@@ -8,6 +8,7 @@ if (!class_exists('WP_Maintenance_Mode_Admin')) {
8
  protected $plugin_slug;
9
  protected $plugin_settings;
10
  protected $plugin_default_settings;
 
11
  protected $plugin_screen_hook_suffix = null;
12
 
13
  private function __construct() {
@@ -15,6 +16,7 @@ if (!class_exists('WP_Maintenance_Mode_Admin')) {
15
  $this->plugin_slug = $plugin->get_plugin_slug();
16
  $this->plugin_settings = $plugin->get_plugin_settings();
17
  $this->plugin_default_settings = $plugin->default_settings();
 
18
 
19
  // Load admin style sheet and JavaScript.
20
  add_action('admin_enqueue_scripts', array($this, 'enqueue_admin_styles'));
@@ -24,12 +26,11 @@ if (!class_exists('WP_Maintenance_Mode_Admin')) {
24
  add_action('admin_menu', array($this, 'add_plugin_menu'));
25
 
26
  // Add an action link pointing to the options page
27
- $plugin_basename = plugin_basename(WPMM_PATH . $this->plugin_slug . '.php');
28
- if (is_multisite() && is_plugin_active_for_network($plugin_basename)) {
29
  // settings link will point to admin_url of the main blog, not to network_admin_url
30
- add_filter('network_admin_plugin_action_links_' . $plugin_basename, array($this, 'add_settings_link'));
31
  } else {
32
- add_filter('plugin_action_links_' . $plugin_basename, array($this, 'add_settings_link'));
33
  }
34
 
35
  // Add admin notices
@@ -201,9 +202,18 @@ if (!class_exists('WP_Maintenance_Mode_Admin')) {
201
  $_POST['options']['general']['exclude'] = array();
202
  }
203
  $_POST['options']['general']['notice'] = (int) $_POST['options']['general']['notice'];
204
-
205
- // delete cache everytime
206
- $this->delete_cache();
 
 
 
 
 
 
 
 
 
207
  break;
208
  case 'design':
209
  $custom_css = array();
@@ -215,7 +225,10 @@ if (!class_exists('WP_Maintenance_Mode_Admin')) {
215
  $_POST['options']['design']['heading_color'] = sanitize_text_field($_POST['options']['design']['heading_color']);
216
  $custom_css['heading_color'] = '.wrap h1 { color: ' . $_POST['options']['design']['heading_color'] . '; }';
217
  }
 
218
  $_POST['options']['design']['text'] = wp_kses_post($_POST['options']['design']['text']);
 
 
219
  if (!empty($_POST['options']['design']['text_color'])) {
220
  $_POST['options']['design']['text_color'] = sanitize_text_field($_POST['options']['design']['text_color']);
221
  $custom_css['text_color'] = '.wrap h2 { color: ' . $_POST['options']['design']['text_color'] . '; }';
@@ -268,23 +281,29 @@ if (!class_exists('WP_Maintenance_Mode_Admin')) {
268
  $_POST['options']['modules']['subscribe_text'] = sanitize_text_field($_POST['options']['modules']['subscribe_text']);
269
  if (!empty($_POST['options']['modules']['subscribe_text_color'])) {
270
  $_POST['options']['modules']['subscribe_text_color'] = sanitize_text_field($_POST['options']['modules']['subscribe_text_color']);
271
- $custom_css['subscribe_text_color'] = '.wrap h3 { color: ' . $_POST['options']['modules']['subscribe_text_color'] . '; }';
272
  }
273
 
274
  // SOCIAL NETWORKS
275
  $_POST['options']['modules']['social_status'] = (int) $_POST['options']['modules']['social_status'];
 
276
  $_POST['options']['modules']['social_github'] = sanitize_text_field($_POST['options']['modules']['social_github']);
277
  $_POST['options']['modules']['social_dribbble'] = sanitize_text_field($_POST['options']['modules']['social_dribbble']);
278
  $_POST['options']['modules']['social_twitter'] = sanitize_text_field($_POST['options']['modules']['social_twitter']);
279
  $_POST['options']['modules']['social_facebook'] = sanitize_text_field($_POST['options']['modules']['social_facebook']);
280
  $_POST['options']['modules']['social_pinterest'] = sanitize_text_field($_POST['options']['modules']['social_pinterest']);
281
  $_POST['options']['modules']['social_google+'] = sanitize_text_field($_POST['options']['modules']['social_google+']);
 
282
 
283
  // CONTACT
284
  $_POST['options']['modules']['contact_status'] = (int) $_POST['options']['modules']['contact_status'];
285
  $_POST['options']['modules']['contact_email'] = sanitize_text_field($_POST['options']['modules']['contact_email']);
286
  $_POST['options']['modules']['contact_effects'] = sanitize_text_field($_POST['options']['modules']['contact_effects']);
287
 
 
 
 
 
288
  $_POST['options']['modules']['custom_css'] = $custom_css;
289
 
290
  // delete cache when is activated
@@ -299,6 +318,25 @@ if (!class_exists('WP_Maintenance_Mode_Admin')) {
299
  }
300
  }
301
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
302
  /**
303
  * Delete cache if any cache plugin (wp_cache or w3tc) is activated
304
  *
@@ -307,7 +345,7 @@ if (!class_exists('WP_Maintenance_Mode_Admin')) {
307
  public function delete_cache() {
308
  // Super Cache Plugin
309
  if (function_exists('wp_cache_clear_cache')) {
310
- wp_cache_clear_cache(get_current_blog_id());
311
  }
312
 
313
  // W3 Total Cache Plugin
8
  protected $plugin_slug;
9
  protected $plugin_settings;
10
  protected $plugin_default_settings;
11
+ protected $plugin_basename;
12
  protected $plugin_screen_hook_suffix = null;
13
 
14
  private function __construct() {
16
  $this->plugin_slug = $plugin->get_plugin_slug();
17
  $this->plugin_settings = $plugin->get_plugin_settings();
18
  $this->plugin_default_settings = $plugin->default_settings();
19
+ $this->plugin_basename = plugin_basename(WPMM_PATH . $this->plugin_slug . '.php');
20
 
21
  // Load admin style sheet and JavaScript.
22
  add_action('admin_enqueue_scripts', array($this, 'enqueue_admin_styles'));
26
  add_action('admin_menu', array($this, 'add_plugin_menu'));
27
 
28
  // Add an action link pointing to the options page
29
+ if (is_multisite() && is_plugin_active_for_network($this->plugin_basename)) {
 
30
  // settings link will point to admin_url of the main blog, not to network_admin_url
31
+ add_filter('network_admin_plugin_action_links_' . $this->plugin_basename, array($this, 'add_settings_link'));
32
  } else {
33
+ add_filter('plugin_action_links_' . $this->plugin_basename, array($this, 'add_settings_link'));
34
  }
35
 
36
  // Add admin notices
202
  $_POST['options']['general']['exclude'] = array();
203
  }
204
  $_POST['options']['general']['notice'] = (int) $_POST['options']['general']['notice'];
205
+ $_POST['options']['general']['admin_link'] = (int) $_POST['options']['general']['admin_link'];
206
+
207
+ // delete cache when is already activated, when is activated and when is deactivated
208
+ if (
209
+ isset($this->plugin_settings['general']['status']) && isset($_POST['options']['general']['status']) &&
210
+ (
211
+ ($this->plugin_settings['general']['status'] == 1 && in_array($_POST['options']['general']['status'], array(0, 1))) ||
212
+ ($this->plugin_settings['general']['status'] == 0 && $_POST['options']['general']['status'] == 1)
213
+ )
214
+ ) {
215
+ $this->delete_cache();
216
+ }
217
  break;
218
  case 'design':
219
  $custom_css = array();
225
  $_POST['options']['design']['heading_color'] = sanitize_text_field($_POST['options']['design']['heading_color']);
226
  $custom_css['heading_color'] = '.wrap h1 { color: ' . $_POST['options']['design']['heading_color'] . '; }';
227
  }
228
+ add_filter('safe_style_css', array($this, 'add_safe_style_css')); // add before we save
229
  $_POST['options']['design']['text'] = wp_kses_post($_POST['options']['design']['text']);
230
+ remove_filter('safe_style_css', array($this, 'add_safe_style_css')); // remove after we save
231
+
232
  if (!empty($_POST['options']['design']['text_color'])) {
233
  $_POST['options']['design']['text_color'] = sanitize_text_field($_POST['options']['design']['text_color']);
234
  $custom_css['text_color'] = '.wrap h2 { color: ' . $_POST['options']['design']['text_color'] . '; }';
281
  $_POST['options']['modules']['subscribe_text'] = sanitize_text_field($_POST['options']['modules']['subscribe_text']);
282
  if (!empty($_POST['options']['modules']['subscribe_text_color'])) {
283
  $_POST['options']['modules']['subscribe_text_color'] = sanitize_text_field($_POST['options']['modules']['subscribe_text_color']);
284
+ $custom_css['subscribe_text_color'] = '.wrap h3, .wrap .subscribe_wrapper { color: ' . $_POST['options']['modules']['subscribe_text_color'] . '; }';
285
  }
286
 
287
  // SOCIAL NETWORKS
288
  $_POST['options']['modules']['social_status'] = (int) $_POST['options']['modules']['social_status'];
289
+ $_POST['options']['modules']['social_target'] = (int) $_POST['options']['modules']['social_target'];
290
  $_POST['options']['modules']['social_github'] = sanitize_text_field($_POST['options']['modules']['social_github']);
291
  $_POST['options']['modules']['social_dribbble'] = sanitize_text_field($_POST['options']['modules']['social_dribbble']);
292
  $_POST['options']['modules']['social_twitter'] = sanitize_text_field($_POST['options']['modules']['social_twitter']);
293
  $_POST['options']['modules']['social_facebook'] = sanitize_text_field($_POST['options']['modules']['social_facebook']);
294
  $_POST['options']['modules']['social_pinterest'] = sanitize_text_field($_POST['options']['modules']['social_pinterest']);
295
  $_POST['options']['modules']['social_google+'] = sanitize_text_field($_POST['options']['modules']['social_google+']);
296
+ $_POST['options']['modules']['social_linkedin'] = sanitize_text_field($_POST['options']['modules']['social_linkedin']);
297
 
298
  // CONTACT
299
  $_POST['options']['modules']['contact_status'] = (int) $_POST['options']['modules']['contact_status'];
300
  $_POST['options']['modules']['contact_email'] = sanitize_text_field($_POST['options']['modules']['contact_email']);
301
  $_POST['options']['modules']['contact_effects'] = sanitize_text_field($_POST['options']['modules']['contact_effects']);
302
 
303
+ // GOOGLE ANALYTICS
304
+ $_POST['options']['modules']['ga_status'] = (int) $_POST['options']['modules']['ga_status'];
305
+ $_POST['options']['modules']['ga_code'] = wp_kses(trim($_POST['options']['modules']['ga_code']), array('script' => array()));
306
+
307
  $_POST['options']['modules']['custom_css'] = $custom_css;
308
 
309
  // delete cache when is activated
318
  }
319
  }
320
 
321
+ /**
322
+ * Add new safe inline style css (use by wp_kses_attr in wp_kses_post)
323
+ * - bug discovered by cokemorgan: https://github.com/Designmodocom/WP-Maintenance-Mode/issues/56
324
+ *
325
+ * @since 2.0.3
326
+ * @param array $properties
327
+ * @return array
328
+ */
329
+ public function add_safe_style_css($properties) {
330
+ $new_properties = array(
331
+ 'min-height',
332
+ 'max-height',
333
+ 'min-width',
334
+ 'max-width'
335
+ );
336
+
337
+ return array_merge($new_properties, $properties);
338
+ }
339
+
340
  /**
341
  * Delete cache if any cache plugin (wp_cache or w3tc) is activated
342
  *
345
  public function delete_cache() {
346
  // Super Cache Plugin
347
  if (function_exists('wp_cache_clear_cache')) {
348
+ wp_cache_clear_cache(is_multisite() && is_plugin_active_for_network($this->plugin_basename) ? get_current_blog_id() : '');
349
  }
350
 
351
  // W3 Total Cache Plugin
includes/classes/wp-maintenance-mode-shortcodes.php ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if (!class_exists('WP_Maintenance_Mode_Shortcodes')) {
4
+ class WP_Maintenance_Mode_Shortcodes {
5
+
6
+ /**
7
+ * Add shortcodes
8
+ *
9
+ * @since 2.0.3
10
+ */
11
+ public static function init() {
12
+ $shortcodes = array(
13
+ 'loginform' => __CLASS__ . '::loginform'
14
+ );
15
+
16
+ foreach ($shortcodes as $shortcode => $method) {
17
+ add_shortcode($shortcode, $method);
18
+ }
19
+ }
20
+
21
+ /**
22
+ * Shortcode Wrapper
23
+ *
24
+ * @since 2.0.3
25
+ * @param string $function
26
+ * @param array $atts
27
+ * @param array $wrapper
28
+ * @return string
29
+ */
30
+ public static function shortcode_wrapper($function, $atts = array(), $wrapper = array('before' => null, 'after' => null)) {
31
+ ob_start();
32
+
33
+ echo $wrapper['before'];
34
+ call_user_func($function, $atts);
35
+ echo $wrapper['after'];
36
+
37
+ return ob_get_clean();
38
+ }
39
+
40
+ /**
41
+ * Login form shortcode.
42
+ *
43
+ * @since 2.0.3
44
+ * @param array $atts
45
+ * @return string
46
+ */
47
+ public static function loginform($atts) {
48
+ return self::shortcode_wrapper(array('WP_Maintenance_Mode_Shortcode_Login', 'display'), $atts);
49
+ }
50
+
51
+ }
52
+
53
+ }
54
+
55
+ if (!class_exists('WP_Maintenance_Mode_Shortcode_Login')) {
56
+
57
+ class WP_Maintenance_Mode_Shortcode_Login {
58
+
59
+ public function __construct() { }
60
+
61
+ /**
62
+ * Show login form
63
+ *
64
+ * @since 2.0.3
65
+ * @param array $atts
66
+ * @param string $content
67
+ */
68
+ public static function display($atts) {
69
+ extract(shortcode_atts(array('redirect' => ''), $atts));
70
+
71
+ include_once(WPMM_VIEWS_PATH . 'loginform.php');
72
+ }
73
+
74
+ }
75
+
76
+ }
includes/classes/wp-maintenance-mode.php CHANGED
@@ -3,21 +3,29 @@ if (!class_exists('WP_Maintenance_Mode')) {
3
 
4
  class WP_Maintenance_Mode {
5
 
6
- const VERSION = '2.0.2';
7
 
8
  protected $plugin_slug = 'wp-maintenance-mode';
9
  protected $plugin_settings;
 
10
  protected static $instance = null;
11
 
12
  private function __construct() {
13
  $this->plugin_settings = get_option('wpmm_settings');
 
14
 
15
  // Load plugin text domain
16
  add_action('init', array($this, 'load_plugin_textdomain'));
17
 
 
 
 
18
  // Activate plugin when new blog is added
19
  add_action('wpmu_new_blog', array($this, 'activate_new_site'));
20
 
 
 
 
21
  if (!empty($this->plugin_settings['general']['status']) && $this->plugin_settings['general']['status'] == 1) {
22
  // INIT
23
  add_action('init', array($this, 'init'));
@@ -30,6 +38,11 @@ if (!class_exists('WP_Maintenance_Mode')) {
30
 
31
  // Redirect
32
  add_action('admin_init', array($this, 'redirect'));
 
 
 
 
 
33
  }
34
  }
35
 
@@ -78,14 +91,12 @@ if (!class_exists('WP_Maintenance_Mode')) {
78
  'meta_robots' => 0,
79
  'redirection' => '',
80
  'exclude' => array(
81
- 0 => 'wp-cron',
82
- 1 => 'feed',
83
- 2 => 'wp-login',
84
- 3 => 'login',
85
- 4 => 'wp-admin',
86
- 5 => 'wp-admin/admin-ajax.php'
87
  ),
88
- 'notice' => 1
 
89
  ),
90
  'design' => array(
91
  'title' => __('Maintenance mode', $this->plugin_slug),
@@ -112,15 +123,19 @@ if (!class_exists('WP_Maintenance_Mode')) {
112
  'subscribe_text' => __('Notify me when it\'s ready', $this->plugin_slug),
113
  'subscribe_text_color' => '',
114
  'social_status' => 0,
 
115
  'social_github' => '',
116
  'social_dribbble' => '',
117
  'social_twitter' => '',
118
  'social_facebook' => '',
119
  'social_pinterest' => '',
120
  'social_google+' => '',
 
121
  'contact_status' => 0,
122
  'contact_email' => get_option('admin_email') ? get_option('admin_email') : '',
123
  'contact_effects' => 'move_top|move_bottom',
 
 
124
  'custom_css' => array()
125
  )
126
  );
@@ -133,6 +148,10 @@ if (!class_exists('WP_Maintenance_Mode')) {
133
  * @param boolean $network_wide
134
  */
135
  public static function activate($network_wide) {
 
 
 
 
136
  if (function_exists('is_multisite') && is_multisite()) {
137
  if ($network_wide) {
138
  // Get all blog ids
@@ -142,23 +161,28 @@ if (!class_exists('WP_Maintenance_Mode')) {
142
  self::single_activate($network_wide);
143
  restore_current_blog();
144
  }
145
-
146
- // delete old options
147
- delete_site_option('wp-maintenance-mode');
148
- delete_site_option('wp-maintenance-mode-msqld');
149
  } else {
150
  self::single_activate();
151
-
152
- // delete old options
153
- delete_option('wp-maintenance-mode');
154
- delete_option('wp-maintenance-mode-msqld');
155
  }
156
  } else {
157
  self::single_activate();
 
 
 
 
 
 
158
 
159
- // delete old options
160
- delete_option('wp-maintenance-mode');
161
- delete_option('wp-maintenance-mode-msqld');
 
 
 
 
 
 
 
162
  }
163
  }
164
 
@@ -222,15 +246,13 @@ if (!class_exists('WP_Maintenance_Mode')) {
222
  require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
223
  dbDelta($sql);
224
 
225
- // set notice if the plugin was installed before & set default settings
 
 
226
  $default_options = self::get_instance()->default_settings();
227
- if (is_multisite() && $network_wide) {
228
- $old_options = get_site_option('wp-maintenance-mode');
229
- } else {
230
- $old_options = get_option('wp-maintenance-mode');
231
- }
232
 
233
- if (!empty($old_options)) {
 
234
  add_option('wpmm_notice', array(
235
  'class' => 'updated',
236
  'msg' => sprintf(__('WP Maintenance Mode plugin was relaunched and you MUST revise <a href="%s">settings</a>.', self::get_instance()->plugin_slug), admin_url('options-general.php?page=' . self::get_instance()->plugin_slug))
@@ -268,6 +290,10 @@ if (!class_exists('WP_Maintenance_Mode')) {
268
  $default_options['general']['notice'] = $old_options['notice'];
269
  }
270
 
 
 
 
 
271
  if (!empty($old_options['title'])) {
272
  $default_options['design']['title'] = $old_options['title'];
273
  }
@@ -344,8 +370,11 @@ if (!class_exists('WP_Maintenance_Mode')) {
344
  }
345
  }
346
 
347
- // set default settings
348
  add_option('wpmm_settings', $default_options);
 
 
 
349
  }
350
 
351
  /**
@@ -384,6 +413,8 @@ if (!class_exists('WP_Maintenance_Mode')) {
384
 
385
  /**
386
  * Initialize when plugin is activated
 
 
387
  */
388
  public function init() {
389
  /**
@@ -391,6 +422,7 @@ if (!class_exists('WP_Maintenance_Mode')) {
391
  */
392
  if (
393
  (!$this->check_user_role()) &&
 
394
  !strstr($_SERVER['PHP_SELF'], 'wp-login.php') &&
395
  !strstr($_SERVER['PHP_SELF'], 'wp-admin/') &&
396
  !strstr($_SERVER['PHP_SELF'], 'async-upload.php') &&
@@ -439,7 +471,7 @@ if (!class_exists('WP_Maintenance_Mode')) {
439
  $heading = apply_filters('wpmm_heading', $heading);
440
 
441
  $text = !empty($this->plugin_settings['design']['text']) ? $this->plugin_settings['design']['text'] : '';
442
- $text = apply_filters('wpmm_text', $text);
443
 
444
  // COUNTDOWN
445
  $countdown_start = !empty($this->plugin_settings['modules']['countdown_start']) ? $this->plugin_settings['modules']['countdown_start'] : $this->plugin_settings['general']['status_data'];
@@ -475,7 +507,7 @@ if (!class_exists('WP_Maintenance_Mode')) {
475
  if (file_exists(WP_CONTENT_DIR . '/wp-maintenance-mode.php')) {
476
  include_once(WP_CONTENT_DIR . '/wp-maintenance-mode.php');
477
  } else {
478
- include(WPMM_VIEWS_PATH . 'maintenance.php');
479
  }
480
  ob_flush();
481
 
@@ -486,6 +518,7 @@ if (!class_exists('WP_Maintenance_Mode')) {
486
  /**
487
  * Check if the current user has access to backend / frontend based on his role compared with role from settings
488
  *
 
489
  * @return boolean
490
  */
491
  public function check_user_role() {
@@ -511,6 +544,7 @@ if (!class_exists('WP_Maintenance_Mode')) {
511
  /**
512
  * Calculate backtime based on countdown remaining time if it is activated
513
  *
 
514
  * @return int
515
  */
516
  public function calculate_backtime() {
@@ -526,6 +560,7 @@ if (!class_exists('WP_Maintenance_Mode')) {
526
  /**
527
  * Check if the visitor is a bot (using useragent)
528
  *
 
529
  * @return boolean
530
  */
531
  public function check_search_bots() {
@@ -568,6 +603,7 @@ if (!class_exists('WP_Maintenance_Mode')) {
568
  /**
569
  * Check if slug / ip address exists in exclude list
570
  *
 
571
  * @return boolean
572
  */
573
  public function check_exclude() {
@@ -588,6 +624,7 @@ if (!class_exists('WP_Maintenance_Mode')) {
588
  /**
589
  * Redirect if "Redirection" option is used and users don't have access to WordPress dashboard
590
  *
 
591
  * @return null
592
  */
593
  public function redirect() {
@@ -608,6 +645,7 @@ if (!class_exists('WP_Maintenance_Mode')) {
608
  /**
609
  * Save subscriber into database
610
  *
 
611
  * @global object $wpdb
612
  */
613
  public function add_subscriber() {
@@ -633,6 +671,8 @@ if (!class_exists('WP_Maintenance_Mode')) {
633
 
634
  /**
635
  * Send email via contact form
 
 
636
  */
637
  public function send_contact() {
638
  $errors = array();
3
 
4
  class WP_Maintenance_Mode {
5
 
6
+ const VERSION = '2.0.3';
7
 
8
  protected $plugin_slug = 'wp-maintenance-mode';
9
  protected $plugin_settings;
10
+ protected $plugin_basename;
11
  protected static $instance = null;
12
 
13
  private function __construct() {
14
  $this->plugin_settings = get_option('wpmm_settings');
15
+ $this->plugin_basename = plugin_basename(WPMM_PATH . $this->plugin_slug . '.php');
16
 
17
  // Load plugin text domain
18
  add_action('init', array($this, 'load_plugin_textdomain'));
19
 
20
+ // Add shortcodes
21
+ add_action('init', array('WP_Maintenance_Mode_Shortcodes', 'init'));
22
+
23
  // Activate plugin when new blog is added
24
  add_action('wpmu_new_blog', array($this, 'activate_new_site'));
25
 
26
+ // Check update
27
+ add_action('admin_init', array($this, 'check_update'));
28
+
29
  if (!empty($this->plugin_settings['general']['status']) && $this->plugin_settings['general']['status'] == 1) {
30
  // INIT
31
  add_action('init', array($this, 'init'));
38
 
39
  // Redirect
40
  add_action('admin_init', array($this, 'redirect'));
41
+
42
+ // Google Analytics tracking script
43
+ if (!empty($this->plugin_settings['modules']['ga_status']) && $this->plugin_settings['modules']['ga_status'] == 1 && !empty($this->plugin_settings['modules']['ga_code'])) {
44
+ add_action('wpmm_head', create_function('', 'echo "' . stripslashes($this->plugin_settings['modules']['ga_code']) . '";'));
45
+ }
46
  }
47
  }
48
 
91
  'meta_robots' => 0,
92
  'redirection' => '',
93
  'exclude' => array(
94
+ 0 => 'feed',
95
+ 1 => 'wp-login',
96
+ 2 => 'login'
 
 
 
97
  ),
98
+ 'notice' => 1,
99
+ 'admin_link' => 0
100
  ),
101
  'design' => array(
102
  'title' => __('Maintenance mode', $this->plugin_slug),
123
  'subscribe_text' => __('Notify me when it\'s ready', $this->plugin_slug),
124
  'subscribe_text_color' => '',
125
  'social_status' => 0,
126
+ 'social_target' => 1,
127
  'social_github' => '',
128
  'social_dribbble' => '',
129
  'social_twitter' => '',
130
  'social_facebook' => '',
131
  'social_pinterest' => '',
132
  'social_google+' => '',
133
+ 'social_linkedin' => '',
134
  'contact_status' => 0,
135
  'contact_email' => get_option('admin_email') ? get_option('admin_email') : '',
136
  'contact_effects' => 'move_top|move_bottom',
137
+ 'ga_status' => 0,
138
+ 'ga_code' => '',
139
  'custom_css' => array()
140
  )
141
  );
148
  * @param boolean $network_wide
149
  */
150
  public static function activate($network_wide) {
151
+ // because we need translated items when activate :)
152
+ load_plugin_textdomain(self::get_instance()->plugin_slug, FALSE, WPMM_LANGUAGES_PATH);
153
+
154
+ // do the job
155
  if (function_exists('is_multisite') && is_multisite()) {
156
  if ($network_wide) {
157
  // Get all blog ids
161
  self::single_activate($network_wide);
162
  restore_current_blog();
163
  }
 
 
 
 
164
  } else {
165
  self::single_activate();
 
 
 
 
166
  }
167
  } else {
168
  self::single_activate();
169
+ }
170
+
171
+ // delete old options
172
+ delete_option('wp-maintenance-mode');
173
+ delete_option('wp-maintenance-mode-msqld');
174
+ }
175
 
176
+ /**
177
+ * Check plugin version for updating process
178
+ *
179
+ * @since 2.0.3
180
+ */
181
+ public function check_update() {
182
+ $version = get_option('wpmm_version', '0');
183
+
184
+ if (!version_compare($version, WP_Maintenance_Mode::VERSION, '=')) {
185
+ self::activate(is_multisite() && is_plugin_active_for_network($this->plugin_basename) ? true : false);
186
  }
187
  }
188
 
246
  require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
247
  dbDelta($sql);
248
 
249
+ // get all options for different versions of the plugin
250
+ $v2_options = get_option('wpmm_settings');
251
+ $old_options = (is_multisite() && $network_wide) ? get_site_option('wp-maintenance-mode') : get_option('wp-maintenance-mode');
252
  $default_options = self::get_instance()->default_settings();
 
 
 
 
 
253
 
254
+ // set notice if the plugin was installed before & set default settings
255
+ if (!empty($old_options) && empty($v2_options)) {
256
  add_option('wpmm_notice', array(
257
  'class' => 'updated',
258
  'msg' => sprintf(__('WP Maintenance Mode plugin was relaunched and you MUST revise <a href="%s">settings</a>.', self::get_instance()->plugin_slug), admin_url('options-general.php?page=' . self::get_instance()->plugin_slug))
290
  $default_options['general']['notice'] = $old_options['notice'];
291
  }
292
 
293
+ if (isset($old_options['admin_link'])) {
294
+ $default_options['general']['admin_link'] = $old_options['admin_link'];
295
+ }
296
+
297
  if (!empty($old_options['title'])) {
298
  $default_options['design']['title'] = $old_options['title'];
299
  }
370
  }
371
  }
372
 
373
+ // set options
374
  add_option('wpmm_settings', $default_options);
375
+
376
+ // set current version
377
+ update_option('wpmm_version', WP_Maintenance_Mode::VERSION);
378
  }
379
 
380
  /**
413
 
414
  /**
415
  * Initialize when plugin is activated
416
+ *
417
+ * @since 2.0.0
418
  */
419
  public function init() {
420
  /**
422
  */
423
  if (
424
  (!$this->check_user_role()) &&
425
+ !strstr($_SERVER['PHP_SELF'], 'wp-cron.php') &&
426
  !strstr($_SERVER['PHP_SELF'], 'wp-login.php') &&
427
  !strstr($_SERVER['PHP_SELF'], 'wp-admin/') &&
428
  !strstr($_SERVER['PHP_SELF'], 'async-upload.php') &&
471
  $heading = apply_filters('wpmm_heading', $heading);
472
 
473
  $text = !empty($this->plugin_settings['design']['text']) ? $this->plugin_settings['design']['text'] : '';
474
+ $text = apply_filters('wpmm_text', do_shortcode($text));
475
 
476
  // COUNTDOWN
477
  $countdown_start = !empty($this->plugin_settings['modules']['countdown_start']) ? $this->plugin_settings['modules']['countdown_start'] : $this->plugin_settings['general']['status_data'];
507
  if (file_exists(WP_CONTENT_DIR . '/wp-maintenance-mode.php')) {
508
  include_once(WP_CONTENT_DIR . '/wp-maintenance-mode.php');
509
  } else {
510
+ include_once(WPMM_VIEWS_PATH . 'maintenance.php');
511
  }
512
  ob_flush();
513
 
518
  /**
519
  * Check if the current user has access to backend / frontend based on his role compared with role from settings
520
  *
521
+ * @since 2.0.0
522
  * @return boolean
523
  */
524
  public function check_user_role() {
544
  /**
545
  * Calculate backtime based on countdown remaining time if it is activated
546
  *
547
+ * @since 2.0.0
548
  * @return int
549
  */
550
  public function calculate_backtime() {
560
  /**
561
  * Check if the visitor is a bot (using useragent)
562
  *
563
+ * @since 2.0.0
564
  * @return boolean
565
  */
566
  public function check_search_bots() {
603
  /**
604
  * Check if slug / ip address exists in exclude list
605
  *
606
+ * @since 2.0.0
607
  * @return boolean
608
  */
609
  public function check_exclude() {
624
  /**
625
  * Redirect if "Redirection" option is used and users don't have access to WordPress dashboard
626
  *
627
+ * @since 2.0.0
628
  * @return null
629
  */
630
  public function redirect() {
645
  /**
646
  * Save subscriber into database
647
  *
648
+ * @since 2.0.0
649
  * @global object $wpdb
650
  */
651
  public function add_subscriber() {
671
 
672
  /**
673
  * Send email via contact form
674
+ *
675
+ * @since 2.0.0
676
  */
677
  public function send_contact() {
678
  $errors = array();
includes/functions/helpers.php CHANGED
@@ -1,29 +1,5 @@
1
  <?php
2
 
3
- /**
4
- * Get Designmodo posts
5
- *
6
- * @param array $args
7
- * @return array
8
- */
9
- function get_designmodo_posts($args = array()) {
10
- $args = wp_parse_args($args, array(
11
- 'feed' => 'http://feeds.feedburner.com/designmodo',
12
- 'posts_no' => 5
13
- ));
14
-
15
- // GET POSTS
16
- $feed = fetch_feed($args['feed']);
17
- if (!is_wp_error($feed)) {
18
- $max_items = $feed->get_item_quantity($args['posts_no']);
19
- $items = $feed->get_items(0, $max_items);
20
-
21
- return $items;
22
- }
23
-
24
- return array();
25
- }
26
-
27
  /**
28
  * Get plugin info
29
  *
1
  <?php
2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  /**
4
  * Get plugin info
5
  *
languages/wp-maintenance-mode-de_DE.mo ADDED
Binary file
languages/wp-maintenance-mode-de_DE.po ADDED
@@ -0,0 +1,459 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ msgid ""
2
+ msgstr ""
3
+ "Project-Id-Version: WP Maintenance Mode 2.0.3\n"
4
+ "POT-Creation-Date: 2014-09-26 19:03+0200\n"
5
+ "PO-Revision-Date: 2014-09-26 19:03+0200\n"
6
+ "Last-Translator: Frank Bültge <frank@bueltge.de>\n"
7
+ "Language-Team: Designmodo <info@designmodo.com>\n"
8
+ "Language: en\n"
9
+ "MIME-Version: 1.0\n"
10
+ "Content-Type: text/plain; charset=UTF-8\n"
11
+ "Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 1.6.7\n"
13
+ "X-Poedit-Basepath: ../\n"
14
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
15
+ "X-Poedit-SourceCharset: UTF-8\n"
16
+ "X-Poedit-KeywordsList: __;_e\n"
17
+ "X-Poedit-SearchPath-0: .\n"
18
+ "X-Poedit-SearchPath-1: includes/classes\n"