Version Description
- 2016-12-31 =
- Improved: newsletters' statistics are generated in a split second;
- Fixed: subscribers' data is properly saved on repeat and/or multiple subscription attempts;
- Fixed: WP posts are displayed/rendered with proper line breaks and spaces;
- Fixed: preview-by-email works once again;
- Wished: 2017 sees the release of the fantastic MailPoet 3 and the super-duper MailPoet Sending Service;
- Wished: 2017 turns out to be an amazing year for all of our beloved and new users!
Download this release
Release Info
| Developer | wysija |
| Plugin | |
| Version | 3.0.0-beta.11 |
| Comparing to | |
| See all releases | |
Code changes from version 3.0.0-beta.10 to 3.0.0-beta.11
- assets/css/newsletter_editor.css +7 -2
- assets/js/lib/tinymce/package.json +83 -0
- lang/mailpoet.pot +37 -37
- lib/API/Endpoints/Newsletters.php +12 -11
- lib/Config/Migrator.php +7 -3
- lib/Models/Newsletter.php +42 -37
- lib/Models/Subscriber.php +44 -17
- lib/Newsletter/Editor/PostContentManager.php +3 -2
- lib/Newsletter/Editor/StructureTransformer.php +1 -1
- lib/Newsletter/Renderer/Blocks/Text.php +9 -1
- lib/Subscription/Pages.php +15 -5
- mailpoet.php +2 -2
- readme.txt +9 -1
- vendor/autoload.php +1 -1
- vendor/composer/autoload_real.php +7 -7
- vendor/composer/autoload_static.php +5 -5
- views/update.html +1 -1
- views/welcome.html +1 -1
assets/css/newsletter_editor.css
CHANGED
|
@@ -1929,7 +1929,6 @@ input.mailpoet_option_offset_left_small {
|
|
| 1929 |
position: relative;
|
| 1930 |
line-height: 1.6em;
|
| 1931 |
}
|
| 1932 |
-
.mailpoet_content p,
|
| 1933 |
.mailpoet_content h1,
|
| 1934 |
.mailpoet_content h2,
|
| 1935 |
.mailpoet_content h3,
|
|
@@ -1950,9 +1949,15 @@ input.mailpoet_option_offset_left_small {
|
|
| 1950 |
.mailpoet_content h6 {
|
| 1951 |
margin-bottom: 0.3em;
|
| 1952 |
}
|
| 1953 |
-
.mailpoet_content p {
|
| 1954 |
margin-top: 0;
|
| 1955 |
margin-bottom: 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1956 |
font-weight: normal;
|
| 1957 |
}
|
| 1958 |
.mailpoet_content ul {
|
| 1929 |
position: relative;
|
| 1930 |
line-height: 1.6em;
|
| 1931 |
}
|
|
|
|
| 1932 |
.mailpoet_content h1,
|
| 1933 |
.mailpoet_content h2,
|
| 1934 |
.mailpoet_content h3,
|
| 1949 |
.mailpoet_content h6 {
|
| 1950 |
margin-bottom: 0.3em;
|
| 1951 |
}
|
| 1952 |
+
.mailpoet_content p:not(.mailpoet_wp_post) {
|
| 1953 |
margin-top: 0;
|
| 1954 |
margin-bottom: 0;
|
| 1955 |
+
padding: 0;
|
| 1956 |
+
margin: 0;
|
| 1957 |
+
}
|
| 1958 |
+
.mailpoet_content p {
|
| 1959 |
+
line-height: 1.6em;
|
| 1960 |
+
font-style: normal;
|
| 1961 |
font-weight: normal;
|
| 1962 |
}
|
| 1963 |
.mailpoet_content ul {
|
assets/js/lib/tinymce/package.json
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_args": [
|
| 3 |
+
[
|
| 4 |
+
{
|
| 5 |
+
"raw": "tinymce@4.3.12",
|
| 6 |
+
"scope": null,
|
| 7 |
+
"escapedName": "tinymce",
|
| 8 |
+
"name": "tinymce",
|
| 9 |
+
"rawSpec": "4.3.12",
|
| 10 |
+
"spec": "4.3.12",
|
| 11 |
+
"type": "version"
|
| 12 |
+
},
|
| 13 |
+
"/mnt/d/storage/coding/WWW/current/mp/phoenix"
|
| 14 |
+
]
|
| 15 |
+
],
|
| 16 |
+
"_from": "tinymce@4.3.12",
|
| 17 |
+
"_id": "tinymce@4.3.12",
|
| 18 |
+
"_inCache": true,
|
| 19 |
+
"_location": "/tinymce",
|
| 20 |
+
"_nodeVersion": "4.2.2",
|
| 21 |
+
"_npmOperationalInternal": {
|
| 22 |
+
"host": "packages-12-west.internal.npmjs.com",
|
| 23 |
+
"tmp": "tmp/tinymce-4.3.12.tgz_1462880672047_0.6823310567997396"
|
| 24 |
+
},
|
| 25 |
+
"_npmUser": {
|
| 26 |
+
"name": "ephox",
|
| 27 |
+
"email": "is-accounts@ephox.com"
|
| 28 |
+
},
|
| 29 |
+
"_npmVersion": "2.14.7",
|
| 30 |
+
"_phantomChildren": {},
|
| 31 |
+
"_requested": {
|
| 32 |
+
"raw": "tinymce@4.3.12",
|
| 33 |
+
"scope": null,
|
| 34 |
+
"escapedName": "tinymce",
|
| 35 |
+
"name": "tinymce",
|
| 36 |
+
"rawSpec": "4.3.12",
|
| 37 |
+
"spec": "4.3.12",
|
| 38 |
+
"type": "version"
|
| 39 |
+
},
|
| 40 |
+
"_requiredBy": [
|
| 41 |
+
"/"
|
| 42 |
+
],
|
| 43 |
+
"_resolved": "https://registry.npmjs.org/tinymce/-/tinymce-4.3.12.tgz",
|
| 44 |
+
"_shasum": "c9f847f897f604e1621432589df9d5dcb3c13b36",
|
| 45 |
+
"_shrinkwrap": null,
|
| 46 |
+
"_spec": "tinymce@4.3.12",
|
| 47 |
+
"_where": "/mnt/d/storage/coding/WWW/current/mp/phoenix",
|
| 48 |
+
"bugs": {
|
| 49 |
+
"url": "http://www.tinymce.com/develop/bugtracker.php"
|
| 50 |
+
},
|
| 51 |
+
"dependencies": {},
|
| 52 |
+
"description": "Web based JavaScript HTML WYSIWYG editor control.",
|
| 53 |
+
"devDependencies": {},
|
| 54 |
+
"directories": {},
|
| 55 |
+
"dist": {
|
| 56 |
+
"shasum": "c9f847f897f604e1621432589df9d5dcb3c13b36",
|
| 57 |
+
"tarball": "https://registry.npmjs.org/tinymce/-/tinymce-4.3.12.tgz"
|
| 58 |
+
},
|
| 59 |
+
"keywords": [
|
| 60 |
+
"editor",
|
| 61 |
+
"wysiwyg",
|
| 62 |
+
"tinymce",
|
| 63 |
+
"richtext",
|
| 64 |
+
"javascript",
|
| 65 |
+
"html"
|
| 66 |
+
],
|
| 67 |
+
"license": "LGPL-2.1",
|
| 68 |
+
"maintainers": [
|
| 69 |
+
{
|
| 70 |
+
"name": "ephox",
|
| 71 |
+
"email": "is-accounts@ephox.com"
|
| 72 |
+
},
|
| 73 |
+
{
|
| 74 |
+
"name": "spocke",
|
| 75 |
+
"email": "spocke@moxiecode.com"
|
| 76 |
+
}
|
| 77 |
+
],
|
| 78 |
+
"name": "tinymce",
|
| 79 |
+
"optionalDependencies": {},
|
| 80 |
+
"readme": "ERROR: No README data found!",
|
| 81 |
+
"scripts": {},
|
| 82 |
+
"version": "4.3.12"
|
| 83 |
+
}
|
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: 2016-12-
|
| 8 |
"MIME-Version: 1.0\n"
|
| 9 |
"Content-Type: text/plain; charset=utf-8\n"
|
| 10 |
"Content-Transfer-Encoding: 8bit\n"
|
|
@@ -79,7 +79,7 @@ msgstr ""
|
|
| 79 |
msgid "Copy of %s"
|
| 80 |
msgstr ""
|
| 81 |
|
| 82 |
-
#: lib/API/Endpoints/Mailer.php:26 lib/API/Endpoints/Newsletters.php:
|
| 83 |
msgid "The email could not be sent: %s"
|
| 84 |
msgstr ""
|
| 85 |
|
|
@@ -1178,13 +1178,13 @@ msgstr ""
|
|
| 1178 |
msgid "Please specify a type"
|
| 1179 |
msgstr ""
|
| 1180 |
|
| 1181 |
-
#: lib/Models/Form.php:50 lib/Models/Newsletter.php:
|
| 1182 |
-
#: lib/Models/Segment.php:126 lib/Models/Subscriber.php:
|
| 1183 |
msgid "All"
|
| 1184 |
msgstr ""
|
| 1185 |
|
| 1186 |
-
#: lib/Models/Form.php:55 lib/Models/Newsletter.php:
|
| 1187 |
-
#: lib/Models/Segment.php:131 lib/Models/Subscriber.php:
|
| 1188 |
#: views/newsletters.html:75 views/segments.html:50
|
| 1189 |
#: views/subscribers/subscribers.html:34
|
| 1190 |
msgid "Trash"
|
|
@@ -1198,34 +1198,34 @@ msgstr ""
|
|
| 1198 |
msgid "Deleted list"
|
| 1199 |
msgstr ""
|
| 1200 |
|
| 1201 |
-
#: lib/Models/Newsletter.php:
|
| 1202 |
#: lib/Subscribers/ImportExport/Export/Export.php:170
|
| 1203 |
msgid "All Lists"
|
| 1204 |
msgstr ""
|
| 1205 |
|
| 1206 |
-
#: lib/Models/Newsletter.php:
|
| 1207 |
#: views/newsletter/templates/blocks/posts/settingsSelection.hbs:12
|
| 1208 |
msgid "Draft"
|
| 1209 |
msgstr ""
|
| 1210 |
|
| 1211 |
-
#: lib/Models/Newsletter.php:
|
| 1212 |
#: views/newsletter/templates/blocks/posts/settingsSelection.hbs:11
|
| 1213 |
msgid "Scheduled"
|
| 1214 |
msgstr ""
|
| 1215 |
|
| 1216 |
-
#: lib/Models/Newsletter.php:
|
| 1217 |
msgid "Sending"
|
| 1218 |
msgstr ""
|
| 1219 |
|
| 1220 |
-
#: lib/Models/Newsletter.php:
|
| 1221 |
msgid "Sent"
|
| 1222 |
msgstr ""
|
| 1223 |
|
| 1224 |
-
#: lib/Models/Newsletter.php:
|
| 1225 |
msgid "Active"
|
| 1226 |
msgstr ""
|
| 1227 |
|
| 1228 |
-
#: lib/Models/Newsletter.php:
|
| 1229 |
msgid "Not active"
|
| 1230 |
msgstr ""
|
| 1231 |
|
|
@@ -1277,35 +1277,35 @@ msgstr ""
|
|
| 1277 |
msgid "Your email address is invalid!"
|
| 1278 |
msgstr ""
|
| 1279 |
|
| 1280 |
-
#: lib/Models/Subscriber.php:
|
| 1281 |
msgid "You need to wait before subscribing again."
|
| 1282 |
msgstr ""
|
| 1283 |
|
| 1284 |
-
#: lib/Models/Subscriber.php:
|
| 1285 |
msgid "Subscribers without a list (%s)"
|
| 1286 |
msgstr ""
|
| 1287 |
|
| 1288 |
-
#: lib/Models/Subscriber.php:
|
| 1289 |
#: views/segments.html:30 views/subscribers/subscribers.html:51
|
| 1290 |
msgid "Subscribed"
|
| 1291 |
msgstr ""
|
| 1292 |
|
| 1293 |
-
#: lib/Models/Subscriber.php:
|
| 1294 |
#: views/subscribers/subscribers.html:50
|
| 1295 |
msgid "Unconfirmed"
|
| 1296 |
msgstr ""
|
| 1297 |
|
| 1298 |
-
#: lib/Models/Subscriber.php:
|
| 1299 |
#: views/segments.html:32 views/subscribers/subscribers.html:52
|
| 1300 |
msgid "Unsubscribed"
|
| 1301 |
msgstr ""
|
| 1302 |
|
| 1303 |
-
#: lib/Models/Subscriber.php:
|
| 1304 |
#: views/segments.html:33 views/subscribers/subscribers.html:53
|
| 1305 |
msgid "Bounced"
|
| 1306 |
msgstr ""
|
| 1307 |
|
| 1308 |
-
#: lib/Newsletter/Editor/PostContentManager.php:
|
| 1309 |
msgid "Click here to view media."
|
| 1310 |
msgstr ""
|
| 1311 |
|
|
@@ -1423,7 +1423,7 @@ msgid "Invalid router endpoint action."
|
|
| 1423 |
msgstr ""
|
| 1424 |
|
| 1425 |
#: lib/Settings/Pages.php:12 lib/Settings/Pages.php:13
|
| 1426 |
-
#: lib/Settings/Pages.php:37 lib/Subscription/Pages.php:
|
| 1427 |
msgid "MailPoet Page"
|
| 1428 |
msgstr ""
|
| 1429 |
|
|
@@ -1482,19 +1482,19 @@ msgid "Not In List"
|
|
| 1482 |
msgstr ""
|
| 1483 |
|
| 1484 |
#: lib/Subscribers/ImportExport/ImportExportFactory.php:33
|
| 1485 |
-
#: lib/Subscription/Pages.php:
|
| 1486 |
#: views/form/editor.html:230
|
| 1487 |
msgid "First name"
|
| 1488 |
msgstr ""
|
| 1489 |
|
| 1490 |
#: lib/Subscribers/ImportExport/ImportExportFactory.php:34
|
| 1491 |
-
#: lib/Subscription/Pages.php:
|
| 1492 |
#: views/form/editor.html:239
|
| 1493 |
msgid "Last name"
|
| 1494 |
msgstr ""
|
| 1495 |
|
| 1496 |
#: lib/Subscribers/ImportExport/ImportExportFactory.php:35
|
| 1497 |
-
#: lib/Subscription/Pages.php:
|
| 1498 |
#: views/subscribers/subscribers.html:49 views/subscribers/subscribers.html:60
|
| 1499 |
msgid "Status"
|
| 1500 |
msgstr ""
|
|
@@ -1532,61 +1532,61 @@ msgstr ""
|
|
| 1532 |
msgid "Yes, please add me to your mailing list"
|
| 1533 |
msgstr ""
|
| 1534 |
|
| 1535 |
-
#: lib/Subscription/Pages.php:
|
| 1536 |
msgid "Hmmm... we don't have a record of you"
|
| 1537 |
msgstr ""
|
| 1538 |
|
| 1539 |
-
#: lib/Subscription/Pages.php:
|
| 1540 |
msgid ""
|
| 1541 |
"Your email address doesn't appear in our lists anymore. Sign up again or "
|
| 1542 |
"contact us if this appears to be a mistake."
|
| 1543 |
msgstr ""
|
| 1544 |
|
| 1545 |
-
#: lib/Subscription/Pages.php:
|
| 1546 |
msgid "You have subscribed to: %s"
|
| 1547 |
msgstr ""
|
| 1548 |
|
| 1549 |
-
#: lib/Subscription/Pages.php:
|
| 1550 |
msgid "You are now subscribed!"
|
| 1551 |
msgstr ""
|
| 1552 |
|
| 1553 |
-
#: lib/Subscription/Pages.php:
|
| 1554 |
msgid "Manage your subscription"
|
| 1555 |
msgstr ""
|
| 1556 |
|
| 1557 |
-
#: lib/Subscription/Pages.php:
|
| 1558 |
msgid "You are now unsubscribed"
|
| 1559 |
msgstr ""
|
| 1560 |
|
| 1561 |
-
#: lib/Subscription/Pages.php:
|
| 1562 |
msgid "Yup, we've added you to our email list. You'll hear from us shortly."
|
| 1563 |
msgstr ""
|
| 1564 |
|
| 1565 |
-
#: lib/Subscription/Pages.php:
|
| 1566 |
msgid "Your lists"
|
| 1567 |
msgstr ""
|
| 1568 |
|
| 1569 |
-
#: lib/Subscription/Pages.php:
|
| 1570 |
#: views/form/editor.html:383 views/newsletter/templates/components/save.hbs:3
|
| 1571 |
#: views/segments.html:55 views/subscribers/subscribers.html:91
|
| 1572 |
msgid "Save"
|
| 1573 |
msgstr ""
|
| 1574 |
|
| 1575 |
-
#: lib/Subscription/Pages.php:
|
| 1576 |
msgid "[link]Edit your profile[/link] to update your email."
|
| 1577 |
msgstr ""
|
| 1578 |
|
| 1579 |
-
#: lib/Subscription/Pages.php:
|
| 1580 |
msgid "[link]Log in to your account[/link] to update your email."
|
| 1581 |
msgstr ""
|
| 1582 |
|
| 1583 |
-
#: lib/Subscription/Pages.php:
|
| 1584 |
msgid ""
|
| 1585 |
"Need to change your email address? Unsubscribe here, then simply sign up "
|
| 1586 |
"again."
|
| 1587 |
msgstr ""
|
| 1588 |
|
| 1589 |
-
#: lib/Subscription/Pages.php:
|
| 1590 |
msgid "Accidentally unsubscribed?"
|
| 1591 |
msgstr ""
|
| 1592 |
|
| 4 |
msgstr ""
|
| 5 |
"Project-Id-Version: \n"
|
| 6 |
"Report-Msgid-Bugs-To: http://support.mailpoet.com/\n"
|
| 7 |
+
"POT-Creation-Date: 2016-12-31 19:55:48+00:00\n"
|
| 8 |
"MIME-Version: 1.0\n"
|
| 9 |
"Content-Type: text/plain; charset=utf-8\n"
|
| 10 |
"Content-Transfer-Encoding: 8bit\n"
|
| 79 |
msgid "Copy of %s"
|
| 80 |
msgstr ""
|
| 81 |
|
| 82 |
+
#: lib/API/Endpoints/Mailer.php:26 lib/API/Endpoints/Newsletters.php:286
|
| 83 |
msgid "The email could not be sent: %s"
|
| 84 |
msgstr ""
|
| 85 |
|
| 1178 |
msgid "Please specify a type"
|
| 1179 |
msgstr ""
|
| 1180 |
|
| 1181 |
+
#: lib/Models/Form.php:50 lib/Models/Newsletter.php:464
|
| 1182 |
+
#: lib/Models/Segment.php:126 lib/Models/Subscriber.php:341
|
| 1183 |
msgid "All"
|
| 1184 |
msgstr ""
|
| 1185 |
|
| 1186 |
+
#: lib/Models/Form.php:55 lib/Models/Newsletter.php:534
|
| 1187 |
+
#: lib/Models/Segment.php:131 lib/Models/Subscriber.php:366 views/forms.html:56
|
| 1188 |
#: views/newsletters.html:75 views/segments.html:50
|
| 1189 |
#: views/subscribers/subscribers.html:34
|
| 1190 |
msgid "Trash"
|
| 1198 |
msgid "Deleted list"
|
| 1199 |
msgstr ""
|
| 1200 |
|
| 1201 |
+
#: lib/Models/Newsletter.php:365 lib/Models/Subscriber.php:279
|
| 1202 |
#: lib/Subscribers/ImportExport/Export/Export.php:170
|
| 1203 |
msgid "All Lists"
|
| 1204 |
msgstr ""
|
| 1205 |
|
| 1206 |
+
#: lib/Models/Newsletter.php:476
|
| 1207 |
#: views/newsletter/templates/blocks/posts/settingsSelection.hbs:12
|
| 1208 |
msgid "Draft"
|
| 1209 |
msgstr ""
|
| 1210 |
|
| 1211 |
+
#: lib/Models/Newsletter.php:484
|
| 1212 |
#: views/newsletter/templates/blocks/posts/settingsSelection.hbs:11
|
| 1213 |
msgid "Scheduled"
|
| 1214 |
msgstr ""
|
| 1215 |
|
| 1216 |
+
#: lib/Models/Newsletter.php:492
|
| 1217 |
msgid "Sending"
|
| 1218 |
msgstr ""
|
| 1219 |
|
| 1220 |
+
#: lib/Models/Newsletter.php:500
|
| 1221 |
msgid "Sent"
|
| 1222 |
msgstr ""
|
| 1223 |
|
| 1224 |
+
#: lib/Models/Newsletter.php:514 views/newsletters.html:82
|
| 1225 |
msgid "Active"
|
| 1226 |
msgstr ""
|
| 1227 |
|
| 1228 |
+
#: lib/Models/Newsletter.php:522
|
| 1229 |
msgid "Not active"
|
| 1230 |
msgstr ""
|
| 1231 |
|
| 1277 |
msgid "Your email address is invalid!"
|
| 1278 |
msgstr ""
|
| 1279 |
|
| 1280 |
+
#: lib/Models/Subscriber.php:193
|
| 1281 |
msgid "You need to wait before subscribing again."
|
| 1282 |
msgstr ""
|
| 1283 |
|
| 1284 |
+
#: lib/Models/Subscriber.php:285
|
| 1285 |
msgid "Subscribers without a list (%s)"
|
| 1286 |
msgstr ""
|
| 1287 |
|
| 1288 |
+
#: lib/Models/Subscriber.php:346 lib/Subscription/Pages.php:290
|
| 1289 |
#: views/segments.html:30 views/subscribers/subscribers.html:51
|
| 1290 |
msgid "Subscribed"
|
| 1291 |
msgstr ""
|
| 1292 |
|
| 1293 |
+
#: lib/Models/Subscriber.php:351 views/segments.html:31
|
| 1294 |
#: views/subscribers/subscribers.html:50
|
| 1295 |
msgid "Unconfirmed"
|
| 1296 |
msgstr ""
|
| 1297 |
|
| 1298 |
+
#: lib/Models/Subscriber.php:356 lib/Subscription/Pages.php:298
|
| 1299 |
#: views/segments.html:32 views/subscribers/subscribers.html:52
|
| 1300 |
msgid "Unsubscribed"
|
| 1301 |
msgstr ""
|
| 1302 |
|
| 1303 |
+
#: lib/Models/Subscriber.php:361 lib/Subscription/Pages.php:306
|
| 1304 |
#: views/segments.html:33 views/subscribers/subscribers.html:53
|
| 1305 |
msgid "Bounced"
|
| 1306 |
msgstr ""
|
| 1307 |
|
| 1308 |
+
#: lib/Newsletter/Editor/PostContentManager.php:81
|
| 1309 |
msgid "Click here to view media."
|
| 1310 |
msgstr ""
|
| 1311 |
|
| 1423 |
msgstr ""
|
| 1424 |
|
| 1425 |
#: lib/Settings/Pages.php:12 lib/Settings/Pages.php:13
|
| 1426 |
+
#: lib/Settings/Pages.php:37 lib/Subscription/Pages.php:95
|
| 1427 |
msgid "MailPoet Page"
|
| 1428 |
msgstr ""
|
| 1429 |
|
| 1482 |
msgstr ""
|
| 1483 |
|
| 1484 |
#: lib/Subscribers/ImportExport/ImportExportFactory.php:33
|
| 1485 |
+
#: lib/Subscription/Pages.php:267 views/form/editor.html:227
|
| 1486 |
#: views/form/editor.html:230
|
| 1487 |
msgid "First name"
|
| 1488 |
msgstr ""
|
| 1489 |
|
| 1490 |
#: lib/Subscribers/ImportExport/ImportExportFactory.php:34
|
| 1491 |
+
#: lib/Subscription/Pages.php:276 views/form/editor.html:236
|
| 1492 |
#: views/form/editor.html:239
|
| 1493 |
msgid "Last name"
|
| 1494 |
msgstr ""
|
| 1495 |
|
| 1496 |
#: lib/Subscribers/ImportExport/ImportExportFactory.php:35
|
| 1497 |
+
#: lib/Subscription/Pages.php:286 views/newsletters.html:61
|
| 1498 |
#: views/subscribers/subscribers.html:49 views/subscribers/subscribers.html:60
|
| 1499 |
msgid "Status"
|
| 1500 |
msgstr ""
|
| 1532 |
msgid "Yes, please add me to your mailing list"
|
| 1533 |
msgstr ""
|
| 1534 |
|
| 1535 |
+
#: lib/Subscription/Pages.php:91
|
| 1536 |
msgid "Hmmm... we don't have a record of you"
|
| 1537 |
msgstr ""
|
| 1538 |
|
| 1539 |
+
#: lib/Subscription/Pages.php:121
|
| 1540 |
msgid ""
|
| 1541 |
"Your email address doesn't appear in our lists anymore. Sign up again or "
|
| 1542 |
"contact us if this appears to be a mistake."
|
| 1543 |
msgstr ""
|
| 1544 |
|
| 1545 |
+
#: lib/Subscription/Pages.php:165 lib/Subscription/Pages.php:177
|
| 1546 |
msgid "You have subscribed to: %s"
|
| 1547 |
msgstr ""
|
| 1548 |
|
| 1549 |
+
#: lib/Subscription/Pages.php:174
|
| 1550 |
msgid "You are now subscribed!"
|
| 1551 |
msgstr ""
|
| 1552 |
|
| 1553 |
+
#: lib/Subscription/Pages.php:187 lib/Subscription/Pages.php:405
|
| 1554 |
msgid "Manage your subscription"
|
| 1555 |
msgstr ""
|
| 1556 |
|
| 1557 |
+
#: lib/Subscription/Pages.php:193
|
| 1558 |
msgid "You are now unsubscribed"
|
| 1559 |
msgstr ""
|
| 1560 |
|
| 1561 |
+
#: lib/Subscription/Pages.php:200
|
| 1562 |
msgid "Yup, we've added you to our email list. You'll hear from us shortly."
|
| 1563 |
msgstr ""
|
| 1564 |
|
| 1565 |
+
#: lib/Subscription/Pages.php:329
|
| 1566 |
msgid "Your lists"
|
| 1567 |
msgstr ""
|
| 1568 |
|
| 1569 |
+
#: lib/Subscription/Pages.php:337 views/form/editor.html:29
|
| 1570 |
#: views/form/editor.html:383 views/newsletter/templates/components/save.hbs:3
|
| 1571 |
#: views/segments.html:55 views/subscribers/subscribers.html:91
|
| 1572 |
msgid "Save"
|
| 1573 |
msgstr ""
|
| 1574 |
|
| 1575 |
+
#: lib/Subscription/Pages.php:369
|
| 1576 |
msgid "[link]Edit your profile[/link] to update your email."
|
| 1577 |
msgstr ""
|
| 1578 |
|
| 1579 |
+
#: lib/Subscription/Pages.php:375
|
| 1580 |
msgid "[link]Log in to your account[/link] to update your email."
|
| 1581 |
msgstr ""
|
| 1582 |
|
| 1583 |
+
#: lib/Subscription/Pages.php:379
|
| 1584 |
msgid ""
|
| 1585 |
"Need to change your email address? Unsubscribe here, then simply sign up "
|
| 1586 |
"again."
|
| 1587 |
msgstr ""
|
| 1588 |
|
| 1589 |
+
#: lib/Subscription/Pages.php:393
|
| 1590 |
msgid "Accidentally unsubscribed?"
|
| 1591 |
msgstr ""
|
| 1592 |
|
lib/API/Endpoints/Newsletters.php
CHANGED
|
@@ -247,13 +247,11 @@ class Newsletters extends APIEndpoint {
|
|
| 247 |
APIError::NOT_FOUND => __('This newsletter does not exist.', 'mailpoet')
|
| 248 |
));
|
| 249 |
} else {
|
| 250 |
-
$newsletter = $newsletter->asArray();
|
| 251 |
-
|
| 252 |
$renderer = new Renderer($newsletter, $preview = true);
|
| 253 |
$rendered_newsletter = $renderer->render();
|
| 254 |
$divider = '***MailPoet***';
|
| 255 |
$data_for_shortcodes = array_merge(
|
| 256 |
-
array($newsletter
|
| 257 |
$rendered_newsletter
|
| 258 |
);
|
| 259 |
|
|
@@ -266,19 +264,22 @@ class Newsletters extends APIEndpoint {
|
|
| 266 |
$newsletter,
|
| 267 |
$subscriber
|
| 268 |
);
|
|
|
|
| 269 |
list(
|
| 270 |
-
$
|
| 271 |
-
$
|
| 272 |
-
$
|
| 273 |
) = explode($divider, $shortcodes->replace($body));
|
| 274 |
|
| 275 |
try {
|
| 276 |
-
$mailer =
|
| 277 |
-
$mailer
|
| 278 |
-
|
| 279 |
-
|
|
|
|
|
|
|
| 280 |
);
|
| 281 |
-
$result = $mailer->send($
|
| 282 |
|
| 283 |
if($result['response'] === false) {
|
| 284 |
$error = sprintf(
|
| 247 |
APIError::NOT_FOUND => __('This newsletter does not exist.', 'mailpoet')
|
| 248 |
));
|
| 249 |
} else {
|
|
|
|
|
|
|
| 250 |
$renderer = new Renderer($newsletter, $preview = true);
|
| 251 |
$rendered_newsletter = $renderer->render();
|
| 252 |
$divider = '***MailPoet***';
|
| 253 |
$data_for_shortcodes = array_merge(
|
| 254 |
+
array($newsletter->subject),
|
| 255 |
$rendered_newsletter
|
| 256 |
);
|
| 257 |
|
| 264 |
$newsletter,
|
| 265 |
$subscriber
|
| 266 |
);
|
| 267 |
+
|
| 268 |
list(
|
| 269 |
+
$rendered_newsletter['subject'],
|
| 270 |
+
$rendered_newsletter['body']['html'],
|
| 271 |
+
$rendered_newsletter['body']['text']
|
| 272 |
) = explode($divider, $shortcodes->replace($body));
|
| 273 |
|
| 274 |
try {
|
| 275 |
+
$mailer = (!empty($data['mailer'])) ?
|
| 276 |
+
$data['mailer'] :
|
| 277 |
+
new \MailPoet\Mailer\Mailer(
|
| 278 |
+
$mailer = false,
|
| 279 |
+
$sender = false,
|
| 280 |
+
$reply_to = false
|
| 281 |
);
|
| 282 |
+
$result = $mailer->send($rendered_newsletter, $data['subscriber']);
|
| 283 |
|
| 284 |
if($result['response'] === false) {
|
| 285 |
$error = sprintf(
|
lib/Config/Migrator.php
CHANGED
|
@@ -140,6 +140,7 @@ class Migrator {
|
|
| 140 |
'created_at TIMESTAMP NULL,',
|
| 141 |
'updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,',
|
| 142 |
'deleted_at TIMESTAMP NULL,',
|
|
|
|
| 143 |
'PRIMARY KEY (id),',
|
| 144 |
'UNIQUE KEY email (email)'
|
| 145 |
);
|
|
@@ -314,7 +315,8 @@ class Migrator {
|
|
| 314 |
'count mediumint(9) NOT NULL,',
|
| 315 |
'created_at TIMESTAMP NULL,',
|
| 316 |
'updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,',
|
| 317 |
-
'PRIMARY KEY (id)',
|
|
|
|
| 318 |
);
|
| 319 |
return $this->sqlify(__FUNCTION__, $attributes);
|
| 320 |
}
|
|
@@ -326,7 +328,8 @@ class Migrator {
|
|
| 326 |
'subscriber_id mediumint(9) NOT NULL,',
|
| 327 |
'queue_id mediumint(9) NOT NULL,',
|
| 328 |
'created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,',
|
| 329 |
-
'PRIMARY KEY (id)',
|
|
|
|
| 330 |
);
|
| 331 |
return $this->sqlify(__FUNCTION__, $attributes);
|
| 332 |
}
|
|
@@ -338,7 +341,8 @@ class Migrator {
|
|
| 338 |
'subscriber_id mediumint(9) NOT NULL,',
|
| 339 |
'queue_id mediumint(9) NOT NULL,',
|
| 340 |
'created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,',
|
| 341 |
-
'PRIMARY KEY (id)',
|
|
|
|
| 342 |
);
|
| 343 |
return $this->sqlify(__FUNCTION__, $attributes);
|
| 344 |
}
|
| 140 |
'created_at TIMESTAMP NULL,',
|
| 141 |
'updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,',
|
| 142 |
'deleted_at TIMESTAMP NULL,',
|
| 143 |
+
'unconfirmed_data longtext,',
|
| 144 |
'PRIMARY KEY (id),',
|
| 145 |
'UNIQUE KEY email (email)'
|
| 146 |
);
|
| 315 |
'count mediumint(9) NOT NULL,',
|
| 316 |
'created_at TIMESTAMP NULL,',
|
| 317 |
'updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,',
|
| 318 |
+
'PRIMARY KEY (id),',
|
| 319 |
+
'KEY (queue_id)',
|
| 320 |
);
|
| 321 |
return $this->sqlify(__FUNCTION__, $attributes);
|
| 322 |
}
|
| 328 |
'subscriber_id mediumint(9) NOT NULL,',
|
| 329 |
'queue_id mediumint(9) NOT NULL,',
|
| 330 |
'created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,',
|
| 331 |
+
'PRIMARY KEY (id),',
|
| 332 |
+
'KEY (queue_id)',
|
| 333 |
);
|
| 334 |
return $this->sqlify(__FUNCTION__, $attributes);
|
| 335 |
}
|
| 341 |
'subscriber_id mediumint(9) NOT NULL,',
|
| 342 |
'queue_id mediumint(9) NOT NULL,',
|
| 343 |
'created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,',
|
| 344 |
+
'PRIMARY KEY (id),',
|
| 345 |
+
'KEY (queue_id)',
|
| 346 |
);
|
| 347 |
return $this->sqlify(__FUNCTION__, $attributes);
|
| 348 |
}
|
lib/Models/Newsletter.php
CHANGED
|
@@ -249,14 +249,23 @@ class Newsletter extends Model {
|
|
| 249 |
)->select_expr(MP_NEWSLETTER_OPTION_TABLE.'.value');
|
| 250 |
}
|
| 251 |
|
| 252 |
-
function getQueue() {
|
| 253 |
-
return SendingQueue::
|
|
|
|
| 254 |
->orderByDesc('updated_at')
|
| 255 |
->findOne();
|
| 256 |
}
|
| 257 |
|
| 258 |
function withSendingQueue() {
|
| 259 |
-
$queue = $this->getQueue(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 260 |
if($queue === false) {
|
| 261 |
$this->queue = false;
|
| 262 |
} else {
|
|
@@ -285,11 +294,7 @@ class Newsletter extends Model {
|
|
| 285 |
|
| 286 |
function withStatistics() {
|
| 287 |
$statistics = $this->getStatistics();
|
| 288 |
-
|
| 289 |
-
$this->statistics = false;
|
| 290 |
-
} else {
|
| 291 |
-
$this->statistics = $statistics->asArray();
|
| 292 |
-
}
|
| 293 |
return $this;
|
| 294 |
}
|
| 295 |
|
|
@@ -299,42 +304,42 @@ class Newsletter extends Model {
|
|
| 299 |
}
|
| 300 |
|
| 301 |
function getStatistics() {
|
| 302 |
-
$statistics_query = SendingQueue::tableAlias('queues')
|
| 303 |
-
->selectExpr(
|
| 304 |
-
'COUNT(DISTINCT(clicks.subscriber_id)) as clicked, ' .
|
| 305 |
-
'COUNT(DISTINCT(opens.subscriber_id)) as opened, ' .
|
| 306 |
-
'COUNT(DISTINCT(unsubscribes.subscriber_id)) as unsubscribed '
|
| 307 |
-
)
|
| 308 |
-
->leftOuterJoin(
|
| 309 |
-
MP_STATISTICS_CLICKS_TABLE,
|
| 310 |
-
'queues.id = clicks.queue_id',
|
| 311 |
-
'clicks'
|
| 312 |
-
)
|
| 313 |
-
->leftOuterJoin(
|
| 314 |
-
MP_STATISTICS_OPENS_TABLE,
|
| 315 |
-
'queues.id = opens.queue_id',
|
| 316 |
-
'opens'
|
| 317 |
-
)
|
| 318 |
-
->leftOuterJoin(
|
| 319 |
-
MP_STATISTICS_UNSUBSCRIBES_TABLE,
|
| 320 |
-
'queues.id = unsubscribes.queue_id',
|
| 321 |
-
'unsubscribes'
|
| 322 |
-
);
|
| 323 |
-
|
| 324 |
if($this->type === self::TYPE_WELCOME) {
|
| 325 |
-
|
| 326 |
-
|
| 327 |
-
|
| 328 |
-
->findOne();
|
| 329 |
} else {
|
| 330 |
if($this->queue === false) {
|
| 331 |
return false;
|
| 332 |
} else {
|
| 333 |
-
|
| 334 |
-
|
| 335 |
-
->findOne();
|
| 336 |
}
|
| 337 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 338 |
}
|
| 339 |
|
| 340 |
static function search($orm, $search = '') {
|
| 249 |
)->select_expr(MP_NEWSLETTER_OPTION_TABLE.'.value');
|
| 250 |
}
|
| 251 |
|
| 252 |
+
function getQueue($columns = '*') {
|
| 253 |
+
return SendingQueue::select($columns)
|
| 254 |
+
->where('newsletter_id', $this->id)
|
| 255 |
->orderByDesc('updated_at')
|
| 256 |
->findOne();
|
| 257 |
}
|
| 258 |
|
| 259 |
function withSendingQueue() {
|
| 260 |
+
$queue = $this->getQueue(array(
|
| 261 |
+
'id',
|
| 262 |
+
'newsletter_id',
|
| 263 |
+
'newsletter_rendered_subject',
|
| 264 |
+
'status',
|
| 265 |
+
'count_processed',
|
| 266 |
+
'count_total',
|
| 267 |
+
'scheduled_at'
|
| 268 |
+
));
|
| 269 |
if($queue === false) {
|
| 270 |
$this->queue = false;
|
| 271 |
} else {
|
| 294 |
|
| 295 |
function withStatistics() {
|
| 296 |
$statistics = $this->getStatistics();
|
| 297 |
+
$this->statistics = $statistics;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 298 |
return $this;
|
| 299 |
}
|
| 300 |
|
| 304 |
}
|
| 305 |
|
| 306 |
function getStatistics() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 307 |
if($this->type === self::TYPE_WELCOME) {
|
| 308 |
+
$where = '`queue_id` IN (SELECT `id` FROM ' . MP_SENDING_QUEUES_TABLE . '
|
| 309 |
+
WHERE `newsletter_id` = ? AND `status` = ?)';
|
| 310 |
+
$where_params = array($this->id, SendingQueue::STATUS_COMPLETED);
|
|
|
|
| 311 |
} else {
|
| 312 |
if($this->queue === false) {
|
| 313 |
return false;
|
| 314 |
} else {
|
| 315 |
+
$where = '`queue_id` = ?';
|
| 316 |
+
$where_params = array($this->queue['id']);
|
|
|
|
| 317 |
}
|
| 318 |
}
|
| 319 |
+
|
| 320 |
+
$clicks = StatisticsClicks::selectExpr(
|
| 321 |
+
'COUNT(DISTINCT subscriber_id) as cnt'
|
| 322 |
+
)
|
| 323 |
+
->whereRaw($where, $where_params)
|
| 324 |
+
->findOne();
|
| 325 |
+
|
| 326 |
+
$opens = StatisticsOpens::selectExpr(
|
| 327 |
+
'COUNT(DISTINCT subscriber_id) as cnt'
|
| 328 |
+
)
|
| 329 |
+
->whereRaw($where, $where_params)
|
| 330 |
+
->findOne();
|
| 331 |
+
|
| 332 |
+
$unsubscribes = StatisticsUnsubscribes::selectExpr(
|
| 333 |
+
'COUNT(DISTINCT subscriber_id) as cnt'
|
| 334 |
+
)
|
| 335 |
+
->whereRaw($where, $where_params)
|
| 336 |
+
->findOne();
|
| 337 |
+
|
| 338 |
+
return array(
|
| 339 |
+
'clicked' => !empty($clicks->cnt) ? $clicks->cnt : 0,
|
| 340 |
+
'opened' => !empty($opens->cnt) ? $opens->cnt : 0,
|
| 341 |
+
'unsubscribed' => !empty($unsubscribes->cnt) ? $unsubscribes->cnt : 0
|
| 342 |
+
);
|
| 343 |
}
|
| 344 |
|
| 345 |
static function search($orm, $search = '') {
|
lib/Models/Subscriber.php
CHANGED
|
@@ -170,21 +170,7 @@ class Subscriber extends Model {
|
|
| 170 |
static function subscribe($subscriber_data = array(), $segment_ids = array()) {
|
| 171 |
// filter out keys from the subscriber_data array
|
| 172 |
// that should not be editable when subscribing
|
| 173 |
-
$
|
| 174 |
-
'id',
|
| 175 |
-
'wp_user_id',
|
| 176 |
-
'status',
|
| 177 |
-
'subscribed_ip',
|
| 178 |
-
'confirmed_ip',
|
| 179 |
-
'confirmed_at',
|
| 180 |
-
'created_at',
|
| 181 |
-
'updated_at',
|
| 182 |
-
'deleted_at'
|
| 183 |
-
);
|
| 184 |
-
$subscriber_data = array_diff_key(
|
| 185 |
-
$subscriber_data,
|
| 186 |
-
array_flip($reserved_columns)
|
| 187 |
-
);
|
| 188 |
|
| 189 |
$signup_confirmation_enabled = (bool)Setting::getValue(
|
| 190 |
'signup_confirmation.enabled'
|
|
@@ -209,14 +195,17 @@ class Subscriber extends Model {
|
|
| 209 |
|
| 210 |
$subscriber = self::findOne($subscriber_data['email']);
|
| 211 |
|
| 212 |
-
if($subscriber === false) {
|
| 213 |
-
// create new subscriber
|
| 214 |
$subscriber = self::createOrUpdate($subscriber_data);
|
| 215 |
if($subscriber->getErrors() !== false) {
|
| 216 |
return $subscriber;
|
| 217 |
}
|
| 218 |
|
| 219 |
$subscriber = self::findOne($subscriber->id);
|
|
|
|
|
|
|
|
|
|
| 220 |
}
|
| 221 |
|
| 222 |
// restore trashed subscriber
|
|
@@ -250,6 +239,26 @@ class Subscriber extends Model {
|
|
| 250 |
return $subscriber;
|
| 251 |
}
|
| 252 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 253 |
static function search($orm, $search = '') {
|
| 254 |
if(strlen(trim($search) === 0)) {
|
| 255 |
return $orm;
|
|
@@ -485,6 +494,9 @@ class Subscriber extends Model {
|
|
| 485 |
}
|
| 486 |
}
|
| 487 |
|
|
|
|
|
|
|
|
|
|
| 488 |
$old_status = false;
|
| 489 |
$new_status = false;
|
| 490 |
|
|
@@ -587,6 +599,20 @@ class Subscriber extends Model {
|
|
| 587 |
));
|
| 588 |
}
|
| 589 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 590 |
static function bulkAddToList($orm, $data = array()) {
|
| 591 |
$segment_id = (isset($data['segment_id']) ? (int)$data['segment_id'] : 0);
|
| 592 |
$segment = Segment::findOne($segment_id);
|
|
@@ -812,6 +838,7 @@ class Subscriber extends Model {
|
|
| 812 |
'UPDATE `' . self::$_table . '` ' .
|
| 813 |
'SET ' . implode(', ', $sql('statement')) . ' '.
|
| 814 |
(($updated_at) ? ', updated_at = "' . $updated_at . '" ' : '') .
|
|
|
|
| 815 |
'WHERE email IN ' .
|
| 816 |
'(' . rtrim(str_repeat('?,', count($subscribers)), ',') . ')',
|
| 817 |
array_merge(
|
| 170 |
static function subscribe($subscriber_data = array(), $segment_ids = array()) {
|
| 171 |
// filter out keys from the subscriber_data array
|
| 172 |
// that should not be editable when subscribing
|
| 173 |
+
$subscriber_data = self::filterOutReservedColumns($subscriber_data);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 174 |
|
| 175 |
$signup_confirmation_enabled = (bool)Setting::getValue(
|
| 176 |
'signup_confirmation.enabled'
|
| 195 |
|
| 196 |
$subscriber = self::findOne($subscriber_data['email']);
|
| 197 |
|
| 198 |
+
if($subscriber === false || !$signup_confirmation_enabled) {
|
| 199 |
+
// create new subscriber or update if no confirmation is required
|
| 200 |
$subscriber = self::createOrUpdate($subscriber_data);
|
| 201 |
if($subscriber->getErrors() !== false) {
|
| 202 |
return $subscriber;
|
| 203 |
}
|
| 204 |
|
| 205 |
$subscriber = self::findOne($subscriber->id);
|
| 206 |
+
} else {
|
| 207 |
+
// store subscriber data to be updated after confirmation
|
| 208 |
+
$subscriber->setUnconfirmedData($subscriber_data);
|
| 209 |
}
|
| 210 |
|
| 211 |
// restore trashed subscriber
|
| 239 |
return $subscriber;
|
| 240 |
}
|
| 241 |
|
| 242 |
+
static function filterOutReservedColumns(array $subscriber_data) {
|
| 243 |
+
$reserved_columns = array(
|
| 244 |
+
'id',
|
| 245 |
+
'wp_user_id',
|
| 246 |
+
'status',
|
| 247 |
+
'subscribed_ip',
|
| 248 |
+
'confirmed_ip',
|
| 249 |
+
'confirmed_at',
|
| 250 |
+
'created_at',
|
| 251 |
+
'updated_at',
|
| 252 |
+
'deleted_at',
|
| 253 |
+
'unconfirmed_data'
|
| 254 |
+
);
|
| 255 |
+
$subscriber_data = array_diff_key(
|
| 256 |
+
$subscriber_data,
|
| 257 |
+
array_flip($reserved_columns)
|
| 258 |
+
);
|
| 259 |
+
return $subscriber_data;
|
| 260 |
+
}
|
| 261 |
+
|
| 262 |
static function search($orm, $search = '') {
|
| 263 |
if(strlen(trim($search) === 0)) {
|
| 264 |
return $orm;
|
| 494 |
}
|
| 495 |
}
|
| 496 |
|
| 497 |
+
// wipe any unconfirmed data at this point
|
| 498 |
+
$data['unconfirmed_data'] = null;
|
| 499 |
+
|
| 500 |
$old_status = false;
|
| 501 |
$new_status = false;
|
| 502 |
|
| 599 |
));
|
| 600 |
}
|
| 601 |
|
| 602 |
+
function setUnconfirmedData(array $subscriber_data) {
|
| 603 |
+
$subscriber_data = self::filterOutReservedColumns($subscriber_data);
|
| 604 |
+
$this->unconfirmed_data = json_encode($subscriber_data);
|
| 605 |
+
}
|
| 606 |
+
|
| 607 |
+
function getUnconfirmedData() {
|
| 608 |
+
if(!empty($this->unconfirmed_data)) {
|
| 609 |
+
$subscriber_data = json_decode($this->unconfirmed_data, true);
|
| 610 |
+
$subscriber_data = self::filterOutReservedColumns((array)$subscriber_data);
|
| 611 |
+
return $subscriber_data;
|
| 612 |
+
}
|
| 613 |
+
return null;
|
| 614 |
+
}
|
| 615 |
+
|
| 616 |
static function bulkAddToList($orm, $data = array()) {
|
| 617 |
$segment_id = (isset($data['segment_id']) ? (int)$data['segment_id'] : 0);
|
| 618 |
$segment = Segment::findOne($segment_id);
|
| 838 |
'UPDATE `' . self::$_table . '` ' .
|
| 839 |
'SET ' . implode(', ', $sql('statement')) . ' '.
|
| 840 |
(($updated_at) ? ', updated_at = "' . $updated_at . '" ' : '') .
|
| 841 |
+
', unconfirmed_data = NULL ' .
|
| 842 |
'WHERE email IN ' .
|
| 843 |
'(' . rtrim(str_repeat('?,', count($subscribers)), ',') . ')',
|
| 844 |
array_merge(
|
lib/Newsletter/Editor/PostContentManager.php
CHANGED
|
@@ -6,6 +6,7 @@ if(!defined('ABSPATH')) exit;
|
|
| 6 |
class PostContentManager {
|
| 7 |
|
| 8 |
const MAX_EXCERPT_LENGTH = 60;
|
|
|
|
| 9 |
|
| 10 |
function getContent($post, $displayType) {
|
| 11 |
if($displayType === 'titleOnly') {
|
|
@@ -42,7 +43,7 @@ class PostContentManager {
|
|
| 42 |
'<h2>', '<h3>', '<a>', '<ul>', '<ol>', '<li>', '<br>'
|
| 43 |
);
|
| 44 |
$content = strip_tags($content, implode('', $tags_not_being_stripped));
|
| 45 |
-
$content = wpautop($content);
|
| 46 |
|
| 47 |
return $content;
|
| 48 |
}
|
|
@@ -91,4 +92,4 @@ class PostContentManager {
|
|
| 91 |
return $content;
|
| 92 |
}
|
| 93 |
|
| 94 |
-
}
|
| 6 |
class PostContentManager {
|
| 7 |
|
| 8 |
const MAX_EXCERPT_LENGTH = 60;
|
| 9 |
+
const WP_POST_CLASS = 'mailpoet_wp_post';
|
| 10 |
|
| 11 |
function getContent($post, $displayType) {
|
| 12 |
if($displayType === 'titleOnly') {
|
| 43 |
'<h2>', '<h3>', '<a>', '<ul>', '<ol>', '<li>', '<br>'
|
| 44 |
);
|
| 45 |
$content = strip_tags($content, implode('', $tags_not_being_stripped));
|
| 46 |
+
$content = str_replace('<p', '<p class="' . self::WP_POST_CLASS .'"', wpautop($content));
|
| 47 |
|
| 48 |
return $content;
|
| 49 |
}
|
| 92 |
return $content;
|
| 93 |
}
|
| 94 |
|
| 95 |
+
}
|
lib/Newsletter/Editor/StructureTransformer.php
CHANGED
|
@@ -72,7 +72,7 @@ class StructureTransformer {
|
|
| 72 |
} else {
|
| 73 |
return array(
|
| 74 |
'type' => 'text',
|
| 75 |
-
'text' => $item->toString()
|
| 76 |
);
|
| 77 |
}
|
| 78 |
|
| 72 |
} else {
|
| 73 |
return array(
|
| 74 |
'type' => 'text',
|
| 75 |
+
'text' => $item->toString()
|
| 76 |
);
|
| 77 |
}
|
| 78 |
|
lib/Newsletter/Renderer/Blocks/Text.php
CHANGED
|
@@ -1,6 +1,7 @@
|
|
| 1 |
<?php
|
| 2 |
namespace MailPoet\Newsletter\Renderer\Blocks;
|
| 3 |
|
|
|
|
| 4 |
use MailPoet\Newsletter\Renderer\StylesHelper;
|
| 5 |
|
| 6 |
class Text {
|
|
@@ -111,9 +112,16 @@ class Text {
|
|
| 111 |
'<br /><br />' :
|
| 112 |
'';
|
| 113 |
// if this element is followed by a list, add single line break
|
| 114 |
-
$line_breaks = ($next_element && preg_match('/<li
|
| 115 |
'<br />' :
|
| 116 |
$line_breaks;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 117 |
$paragraph->html('
|
| 118 |
<tr>
|
| 119 |
<td class="mailpoet_paragraph" style="word-break:break-word;word-wrap:break-word;' . $style . '">
|
| 1 |
<?php
|
| 2 |
namespace MailPoet\Newsletter\Renderer\Blocks;
|
| 3 |
|
| 4 |
+
use MailPoet\Newsletter\Editor\PostContentManager;
|
| 5 |
use MailPoet\Newsletter\Renderer\StylesHelper;
|
| 6 |
|
| 7 |
class Text {
|
| 112 |
'<br /><br />' :
|
| 113 |
'';
|
| 114 |
// if this element is followed by a list, add single line break
|
| 115 |
+
$line_breaks = ($next_element && preg_match('/<li/i', $next_element->getOuterText())) ?
|
| 116 |
'<br />' :
|
| 117 |
$line_breaks;
|
| 118 |
+
if($paragraph->hasClass(PostContentManager::WP_POST_CLASS)) {
|
| 119 |
+
$paragraph->removeClass(PostContentManager::WP_POST_CLASS);
|
| 120 |
+
// if this element is followed by a paragraph, add double line breaks
|
| 121 |
+
$line_breaks = ($next_element && preg_match('/<p/i', $next_element->getOuterText())) ?
|
| 122 |
+
'<br /><br />' :
|
| 123 |
+
$line_breaks;
|
| 124 |
+
}
|
| 125 |
$paragraph->html('
|
| 126 |
<tr>
|
| 127 |
<td class="mailpoet_paragraph" style="word-break:break-word;word-wrap:break-word;' . $style . '">
|
lib/Subscription/Pages.php
CHANGED
|
@@ -57,11 +57,21 @@ class Pages {
|
|
| 57 |
}
|
| 58 |
|
| 59 |
function confirm() {
|
| 60 |
-
if($this->subscriber
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 65 |
}
|
| 66 |
}
|
| 67 |
|
| 57 |
}
|
| 58 |
|
| 59 |
function confirm() {
|
| 60 |
+
if($this->subscriber === false) {
|
| 61 |
+
return false;
|
| 62 |
+
}
|
| 63 |
+
|
| 64 |
+
$subscriber_data = $this->subscriber->getUnconfirmedData();
|
| 65 |
+
|
| 66 |
+
$this->subscriber->status = Subscriber::STATUS_SUBSCRIBED;
|
| 67 |
+
$this->subscriber->confirmed_ip = $_SERVER['REMOTE_ADDR'];
|
| 68 |
+
$this->subscriber->setExpr('confirmed_at', 'NOW()');
|
| 69 |
+
$this->subscriber->unconfirmed_data = null;
|
| 70 |
+
$this->subscriber->save();
|
| 71 |
+
|
| 72 |
+
// update subscriber from stored data after confirmation
|
| 73 |
+
if(!empty($subscriber_data)) {
|
| 74 |
+
Subscriber::createOrUpdate($subscriber_data);
|
| 75 |
}
|
| 76 |
}
|
| 77 |
|
mailpoet.php
CHANGED
|
@@ -5,7 +5,7 @@ use MailPoet\Config\Initializer;
|
|
| 5 |
|
| 6 |
/*
|
| 7 |
* Plugin Name: MailPoet
|
| 8 |
-
* Version: 3.0.0-beta.
|
| 9 |
* Plugin URI: http://www.mailpoet.com
|
| 10 |
* Description: Create and send beautiful email newsletters, autoresponders, and post notifications without leaving WordPress. This is a beta version of our brand new plugin!
|
| 11 |
* Author: MailPoet
|
|
@@ -24,7 +24,7 @@ use MailPoet\Config\Initializer;
|
|
| 24 |
$mailpoet_loader = dirname(__FILE__) . '/vendor/autoload.php';
|
| 25 |
if(file_exists($mailpoet_loader)) {
|
| 26 |
require $mailpoet_loader;
|
| 27 |
-
define('MAILPOET_VERSION', '3.0.0-beta.
|
| 28 |
$initializer = new Initializer(
|
| 29 |
array(
|
| 30 |
'file' => __FILE__,
|
| 5 |
|
| 6 |
/*
|
| 7 |
* Plugin Name: MailPoet
|
| 8 |
+
* Version: 3.0.0-beta.11
|
| 9 |
* Plugin URI: http://www.mailpoet.com
|
| 10 |
* Description: Create and send beautiful email newsletters, autoresponders, and post notifications without leaving WordPress. This is a beta version of our brand new plugin!
|
| 11 |
* Author: MailPoet
|
| 24 |
$mailpoet_loader = dirname(__FILE__) . '/vendor/autoload.php';
|
| 25 |
if(file_exists($mailpoet_loader)) {
|
| 26 |
require $mailpoet_loader;
|
| 27 |
+
define('MAILPOET_VERSION', '3.0.0-beta.11');
|
| 28 |
$initializer = new Initializer(
|
| 29 |
array(
|
| 30 |
'file' => __FILE__,
|
readme.txt
CHANGED
|
@@ -3,7 +3,7 @@ Contributors: mailpoet, wysija
|
|
| 3 |
Tags: newsletter, email, welcome email, post notification, autoresponder, mailchimp, signup, smtp
|
| 4 |
Requires at least: 4.6
|
| 5 |
Tested up to: 4.7
|
| 6 |
-
Stable tag: 3.0.0-beta.
|
| 7 |
Create and send beautiful emails and newsletters from WordPress.
|
| 8 |
|
| 9 |
== Description ==
|
|
@@ -83,6 +83,14 @@ Our [support site](https://docs.mailpoet.com/) has plenty of articles. You can w
|
|
| 83 |
|
| 84 |
== Changelog ==
|
| 85 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 86 |
= 3.0.0-beta.10 - 2016-12-27 =
|
| 87 |
* Improved: newsletter is saved prior to sending an email preview;
|
| 88 |
* Improved: subscription management page conditionally displays the "bounced" status;
|
| 3 |
Tags: newsletter, email, welcome email, post notification, autoresponder, mailchimp, signup, smtp
|
| 4 |
Requires at least: 4.6
|
| 5 |
Tested up to: 4.7
|
| 6 |
+
Stable tag: 3.0.0-beta.11
|
| 7 |
Create and send beautiful emails and newsletters from WordPress.
|
| 8 |
|
| 9 |
== Description ==
|
| 83 |
|
| 84 |
== Changelog ==
|
| 85 |
|
| 86 |
+
= 3.0.0-beta.11 - 2016-12-31 =
|
| 87 |
+
* Improved: newsletters' statistics are generated in a split second;
|
| 88 |
+
* Fixed: subscribers' data is properly saved on repeat and/or multiple subscription attempts;
|
| 89 |
+
* Fixed: WP posts are displayed/rendered with proper line breaks and spaces;
|
| 90 |
+
* Fixed: preview-by-email works once again;
|
| 91 |
+
* Wished: 2017 sees the release of the fantastic MailPoet 3 and the super-duper MailPoet Sending Service;
|
| 92 |
+
* Wished: 2017 turns out to be an amazing year for all of our beloved and new users!
|
| 93 |
+
|
| 94 |
= 3.0.0-beta.10 - 2016-12-27 =
|
| 95 |
* Improved: newsletter is saved prior to sending an email preview;
|
| 96 |
* Improved: subscription management page conditionally displays the "bounced" status;
|
vendor/autoload.php
CHANGED
|
@@ -4,4 +4,4 @@
|
|
| 4 |
|
| 5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
| 6 |
|
| 7 |
-
return
|
| 4 |
|
| 5 |
require_once __DIR__ . '/composer/autoload_real.php';
|
| 6 |
|
| 7 |
+
return ComposerAutoloaderInit42e5829133c754f10db8482d3d3bddd5::getLoader();
|
vendor/composer/autoload_real.php
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
|
| 3 |
// autoload_real.php @generated by Composer
|
| 4 |
|
| 5 |
-
class
|
| 6 |
{
|
| 7 |
private static $loader;
|
| 8 |
|
|
@@ -19,15 +19,15 @@ class ComposerAutoloaderInit9478c93be8e1a8371b13c6b1b2795224
|
|
| 19 |
return self::$loader;
|
| 20 |
}
|
| 21 |
|
| 22 |
-
spl_autoload_register(array('
|
| 23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
| 24 |
-
spl_autoload_unregister(array('
|
| 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\
|
| 31 |
} else {
|
| 32 |
$map = require __DIR__ . '/autoload_namespaces.php';
|
| 33 |
foreach ($map as $namespace => $path) {
|
|
@@ -48,19 +48,19 @@ class ComposerAutoloaderInit9478c93be8e1a8371b13c6b1b2795224
|
|
| 48 |
$loader->register(true);
|
| 49 |
|
| 50 |
if ($useStaticLoader) {
|
| 51 |
-
$includeFiles = Composer\Autoload\
|
| 52 |
} else {
|
| 53 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
| 54 |
}
|
| 55 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
| 56 |
-
|
| 57 |
}
|
| 58 |
|
| 59 |
return $loader;
|
| 60 |
}
|
| 61 |
}
|
| 62 |
|
| 63 |
-
function
|
| 64 |
{
|
| 65 |
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
| 66 |
require $file;
|
| 2 |
|
| 3 |
// autoload_real.php @generated by Composer
|
| 4 |
|
| 5 |
+
class ComposerAutoloaderInit42e5829133c754f10db8482d3d3bddd5
|
| 6 |
{
|
| 7 |
private static $loader;
|
| 8 |
|
| 19 |
return self::$loader;
|
| 20 |
}
|
| 21 |
|
| 22 |
+
spl_autoload_register(array('ComposerAutoloaderInit42e5829133c754f10db8482d3d3bddd5', 'loadClassLoader'), true, true);
|
| 23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
| 24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit42e5829133c754f10db8482d3d3bddd5', '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\ComposerStaticInit42e5829133c754f10db8482d3d3bddd5::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\ComposerStaticInit42e5829133c754f10db8482d3d3bddd5::$files;
|
| 52 |
} else {
|
| 53 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
| 54 |
}
|
| 55 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
| 56 |
+
composerRequire42e5829133c754f10db8482d3d3bddd5($fileIdentifier, $file);
|
| 57 |
}
|
| 58 |
|
| 59 |
return $loader;
|
| 60 |
}
|
| 61 |
}
|
| 62 |
|
| 63 |
+
function composerRequire42e5829133c754f10db8482d3d3bddd5($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
|
| 8 |
{
|
| 9 |
public static $files = array (
|
| 10 |
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
|
|
@@ -555,10 +555,10 @@ class ComposerStaticInit9478c93be8e1a8371b13c6b1b2795224
|
|
| 555 |
public static function getInitializer(ClassLoader $loader)
|
| 556 |
{
|
| 557 |
return \Closure::bind(function () use ($loader) {
|
| 558 |
-
$loader->prefixLengthsPsr4 =
|
| 559 |
-
$loader->prefixDirsPsr4 =
|
| 560 |
-
$loader->prefixesPsr0 =
|
| 561 |
-
$loader->classMap =
|
| 562 |
|
| 563 |
}, null, ClassLoader::class);
|
| 564 |
}
|
| 4 |
|
| 5 |
namespace Composer\Autoload;
|
| 6 |
|
| 7 |
+
class ComposerStaticInit42e5829133c754f10db8482d3d3bddd5
|
| 8 |
{
|
| 9 |
public static $files = array (
|
| 10 |
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
|
| 555 |
public static function getInitializer(ClassLoader $loader)
|
| 556 |
{
|
| 557 |
return \Closure::bind(function () use ($loader) {
|
| 558 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInit42e5829133c754f10db8482d3d3bddd5::$prefixLengthsPsr4;
|
| 559 |
+
$loader->prefixDirsPsr4 = ComposerStaticInit42e5829133c754f10db8482d3d3bddd5::$prefixDirsPsr4;
|
| 560 |
+
$loader->prefixesPsr0 = ComposerStaticInit42e5829133c754f10db8482d3d3bddd5::$prefixesPsr0;
|
| 561 |
+
$loader->classMap = ComposerStaticInit42e5829133c754f10db8482d3d3bddd5::$classMap;
|
| 562 |
|
| 563 |
}, null, ClassLoader::class);
|
| 564 |
}
|
views/update.html
CHANGED
|
@@ -14,7 +14,7 @@
|
|
| 14 |
|
| 15 |
<p class="about-text"><%= __("Thank you for helping us test and improve this new version of MailPoet. You're one of our extra-special beta testers. We really appreciate your help!") %>
|
| 16 |
</p>
|
| 17 |
-
<div style="position: absolute; top: .2em; right: 0;"><img src="<%= image_url('welcome_template/mailpoet-logo.png') %>" alt="MailPoet Logo" /></div>
|
| 18 |
|
| 19 |
<h2 class="nav-tab-wrapper wp-clearfix">
|
| 20 |
<a href="admin.php?page=mailpoet-welcome" class="nav-tab"><%= __('Welcome') %></a>
|
| 14 |
|
| 15 |
<p class="about-text"><%= __("Thank you for helping us test and improve this new version of MailPoet. You're one of our extra-special beta testers. We really appreciate your help!") %>
|
| 16 |
</p>
|
| 17 |
+
<div style="position: absolute; top: .2em; right: 0;"><img style="border: 0 !important;" src="<%= image_url('welcome_template/mailpoet-logo.png') %>" alt="MailPoet Logo" /></div>
|
| 18 |
|
| 19 |
<h2 class="nav-tab-wrapper wp-clearfix">
|
| 20 |
<a href="admin.php?page=mailpoet-welcome" class="nav-tab"><%= __('Welcome') %></a>
|
views/welcome.html
CHANGED
|
@@ -23,7 +23,7 @@
|
|
| 23 |
|
| 24 |
<p class="about-text"><%= __("Thank you for helping us test and improve this new version of MailPoet. You're one of our extra-special beta testers. We really appreciate your help!") %>
|
| 25 |
</p>
|
| 26 |
-
<div style="position: absolute; top: .2em; right: 0;"><img src="<%= image_url('welcome_template/mailpoet-logo.png') %>" alt="<%= __('MailPoet Logo') %>" /></div>
|
| 27 |
|
| 28 |
<h2 class="nav-tab-wrapper wp-clearfix">
|
| 29 |
<a href="admin.php?page=mailpoet-welcome" class="nav-tab nav-tab-active"><%= __('Welcome') %></a>
|
| 23 |
|
| 24 |
<p class="about-text"><%= __("Thank you for helping us test and improve this new version of MailPoet. You're one of our extra-special beta testers. We really appreciate your help!") %>
|
| 25 |
</p>
|
| 26 |
+
<div style="position: absolute; top: .2em; right: 0;"><img style="border: 0 !important;" src="<%= image_url('welcome_template/mailpoet-logo.png') %>" alt="<%= __('MailPoet Logo') %>" /></div>
|
| 27 |
|
| 28 |
<h2 class="nav-tab-wrapper wp-clearfix">
|
| 29 |
<a href="admin.php?page=mailpoet-welcome" class="nav-tab nav-tab-active"><%= __('Welcome') %></a>
|
