MailPoet Newsletters (New) - Version 3.3.6

Version Description

  • 2018-01-23 =
  • Added: optional reCAPTCHA to protect subscription forms from fake signups.
Download this release

Release Info

Developer wysija
Plugin Icon 128x128 MailPoet Newsletters (New)
Version 3.3.6
Comparing to
See all releases

Code changes from version 3.3.5 to 3.3.6

assets/js/{admin.76e45773.js → admin.d5dc3994.js} RENAMED
@@ -740,7 +740,7 @@ webpackJsonp([0],{
740
  _react2['default'].createElement(_reactRouter.Route, { name: 'template', path: 'template/:id', component: _newslettersTemplatesJsx2['default'] }),
741
  _react2['default'].createElement(_reactRouter.Route, { path: 'send/:id', component: _newslettersSendJsx2['default'] }),
742
  extraRoutes.map(function (rt) {
743
- return _react2['default'].createElement(_reactRouter.Route, { key: rt.path, path: rt.path, component: rt.component });
744
  })
745
  )
746
  ), container);
@@ -858,7 +858,11 @@ webpackJsonp([0],{
858
  React.createElement(
859
  'div',
860
  null,
861
- React.createElement('div', { className: 'mailpoet_thumbnail' }),
 
 
 
 
862
  React.createElement(
863
  'div',
864
  { className: 'mailpoet_description' },
740
  _react2['default'].createElement(_reactRouter.Route, { name: 'template', path: 'template/:id', component: _newslettersTemplatesJsx2['default'] }),
741
  _react2['default'].createElement(_reactRouter.Route, { path: 'send/:id', component: _newslettersSendJsx2['default'] }),
742
  extraRoutes.map(function (rt) {
743
+ return _react2['default'].createElement(_reactRouter.Route, { key: rt.path, path: rt.path, component: rt.component, data: rt.data || null });
744
  })
745
  )
746
  ), container);
858
  React.createElement(
859
  'div',
860
  null,
861
+ React.createElement(
862
+ 'div',
863
+ { className: 'mailpoet_thumbnail' },
864
+ type.thumbnailImage ? React.createElement('img', { src: type.thumbnailImage }) : null
865
+ ),
866
  React.createElement(
867
  'div',
868
  { className: 'mailpoet_description' },
assets/js/{admin_vendor.fa88de45.js → admin_vendor.2bc811e8.js} RENAMED
File without changes
assets/js/manifest.json CHANGED
@@ -1,10 +1,10 @@
1
  {
2
  "mp2migrator.js": "mp2migrator.dc0d6e2b.js",
3
- "public.js": "public.d12800d0.js",
4
- "admin.js": "admin.76e45773.js",
5
- "admin_vendor.js": "admin_vendor.fa88de45.js",
6
  "form_editor.js": "form_editor.13982476.js",
7
  "mailpoet.js": "mailpoet.a55b11ee.js",
8
  "newsletter_editor.js": "newsletter_editor.1de7c9b5.js",
9
- "vendor.js": "vendor.ae69bbf6.js"
10
  }
1
  {
2
  "mp2migrator.js": "mp2migrator.dc0d6e2b.js",
3
+ "public.js": "public.ea9ffa3f.js",
4
+ "admin.js": "admin.d5dc3994.js",
5
+ "admin_vendor.js": "admin_vendor.2bc811e8.js",
6
  "form_editor.js": "form_editor.13982476.js",
7
  "mailpoet.js": "mailpoet.a55b11ee.js",
8
  "newsletter_editor.js": "newsletter_editor.1de7c9b5.js",
9
+ "vendor.js": "vendor.e3b41dc0.js"
10
  }
assets/js/{public.d12800d0.js → public.ea9ffa3f.js} RENAMED
@@ -1910,6 +1910,19 @@
1910
  jQuery
1911
  ) {
1912
  jQuery(function ($) { // eslint-disable-line func-names
 
 
 
 
 
 
 
 
 
 
 
 
 
1913
  function isSameDomain(url) {
1914
  var link = document.createElement('a');
1915
  link.href = url;
@@ -1938,7 +1951,12 @@
1938
  // non ajax post request
1939
  return true;
1940
  }
1941
- // ajax request
 
 
 
 
 
1942
  MailPoet.Ajax.post({
1943
  url: window.MailPoetForm.ajax_url,
1944
  token: formData.token,
@@ -1952,6 +1970,11 @@
1952
  return error.message;
1953
  }).join('<br />')
1954
  ).show();
 
 
 
 
 
1955
  }).done(function (response) { // eslint-disable-line func-names
1956
  // successfully subscribed
1957
  if (
@@ -1969,6 +1992,10 @@
1969
  form.trigger('reset');
1970
  // reset validation
1971
  parsley.reset();
 
 
 
 
1972
 
1973
  // resize iframe
1974
  if (
1910
  jQuery
1911
  ) {
1912
  jQuery(function ($) { // eslint-disable-line func-names
1913
+ window.reCaptchaCallback = function reCaptchaCallback() {
1914
+ $('.mailpoet_recaptcha').each(function () { // eslint-disable-line func-names
1915
+ var sitekey = $(this).attr('data-sitekey');
1916
+ var container = $(this).find('> .mailpoet_recaptcha_container').get(0);
1917
+ var field = $(this).find('> .mailpoet_recaptcha_field');
1918
+ var widgetId;
1919
+ if (sitekey) {
1920
+ widgetId = window.grecaptcha.render(container, { sitekey: sitekey, size: 'compact' });
1921
+ field.val(widgetId);
1922
+ }
1923
+ });
1924
+ };
1925
+
1926
  function isSameDomain(url) {
1927
  var link = document.createElement('a');
1928
  link.href = url;
1951
  // non ajax post request
1952
  return true;
1953
  }
1954
+
1955
+ if (window.grecaptcha && formData.recaptcha) {
1956
+ formData.data.recaptcha = window.grecaptcha.getResponse(formData.recaptcha);
1957
+ }
1958
+
1959
+ // ajax request
1960
  MailPoet.Ajax.post({
1961
  url: window.MailPoetForm.ajax_url,
1962
  token: formData.token,
1970
  return error.message;
1971
  }).join('<br />')
1972
  ).show();
1973
+ }).done(function (response) { // eslint-disable-line func-names
1974
+ if (window.grecaptcha && formData.recaptcha) {
1975
+ window.grecaptcha.reset(formData.recaptcha);
1976
+ }
1977
+ return response;
1978
  }).done(function (response) { // eslint-disable-line func-names
1979
  // successfully subscribed
1980
  if (
1992
  form.trigger('reset');
1993
  // reset validation
1994
  parsley.reset();
1995
+ // reset captcha
1996
+ if (window.grecaptcha && formData.recaptcha) {
1997
+ window.grecaptcha.reset(formData.recaptcha);
1998
+ }
1999
 
2000
  // resize iframe
2001
  if (
assets/js/{vendor.ae69bbf6.js → vendor.e3b41dc0.js} RENAMED
@@ -76,7 +76,7 @@
76
  /******/ script.charset = 'utf-8';
77
  /******/ script.async = true;
78
 
79
- /******/ script.src = __webpack_require__.p + "" + ({"0":"admin","1":"admin_vendor","2":"form_editor","3":"mailpoet","4":"newsletter_editor"}[chunkId]||chunkId) + "." + {"0":"76e45773","1":"fa88de45","2":"13982476","3":"a55b11ee","4":"1de7c9b5"}[chunkId] + ".chunk.js";
80
  /******/ head.appendChild(script);
81
  /******/ }
82
  /******/ };
76
  /******/ script.charset = 'utf-8';
77
  /******/ script.async = true;
78
 
79
+ /******/ script.src = __webpack_require__.p + "" + ({"0":"admin","1":"admin_vendor","2":"form_editor","3":"mailpoet","4":"newsletter_editor"}[chunkId]||chunkId) + "." + {"0":"d5dc3994","1":"2bc811e8","2":"13982476","3":"a55b11ee","4":"1de7c9b5"}[chunkId] + ".chunk.js";
80
  /******/ head.appendChild(script);
81
  /******/ }
82
  /******/ };
lang/mailpoet-ca.mo CHANGED
Binary file
lang/mailpoet-da_DK.mo CHANGED
Binary file
lang/mailpoet-de_DE.mo CHANGED
Binary file
lang/mailpoet-en_GB.mo CHANGED
Binary file
lang/mailpoet-es_ES.mo CHANGED
Binary file
lang/mailpoet-fa_IR.mo CHANGED
Binary file
lang/mailpoet-fr_CA.mo CHANGED
Binary file
lang/mailpoet-fr_FR.mo CHANGED
Binary file
lang/mailpoet-it_IT.mo CHANGED
Binary file
lang/mailpoet-ja.mo CHANGED
Binary file
lang/mailpoet-nl_NL.mo CHANGED
Binary file
lang/mailpoet-pl_PL.mo CHANGED
Binary file
lang/mailpoet-pt_BR.mo CHANGED
Binary file
lang/mailpoet-pt_PT.mo CHANGED
Binary file
lang/mailpoet-ru_RU.mo CHANGED
Binary file
lang/mailpoet-sq.mo CHANGED
Binary file
lang/mailpoet-sv_SE.mo CHANGED
Binary file
lang/mailpoet-tr_TR.mo CHANGED
Binary file
lang/mailpoet.pot CHANGED
@@ -4,7 +4,7 @@ msgid ""
4
  msgstr ""
5
  "Project-Id-Version: \n"
6
  "Report-Msgid-Bugs-To: http://support.mailpoet.com/\n"
7
- "POT-Creation-Date: 2018-01-16 14:15:33+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -30,25 +30,25 @@ msgstr ""
30
  msgid "Invalid API version."
31
  msgstr ""
32
 
33
- #: lib/API/JSON/API.php:60
34
  msgid ""
35
  "Sorry, but we couldn't connect to the MailPoet server. Please refresh the "
36
  "web page and try again."
37
  msgstr ""
38
 
39
- #: lib/API/JSON/API.php:87
40
  msgid "Invalid API request."
41
  msgstr ""
42
 
43
- #: lib/API/JSON/API.php:128
44
  msgid "Invalid API endpoint."
45
  msgstr ""
46
 
47
- #: lib/API/JSON/API.php:134
48
  msgid "Invalid API endpoint method."
49
  msgstr ""
50
 
51
- #: lib/API/JSON/API.php:140 lib/Router/Router.php:45
52
  msgid "You do not have the required permissions."
53
  msgstr ""
54
 
@@ -205,25 +205,33 @@ msgstr ""
205
  msgid "You have not specified any settings to be saved."
206
  msgstr ""
207
 
208
- #: lib/API/JSON/v1/Subscribers.php:33 lib/API/JSON/v1/Subscribers.php:178
209
- #: lib/API/JSON/v1/Subscribers.php:194 lib/API/JSON/v1/Subscribers.php:210
210
  #: lib/API/MP/v1/API.php:52 lib/API/MP/v1/API.php:97 lib/API/MP/v1/API.php:225
211
  msgid "This subscriber does not exist."
212
  msgstr ""
213
 
214
- #: lib/API/JSON/v1/Subscribers.php:81
215
  msgid "Please specify a valid form ID."
216
  msgstr ""
217
 
218
- #: lib/API/JSON/v1/Subscribers.php:86
219
  msgid "Please leave the first field empty."
220
  msgstr ""
221
 
222
- #: lib/API/JSON/v1/Subscribers.php:102 views/form/editor.html:57
 
 
 
 
 
 
 
 
223
  msgid "Please select a list."
224
  msgstr ""
225
 
226
- #: lib/API/JSON/v1/Subscribers.php:114
227
  msgid "You need to wait %d seconds before subscribing again."
228
  msgstr ""
229
 
@@ -291,7 +299,7 @@ msgstr ""
291
  msgid "Manage segments"
292
  msgstr ""
293
 
294
- #: lib/Config/Capabilities.php:67 lib/Config/Menu.php:633 views/premium.html:41
295
  msgid "MailPoet"
296
  msgstr ""
297
 
@@ -392,80 +400,80 @@ msgstr[1] ""
392
  msgid "Settings imported"
393
  msgstr ""
394
 
395
- #: lib/Config/Menu.php:85 lib/Config/Menu.php:86 views/newsletters.html:24
396
  msgid "Emails"
397
  msgstr ""
398
 
399
- #: lib/Config/Menu.php:110 lib/Newsletter/Shortcodes/ShortcodesHelper.php:33
400
  #: views/newsletter/templates/components/sidebar/styles.hbs:75
401
  #: views/newsletters.html:123
402
  msgid "Newsletter"
403
  msgstr ""
404
 
405
- #: lib/Config/Menu.php:111 views/newsletter/editor.html:228
406
  msgid "Newsletter Editor"
407
  msgstr ""
408
 
409
- #: lib/Config/Menu.php:123 lib/Config/Menu.php:124 views/forms.html:25
410
  #: views/mp2migration.html:14
411
  msgid "Forms"
412
  msgstr ""
413
 
414
- #: lib/Config/Menu.php:148 lib/Config/Menu.php:149
415
  msgid "Form Editor"
416
  msgstr ""
417
 
418
- #: lib/Config/Menu.php:161 lib/Config/Menu.php:162
419
  #: views/subscribers/subscribers.html:18
420
  msgid "Subscribers"
421
  msgstr ""
422
 
423
- #: lib/Config/Menu.php:186 lib/Config/Menu.php:187
424
  #: views/subscribers/importExport/import.html:7
425
  #: views/subscribers/subscribers.html:95
426
  msgid "Import"
427
  msgstr ""
428
 
429
- #: lib/Config/Menu.php:199 lib/Config/Menu.php:200
430
  #: views/subscribers/importExport/export.html:6
431
  #: views/subscribers/importExport/export.html:96
432
  #: views/subscribers/subscribers.html:96
433
  msgid "Export"
434
  msgstr ""
435
 
436
- #: lib/Config/Menu.php:212 lib/Config/Menu.php:213 views/forms.html:53
437
  #: views/newsletters.html:66 views/newsletters.html:168 views/segments.html:13
438
  #: views/subscribers/subscribers.html:67
439
  msgid "Lists"
440
  msgstr ""
441
 
442
- #: lib/Config/Menu.php:239 lib/Config/Menu.php:240 views/form/editor.html:37
443
  #: views/mp2migration.html:15 views/newsletters.html:67 views/settings.html:6
444
  msgid "Settings"
445
  msgstr ""
446
 
447
- #: lib/Config/Menu.php:252 lib/Config/Menu.php:253 views/help.html:5
448
  msgid "Help"
449
  msgstr ""
450
 
451
- #: lib/Config/Menu.php:266 lib/Config/Menu.php:267
452
  msgid "Premium"
453
  msgstr ""
454
 
455
- #: lib/Config/Menu.php:279 lib/Config/Menu.php:280 views/update.html:12
456
  #: views/welcome.html:12
457
  msgid "Welcome"
458
  msgstr ""
459
 
460
- #: lib/Config/Menu.php:292 lib/Config/Menu.php:293 views/segments.html:43
461
  msgid "Update"
462
  msgstr ""
463
 
464
- #: lib/Config/Menu.php:305
465
  msgid "Migration"
466
  msgstr ""
467
 
468
- #: lib/Config/Menu.php:555
469
  msgid "In any WordPress role"
470
  msgstr ""
471
 
@@ -475,11 +483,11 @@ msgid ""
475
  "might work within a MultiSite environment, we don’t support it."
476
  msgstr ""
477
 
478
- #: lib/Config/Populator.php:158
479
  msgid "My First List"
480
  msgstr ""
481
 
482
- #: lib/Config/Populator.php:160
483
  msgid "This list is automatically created when you install MailPoet."
484
  msgstr ""
485
 
@@ -1220,7 +1228,7 @@ msgstr ""
1220
  msgid "December"
1221
  msgstr ""
1222
 
1223
- #: lib/Form/Renderer.php:44
1224
  msgid "Please leave this field empty"
1225
  msgstr ""
1226
 
@@ -1232,27 +1240,27 @@ msgstr ""
1232
  msgid "END Scripts"
1233
  msgstr ""
1234
 
1235
- #: lib/Form/Widget.php:21
1236
  msgid "MailPoet Form"
1237
  msgstr ""
1238
 
1239
- #: lib/Form/Widget.php:22
1240
  msgid "Add a newsletter subscription form"
1241
  msgstr ""
1242
 
1243
- #: lib/Form/Widget.php:116
1244
  msgid "An error has happened while performing a request, please try again later."
1245
  msgstr ""
1246
 
1247
- #: lib/Form/Widget.php:170
1248
  msgid "Subscribe to Our Newsletter"
1249
  msgstr ""
1250
 
1251
- #: lib/Form/Widget.php:185
1252
  msgid "Title:"
1253
  msgstr ""
1254
 
1255
- #: lib/Form/Widget.php:205
1256
  msgid "Create a new form"
1257
  msgstr ""
1258
 
@@ -1936,9 +1944,9 @@ msgstr ""
1936
  #: views/newsletter/templates/blocks/posts/settingsDisplayOptions.hbs:79
1937
  #: views/newsletter/templates/blocks/posts/settingsDisplayOptions.hbs:221
1938
  #: views/premium.html:56 views/settings/advanced.html:111
1939
- #: views/settings/advanced.html:151 views/settings/bounce.html:190
1940
- #: views/settings/mta.html:588 views/settings/signup.html:34
1941
- #: views/subscribers/importExport/export.html:33
1942
  #: views/subscribers/importExport/import/step2.html:63
1943
  msgid "Yes"
1944
  msgstr ""
@@ -1955,10 +1963,10 @@ msgstr ""
1955
  #: views/newsletter/templates/blocks/posts/settingsDisplayOptions.hbs:165
1956
  #: views/newsletter/templates/blocks/posts/settingsDisplayOptions.hbs:227
1957
  #: views/premium.html:62 views/premium.html:63 views/settings/advanced.html:122
1958
- #: views/settings/advanced.html:162 views/settings/bounce.html:148
1959
- #: views/settings/bounce.html:179 views/settings/mta.html:545
1960
- #: views/settings/mta.html:599 views/settings/signup.html:46
1961
- #: views/subscribers/importExport/export.html:38
1962
  #: views/subscribers/importExport/import/step2.html:67
1963
  msgid "No"
1964
  msgstr ""
@@ -4225,17 +4233,41 @@ msgid ""
4225
  "help!"
4226
  msgstr ""
4227
 
4228
- #: views/settings/advanced.html:170
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4229
  msgid "Reinstall from scratch"
4230
  msgstr ""
4231
 
4232
- #: views/settings/advanced.html:172
4233
  msgid ""
4234
  "Want to start from the beginning? This will completely delete MailPoet and "
4235
  "reinstall it from scratch. Remember: you will lose all of your data!"
4236
  msgstr ""
4237
 
4238
- #: views/settings/advanced.html:180
4239
  msgid "Reinstall now..."
4240
  msgstr ""
4241
 
@@ -4852,11 +4884,11 @@ msgstr ""
4852
  msgid "Save settings"
4853
  msgstr ""
4854
 
4855
- #: views/settings.html:97
4856
  msgid "Settings saved"
4857
  msgstr ""
4858
 
4859
- #: views/settings.html:153
4860
  msgid ""
4861
  "Are you sure? All of your MailPoet data will be permanently erased "
4862
  "(newsletters, statistics, subscribers, etc.)."
@@ -5290,7 +5322,7 @@ msgstr ""
5290
  msgid "Care to Give Your Opinion?"
5291
  msgstr ""
5292
 
5293
- #: views/update.html:71 views/welcome.html:60
5294
  msgid "Awesome! Now, take me to MailPoet"
5295
  msgstr ""
5296
 
@@ -5376,22 +5408,22 @@ msgctxt "Error code (inside parentheses)"
5376
  msgid "code: %s"
5377
  msgstr ""
5378
 
5379
- #: lib/Config/Menu.php:98
5380
  msgctxt "newsletters per page (screen options)"
5381
  msgid "Number of newsletters per page"
5382
  msgstr ""
5383
 
5384
- #: lib/Config/Menu.php:136
5385
  msgctxt "forms per page (screen options)"
5386
  msgid "Number of forms per page"
5387
  msgstr ""
5388
 
5389
- #: lib/Config/Menu.php:174
5390
  msgctxt "subscribers per page (screen options)"
5391
  msgid "Number of subscribers per page"
5392
  msgstr ""
5393
 
5394
- #: lib/Config/Menu.php:225
5395
  msgctxt "segments per page (screen options)"
5396
  msgid "Number of segments per page"
5397
  msgstr ""
4
  msgstr ""
5
  "Project-Id-Version: \n"
6
  "Report-Msgid-Bugs-To: http://support.mailpoet.com/\n"
7
+ "POT-Creation-Date: 2018-01-23 14:57:38+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
30
  msgid "Invalid API version."
31
  msgstr ""
32
 
33
+ #: lib/API/JSON/API.php:67
34
  msgid ""
35
  "Sorry, but we couldn't connect to the MailPoet server. Please refresh the "
36
  "web page and try again."
37
  msgstr ""
38
 
39
+ #: lib/API/JSON/API.php:94
40
  msgid "Invalid API request."
41
  msgstr ""
42
 
43
+ #: lib/API/JSON/API.php:135
44
  msgid "Invalid API endpoint."
45
  msgstr ""
46
 
47
+ #: lib/API/JSON/API.php:141
48
  msgid "Invalid API endpoint method."
49
  msgstr ""
50
 
51
+ #: lib/API/JSON/API.php:147 lib/Router/Router.php:45
52
  msgid "You do not have the required permissions."
53
  msgstr ""
54
 
205
  msgid "You have not specified any settings to be saved."
206
  msgstr ""
207
 
208
+ #: lib/API/JSON/v1/Subscribers.php:34 lib/API/JSON/v1/Subscribers.php:207
209
+ #: lib/API/JSON/v1/Subscribers.php:223 lib/API/JSON/v1/Subscribers.php:239
210
  #: lib/API/MP/v1/API.php:52 lib/API/MP/v1/API.php:97 lib/API/MP/v1/API.php:225
211
  msgid "This subscriber does not exist."
212
  msgstr ""
213
 
214
+ #: lib/API/JSON/v1/Subscribers.php:84
215
  msgid "Please specify a valid form ID."
216
  msgstr ""
217
 
218
+ #: lib/API/JSON/v1/Subscribers.php:89
219
  msgid "Please leave the first field empty."
220
  msgstr ""
221
 
222
+ #: lib/API/JSON/v1/Subscribers.php:95
223
+ msgid "Please check the captcha."
224
+ msgstr ""
225
+
226
+ #: lib/API/JSON/v1/Subscribers.php:109 lib/API/JSON/v1/Subscribers.php:115
227
+ msgid "Error while validating the captcha."
228
+ msgstr ""
229
+
230
+ #: lib/API/JSON/v1/Subscribers.php:131 views/form/editor.html:57
231
  msgid "Please select a list."
232
  msgstr ""
233
 
234
+ #: lib/API/JSON/v1/Subscribers.php:143
235
  msgid "You need to wait %d seconds before subscribing again."
236
  msgstr ""
237
 
299
  msgid "Manage segments"
300
  msgstr ""
301
 
302
+ #: lib/Config/Capabilities.php:67 lib/Config/Menu.php:640 views/premium.html:41
303
  msgid "MailPoet"
304
  msgstr ""
305
 
400
  msgid "Settings imported"
401
  msgstr ""
402
 
403
+ #: lib/Config/Menu.php:86 lib/Config/Menu.php:87 views/newsletters.html:24
404
  msgid "Emails"
405
  msgstr ""
406
 
407
+ #: lib/Config/Menu.php:111 lib/Newsletter/Shortcodes/ShortcodesHelper.php:33
408
  #: views/newsletter/templates/components/sidebar/styles.hbs:75
409
  #: views/newsletters.html:123
410
  msgid "Newsletter"
411
  msgstr ""
412
 
413
+ #: lib/Config/Menu.php:112 views/newsletter/editor.html:228
414
  msgid "Newsletter Editor"
415
  msgstr ""
416
 
417
+ #: lib/Config/Menu.php:124 lib/Config/Menu.php:125 views/forms.html:25
418
  #: views/mp2migration.html:14
419
  msgid "Forms"
420
  msgstr ""
421
 
422
+ #: lib/Config/Menu.php:149 lib/Config/Menu.php:150
423
  msgid "Form Editor"
424
  msgstr ""
425
 
426
+ #: lib/Config/Menu.php:162 lib/Config/Menu.php:163
427
  #: views/subscribers/subscribers.html:18
428
  msgid "Subscribers"
429
  msgstr ""
430
 
431
+ #: lib/Config/Menu.php:187 lib/Config/Menu.php:188
432
  #: views/subscribers/importExport/import.html:7
433
  #: views/subscribers/subscribers.html:95
434
  msgid "Import"
435
  msgstr ""
436
 
437
+ #: lib/Config/Menu.php:200 lib/Config/Menu.php:201
438
  #: views/subscribers/importExport/export.html:6
439
  #: views/subscribers/importExport/export.html:96
440
  #: views/subscribers/subscribers.html:96
441
  msgid "Export"
442
  msgstr ""
443
 
444
+ #: lib/Config/Menu.php:213 lib/Config/Menu.php:214 views/forms.html:53
445
  #: views/newsletters.html:66 views/newsletters.html:168 views/segments.html:13
446
  #: views/subscribers/subscribers.html:67
447
  msgid "Lists"
448
  msgstr ""
449
 
450
+ #: lib/Config/Menu.php:240 lib/Config/Menu.php:241 views/form/editor.html:37
451
  #: views/mp2migration.html:15 views/newsletters.html:67 views/settings.html:6
452
  msgid "Settings"
453
  msgstr ""
454
 
455
+ #: lib/Config/Menu.php:253 lib/Config/Menu.php:254 views/help.html:5
456
  msgid "Help"
457
  msgstr ""
458
 
459
+ #: lib/Config/Menu.php:267 lib/Config/Menu.php:268
460
  msgid "Premium"
461
  msgstr ""
462
 
463
+ #: lib/Config/Menu.php:280 lib/Config/Menu.php:281 views/update.html:12
464
  #: views/welcome.html:12
465
  msgid "Welcome"
466
  msgstr ""
467
 
468
+ #: lib/Config/Menu.php:293 lib/Config/Menu.php:294 views/segments.html:43
469
  msgid "Update"
470
  msgstr ""
471
 
472
+ #: lib/Config/Menu.php:306
473
  msgid "Migration"
474
  msgstr ""
475
 
476
+ #: lib/Config/Menu.php:562
477
  msgid "In any WordPress role"
478
  msgstr ""
479
 
483
  "might work within a MultiSite environment, we don’t support it."
484
  msgstr ""
485
 
486
+ #: lib/Config/Populator.php:168
487
  msgid "My First List"
488
  msgstr ""
489
 
490
+ #: lib/Config/Populator.php:170
491
  msgid "This list is automatically created when you install MailPoet."
492
  msgstr ""
493
 
1228
  msgid "December"
1229
  msgstr ""
1230
 
1231
+ #: lib/Form/Renderer.php:46
1232
  msgid "Please leave this field empty"
1233
  msgstr ""
1234
 
1240
  msgid "END Scripts"
1241
  msgstr ""
1242
 
1243
+ #: lib/Form/Widget.php:24
1244
  msgid "MailPoet Form"
1245
  msgstr ""
1246
 
1247
+ #: lib/Form/Widget.php:25
1248
  msgid "Add a newsletter subscription form"
1249
  msgstr ""
1250
 
1251
+ #: lib/Form/Widget.php:129
1252
  msgid "An error has happened while performing a request, please try again later."
1253
  msgstr ""
1254
 
1255
+ #: lib/Form/Widget.php:183
1256
  msgid "Subscribe to Our Newsletter"
1257
  msgstr ""
1258
 
1259
+ #: lib/Form/Widget.php:198
1260
  msgid "Title:"
1261
  msgstr ""
1262
 
1263
+ #: lib/Form/Widget.php:218
1264
  msgid "Create a new form"
1265
  msgstr ""
1266
 
1944
  #: views/newsletter/templates/blocks/posts/settingsDisplayOptions.hbs:79
1945
  #: views/newsletter/templates/blocks/posts/settingsDisplayOptions.hbs:221
1946
  #: views/premium.html:56 views/settings/advanced.html:111
1947
+ #: views/settings/advanced.html:151 views/settings/advanced.html:191
1948
+ #: views/settings/bounce.html:190 views/settings/mta.html:588
1949
+ #: views/settings/signup.html:34 views/subscribers/importExport/export.html:33
1950
  #: views/subscribers/importExport/import/step2.html:63
1951
  msgid "Yes"
1952
  msgstr ""
1963
  #: views/newsletter/templates/blocks/posts/settingsDisplayOptions.hbs:165
1964
  #: views/newsletter/templates/blocks/posts/settingsDisplayOptions.hbs:227
1965
  #: views/premium.html:62 views/premium.html:63 views/settings/advanced.html:122
1966
+ #: views/settings/advanced.html:162 views/settings/advanced.html:202
1967
+ #: views/settings/bounce.html:148 views/settings/bounce.html:179
1968
+ #: views/settings/mta.html:545 views/settings/mta.html:599
1969
+ #: views/settings/signup.html:46 views/subscribers/importExport/export.html:38
1970
  #: views/subscribers/importExport/import/step2.html:67
1971
  msgid "No"
1972
  msgstr ""
4233
  "help!"
4234
  msgstr ""
4235
 
4236
+ #: views/settings/advanced.html:171
4237
+ msgid "Enable reCAPTCHA"
4238
+ msgstr ""
4239
+
4240
+ #: views/settings/advanced.html:174
4241
+ msgid "Use reCAPTCHA to protect MailPoet subscription forms."
4242
+ msgstr ""
4243
+
4244
+ #: views/settings/advanced.html:178
4245
+ msgid "Sign up for an API key pair here."
4246
+ msgstr ""
4247
+
4248
+ #: views/settings/advanced.html:210
4249
+ msgid "Your reCAPTCHA Site Key"
4250
+ msgstr ""
4251
+
4252
+ #: views/settings/advanced.html:218
4253
+ msgid "Your reCAPTCHA Secret Key"
4254
+ msgstr ""
4255
+
4256
+ #: views/settings/advanced.html:223
4257
+ msgid "Please fill the reCAPTCHA keys."
4258
+ msgstr ""
4259
+
4260
+ #: views/settings/advanced.html:231
4261
  msgid "Reinstall from scratch"
4262
  msgstr ""
4263
 
4264
+ #: views/settings/advanced.html:233
4265
  msgid ""
4266
  "Want to start from the beginning? This will completely delete MailPoet and "
4267
  "reinstall it from scratch. Remember: you will lose all of your data!"
4268
  msgstr ""
4269
 
4270
+ #: views/settings/advanced.html:241
4271
  msgid "Reinstall now..."
4272
  msgstr ""
4273
 
4884
  msgid "Save settings"
4885
  msgstr ""
4886
 
4887
+ #: views/settings.html:108
4888
  msgid "Settings saved"
4889
  msgstr ""
4890
 
4891
+ #: views/settings.html:175
4892
  msgid ""
4893
  "Are you sure? All of your MailPoet data will be permanently erased "
4894
  "(newsletters, statistics, subscribers, etc.)."
5322
  msgid "Care to Give Your Opinion?"
5323
  msgstr ""
5324
 
5325
+ #: views/update.html:59 views/welcome.html:60
5326
  msgid "Awesome! Now, take me to MailPoet"
5327
  msgstr ""
5328
 
5408
  msgid "code: %s"
5409
  msgstr ""
5410
 
5411
+ #: lib/Config/Menu.php:99
5412
  msgctxt "newsletters per page (screen options)"
5413
  msgid "Number of newsletters per page"
5414
  msgstr ""
5415
 
5416
+ #: lib/Config/Menu.php:137
5417
  msgctxt "forms per page (screen options)"
5418
  msgid "Number of forms per page"
5419
  msgstr ""
5420
 
5421
+ #: lib/Config/Menu.php:175
5422
  msgctxt "subscribers per page (screen options)"
5423
  msgid "Number of subscribers per page"
5424
  msgstr ""
5425
 
5426
+ #: lib/Config/Menu.php:226
5427
  msgctxt "segments per page (screen options)"
5428
  msgid "Number of segments per page"
5429
  msgstr ""
lib/API/JSON/API.php CHANGED
@@ -2,6 +2,7 @@
2
  namespace MailPoet\API\JSON;
3
 
4
  use MailPoet\Config\AccessControl;
 
5
  use MailPoet\Util\Helpers;
6
  use MailPoet\Util\Security;
7
  use MailPoet\WP\Hooks;
@@ -56,7 +57,13 @@ class API {
56
  Hooks::doAction('mailpoet_api_setup', array($this));
57
  $this->setRequestData($_POST);
58
 
59
- if($this->checkToken() === false) {
 
 
 
 
 
 
60
  $error_message = __('Sorry, but we couldn\'t connect to the MailPoet server. Please refresh the web page and try again.', 'mailpoet');
61
  $error_response = $this->createErrorResponse(Error::UNAUTHORIZED, $error_message, Response::STATUS_UNAUTHORIZED);
62
  return $error_response->send();
2
  namespace MailPoet\API\JSON;
3
 
4
  use MailPoet\Config\AccessControl;
5
+ use MailPoet\Models\Setting;
6
  use MailPoet\Util\Helpers;
7
  use MailPoet\Util\Security;
8
  use MailPoet\WP\Hooks;
57
  Hooks::doAction('mailpoet_api_setup', array($this));
58
  $this->setRequestData($_POST);
59
 
60
+ $ignoreToken = (
61
+ Setting::getValue('re_captcha.enabled') &&
62
+ $this->_request_endpoint === 'subscribers' &&
63
+ $this->_request_method === 'subscribe'
64
+ );
65
+
66
+ if(!$ignoreToken && $this->checkToken() === false) {
67
  $error_message = __('Sorry, but we couldn\'t connect to the MailPoet server. Please refresh the web page and try again.', 'mailpoet');
68
  $error_response = $this->createErrorResponse(Error::UNAUTHORIZED, $error_message, Response::STATUS_UNAUTHORIZED);
69
  return $error_response->send();
lib/API/JSON/v1/Subscribers.php CHANGED
@@ -5,9 +5,10 @@ namespace MailPoet\API\JSON\v1;
5
  use MailPoet\API\JSON\Endpoint as APIEndpoint;
6
  use MailPoet\API\JSON\Error as APIError;
7
  use MailPoet\Config\AccessControl;
8
- use MailPoet\Listing;
9
  use MailPoet\Form\Util\FieldNameObfuscator;
 
10
  use MailPoet\Models\Form;
 
11
  use MailPoet\Models\StatisticsForms;
12
  use MailPoet\Models\Subscriber;
13
  use MailPoet\Newsletter\Scheduler\Scheduler;
@@ -76,6 +77,8 @@ class Subscribers extends APIEndpoint {
76
  $form = Form::findOne($form_id);
77
  unset($data['form_id']);
78
 
 
 
79
  if(!$form) {
80
  return $this->badRequest(array(
81
  APIError::BAD_REQUEST => __('Please specify a valid form ID.', 'mailpoet')
@@ -87,6 +90,33 @@ class Subscribers extends APIEndpoint {
87
  ));
88
  }
89
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
90
  $data = $this->deobfuscateFormPayload($data);
91
 
92
  $segment_ids = (!empty($data['segments'])
@@ -96,7 +126,6 @@ class Subscribers extends APIEndpoint {
96
  $segment_ids = $form->filterSegments($segment_ids);
97
  unset($data['segments']);
98
 
99
-
100
  if(empty($segment_ids)) {
101
  return $this->badRequest(array(
102
  APIError::BAD_REQUEST => __('Please select a list.', 'mailpoet')
5
  use MailPoet\API\JSON\Endpoint as APIEndpoint;
6
  use MailPoet\API\JSON\Error as APIError;
7
  use MailPoet\Config\AccessControl;
 
8
  use MailPoet\Form\Util\FieldNameObfuscator;
9
+ use MailPoet\Listing;
10
  use MailPoet\Models\Form;
11
+ use MailPoet\Models\Setting;
12
  use MailPoet\Models\StatisticsForms;
13
  use MailPoet\Models\Subscriber;
14
  use MailPoet\Newsletter\Scheduler\Scheduler;
77
  $form = Form::findOne($form_id);
78
  unset($data['form_id']);
79
 
80
+ $recaptcha = Setting::getValue('re_captcha');
81
+
82
  if(!$form) {
83
  return $this->badRequest(array(
84
  APIError::BAD_REQUEST => __('Please specify a valid form ID.', 'mailpoet')
90
  ));
91
  }
92
 
93
+ if(!empty($recaptcha['enabled']) && empty($data['recaptcha'])) {
94
+ return $this->badRequest(array(
95
+ APIError::BAD_REQUEST => __('Please check the captcha.', 'mailpoet')
96
+ ));
97
+ }
98
+
99
+ if(!empty($recaptcha['enabled'])) {
100
+ $res = empty($data['recaptcha']) ? $data['recaptcha-no-js'] : $data['recaptcha'];
101
+ $res = wp_remote_post('https://www.google.com/recaptcha/api/siteverify', array(
102
+ 'body' => array(
103
+ 'secret' => $recaptcha['secret_token'],
104
+ 'response' => $res
105
+ )
106
+ ));
107
+ if(is_wp_error($res)) {
108
+ return $this->badRequest(array(
109
+ APIError::BAD_REQUEST => __('Error while validating the captcha.', 'mailpoet')
110
+ ));
111
+ }
112
+ $res = json_decode(wp_remote_retrieve_body($res));
113
+ if(empty($res->success)) {
114
+ return $this->badRequest(array(
115
+ APIError::BAD_REQUEST => __('Error while validating the captcha.', 'mailpoet')
116
+ ));
117
+ }
118
+ }
119
+
120
  $data = $this->deobfuscateFormPayload($data);
121
 
122
  $segment_ids = (!empty($data['segments'])
126
  $segment_ids = $form->filterSegments($segment_ids);
127
  unset($data['segments']);
128
 
 
129
  if(empty($segment_ids)) {
130
  return $this->badRequest(array(
131
  APIError::BAD_REQUEST => __('Please select a list.', 'mailpoet')
lib/Config/Menu.php CHANGED
@@ -2,6 +2,7 @@
2
 
3
  namespace MailPoet\Config;
4
 
 
5
  use MailPoet\Cron\CronHelper;
6
  use MailPoet\Cron\CronTrigger;
7
  use MailPoet\Form\Block;
@@ -376,9 +377,15 @@ class Menu {
376
  'current_user' => wp_get_current_user(),
377
  'redirect_url' => $redirect_url,
378
  'sub_menu' => self::MAIN_PAGE_SLUG,
379
- 'is_woocommerce_available' => is_plugin_active('woocommerce/woocommerce.php'),
380
  );
381
 
 
 
 
 
 
 
 
382
  $readme_file = Env::$path . '/readme.txt';
383
  if(is_readable($readme_file)) {
384
  $changelog = Readme::parseChangelog(file_get_contents($readme_file), 1);
2
 
3
  namespace MailPoet\Config;
4
 
5
+ use Carbon\Carbon;
6
  use MailPoet\Cron\CronHelper;
7
  use MailPoet\Cron\CronTrigger;
8
  use MailPoet\Form\Block;
377
  'current_user' => wp_get_current_user(),
378
  'redirect_url' => $redirect_url,
379
  'sub_menu' => self::MAIN_PAGE_SLUG,
 
380
  );
381
 
382
+ $data['is_new_user'] = true;
383
+ if(!empty($data['settings']['installed_at'])) {
384
+ $installed_at = Carbon::createFromTimestamp(strtotime($data['settings']['installed_at']));
385
+ $current_time = Carbon::createFromTimestamp(current_time('timestamp'));
386
+ $data['is_new_user'] = $current_time->diffInDays($installed_at) <= 30;
387
+ }
388
+
389
  $readme_file = Env::$path . '/readme.txt';
390
  if(is_readable($readme_file)) {
391
  $changelog = Readme::parseChangelog(file_get_contents($readme_file), 1);
lib/Config/Populator.php CHANGED
@@ -140,6 +140,16 @@ class Populator {
140
  Setting::setValue('installed_at', date("Y-m-d H:i:s"));
141
  }
142
 
 
 
 
 
 
 
 
 
 
 
143
  // reset mailer log
144
  MailerLog::resetMailerLog();
145
  }
140
  Setting::setValue('installed_at', date("Y-m-d H:i:s"));
141
  }
142
 
143
+ // set reCaptcha settings
144
+ $re_captcha = Setting::getValue('re_captcha');
145
+ if(empty($re_captcha)) {
146
+ Setting::setValue('re_captcha', array(
147
+ 'enabled' => false,
148
+ 'site_token' => '',
149
+ 'secret_token' => ''
150
+ ));
151
+ }
152
+
153
  // reset mailer log
154
  MailerLog::resetMailerLog();
155
  }
lib/Form/Renderer.php CHANGED
@@ -1,6 +1,8 @@
1
  <?php
2
  namespace MailPoet\Form;
3
 
 
 
4
  if(!defined('ABSPATH')) exit;
5
 
6
  class Renderer {
@@ -44,9 +46,30 @@ class Renderer {
44
  '<label class="mailpoet_hp_email_label">' . __('Please leave this field empty', 'mailpoet') . '<input type="email" name="data[email]"></label>' :
45
  '';
46
  foreach($blocks as $key => $block) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
  $html .= static::renderBlock($block) . PHP_EOL;
48
  }
49
-
50
  return $html;
51
  }
52
 
1
  <?php
2
  namespace MailPoet\Form;
3
 
4
+ use MailPoet\Models\Setting;
5
+
6
  if(!defined('ABSPATH')) exit;
7
 
8
  class Renderer {
46
  '<label class="mailpoet_hp_email_label">' . __('Please leave this field empty', 'mailpoet') . '<input type="email" name="data[email]"></label>' :
47
  '';
48
  foreach($blocks as $key => $block) {
49
+ if($block['type'] == 'submit' && Setting::getValue('re_captcha.enabled')) {
50
+ $site_key = Setting::getValue('re_captcha.site_token');
51
+ $html .= '<div class="mailpoet_recaptcha" data-sitekey="'. $site_key .'">
52
+ <div class="mailpoet_recaptcha_container"></div>
53
+ <noscript>
54
+ <div>
55
+ <div style="width: 302px; height: 422px; position: relative;">
56
+ <div style="width: 302px; height: 422px; position: absolute;">
57
+ <iframe src="https://www.google.com/recaptcha/api/fallback?k='. $site_key .'" frameborder="0" scrolling="no" style="width: 302px; height:422px; border-style: none;">
58
+ </iframe>
59
+ </div>
60
+ </div>
61
+ <div style="width: 300px; height: 60px; border-style: none; bottom: 12px; left: 25px; margin: 0px; padding: 0px; right: 25px; background: #f9f9f9; border: 1px solid #c1c1c1; border-radius: 3px;">
62
+ <textarea id="g-recaptcha-response" name="data[recaptcha]" class="g-recaptcha-response" style="width: 250px; height: 40px; border: 1px solid #c1c1c1; margin: 10px 25px; padding: 0px; resize: none;" >
63
+ </textarea>
64
+ </div>
65
+ </div>
66
+ </noscript>
67
+ <input class="mailpoet_recaptcha_field" type="hidden" name="recaptcha">
68
+ </div>';
69
+ }
70
  $html .= static::renderBlock($block) . PHP_EOL;
71
  }
72
+
73
  return $html;
74
  }
75
 
lib/Form/Widget.php CHANGED
@@ -7,6 +7,7 @@ use MailPoet\Config\Env;
7
  use MailPoet\Config\Renderer as ConfigRenderer;
8
  use MailPoet\Form\Renderer as FormRenderer;
9
  use MailPoet\Models\Form;
 
10
  use MailPoet\Util\Security;
11
  use MailPoet\WP\Hooks;
12
 
@@ -15,6 +16,8 @@ if(!defined('ABSPATH')) exit;
15
  class Widget extends \WP_Widget {
16
  private $renderer;
17
 
 
 
18
  function __construct() {
19
  parent::__construct(
20
  'mailpoet_form',
@@ -48,6 +51,7 @@ class Widget extends \WP_Widget {
48
  wp_print_scripts('jquery');
49
  wp_print_scripts('mailpoet_vendor');
50
  wp_print_scripts('mailpoet_public');
 
51
  $scripts = ob_get_contents();
52
  ob_end_clean();
53
 
@@ -108,6 +112,15 @@ class Widget extends \WP_Widget {
108
  true
109
  );
110
 
 
 
 
 
 
 
 
 
 
111
  wp_localize_script('mailpoet_public', 'MailPoetForm', array(
112
  'ajax_url' => admin_url('admin-ajax.php'),
113
  'is_rtl' => (function_exists('is_rtl') ? (bool)is_rtl() : false)
@@ -271,7 +284,6 @@ EOL;
271
 
272
  if(!empty($body)) {
273
  $form_id = $this->id_base . '_' . $form['id'];
274
-
275
  $data = array(
276
  'form_id' => $form_id,
277
  'form_type' => $form_type,
@@ -320,4 +332,4 @@ EOL;
320
  return $output;
321
  }
322
  }
323
- }
7
  use MailPoet\Config\Renderer as ConfigRenderer;
8
  use MailPoet\Form\Renderer as FormRenderer;
9
  use MailPoet\Models\Form;
10
+ use MailPoet\Models\Setting;
11
  use MailPoet\Util\Security;
12
  use MailPoet\WP\Hooks;
13
 
16
  class Widget extends \WP_Widget {
17
  private $renderer;
18
 
19
+ const RECAPTCHA_API_URL = 'https://www.google.com/recaptcha/api.js?onload=reCaptchaCallback&render=explicit';
20
+
21
  function __construct() {
22
  parent::__construct(
23
  'mailpoet_form',
51
  wp_print_scripts('jquery');
52
  wp_print_scripts('mailpoet_vendor');
53
  wp_print_scripts('mailpoet_public');
54
+ echo '<script src="'.self::RECAPTCHA_API_URL.'" async defer></script>';
55
  $scripts = ob_get_contents();
56
  ob_end_clean();
57
 
112
  true
113
  );
114
 
115
+ $captcha = Setting::getValue('re_captcha');
116
+ if(!empty($captcha['enabled'])) {
117
+ wp_enqueue_script(
118
+ 'mailpoet_recaptcha',
119
+ self::RECAPTCHA_API_URL,
120
+ array('mailpoet_public')
121
+ );
122
+ }
123
+
124
  wp_localize_script('mailpoet_public', 'MailPoetForm', array(
125
  'ajax_url' => admin_url('admin-ajax.php'),
126
  'is_rtl' => (function_exists('is_rtl') ? (bool)is_rtl() : false)
284
 
285
  if(!empty($body)) {
286
  $form_id = $this->id_base . '_' . $form['id'];
 
287
  $data = array(
288
  'form_id' => $form_id,
289
  'form_type' => $form_type,
332
  return $output;
333
  }
334
  }
335
+ }
lib/Util/Helpers.php CHANGED
@@ -134,14 +134,16 @@ class Helpers {
134
  if($capitalise_first_char) {
135
  $str[0] = strtoupper($str[0]);
136
  }
137
- $func = create_function('$c', 'return strtoupper($c[1]);');
138
- return preg_replace_callback('/_([a-z])/', $func, $str);
 
139
  }
140
 
141
  static function camelCaseToUnderscore($str) {
142
  $str[0] = strtolower($str[0]);
143
- $func = create_function('$c', 'return "_" . strtolower($c[1]);');
144
- return preg_replace_callback('/([A-Z])/', $func, $str);
 
145
  }
146
 
147
  static function joinObject($object = array()) {
134
  if($capitalise_first_char) {
135
  $str[0] = strtoupper($str[0]);
136
  }
137
+ return preg_replace_callback('/_([a-z])/', function ($c) {
138
+ return strtoupper($c[1]);
139
+ }, $str);
140
  }
141
 
142
  static function camelCaseToUnderscore($str) {
143
  $str[0] = strtolower($str[0]);
144
+ return preg_replace_callback('/([A-Z])/', function ($c) {
145
+ return "_" . strtolower($c[1]);
146
+ }, $str);
147
  }
148
 
149
  static function joinObject($object = array()) {
mailpoet.php CHANGED
@@ -4,7 +4,7 @@ if(!defined('ABSPATH')) exit;
4
 
5
  /*
6
  * Plugin Name: MailPoet 3 (New)
7
- * Version: 3.3.5
8
  * Plugin URI: http://www.mailpoet.com
9
  * Description: Create and send newsletters, post notifications and welcome emails from your WordPress.
10
  * Author: MailPoet
@@ -20,7 +20,7 @@ if(!defined('ABSPATH')) exit;
20
  */
21
 
22
  $mailpoet_plugin = array(
23
- 'version' => '3.3.5',
24
  'filename' => __FILE__,
25
  'path' => dirname(__FILE__),
26
  'autoloader' => dirname(__FILE__) . '/vendor/autoload.php',
4
 
5
  /*
6
  * Plugin Name: MailPoet 3 (New)
7
+ * Version: 3.3.6
8
  * Plugin URI: http://www.mailpoet.com
9
  * Description: Create and send newsletters, post notifications and welcome emails from your WordPress.
10
  * Author: MailPoet
20
  */
21
 
22
  $mailpoet_plugin = array(
23
+ 'version' => '3.3.6',
24
  'filename' => __FILE__,
25
  'path' => dirname(__FILE__),
26
  'autoloader' => dirname(__FILE__) . '/vendor/autoload.php',
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: newsletter, email, welcome email, post notification, autoresponder, signup
4
  Requires at least: 4.7
5
  Tested up to: 4.9
6
  Requires PHP: 5.3
7
- Stable tag: 3.3.5
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -116,6 +116,9 @@ Stop by our [support site](https://www.mailpoet.com/support).
116
 
117
  == Changelog ==
118
 
 
 
 
119
  = 3.3.5 - 2018-01-16 =
120
  * Added: additional tools for our support team to mitigate sending issues;
121
 
4
  Requires at least: 4.7
5
  Tested up to: 4.9
6
  Requires PHP: 5.3
7
+ Stable tag: 3.3.6
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
116
 
117
  == Changelog ==
118
 
119
+ = 3.3.6 - 2018-01-23 =
120
+ * Added: optional reCAPTCHA to protect subscription forms from fake signups.
121
+
122
  = 3.3.5 - 2018-01-16 =
123
  * Added: additional tools for our support team to mitigate sending issues;
124
 
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit41e65186cd8b74e61cdec872a50c0dfd::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit37cf2f8de55968540738ed368770074d::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit41e65186cd8b74e61cdec872a50c0dfd
6
  {
7
  private static $loader;
8
 
@@ -19,15 +19,15 @@ class ComposerAutoloaderInit41e65186cd8b74e61cdec872a50c0dfd
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInit41e65186cd8b74e61cdec872a50c0dfd', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInit41e65186cd8b74e61cdec872a50c0dfd', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
- call_user_func(\Composer\Autoload\ComposerStaticInit41e65186cd8b74e61cdec872a50c0dfd::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
@@ -48,19 +48,19 @@ class ComposerAutoloaderInit41e65186cd8b74e61cdec872a50c0dfd
48
  $loader->register(true);
49
 
50
  if ($useStaticLoader) {
51
- $includeFiles = Composer\Autoload\ComposerStaticInit41e65186cd8b74e61cdec872a50c0dfd::$files;
52
  } else {
53
  $includeFiles = require __DIR__ . '/autoload_files.php';
54
  }
55
  foreach ($includeFiles as $fileIdentifier => $file) {
56
- composerRequire41e65186cd8b74e61cdec872a50c0dfd($fileIdentifier, $file);
57
  }
58
 
59
  return $loader;
60
  }
61
  }
62
 
63
- function composerRequire41e65186cd8b74e61cdec872a50c0dfd($fileIdentifier, $file)
64
  {
65
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
66
  require $file;
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit37cf2f8de55968540738ed368770074d
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInit37cf2f8de55968540738ed368770074d', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInit37cf2f8de55968540738ed368770074d', 'loadClassLoader'));
25
 
26
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
27
  if ($useStaticLoader) {
28
  require_once __DIR__ . '/autoload_static.php';
29
 
30
+ call_user_func(\Composer\Autoload\ComposerStaticInit37cf2f8de55968540738ed368770074d::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
48
  $loader->register(true);
49
 
50
  if ($useStaticLoader) {
51
+ $includeFiles = Composer\Autoload\ComposerStaticInit37cf2f8de55968540738ed368770074d::$files;
52
  } else {
53
  $includeFiles = require __DIR__ . '/autoload_files.php';
54
  }
55
  foreach ($includeFiles as $fileIdentifier => $file) {
56
+ composerRequire37cf2f8de55968540738ed368770074d($fileIdentifier, $file);
57
  }
58
 
59
  return $loader;
60
  }
61
  }
62
 
63
+ function composerRequire37cf2f8de55968540738ed368770074d($fileIdentifier, $file)
64
  {
65
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
66
  require $file;
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInit41e65186cd8b74e61cdec872a50c0dfd
8
  {
9
  public static $files = array (
10
  '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
@@ -985,10 +985,10 @@ class ComposerStaticInit41e65186cd8b74e61cdec872a50c0dfd
985
  public static function getInitializer(ClassLoader $loader)
986
  {
987
  return \Closure::bind(function () use ($loader) {
988
- $loader->prefixLengthsPsr4 = ComposerStaticInit41e65186cd8b74e61cdec872a50c0dfd::$prefixLengthsPsr4;
989
- $loader->prefixDirsPsr4 = ComposerStaticInit41e65186cd8b74e61cdec872a50c0dfd::$prefixDirsPsr4;
990
- $loader->prefixesPsr0 = ComposerStaticInit41e65186cd8b74e61cdec872a50c0dfd::$prefixesPsr0;
991
- $loader->classMap = ComposerStaticInit41e65186cd8b74e61cdec872a50c0dfd::$classMap;
992
 
993
  }, null, ClassLoader::class);
994
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit37cf2f8de55968540738ed368770074d
8
  {
9
  public static $files = array (
10
  '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
985
  public static function getInitializer(ClassLoader $loader)
986
  {
987
  return \Closure::bind(function () use ($loader) {
988
+ $loader->prefixLengthsPsr4 = ComposerStaticInit37cf2f8de55968540738ed368770074d::$prefixLengthsPsr4;
989
+ $loader->prefixDirsPsr4 = ComposerStaticInit37cf2f8de55968540738ed368770074d::$prefixDirsPsr4;
990
+ $loader->prefixesPsr0 = ComposerStaticInit37cf2f8de55968540738ed368770074d::$prefixesPsr0;
991
+ $loader->classMap = ComposerStaticInit37cf2f8de55968540738ed368770074d::$classMap;
992
 
993
  }, null, ClassLoader::class);
994
  }
views/form/iframe.html CHANGED
@@ -22,4 +22,4 @@
22
  var MailPoetForm = <%= json_encode(mailpoet_form) %>;
23
  </script>
24
  </body>
25
- </html>
22
  var MailPoetForm = <%= json_encode(mailpoet_form) %>;
23
  </script>
24
  </body>
25
+ </html>
views/form/widget.html CHANGED
@@ -4,7 +4,7 @@
4
  <% if(title) %>
5
  <%= before_title | raw %><%= title | raw %><%= after_title | raw %>
6
  <% endif %>
7
-
8
  <div id="<%= form_id %>" class="mailpoet_form mailpoet_form_<%= form_type %>">
9
  <%= styles | raw %>
10
  <form
4
  <% if(title) %>
5
  <%= before_title | raw %><%= title | raw %><%= after_title | raw %>
6
  <% endif %>
7
+
8
  <div id="<%= form_id %>" class="mailpoet_form mailpoet_form_<%= form_type %>">
9
  <%= styles | raw %>
10
  <form
views/settings.html CHANGED
@@ -1,155 +1,177 @@
1
- <% extends 'layout.html' %>
2
-
3
- <% block content %>
4
- <div id="mailpoet_settings">
5
-
6
- <h1 class="title"><%= __('Settings') %></h1>
7
-
8
- <!-- settings form -->
9
- <form
10
- id="mailpoet_settings_form"
11
- name="mailpoet_settings_form"
12
- class="mailpoet_form"
13
- autocomplete="off"
14
- novalidate
15
- >
16
- <!-- tabs -->
17
- <h2 class="nav-tab-wrapper" id="mailpoet_settings_tabs">
18
- <a class="nav-tab" href="#mta"><%= __('Send With...') %></a>
19
- <a class="nav-tab" href="#basics"><%= __('Basics') %></a>
20
- <a class="nav-tab" href="#signup"><%= __('Sign-up Confirmation') %></a>
21
- <a class="nav-tab" href="#advanced"><%= __('Advanced') %></a>
22
- <a class="nav-tab" href="#premium"><%= __('Key Activation') %></a>
23
- </h2>
24
-
25
- <!-- sending method -->
26
- <div data-tab="mta" class="mailpoet_panel">
27
- <% include 'settings/mta.html' %>
28
- </div>
29
-
30
- <!-- basics -->
31
- <div data-tab="basics" class="mailpoet_panel">
32
- <% include 'settings/basics.html' %>
33
- </div>
34
-
35
- <!-- sign-up confirmation -->
36
- <div data-tab="signup" class="mailpoet_panel">
37
- <% include 'settings/signup.html' %>
38
- </div>
39
-
40
- <!-- advanced -->
41
- <div data-tab="advanced" class="mailpoet_panel">
42
- <% include 'settings/advanced.html' %>
43
- </div>
44
-
45
- <!-- premium -->
46
- <div data-tab="premium" class="mailpoet_panel">
47
- <% include 'settings/premium.html' %>
48
- </div>
49
-
50
- <p class="submit mailpoet_settings_submit" style="display:none;">
51
- <input
52
- type="submit"
53
- class="button button-primary"
54
- name="submit"
55
- value="<%= __('Save settings') %>"
56
- />
57
- </p>
58
- </form>
59
- </div>
60
-
61
- <script type="text/javascript">
62
- jQuery(function($) {
63
- // on dom loaded
64
- $(function() {
65
- // on form submission
66
- $('#mailpoet_settings_form').on('submit', function() {
67
- // if we're setting up a sending method, try to activate it
68
- if ($('.mailpoet_mta_setup_save').is(':visible')) {
69
- $('.mailpoet_mta_setup_save').trigger('click');
70
- }
71
- var mailpoet_premium_key = $('#mailpoet_premium_key').val();
72
- // sync mss key with premium key
73
- $('#mailpoet_api_key').val(mailpoet_premium_key);
74
- if (mailpoet_premium_key.length > 0) {
75
- $('#mailpoet_premium_key_verify').trigger('click');
76
- }
77
- saveSettings();
78
- return false;
79
- });
80
-
81
- function saveSettings() {
82
- // serialize form data
83
- var settings_data = $('#mailpoet_settings_form').mailpoetSerializeObject();
84
-
85
- // show loading screen
86
- MailPoet.Modal.loading(true);
87
-
88
- MailPoet.Ajax.post({
89
- api_version: window.mailpoet_api_version,
90
- endpoint: 'settings',
91
- action: 'set',
92
- data: settings_data
93
- }).always(function() {
94
- MailPoet.Modal.loading(false);
95
- }).done(function(response) {
96
- MailPoet.Notice.success(
97
- "<%= __('Settings saved') | escape('js') %>",
98
- { scroll: true }
99
- );
100
- MailPoet.trackEvent(
101
- 'User has saved Settings',
102
- {
103
- 'MailPoet Free version': window.mailpoet_version,
104
- 'Sending method type': settings_data.mta_group || null,
105
- 'Sending frequency (emails)': settings_data.mta_group != 'mailpoet' && settings_data.mta && settings_data.mta.frequency && settings_data.mta.frequency.emails,
106
- 'Sending frequency (interval)': settings_data.mta_group != 'mailpoet' && settings_data.mta && settings_data.mta.frequency && settings_data.mta.frequency.interval,
107
- 'Sending provider': settings_data.mta_group == 'smtp' && settings_data.smtp_provider,
108
- 'Sign-up confirmation enabled': (settings_data.signup_confirmation && settings_data.signup_confirmation.enabled == true),
109
- 'Bounce email is present': (settings_data.bounce && settings_data.bounce.address != ""),
110
- 'Newsletter task scheduler method': (settings_data.cron_trigger && settings_data.cron_trigger.method)
111
- }
112
- );
113
- }).fail(function(response) {
114
- if (response.errors.length > 0) {
115
- MailPoet.Notice.error(
116
- response.errors.map(function(error) { return error.message; }),
117
- { scroll: true }
118
- );
119
- }
120
- });
121
- }
122
-
123
- // setup toggle checkboxes
124
- function toggleContent() {
125
- $('#'+$(this).data('toggle'))[
126
- ($(this).is(':checked'))
127
- ? 'show'
128
- : 'hide'
129
- ]();
130
- }
131
-
132
- $(document).on('click', 'input[data-toggle]', toggleContent);
133
- $('input[data-toggle]').each(toggleContent);
134
-
135
- // page preview
136
- $('.mailpoet_page_preview').on('click', function() {
137
- var selection = $(this).siblings('.mailpoet_page_selection');
138
-
139
- if (selection.length > 0) {
140
- $(this).attr('href', $(selection).find('option[value="'+$(selection).val()+'"]').data('preview-url'));
141
- $(this).attr('target', '_blank');
142
- } else {
143
- $(this).attr('href', 'javascript:;');
144
- $(this).removeAttr('target');
145
- }
146
- });
147
- });
148
- });
149
- </script>
150
- <% endblock %>
151
- <% block translations %>
152
- <%= localize({
153
- 'reinstallConfirmation': __('Are you sure? All of your MailPoet data will be permanently erased (newsletters, statistics, subscribers, etc.).')
154
- }) %>
155
- <% endblock %>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <% extends 'layout.html' %>
2
+
3
+ <% block content %>
4
+ <div id="mailpoet_settings">
5
+
6
+ <h1 class="title"><%= __('Settings') %></h1>
7
+
8
+ <!-- settings form -->
9
+ <form
10
+ id="mailpoet_settings_form"
11
+ name="mailpoet_settings_form"
12
+ class="mailpoet_form"
13
+ autocomplete="off"
14
+ novalidate
15
+ >
16
+ <!-- tabs -->
17
+ <h2 class="nav-tab-wrapper" id="mailpoet_settings_tabs">
18
+ <a class="nav-tab" href="#mta"><%= __('Send With...') %></a>
19
+ <a class="nav-tab" href="#basics"><%= __('Basics') %></a>
20
+ <a class="nav-tab" href="#signup"><%= __('Sign-up Confirmation') %></a>
21
+ <a class="nav-tab" href="#advanced"><%= __('Advanced') %></a>
22
+ <a class="nav-tab" href="#premium"><%= __('Key Activation') %></a>
23
+ </h2>
24
+
25
+ <!-- sending method -->
26
+ <div data-tab="mta" class="mailpoet_panel">
27
+ <% include 'settings/mta.html' %>
28
+ </div>
29
+
30
+ <!-- basics -->
31
+ <div data-tab="basics" class="mailpoet_panel">
32
+ <% include 'settings/basics.html' %>
33
+ </div>
34
+
35
+ <!-- sign-up confirmation -->
36
+ <div data-tab="signup" class="mailpoet_panel">
37
+ <% include 'settings/signup.html' %>
38
+ </div>
39
+
40
+ <!-- advanced -->
41
+ <div data-tab="advanced" class="mailpoet_panel">
42
+ <% include 'settings/advanced.html' %>
43
+ </div>
44
+
45
+ <!-- premium -->
46
+ <div data-tab="premium" class="mailpoet_panel">
47
+ <% include 'settings/premium.html' %>
48
+ </div>
49
+
50
+ <p class="submit mailpoet_settings_submit" style="display:none;">
51
+ <input
52
+ type="submit"
53
+ class="button button-primary"
54
+ name="submit"
55
+ value="<%= __('Save settings') %>"
56
+ />
57
+ </p>
58
+ </form>
59
+ </div>
60
+
61
+ <script type="text/javascript">
62
+ jQuery(function($) {
63
+ // on dom loaded
64
+ $(function() {
65
+ // on form submission
66
+ $('#mailpoet_settings_form').on('submit', function() {
67
+ // if reCAPTCHA is enabled but keys are emty, show error
68
+ var enabled = $('input[name="re_captcha[enabled]"]:checked').val(),
69
+ site_key = $('input[name="re_captcha[site_token]"]').val().trim(),
70
+ secret_key = $('input[name="re_captcha[secret_token]"]').val().trim();
71
+ if (enabled && (site_key == '' || secret_key == '')) {
72
+ $('#settings_re_captcha_tokens_error').show();
73
+ window.location.href = '#advanced';
74
+ return false;
75
+ } else {
76
+ $('#settings_re_captcha_tokens_error').hide();
77
+ }
78
+ // if we're setting up a sending method, try to activate it
79
+ if ($('.mailpoet_mta_setup_save').is(':visible')) {
80
+ $('.mailpoet_mta_setup_save').trigger('click');
81
+ }
82
+ var mailpoet_premium_key = $('#mailpoet_premium_key').val();
83
+ // sync mss key with premium key
84
+ $('#mailpoet_api_key').val(mailpoet_premium_key);
85
+ if (mailpoet_premium_key.length > 0) {
86
+ $('#mailpoet_premium_key_verify').trigger('click');
87
+ }
88
+ saveSettings();
89
+ return false;
90
+ });
91
+
92
+ function saveSettings() {
93
+ // serialize form data
94
+ var settings_data = $('#mailpoet_settings_form').mailpoetSerializeObject();
95
+
96
+ // show loading screen
97
+ MailPoet.Modal.loading(true);
98
+
99
+ MailPoet.Ajax.post({
100
+ api_version: window.mailpoet_api_version,
101
+ endpoint: 'settings',
102
+ action: 'set',
103
+ data: settings_data
104
+ }).always(function() {
105
+ MailPoet.Modal.loading(false);
106
+ }).done(function(response) {
107
+ MailPoet.Notice.success(
108
+ "<%= __('Settings saved') | escape('js') %>",
109
+ { scroll: true }
110
+ );
111
+ MailPoet.trackEvent(
112
+ 'User has saved Settings',
113
+ {
114
+ 'MailPoet Free version': window.mailpoet_version,
115
+ 'Sending method type': settings_data.mta_group || null,
116
+ 'Sending frequency (emails)': settings_data.mta_group != 'mailpoet' && settings_data.mta && settings_data.mta.frequency && settings_data.mta.frequency.emails,
117
+ 'Sending frequency (interval)': settings_data.mta_group != 'mailpoet' && settings_data.mta && settings_data.mta.frequency && settings_data.mta.frequency.interval,
118
+ 'Sending provider': settings_data.mta_group == 'smtp' && settings_data.smtp_provider,
119
+ 'Sign-up confirmation enabled': (settings_data.signup_confirmation && settings_data.signup_confirmation.enabled == true),
120
+ 'Bounce email is present': (settings_data.bounce && settings_data.bounce.address != ""),
121
+ 'Newsletter task scheduler method': (settings_data.cron_trigger && settings_data.cron_trigger.method)
122
+ }
123
+ );
124
+ }).fail(function(response) {
125
+ if (response.errors.length > 0) {
126
+ MailPoet.Notice.error(
127
+ response.errors.map(function(error) { return error.message; }),
128
+ { scroll: true }
129
+ );
130
+ }
131
+ });
132
+ }
133
+
134
+ // setup toggle checkboxes
135
+ function toggleContent() {
136
+ $('#'+$(this).data('toggle'))[
137
+ ($(this).is(':checked'))
138
+ ? 'show'
139
+ : 'hide'
140
+ ]();
141
+ }
142
+
143
+ $(document).on('click', 'input[data-toggle]', toggleContent);
144
+ $('input[data-toggle]').each(toggleContent);
145
+
146
+ function toggleReCaptchaSettings() {
147
+ if ($('input[name="re_captcha[enabled]"]:checked').val()) {
148
+ $('#settings_re_captcha_tokens').show();
149
+ } else {
150
+ $('#settings_re_captcha_tokens').hide();
151
+ }
152
+ }
153
+ $('input[name="re_captcha[enabled]"]').on('click', toggleReCaptchaSettings);
154
+ toggleReCaptchaSettings();
155
+ $('#settings_re_captcha_tokens_error').hide();
156
+
157
+ // page preview
158
+ $('.mailpoet_page_preview').on('click', function() {
159
+ var selection = $(this).siblings('.mailpoet_page_selection');
160
+
161
+ if (selection.length > 0) {
162
+ $(this).attr('href', $(selection).find('option[value="'+$(selection).val()+'"]').data('preview-url'));
163
+ $(this).attr('target', '_blank');
164
+ } else {
165
+ $(this).attr('href', 'javascript:;');
166
+ $(this).removeAttr('target');
167
+ }
168
+ });
169
+ });
170
+ });
171
+ </script>
172
+ <% endblock %>
173
+ <% block translations %>
174
+ <%= localize({
175
+ 'reinstallConfirmation': __('Are you sure? All of your MailPoet data will be permanently erased (newsletters, statistics, subscribers, etc.).')
176
+ }) %>
177
+ <% endblock %>
views/settings/advanced.html CHANGED
@@ -164,6 +164,67 @@
164
  </p>
165
  </td>
166
  </tr>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
167
  <!-- reinstall -->
168
  <tr>
169
  <th scope="row">
164
  </p>
165
  </td>
166
  </tr>
167
+ <!-- reCaptcha settings -->
168
+ <tr>
169
+ <th scope="row">
170
+ <label>
171
+ <%= __('Enable reCAPTCHA') %>
172
+ </label>
173
+ <p class="description">
174
+ <%= __('Use reCAPTCHA to protect MailPoet subscription forms.') %>
175
+ <a
176
+ href="https://www.google.com/recaptcha/admin"
177
+ target="_blank"
178
+ ><%= __('Sign up for an API key pair here.') %></a>
179
+ </p>
180
+ </th>
181
+ <td>
182
+ <p>
183
+ <label>
184
+ <input
185
+ type="radio"
186
+ name="re_captcha[enabled]"
187
+ value="1"
188
+ <% if(settings.re_captcha.enabled) %>
189
+ checked="checked"
190
+ <% endif %>
191
+ /><%= __('Yes') %>
192
+ </label>
193
+ &nbsp;
194
+ <label>
195
+ <input
196
+ type="radio"
197
+ name="re_captcha[enabled]"
198
+ value=""
199
+ <% if not(settings.re_captcha.enabled) %>
200
+ checked="checked"
201
+ <% endif %>
202
+ /><%= __('No') %>
203
+ </label>
204
+ </p>
205
+ <div id="settings_re_captcha_tokens">
206
+ <p>
207
+ <input type="text"
208
+ name="re_captcha[site_token]"
209
+ value="<%= settings.re_captcha.site_token %>"
210
+ placeholder="<%= __('Your reCAPTCHA Site Key') %>"
211
+ class="regular-text"
212
+ />
213
+ </p>
214
+ <p>
215
+ <input type="text"
216
+ name="re_captcha[secret_token]"
217
+ value="<%= settings.re_captcha.secret_token %>"
218
+ placeholder="<%= __('Your reCAPTCHA Secret Key') %>"
219
+ class="regular-text"
220
+ />
221
+ </p>
222
+ <div id="settings_re_captcha_tokens_error" class="mailpoet_error_item mailpoet_error">
223
+ <%= __('Please fill the reCAPTCHA keys.') %>
224
+ </div>
225
+ </div>
226
+ </td>
227
+ </tr>
228
  <!-- reinstall -->
229
  <tr>
230
  <th scope="row">
views/update.html CHANGED
@@ -33,8 +33,8 @@
33
  <div class="feature-section one-col mailpoet_centered">
34
  <h2><%= __('Care to Give Your Opinion?') %></h2>
35
 
36
- <% if(is_woocommerce_available) %>
37
- <div class="pd-embed" id="pd_1513007087"></div>
38
  <script type="text/javascript">
39
  var _polldaddy = [] || _polldaddy;
40
 
@@ -42,27 +42,15 @@
42
  type: "iframe",
43
  auto: "1",
44
  domain: "mailpoet.polldaddy.com/s/",
45
- id: "woocommerce-01",
46
- placeholder: "pd_1513007087"
47
  } );
48
 
49
  (function(d,c,j){if(!document.getElementById(j)){var pd=d.createElement(c),s;pd.id=j;pd.src=('https:'==document.location.protocol)?'https://polldaddy.com/survey.js':'http://i0.poll.fm/survey.js';s=document.getElementsByTagName(c)[0];s.parentNode.insertBefore(pd,s);}}(document,'script','pd-embed'));
50
  </script>
51
  <% else %>
52
- <div class="pd-embed" id="pd_1509014259"></div>
53
- <script type="text/javascript">
54
- var _polldaddy = [] || _polldaddy;
55
-
56
- _polldaddy.push( {
57
- type: "iframe",
58
- auto: "1",
59
- domain: "mailpoet.polldaddy.com/s/",
60
- id: "what-s-one-feature-that-s-missing-in-mailpoet-1",
61
- placeholder: "pd_1509014259"
62
- } );
63
-
64
- (function(d,c,j){if(!document.getElementById(j)){var pd=d.createElement(c),s;pd.id=j;pd.src=('https:'==document.location.protocol)?'https://polldaddy.com/survey.js':'http://i0.poll.fm/survey.js';s=document.getElementsByTagName(c)[0];s.parentNode.insertBefore(pd,s);}}(document,'script','pd-embed'));
65
- </script>
66
  <% endif %>
67
 
68
  <hr>
33
  <div class="feature-section one-col mailpoet_centered">
34
  <h2><%= __('Care to Give Your Opinion?') %></h2>
35
 
36
+ <% if(is_new_user) %>
37
+ <div class="pd-embed" id="pd_1516701033"></div>
38
  <script type="text/javascript">
39
  var _polldaddy = [] || _polldaddy;
40
 
42
  type: "iframe",
43
  auto: "1",
44
  domain: "mailpoet.polldaddy.com/s/",
45
+ id: "experience-so-far",
46
+ placeholder: "pd_1516701033"
47
  } );
48
 
49
  (function(d,c,j){if(!document.getElementById(j)){var pd=d.createElement(c),s;pd.id=j;pd.src=('https:'==document.location.protocol)?'https://polldaddy.com/survey.js':'http://i0.poll.fm/survey.js';s=document.getElementsByTagName(c)[0];s.parentNode.insertBefore(pd,s);}}(document,'script','pd-embed'));
50
  </script>
51
  <% else %>
52
+ <script type="text/javascript" charset="utf-8" src="https://secure.polldaddy.com/p/9917505.js"></script>
53
+ <noscript><a href="https://polldaddy.com/poll/9917505/">Do you find this page useful?</a></noscript>
 
 
 
 
 
 
 
 
 
 
 
 
54
  <% endif %>
55
 
56
  <hr>