Version Description
- 2018-03-06 =
- Premium: bulk actions can now be executed on subscribers belonging to a selected segment;
- Improved: a proper error page is displayed if user credentials can't be verified when clicking a tracked newsletter link. Thanks, Bernhard;
- Fixed: MailPoet polyfills missing mbstring function for WordPress core. Thanks Dioni!
Download this release
Release Info
| Developer | wysija |
| Plugin | |
| Version | 3.5.0 |
| Comparing to | |
| See all releases | |
Code changes from version 3.4.4 to 3.5.0
- assets/css/{admin.3eda5330.css → admin.fb9afbf3.css} +1 -1
- assets/css/manifest.json +1 -1
- assets/js/{admin.8b417da7.js → admin.7f9ea640.js} +12 -11
- assets/js/{admin_vendor.34b14aa4.js → admin_vendor.b56c5496.js} +13 -13
- assets/js/{form_editor.ac341877.js → form_editor.20737db0.js} +16 -11
- assets/js/{mailpoet.3a0d1a00.js → mailpoet.4267d9a6.js} +1 -2
- assets/js/manifest.json +5 -5
- assets/js/{vendor.279e244a.js → vendor.79f8bb9d.js} +2 -2
- lang/mailpoet-ca.mo +0 -0
- lang/mailpoet-da_DK.mo +0 -0
- lang/mailpoet-de_DE.mo +0 -0
- lang/mailpoet-en_GB.mo +0 -0
- lang/mailpoet-es_ES.mo +0 -0
- lang/mailpoet-fa_IR.mo +0 -0
- lang/mailpoet-fr_CA.mo +0 -0
- lang/mailpoet-fr_FR.mo +0 -0
- lang/mailpoet-it_IT.mo +0 -0
- lang/mailpoet-ja.mo +0 -0
- lang/mailpoet-nl_NL.mo +0 -0
- lang/mailpoet-pl_PL.mo +0 -0
- lang/mailpoet-pt_BR.mo +0 -0
- lang/mailpoet-pt_PT.mo +0 -0
- lang/mailpoet-ru_RU.mo +0 -0
- lang/mailpoet-sq.mo +0 -0
- lang/mailpoet-sv_SE.mo +0 -0
- lang/mailpoet-tr_TR.mo +0 -0
- lang/mailpoet.pot +21 -17
- lib/API/JSON/v1/Subscribers.php +7 -6
- lib/Models/Model.php +1 -1
- lib/Models/SubscriberSegment.php +2 -2
- lib/Router/Endpoints/Track.php +9 -1
- lib/Segments/BulkAction.php +57 -0
- lib/Statistics/Track/Clicks.php +1 -0
- lib/Util/Polyfills.php +6 -0
- mailpoet.php +2 -2
- readme.txt +6 -1
- vendor/autoload.php +1 -1
- vendor/composer/autoload_classmap.php +1 -0
- vendor/composer/autoload_real.php +7 -7
- vendor/composer/autoload_static.php +6 -5
- views/subscribers/importExport/export.html +6 -0
assets/css/{admin.3eda5330.css → admin.fb9afbf3.css}
RENAMED
|
@@ -2591,7 +2591,6 @@ rgba(0,0,0,0.3)
|
|
| 2591 |
border-radius: 3px;
|
| 2592 |
letter-spacing: 1px;
|
| 2593 |
vertical-align: middle;
|
| 2594 |
-
white-space: nowrap;
|
| 2595 |
}
|
| 2596 |
.mailpoet_badge_excellent,
|
| 2597 |
.mailpoet_badge_teal {
|
|
@@ -2764,6 +2763,7 @@ rgba(0,0,0,0.3)
|
|
| 2764 |
margin: 0 0 0 10px;
|
| 2765 |
padding: 0 6px 0 6px;
|
| 2766 |
max-height: 21px;
|
|
|
|
| 2767 |
}
|
| 2768 |
.mailpoet_breadcrumb {
|
| 2769 |
font-size: 0.9em;
|
| 2591 |
border-radius: 3px;
|
| 2592 |
letter-spacing: 1px;
|
| 2593 |
vertical-align: middle;
|
|
|
|
| 2594 |
}
|
| 2595 |
.mailpoet_badge_excellent,
|
| 2596 |
.mailpoet_badge_teal {
|
| 2763 |
margin: 0 0 0 10px;
|
| 2764 |
padding: 0 6px 0 6px;
|
| 2765 |
max-height: 21px;
|
| 2766 |
+
white-space: nowrap;
|
| 2767 |
}
|
| 2768 |
.mailpoet_breadcrumb {
|
| 2769 |
font-size: 0.9em;
|
assets/css/manifest.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
{
|
| 2 |
"admin-global.css": "admin-global.673373a1.css",
|
| 3 |
-
"admin.css": "admin.
|
| 4 |
"importExport.css": "importExport.b3745466.css",
|
| 5 |
"newsletter_editor.css": "newsletter_editor.9cb620b4.css",
|
| 6 |
"public.css": "public.cae357df.css",
|
| 1 |
{
|
| 2 |
"admin-global.css": "admin-global.673373a1.css",
|
| 3 |
+
"admin.css": "admin.fb9afbf3.css",
|
| 4 |
"importExport.css": "importExport.b3745466.css",
|
| 5 |
"newsletter_editor.css": "newsletter_editor.9cb620b4.css",
|
| 6 |
"public.css": "public.cae357df.css",
|
assets/js/{admin.8b417da7.js → admin.7f9ea640.js}
RENAMED
|
@@ -1188,8 +1188,8 @@ webpackJsonp([0],[
|
|
| 1188 |
|
| 1189 |
return _underscore2['default'].map(window.mailpoet_automatic_emails, function (automaticEmail) {
|
| 1190 |
return {
|
| 1191 |
-
path: 'new/' + automaticEmail.
|
| 1192 |
-
name: automaticEmail.
|
| 1193 |
component: _newslettersTypesAutomatic_emailsEvents_listJsx2['default'],
|
| 1194 |
data: {
|
| 1195 |
automaticEmail: automaticEmail
|
|
@@ -1333,7 +1333,7 @@ webpackJsonp([0],[
|
|
| 1333 |
'a',
|
| 1334 |
{ className: 'button button-primary',
|
| 1335 |
disabled: disabled,
|
| 1336 |
-
onClick: !disabled ? _this2.setupNewsletter.bind(null, automaticEmail.
|
| 1337 |
},
|
| 1338 |
MailPoet.I18n.t('setUp')
|
| 1339 |
)
|
|
@@ -1345,7 +1345,7 @@ webpackJsonp([0],[
|
|
| 1345 |
},
|
| 1346 |
render: function render() {
|
| 1347 |
var defaultTypes = [{
|
| 1348 |
-
|
| 1349 |
title: MailPoet.I18n.t('regularNewsletterTypeTitle'),
|
| 1350 |
description: MailPoet.I18n.t('regularNewsletterTypeDescription'),
|
| 1351 |
action: (function () {
|
|
@@ -1356,7 +1356,7 @@ webpackJsonp([0],[
|
|
| 1356 |
);
|
| 1357 |
}).bind(this)()
|
| 1358 |
}, {
|
| 1359 |
-
|
| 1360 |
title: MailPoet.I18n.t('welcomeNewsletterTypeTitle'),
|
| 1361 |
description: MailPoet.I18n.t('welcomeNewsletterTypeDescription'),
|
| 1362 |
action: (function () {
|
|
@@ -1371,7 +1371,7 @@ webpackJsonp([0],[
|
|
| 1371 |
);
|
| 1372 |
})()
|
| 1373 |
}, {
|
| 1374 |
-
|
| 1375 |
title: MailPoet.I18n.t('postNotificationNewsletterTypeTitle'),
|
| 1376 |
description: MailPoet.I18n.t('postNotificationNewsletterTypeDescription'),
|
| 1377 |
action: (function () {
|
|
@@ -1400,7 +1400,7 @@ webpackJsonp([0],[
|
|
| 1400 |
types.map(function (type, index) {
|
| 1401 |
return React.createElement(
|
| 1402 |
'li',
|
| 1403 |
-
{ key: index, 'data-type': type.
|
| 1404 |
React.createElement(
|
| 1405 |
'div',
|
| 1406 |
null,
|
|
@@ -22043,7 +22043,7 @@ webpackJsonp([0],[
|
|
| 22043 |
email = test[1].trim();
|
| 22044 |
}
|
| 22045 |
// test for valid characters using WP's rule (https://core.trac.wordpress.org/browser/tags/4.7.3/src/wp-includes/formatting.php#L2902)
|
| 22046 |
-
if (!/^[a-zA-Z0-9
|
| 22047 |
return false;
|
| 22048 |
}
|
| 22049 |
return email;
|
|
@@ -22609,8 +22609,8 @@ webpackJsonp([0],[
|
|
| 22609 |
});
|
| 22610 |
|
| 22611 |
// start array index from 1
|
| 22612 |
-
Handlebars.registerHelper('calculate_index', function (
|
| 22613 |
-
var index = parseInt(
|
| 22614 |
// display filler data (e.g., ellipsis) if we've reached the maximum number of rows and
|
| 22615 |
// subscribers count is greater than the maximum number of rows we're displaying
|
| 22616 |
if (index === maxRowsToShow && subscribers.subscribersCount > (maxRowsToShow + 1)) {
|
|
@@ -23274,7 +23274,8 @@ webpackJsonp([0],[
|
|
| 23274 |
'email',
|
| 23275 |
'first_name',
|
| 23276 |
'last_name',
|
| 23277 |
-
'list_status'
|
|
|
|
| 23278 |
]).trigger('change');
|
| 23279 |
|
| 23280 |
nextStepButton.click(function nextClick() {
|
| 1188 |
|
| 1189 |
return _underscore2['default'].map(window.mailpoet_automatic_emails, function (automaticEmail) {
|
| 1190 |
return {
|
| 1191 |
+
path: 'new/' + automaticEmail.slug,
|
| 1192 |
+
name: automaticEmail.slug,
|
| 1193 |
component: _newslettersTypesAutomatic_emailsEvents_listJsx2['default'],
|
| 1194 |
data: {
|
| 1195 |
automaticEmail: automaticEmail
|
| 1333 |
'a',
|
| 1334 |
{ className: 'button button-primary',
|
| 1335 |
disabled: disabled,
|
| 1336 |
+
onClick: !disabled ? _this2.setupNewsletter.bind(null, automaticEmail.slug) : null
|
| 1337 |
},
|
| 1338 |
MailPoet.I18n.t('setUp')
|
| 1339 |
)
|
| 1345 |
},
|
| 1346 |
render: function render() {
|
| 1347 |
var defaultTypes = [{
|
| 1348 |
+
slug: 'standard',
|
| 1349 |
title: MailPoet.I18n.t('regularNewsletterTypeTitle'),
|
| 1350 |
description: MailPoet.I18n.t('regularNewsletterTypeDescription'),
|
| 1351 |
action: (function () {
|
| 1356 |
);
|
| 1357 |
}).bind(this)()
|
| 1358 |
}, {
|
| 1359 |
+
slug: 'welcome',
|
| 1360 |
title: MailPoet.I18n.t('welcomeNewsletterTypeTitle'),
|
| 1361 |
description: MailPoet.I18n.t('welcomeNewsletterTypeDescription'),
|
| 1362 |
action: (function () {
|
| 1371 |
);
|
| 1372 |
})()
|
| 1373 |
}, {
|
| 1374 |
+
slug: 'notification',
|
| 1375 |
title: MailPoet.I18n.t('postNotificationNewsletterTypeTitle'),
|
| 1376 |
description: MailPoet.I18n.t('postNotificationNewsletterTypeDescription'),
|
| 1377 |
action: (function () {
|
| 1400 |
types.map(function (type, index) {
|
| 1401 |
return React.createElement(
|
| 1402 |
'li',
|
| 1403 |
+
{ key: index, 'data-type': type.slug },
|
| 1404 |
React.createElement(
|
| 1405 |
'div',
|
| 1406 |
null,
|
| 22043 |
email = test[1].trim();
|
| 22044 |
}
|
| 22045 |
// test for valid characters using WP's rule (https://core.trac.wordpress.org/browser/tags/4.7.3/src/wp-includes/formatting.php#L2902)
|
| 22046 |
+
if (!/^[a-zA-Z0-9!#$%&'*+/=?^_`{|}~.-@]+$/.test(email)) {
|
| 22047 |
return false;
|
| 22048 |
}
|
| 22049 |
return email;
|
| 22609 |
});
|
| 22610 |
|
| 22611 |
// start array index from 1
|
| 22612 |
+
Handlebars.registerHelper('calculate_index', function (rawIndex) {
|
| 22613 |
+
var index = parseInt(rawIndex);
|
| 22614 |
// display filler data (e.g., ellipsis) if we've reached the maximum number of rows and
|
| 22615 |
// subscribers count is greater than the maximum number of rows we're displaying
|
| 22616 |
if (index === maxRowsToShow && subscribers.subscribersCount > (maxRowsToShow + 1)) {
|
| 23274 |
'email',
|
| 23275 |
'first_name',
|
| 23276 |
'last_name',
|
| 23277 |
+
'list_status',
|
| 23278 |
+
'global_status'
|
| 23279 |
]).trigger('change');
|
| 23280 |
|
| 23281 |
nextStepButton.click(function nextClick() {
|
assets/js/{admin_vendor.34b14aa4.js → admin_vendor.b56c5496.js}
RENAMED
|
@@ -59823,7 +59823,7 @@ webpackJsonp([1],[
|
|
| 59823 |
/* WEBPACK VAR INJECTION */(function(global) {"use strict";
|
| 59824 |
|
| 59825 |
if (!global["MailPoetLib"]) global["MailPoetLib"] = {};
|
| 59826 |
-
module.exports = global["MailPoetLib"]["
|
| 59827 |
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
|
| 59828 |
|
| 59829 |
/***/ },
|
|
@@ -59858,22 +59858,22 @@ webpackJsonp([1],[
|
|
| 59858 |
|
| 59859 |
var _underscore2 = _interopRequireDefault(_underscore);
|
| 59860 |
|
| 59861 |
-
var
|
| 59862 |
-
_inherits(
|
| 59863 |
|
| 59864 |
-
function
|
| 59865 |
-
_classCallCheck(this,
|
| 59866 |
|
| 59867 |
-
_get(Object.getPrototypeOf(
|
| 59868 |
this.automaticEmail = this.props.route.data.automaticEmail;
|
| 59869 |
this.automaticEmailEvents = this.automaticEmail.events;
|
| 59870 |
this.eventsConfigurator = this.eventsConfigurator.bind(this);
|
| 59871 |
}
|
| 59872 |
|
| 59873 |
-
_createClass(
|
| 59874 |
key: 'eventsConfigurator',
|
| 59875 |
-
value: function eventsConfigurator(
|
| 59876 |
-
this.props.router.push('new/' + this.automaticEmail.
|
| 59877 |
}
|
| 59878 |
}, {
|
| 59879 |
key: 'displayEvents',
|
|
@@ -59897,7 +59897,7 @@ webpackJsonp([1],[
|
|
| 59897 |
'a',
|
| 59898 |
{ className: 'button button-primary',
|
| 59899 |
disabled: disabled,
|
| 59900 |
-
onClick: !disabled ? _this.eventsConfigurator.bind(null, event.
|
| 59901 |
},
|
| 59902 |
event.actionButtonTitle || _mailpoet2['default'].I18n.t('setUp')
|
| 59903 |
);
|
|
@@ -59905,7 +59905,7 @@ webpackJsonp([1],[
|
|
| 59905 |
|
| 59906 |
return _react2['default'].createElement(
|
| 59907 |
'li',
|
| 59908 |
-
{ key: index, 'data-type': event.
|
| 59909 |
_react2['default'].createElement(
|
| 59910 |
'div',
|
| 59911 |
null,
|
|
@@ -59976,10 +59976,10 @@ webpackJsonp([1],[
|
|
| 59976 |
}
|
| 59977 |
}]);
|
| 59978 |
|
| 59979 |
-
return
|
| 59980 |
})(_react2['default'].Component);
|
| 59981 |
|
| 59982 |
-
module.exports =
|
| 59983 |
|
| 59984 |
/***/ },
|
| 59985 |
/* 539 */
|
| 59823 |
/* WEBPACK VAR INJECTION */(function(global) {"use strict";
|
| 59824 |
|
| 59825 |
if (!global["MailPoetLib"]) global["MailPoetLib"] = {};
|
| 59826 |
+
module.exports = global["MailPoetLib"]["AutomaticEmailEventsList"] = __webpack_require__(538);
|
| 59827 |
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
|
| 59828 |
|
| 59829 |
/***/ },
|
| 59858 |
|
| 59859 |
var _underscore2 = _interopRequireDefault(_underscore);
|
| 59860 |
|
| 59861 |
+
var AutomaticEmailEventsList = (function (_React$Component) {
|
| 59862 |
+
_inherits(AutomaticEmailEventsList, _React$Component);
|
| 59863 |
|
| 59864 |
+
function AutomaticEmailEventsList(props) {
|
| 59865 |
+
_classCallCheck(this, AutomaticEmailEventsList);
|
| 59866 |
|
| 59867 |
+
_get(Object.getPrototypeOf(AutomaticEmailEventsList.prototype), 'constructor', this).call(this, props);
|
| 59868 |
this.automaticEmail = this.props.route.data.automaticEmail;
|
| 59869 |
this.automaticEmailEvents = this.automaticEmail.events;
|
| 59870 |
this.eventsConfigurator = this.eventsConfigurator.bind(this);
|
| 59871 |
}
|
| 59872 |
|
| 59873 |
+
_createClass(AutomaticEmailEventsList, [{
|
| 59874 |
key: 'eventsConfigurator',
|
| 59875 |
+
value: function eventsConfigurator(eventSlug) {
|
| 59876 |
+
this.props.router.push('new/' + this.automaticEmail.slug + '/' + eventSlug + '/conditions');
|
| 59877 |
}
|
| 59878 |
}, {
|
| 59879 |
key: 'displayEvents',
|
| 59897 |
'a',
|
| 59898 |
{ className: 'button button-primary',
|
| 59899 |
disabled: disabled,
|
| 59900 |
+
onClick: !disabled ? _this.eventsConfigurator.bind(null, event.slug) : null
|
| 59901 |
},
|
| 59902 |
event.actionButtonTitle || _mailpoet2['default'].I18n.t('setUp')
|
| 59903 |
);
|
| 59905 |
|
| 59906 |
return _react2['default'].createElement(
|
| 59907 |
'li',
|
| 59908 |
+
{ key: index, 'data-type': event.slug },
|
| 59909 |
_react2['default'].createElement(
|
| 59910 |
'div',
|
| 59911 |
null,
|
| 59976 |
}
|
| 59977 |
}]);
|
| 59978 |
|
| 59979 |
+
return AutomaticEmailEventsList;
|
| 59980 |
})(_react2['default'].Component);
|
| 59981 |
|
| 59982 |
+
module.exports = AutomaticEmailEventsList;
|
| 59983 |
|
| 59984 |
/***/ },
|
| 59985 |
/* 539 */
|
assets/js/{form_editor.ac341877.js → form_editor.20737db0.js}
RENAMED
|
@@ -39,7 +39,7 @@ webpackJsonp([2],{
|
|
| 39 |
function info(value) {
|
| 40 |
if (WysijaForm.options.debug === false) return;
|
| 41 |
|
| 42 |
-
if (!(window.console && console.log)) {
|
| 43 |
(function () {
|
| 44 |
var noop = function () {};
|
| 45 |
var methods = [
|
|
@@ -77,8 +77,10 @@ webpackJsonp([2],{
|
|
| 77 |
}());
|
| 78 |
}
|
| 79 |
try {
|
| 80 |
-
console.log('[DEBUG] ' + value);
|
| 81 |
-
} catch (e) {
|
|
|
|
|
|
|
| 82 |
}
|
| 83 |
|
| 84 |
Event.cacheDelegated = {};
|
|
@@ -166,9 +168,9 @@ webpackJsonp([2],{
|
|
| 166 |
return name.underscore().split('_').join(':');
|
| 167 |
}
|
| 168 |
|
| 169 |
-
function getWrapper(handler,
|
| 170 |
return function (event) {
|
| 171 |
-
return handler.call(new
|
| 172 |
};
|
| 173 |
}
|
| 174 |
|
|
@@ -182,9 +184,9 @@ webpackJsonp([2],{
|
|
| 182 |
});
|
| 183 |
}
|
| 184 |
|
| 185 |
-
function onDomLoad(selector,
|
| 186 |
window.$$(selector).each(function (element) {
|
| 187 |
-
new
|
| 188 |
});
|
| 189 |
}
|
| 190 |
return {
|
|
@@ -494,7 +496,7 @@ webpackJsonp([2],{
|
|
| 494 |
|
| 495 |
// loop through each unique field already inserted in the editor
|
| 496 |
// and disable its toolbar equivalent
|
| 497 |
-
window.$$('#' + WysijaForm.options.editor + ' [wysija_unique="1"]').
|
| 498 |
var field = window.$$(
|
| 499 |
'#' + WysijaForm.options.toolbar + ' [wysija_id="' + element.readAttribute('wysija_id') + '"]'
|
| 500 |
);
|
|
@@ -677,7 +679,9 @@ webpackJsonp([2],{
|
|
| 677 |
hideControls: function () {
|
| 678 |
try {
|
| 679 |
WysijaForm.getBlocks().invoke('hideControls');
|
| 680 |
-
} catch (e) {
|
|
|
|
|
|
|
| 681 |
},
|
| 682 |
hideTools: function () {
|
| 683 |
window.$$('.wysija_tools').invoke('hide');
|
|
@@ -819,7 +823,7 @@ webpackJsonp([2],{
|
|
| 819 |
window.Droppables.hideArea();
|
| 820 |
},
|
| 821 |
starteffect: function (element) {
|
| 822 |
-
new window.Effect.Opacity(element, {
|
| 823 |
duration: 0.2,
|
| 824 |
from: element.getOpacity(),
|
| 825 |
to: 0.7
|
|
@@ -867,6 +871,7 @@ webpackJsonp([2],{
|
|
| 867 |
try {
|
| 868 |
this.getControls().show();
|
| 869 |
} catch (e) {
|
|
|
|
| 870 |
}
|
| 871 |
}
|
| 872 |
},
|
|
@@ -897,7 +902,7 @@ webpackJsonp([2],{
|
|
| 897 |
createBlockDroppable: function () {
|
| 898 |
info('block -> createBlockDroppable');
|
| 899 |
this.element.insert({
|
| 900 |
-
before: '<div class
|
| 901 |
});
|
| 902 |
return this.element.previous('.block_placeholder');
|
| 903 |
},
|
| 39 |
function info(value) {
|
| 40 |
if (WysijaForm.options.debug === false) return;
|
| 41 |
|
| 42 |
+
if (!(window.console && console.log)) { // eslint-disable-line no-console
|
| 43 |
(function () {
|
| 44 |
var noop = function () {};
|
| 45 |
var methods = [
|
| 77 |
}());
|
| 78 |
}
|
| 79 |
try {
|
| 80 |
+
console.log('[DEBUG] ' + value); // eslint-disable-line no-console
|
| 81 |
+
} catch (e) {
|
| 82 |
+
// continue regardless of error
|
| 83 |
+
}
|
| 84 |
}
|
| 85 |
|
| 86 |
Event.cacheDelegated = {};
|
| 168 |
return name.underscore().split('_').join(':');
|
| 169 |
}
|
| 170 |
|
| 171 |
+
function getWrapper(handler, Klass) {
|
| 172 |
return function (event) {
|
| 173 |
+
return handler.call(new Klass(this), event, event.memo);
|
| 174 |
};
|
| 175 |
}
|
| 176 |
|
| 184 |
});
|
| 185 |
}
|
| 186 |
|
| 187 |
+
function onDomLoad(selector, Klass) {
|
| 188 |
window.$$(selector).each(function (element) {
|
| 189 |
+
new Klass(element).onDomLoaded();
|
| 190 |
});
|
| 191 |
}
|
| 192 |
return {
|
| 496 |
|
| 497 |
// loop through each unique field already inserted in the editor
|
| 498 |
// and disable its toolbar equivalent
|
| 499 |
+
window.$$('#' + WysijaForm.options.editor + ' [wysija_unique="1"]').forEach(function (element) {
|
| 500 |
var field = window.$$(
|
| 501 |
'#' + WysijaForm.options.toolbar + ' [wysija_id="' + element.readAttribute('wysija_id') + '"]'
|
| 502 |
);
|
| 679 |
hideControls: function () {
|
| 680 |
try {
|
| 681 |
WysijaForm.getBlocks().invoke('hideControls');
|
| 682 |
+
} catch (e) {
|
| 683 |
+
// continue regardless of error
|
| 684 |
+
}
|
| 685 |
},
|
| 686 |
hideTools: function () {
|
| 687 |
window.$$('.wysija_tools').invoke('hide');
|
| 823 |
window.Droppables.hideArea();
|
| 824 |
},
|
| 825 |
starteffect: function (element) {
|
| 826 |
+
new window.Effect.Opacity(element, {// eslint-disable-line no-new
|
| 827 |
duration: 0.2,
|
| 828 |
from: element.getOpacity(),
|
| 829 |
to: 0.7
|
| 871 |
try {
|
| 872 |
this.getControls().show();
|
| 873 |
} catch (e) {
|
| 874 |
+
// continue regardless of error
|
| 875 |
}
|
| 876 |
}
|
| 877 |
},
|
| 902 |
createBlockDroppable: function () {
|
| 903 |
info('block -> createBlockDroppable');
|
| 904 |
this.element.insert({
|
| 905 |
+
before: '<div class="block_placeholder">' + window.$('block_placeholder').innerHTML + '</div>'
|
| 906 |
});
|
| 907 |
return this.element.previous('.block_placeholder');
|
| 908 |
},
|
assets/js/{mailpoet.3a0d1a00.js → mailpoet.4267d9a6.js}
RENAMED
|
@@ -50528,7 +50528,6 @@ webpackJsonp([3],[
|
|
| 50528 |
} else if (token === '\\') {
|
| 50529 |
// Slash escapes the next symbol to be treated as literal
|
| 50530 |
escapeToken = true;
|
| 50531 |
-
continue;
|
| 50532 |
} else if (replacements[token] !== undefined) {
|
| 50533 |
convertedFormat.push(replacements[token]);
|
| 50534 |
} else {
|
|
@@ -54115,7 +54114,7 @@ webpackJsonp([3],[
|
|
| 54115 |
}
|
| 54116 |
|
| 54117 |
function trackCachedEvents() {
|
| 54118 |
-
eventsCache.
|
| 54119 |
if (window.mailpoet_analytics_enabled || event.forced) {
|
| 54120 |
window.mixpanel.track(event.name, event.data);
|
| 54121 |
}
|
| 50528 |
} else if (token === '\\') {
|
| 50529 |
// Slash escapes the next symbol to be treated as literal
|
| 50530 |
escapeToken = true;
|
|
|
|
| 50531 |
} else if (replacements[token] !== undefined) {
|
| 50532 |
convertedFormat.push(replacements[token]);
|
| 50533 |
} else {
|
| 54114 |
}
|
| 54115 |
|
| 54116 |
function trackCachedEvents() {
|
| 54117 |
+
eventsCache.forEach(function trackIfEnabled(event) {
|
| 54118 |
if (window.mailpoet_analytics_enabled || event.forced) {
|
| 54119 |
window.mixpanel.track(event.name, event.data);
|
| 54120 |
}
|
assets/js/manifest.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
| 1 |
{
|
| 2 |
"mp2migrator.js": "mp2migrator.d90426c2.js",
|
| 3 |
"public.js": "public.ec1bce32.js",
|
| 4 |
-
"admin.js": "admin.
|
| 5 |
-
"admin_vendor.js": "admin_vendor.
|
| 6 |
-
"form_editor.js": "form_editor.
|
| 7 |
-
"mailpoet.js": "mailpoet.
|
| 8 |
"newsletter_editor.js": "newsletter_editor.fd18ee48.js",
|
| 9 |
-
"vendor.js": "vendor.
|
| 10 |
}
|
| 1 |
{
|
| 2 |
"mp2migrator.js": "mp2migrator.d90426c2.js",
|
| 3 |
"public.js": "public.ec1bce32.js",
|
| 4 |
+
"admin.js": "admin.7f9ea640.js",
|
| 5 |
+
"admin_vendor.js": "admin_vendor.b56c5496.js",
|
| 6 |
+
"form_editor.js": "form_editor.20737db0.js",
|
| 7 |
+
"mailpoet.js": "mailpoet.4267d9a6.js",
|
| 8 |
"newsletter_editor.js": "newsletter_editor.fd18ee48.js",
|
| 9 |
+
"vendor.js": "vendor.79f8bb9d.js"
|
| 10 |
}
|
assets/js/{vendor.279e244a.js → vendor.79f8bb9d.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":"
|
| 80 |
/******/ head.appendChild(script);
|
| 81 |
/******/ }
|
| 82 |
/******/ };
|
|
@@ -194,7 +194,7 @@
|
|
| 194 |
return url + value;
|
| 195 |
});
|
| 196 |
Handlebars.registerHelper('emailFromMailto', function (value) {
|
| 197 |
-
var mailtoMatchingRegex = /^mailto
|
| 198 |
if (typeof value === 'string' && value.match(mailtoMatchingRegex)) {
|
| 199 |
return value.replace(mailtoMatchingRegex, '');
|
| 200 |
}
|
| 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":"7f9ea640","1":"b56c5496","2":"20737db0","3":"4267d9a6","4":"fd18ee48"}[chunkId] + ".chunk.js";
|
| 80 |
/******/ head.appendChild(script);
|
| 81 |
/******/ }
|
| 82 |
/******/ };
|
| 194 |
return url + value;
|
| 195 |
});
|
| 196 |
Handlebars.registerHelper('emailFromMailto', function (value) {
|
| 197 |
+
var mailtoMatchingRegex = /^mailto:/i;
|
| 198 |
if (typeof value === 'string' && value.match(mailtoMatchingRegex)) {
|
| 199 |
return value.replace(mailtoMatchingRegex, '');
|
| 200 |
}
|
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
DELETED
|
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-
|
| 8 |
"MIME-Version: 1.0\n"
|
| 9 |
"Content-Type: text/plain; charset=utf-8\n"
|
| 10 |
"Content-Transfer-Encoding: 8bit\n"
|
|
@@ -205,33 +205,33 @@ msgstr ""
|
|
| 205 |
msgid "You have not specified any settings to be saved."
|
| 206 |
msgstr ""
|
| 207 |
|
| 208 |
-
#: lib/API/JSON/v1/Subscribers.php:
|
| 209 |
-
#: lib/API/JSON/v1/Subscribers.php:
|
| 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:
|
| 215 |
msgid "Please specify a valid form ID."
|
| 216 |
msgstr ""
|
| 217 |
|
| 218 |
-
#: lib/API/JSON/v1/Subscribers.php:
|
| 219 |
msgid "Please leave the first field empty."
|
| 220 |
msgstr ""
|
| 221 |
|
| 222 |
-
#: lib/API/JSON/v1/Subscribers.php:
|
| 223 |
msgid "Please check the captcha."
|
| 224 |
msgstr ""
|
| 225 |
|
| 226 |
-
#: lib/API/JSON/v1/Subscribers.php:
|
| 227 |
msgid "Error while validating the captcha."
|
| 228 |
msgstr ""
|
| 229 |
|
| 230 |
-
#: lib/API/JSON/v1/Subscribers.php:
|
| 231 |
msgid "Please select a list."
|
| 232 |
msgstr ""
|
| 233 |
|
| 234 |
-
#: lib/API/JSON/v1/Subscribers.php:
|
| 235 |
msgid "You need to wait %d seconds before subscribing again."
|
| 236 |
msgstr ""
|
| 237 |
|
|
@@ -436,7 +436,7 @@ 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:
|
| 440 |
#: views/subscribers/subscribers.html:96
|
| 441 |
msgid "Export"
|
| 442 |
msgstr ""
|
|
@@ -4952,28 +4952,32 @@ msgstr ""
|
|
| 4952 |
msgid "List of fields to export"
|
| 4953 |
msgstr ""
|
| 4954 |
|
| 4955 |
-
#: views/subscribers/importExport/export.html:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4956 |
msgid "Group subscribers by list"
|
| 4957 |
msgstr ""
|
| 4958 |
|
| 4959 |
-
#: views/subscribers/importExport/export.html:
|
| 4960 |
msgid "Format"
|
| 4961 |
msgstr ""
|
| 4962 |
|
| 4963 |
-
#: views/subscribers/importExport/export.html:
|
| 4964 |
msgid "CSV file"
|
| 4965 |
msgstr ""
|
| 4966 |
|
| 4967 |
-
#: views/subscribers/importExport/export.html:
|
| 4968 |
msgid "Excel file"
|
| 4969 |
msgstr ""
|
| 4970 |
|
| 4971 |
-
#: views/subscribers/importExport/export.html:
|
| 4972 |
#: views/subscribers/importExport/import.html:36
|
| 4973 |
msgid "Server error:"
|
| 4974 |
msgstr ""
|
| 4975 |
|
| 4976 |
-
#: views/subscribers/importExport/export.html:
|
| 4977 |
msgid "%1$s subscribers were exported. Get the exported file [link]here[/link]."
|
| 4978 |
msgstr ""
|
| 4979 |
|
|
@@ -5500,7 +5504,7 @@ msgid "Conditions"
|
|
| 5500 |
msgstr ""
|
| 5501 |
|
| 5502 |
#: views/newsletters.html:120 views/subscribers/importExport/export.html:32
|
| 5503 |
-
#: views/subscribers/importExport/export.html:
|
| 5504 |
#: views/subscribers/importExport/import/step1.html:95
|
| 5505 |
#: views/subscribers/importExport/import/step2.html:41
|
| 5506 |
msgctxt "Verb"
|
| 4 |
msgstr ""
|
| 5 |
"Project-Id-Version: \n"
|
| 6 |
"Report-Msgid-Bugs-To: http://support.mailpoet.com/\n"
|
| 7 |
+
"POT-Creation-Date: 2018-03-06 13:51:22+00:00\n"
|
| 8 |
"MIME-Version: 1.0\n"
|
| 9 |
"Content-Type: text/plain; charset=utf-8\n"
|
| 10 |
"Content-Transfer-Encoding: 8bit\n"
|
| 205 |
msgid "You have not specified any settings to be saved."
|
| 206 |
msgstr ""
|
| 207 |
|
| 208 |
+
#: lib/API/JSON/v1/Subscribers.php:35 lib/API/JSON/v1/Subscribers.php:208
|
| 209 |
+
#: lib/API/JSON/v1/Subscribers.php:224 lib/API/JSON/v1/Subscribers.php:240
|
| 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:85
|
| 215 |
msgid "Please specify a valid form ID."
|
| 216 |
msgstr ""
|
| 217 |
|
| 218 |
+
#: lib/API/JSON/v1/Subscribers.php:90
|
| 219 |
msgid "Please leave the first field empty."
|
| 220 |
msgstr ""
|
| 221 |
|
| 222 |
+
#: lib/API/JSON/v1/Subscribers.php:96
|
| 223 |
msgid "Please check the captcha."
|
| 224 |
msgstr ""
|
| 225 |
|
| 226 |
+
#: lib/API/JSON/v1/Subscribers.php:110 lib/API/JSON/v1/Subscribers.php:116
|
| 227 |
msgid "Error while validating the captcha."
|
| 228 |
msgstr ""
|
| 229 |
|
| 230 |
+
#: lib/API/JSON/v1/Subscribers.php:132 views/form/editor.html:57
|
| 231 |
msgid "Please select a list."
|
| 232 |
msgstr ""
|
| 233 |
|
| 234 |
+
#: lib/API/JSON/v1/Subscribers.php:144
|
| 235 |
msgid "You need to wait %d seconds before subscribing again."
|
| 236 |
msgstr ""
|
| 237 |
|
| 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:82
|
| 440 |
#: views/subscribers/subscribers.html:96
|
| 441 |
msgid "Export"
|
| 442 |
msgstr ""
|
| 4952 |
msgid "List of fields to export"
|
| 4953 |
msgstr ""
|
| 4954 |
|
| 4955 |
+
#: views/subscribers/importExport/export.html:41
|
| 4956 |
+
msgid "[link]Read about the Global status.[/link]"
|
| 4957 |
+
msgstr ""
|
| 4958 |
+
|
| 4959 |
+
#: views/subscribers/importExport/export.html:55
|
| 4960 |
msgid "Group subscribers by list"
|
| 4961 |
msgstr ""
|
| 4962 |
|
| 4963 |
+
#: views/subscribers/importExport/export.html:64
|
| 4964 |
msgid "Format"
|
| 4965 |
msgstr ""
|
| 4966 |
|
| 4967 |
+
#: views/subscribers/importExport/export.html:70
|
| 4968 |
msgid "CSV file"
|
| 4969 |
msgstr ""
|
| 4970 |
|
| 4971 |
+
#: views/subscribers/importExport/export.html:75
|
| 4972 |
msgid "Excel file"
|
| 4973 |
msgstr ""
|
| 4974 |
|
| 4975 |
+
#: views/subscribers/importExport/export.html:105
|
| 4976 |
#: views/subscribers/importExport/import.html:36
|
| 4977 |
msgid "Server error:"
|
| 4978 |
msgstr ""
|
| 4979 |
|
| 4980 |
+
#: views/subscribers/importExport/export.html:106
|
| 4981 |
msgid "%1$s subscribers were exported. Get the exported file [link]here[/link]."
|
| 4982 |
msgstr ""
|
| 4983 |
|
| 5504 |
msgstr ""
|
| 5505 |
|
| 5506 |
#: views/newsletters.html:120 views/subscribers/importExport/export.html:32
|
| 5507 |
+
#: views/subscribers/importExport/export.html:49
|
| 5508 |
#: views/subscribers/importExport/import/step1.html:95
|
| 5509 |
#: views/subscribers/importExport/import/step2.html:41
|
| 5510 |
msgctxt "Verb"
|
lib/API/JSON/v1/Subscribers.php
CHANGED
|
@@ -12,6 +12,7 @@ use MailPoet\Models\Setting;
|
|
| 12 |
use MailPoet\Models\StatisticsForms;
|
| 13 |
use MailPoet\Models\Subscriber;
|
| 14 |
use MailPoet\Newsletter\Scheduler\Scheduler;
|
|
|
|
| 15 |
use MailPoet\Segments\SubscribersListings;
|
| 16 |
use MailPoet\Subscription\Throttling as SubscriptionThrottling;
|
| 17 |
use MailPoet\WP\Hooks;
|
|
@@ -246,12 +247,12 @@ class Subscribers extends APIEndpoint {
|
|
| 246 |
|
| 247 |
function bulkAction($data = array()) {
|
| 248 |
try {
|
| 249 |
-
$
|
| 250 |
-
'\MailPoet\Models\Subscriber',
|
| 251 |
-
|
| 252 |
-
|
| 253 |
-
|
| 254 |
-
return $this->successResponse(null, $
|
| 255 |
} catch(\Exception $e) {
|
| 256 |
return $this->errorResponse(array(
|
| 257 |
$e->getCode() => $e->getMessage()
|
| 12 |
use MailPoet\Models\StatisticsForms;
|
| 13 |
use MailPoet\Models\Subscriber;
|
| 14 |
use MailPoet\Newsletter\Scheduler\Scheduler;
|
| 15 |
+
use MailPoet\Segments\BulkAction;
|
| 16 |
use MailPoet\Segments\SubscribersListings;
|
| 17 |
use MailPoet\Subscription\Throttling as SubscriptionThrottling;
|
| 18 |
use MailPoet\WP\Hooks;
|
| 247 |
|
| 248 |
function bulkAction($data = array()) {
|
| 249 |
try {
|
| 250 |
+
if(!isset($data['listing']['filter']['segment'])) {
|
| 251 |
+
$bulk_action = new Listing\BulkAction('\MailPoet\Models\Subscriber', $data);
|
| 252 |
+
} else {
|
| 253 |
+
$bulk_action = new BulkAction($data);
|
| 254 |
+
}
|
| 255 |
+
return $this->successResponse(null, $bulk_action->apply());
|
| 256 |
} catch(\Exception $e) {
|
| 257 |
return $this->errorResponse(array(
|
| 258 |
$e->getCode() => $e->getMessage()
|
lib/Models/Model.php
CHANGED
|
@@ -184,7 +184,7 @@ class Model extends \Sudzy\ValidModel {
|
|
| 184 |
return (int)$model['id'];
|
| 185 |
}, $rows);
|
| 186 |
|
| 187 |
-
if($callback
|
| 188 |
$callback($ids);
|
| 189 |
}
|
| 190 |
|
| 184 |
return (int)$model['id'];
|
| 185 |
}, $rows);
|
| 186 |
|
| 187 |
+
if(is_callable($callback)) {
|
| 188 |
$callback($ids);
|
| 189 |
}
|
| 190 |
|
lib/Models/SubscriberSegment.php
CHANGED
|
@@ -102,8 +102,8 @@ class SubscriberSegment extends Model {
|
|
| 102 |
|
| 103 |
$query = array(
|
| 104 |
'INSERT IGNORE INTO `'.self::$_table.'`',
|
| 105 |
-
'(`subscriber_id`, `segment_id`)',
|
| 106 |
-
'VALUES '.rtrim(str_repeat('(?,
|
| 107 |
);
|
| 108 |
self::rawExecute(join(' ', $query), $values);
|
| 109 |
|
| 102 |
|
| 103 |
$query = array(
|
| 104 |
'INSERT IGNORE INTO `'.self::$_table.'`',
|
| 105 |
+
'(`subscriber_id`, `segment_id`, `created_at`)',
|
| 106 |
+
'VALUES '.rtrim(str_repeat('(?, ?, NOW()),', $row_count), ',')
|
| 107 |
);
|
| 108 |
self::rawExecute(join(' ', $query), $values);
|
| 109 |
|
lib/Router/Endpoints/Track.php
CHANGED
|
@@ -65,7 +65,9 @@ class Track {
|
|
| 65 |
if(!$data->subscriber || !$data->queue || !$data->newsletter) return false;
|
| 66 |
$subscriber_token_match =
|
| 67 |
Subscriber::verifyToken($data->subscriber->email, $data->subscriber_token);
|
| 68 |
-
if(!$subscriber_token_match)
|
|
|
|
|
|
|
| 69 |
// return if this is a WP user previewing the newsletter
|
| 70 |
if($data->subscriber->isWPUser() && $data->preview) {
|
| 71 |
return $data;
|
|
@@ -75,4 +77,10 @@ class Track {
|
|
| 75 |
$data :
|
| 76 |
false;
|
| 77 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 78 |
}
|
| 65 |
if(!$data->subscriber || !$data->queue || !$data->newsletter) return false;
|
| 66 |
$subscriber_token_match =
|
| 67 |
Subscriber::verifyToken($data->subscriber->email, $data->subscriber_token);
|
| 68 |
+
if(!$subscriber_token_match) {
|
| 69 |
+
$this->terminate(403);
|
| 70 |
+
}
|
| 71 |
// return if this is a WP user previewing the newsletter
|
| 72 |
if($data->subscriber->isWPUser() && $data->preview) {
|
| 73 |
return $data;
|
| 77 |
$data :
|
| 78 |
false;
|
| 79 |
}
|
| 80 |
+
|
| 81 |
+
private function terminate($code) {
|
| 82 |
+
status_header($code);
|
| 83 |
+
get_template_part((string)$code);
|
| 84 |
+
exit;
|
| 85 |
+
}
|
| 86 |
}
|
lib/Segments/BulkAction.php
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
|
| 3 |
+
namespace MailPoet\Segments;
|
| 4 |
+
|
| 5 |
+
use MailPoet\Models\Segment;
|
| 6 |
+
use MailPoet\WP\Hooks;
|
| 7 |
+
|
| 8 |
+
class BulkAction {
|
| 9 |
+
|
| 10 |
+
private $data = null;
|
| 11 |
+
|
| 12 |
+
function __construct($data) {
|
| 13 |
+
$this->data = $data;
|
| 14 |
+
}
|
| 15 |
+
|
| 16 |
+
/**
|
| 17 |
+
* @return array
|
| 18 |
+
* @throws \Exception
|
| 19 |
+
*/
|
| 20 |
+
function apply() {
|
| 21 |
+
if(!isset($this->data['listing']['filter']['segment'])) {
|
| 22 |
+
throw new \InvalidArgumentException('Missing segment id');
|
| 23 |
+
}
|
| 24 |
+
$segment = Segment::findOne($this->data['listing']['filter']['segment']);
|
| 25 |
+
if($segment) {
|
| 26 |
+
$segment = $segment->asArray();
|
| 27 |
+
}
|
| 28 |
+
return $this->applySegment($segment);
|
| 29 |
+
}
|
| 30 |
+
|
| 31 |
+
/**
|
| 32 |
+
* @param array $segment
|
| 33 |
+
*
|
| 34 |
+
* @return array
|
| 35 |
+
* @throws \Exception
|
| 36 |
+
*/
|
| 37 |
+
private function applySegment($segment) {
|
| 38 |
+
if(!$segment || $segment['type'] === Segment::TYPE_DEFAULT || $segment['type'] === Segment::TYPE_WP_USERS) {
|
| 39 |
+
$bulk_action = new \MailPoet\Listing\BulkAction(
|
| 40 |
+
'\MailPoet\Models\Subscriber',
|
| 41 |
+
$this->data
|
| 42 |
+
);
|
| 43 |
+
|
| 44 |
+
return $bulk_action->apply();
|
| 45 |
+
} else {
|
| 46 |
+
$handlers = Hooks::applyFilters('mailpoet_subscribers_in_segment_apply_bulk_action_handlers', array());
|
| 47 |
+
foreach($handlers as $handler) {
|
| 48 |
+
$meta = $handler->apply($segment, $this->data);
|
| 49 |
+
if($meta) {
|
| 50 |
+
return $meta;
|
| 51 |
+
}
|
| 52 |
+
}
|
| 53 |
+
throw new \InvalidArgumentException('No handler found for segment');
|
| 54 |
+
}
|
| 55 |
+
}
|
| 56 |
+
|
| 57 |
+
}
|
lib/Statistics/Track/Clicks.php
CHANGED
|
@@ -49,6 +49,7 @@ class Clicks {
|
|
| 49 |
|
| 50 |
function abort() {
|
| 51 |
status_header(404);
|
|
|
|
| 52 |
exit;
|
| 53 |
}
|
| 54 |
|
| 49 |
|
| 50 |
function abort() {
|
| 51 |
status_header(404);
|
| 52 |
+
get_template_part((string)404);
|
| 53 |
exit;
|
| 54 |
}
|
| 55 |
|
lib/Util/Polyfills.php
CHANGED
|
@@ -21,3 +21,9 @@ if(!function_exists('mb_strtoupper')) {
|
|
| 21 |
return MbstringPolyfill::mb_strtoupper($s, $encoding);
|
| 22 |
}
|
| 23 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
return MbstringPolyfill::mb_strtoupper($s, $encoding);
|
| 22 |
}
|
| 23 |
}
|
| 24 |
+
|
| 25 |
+
if(!function_exists('mb_detect_order')) {
|
| 26 |
+
function mb_detect_order($encodingList = null) {
|
| 27 |
+
return MbstringPolyfill::mb_detect_order($encodingList);
|
| 28 |
+
}
|
| 29 |
+
}
|
mailpoet.php
CHANGED
|
@@ -4,7 +4,7 @@ if(!defined('ABSPATH')) exit;
|
|
| 4 |
|
| 5 |
/*
|
| 6 |
* Plugin Name: MailPoet 3 (New)
|
| 7 |
-
* Version: 3.
|
| 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.
|
| 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.5.0
|
| 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.5.0',
|
| 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.
|
| 8 |
License: GPLv3
|
| 9 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
| 10 |
|
|
@@ -116,6 +116,11 @@ Stop by our [support site](https://www.mailpoet.com/support).
|
|
| 116 |
|
| 117 |
== Changelog ==
|
| 118 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 119 |
= 3.4.4 - 2018-02-27 =
|
| 120 |
* Premium: send emails to WooCommerce customers who purchased a specific product or in a specific product category;
|
| 121 |
* Improved: the template import form is now in its own tab;
|
| 4 |
Requires at least: 4.7
|
| 5 |
Tested up to: 4.9
|
| 6 |
Requires PHP: 5.3
|
| 7 |
+
Stable tag: 3.5.0
|
| 8 |
License: GPLv3
|
| 9 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
| 10 |
|
| 116 |
|
| 117 |
== Changelog ==
|
| 118 |
|
| 119 |
+
= 3.5.0 - 2018-03-06 =
|
| 120 |
+
* Premium: bulk actions can now be executed on subscribers belonging to a selected segment;
|
| 121 |
+
* Improved: a proper error page is displayed if user credentials can't be verified when clicking a tracked newsletter link. Thanks, Bernhard;
|
| 122 |
+
* Fixed: MailPoet polyfills missing mbstring function for WordPress core. Thanks Dioni!
|
| 123 |
+
|
| 124 |
= 3.4.4 - 2018-02-27 =
|
| 125 |
* Premium: send emails to WooCommerce customers who purchased a specific product or in a specific product category;
|
| 126 |
* Improved: the template import form is now in its own tab;
|
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 ComposerAutoloaderInit304fcf7f744d8f15317439a24e53ab80::getLoader();
|
vendor/composer/autoload_classmap.php
CHANGED
|
@@ -203,6 +203,7 @@ return array(
|
|
| 203 |
'MailPoet\\Router\\Endpoints\\Track' => $baseDir . '/lib/Router/Endpoints/Track.php',
|
| 204 |
'MailPoet\\Router\\Endpoints\\ViewInBrowser' => $baseDir . '/lib/Router/Endpoints/ViewInBrowser.php',
|
| 205 |
'MailPoet\\Router\\Router' => $baseDir . '/lib/Router/Router.php',
|
|
|
|
| 206 |
'MailPoet\\Segments\\SubscribersFinder' => $baseDir . '/lib/Segments/SubscribersFinder.php',
|
| 207 |
'MailPoet\\Segments\\SubscribersListings' => $baseDir . '/lib/Segments/SubscribersListings.php',
|
| 208 |
'MailPoet\\Segments\\WP' => $baseDir . '/lib/Segments/WP.php',
|
| 203 |
'MailPoet\\Router\\Endpoints\\Track' => $baseDir . '/lib/Router/Endpoints/Track.php',
|
| 204 |
'MailPoet\\Router\\Endpoints\\ViewInBrowser' => $baseDir . '/lib/Router/Endpoints/ViewInBrowser.php',
|
| 205 |
'MailPoet\\Router\\Router' => $baseDir . '/lib/Router/Router.php',
|
| 206 |
+
'MailPoet\\Segments\\BulkAction' => $baseDir . '/lib/Segments/BulkAction.php',
|
| 207 |
'MailPoet\\Segments\\SubscribersFinder' => $baseDir . '/lib/Segments/SubscribersFinder.php',
|
| 208 |
'MailPoet\\Segments\\SubscribersListings' => $baseDir . '/lib/Segments/SubscribersListings.php',
|
| 209 |
'MailPoet\\Segments\\WP' => $baseDir . '/lib/Segments/WP.php',
|
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 ComposerAutoloaderInit8a97a39eb8855079bf6132f43240d240
|
|
| 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 ComposerAutoloaderInit8a97a39eb8855079bf6132f43240d240
|
|
| 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 ComposerAutoloaderInit304fcf7f744d8f15317439a24e53ab80
|
| 6 |
{
|
| 7 |
private static $loader;
|
| 8 |
|
| 19 |
return self::$loader;
|
| 20 |
}
|
| 21 |
|
| 22 |
+
spl_autoload_register(array('ComposerAutoloaderInit304fcf7f744d8f15317439a24e53ab80', 'loadClassLoader'), true, true);
|
| 23 |
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
|
| 24 |
+
spl_autoload_unregister(array('ComposerAutoloaderInit304fcf7f744d8f15317439a24e53ab80', '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\ComposerStaticInit304fcf7f744d8f15317439a24e53ab80::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\ComposerStaticInit304fcf7f744d8f15317439a24e53ab80::$files;
|
| 52 |
} else {
|
| 53 |
$includeFiles = require __DIR__ . '/autoload_files.php';
|
| 54 |
}
|
| 55 |
foreach ($includeFiles as $fileIdentifier => $file) {
|
| 56 |
+
composerRequire304fcf7f744d8f15317439a24e53ab80($fileIdentifier, $file);
|
| 57 |
}
|
| 58 |
|
| 59 |
return $loader;
|
| 60 |
}
|
| 61 |
}
|
| 62 |
|
| 63 |
+
function composerRequire304fcf7f744d8f15317439a24e53ab80($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',
|
|
@@ -320,6 +320,7 @@ class ComposerStaticInit8a97a39eb8855079bf6132f43240d240
|
|
| 320 |
'MailPoet\\Router\\Endpoints\\Track' => __DIR__ . '/../..' . '/lib/Router/Endpoints/Track.php',
|
| 321 |
'MailPoet\\Router\\Endpoints\\ViewInBrowser' => __DIR__ . '/../..' . '/lib/Router/Endpoints/ViewInBrowser.php',
|
| 322 |
'MailPoet\\Router\\Router' => __DIR__ . '/../..' . '/lib/Router/Router.php',
|
|
|
|
| 323 |
'MailPoet\\Segments\\SubscribersFinder' => __DIR__ . '/../..' . '/lib/Segments/SubscribersFinder.php',
|
| 324 |
'MailPoet\\Segments\\SubscribersListings' => __DIR__ . '/../..' . '/lib/Segments/SubscribersListings.php',
|
| 325 |
'MailPoet\\Segments\\WP' => __DIR__ . '/../..' . '/lib/Segments/WP.php',
|
|
@@ -985,10 +986,10 @@ class ComposerStaticInit8a97a39eb8855079bf6132f43240d240
|
|
| 985 |
public static function getInitializer(ClassLoader $loader)
|
| 986 |
{
|
| 987 |
return \Closure::bind(function () use ($loader) {
|
| 988 |
-
$loader->prefixLengthsPsr4 =
|
| 989 |
-
$loader->prefixDirsPsr4 =
|
| 990 |
-
$loader->prefixesPsr0 =
|
| 991 |
-
$loader->classMap =
|
| 992 |
|
| 993 |
}, null, ClassLoader::class);
|
| 994 |
}
|
| 4 |
|
| 5 |
namespace Composer\Autoload;
|
| 6 |
|
| 7 |
+
class ComposerStaticInit304fcf7f744d8f15317439a24e53ab80
|
| 8 |
{
|
| 9 |
public static $files = array (
|
| 10 |
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
|
| 320 |
'MailPoet\\Router\\Endpoints\\Track' => __DIR__ . '/../..' . '/lib/Router/Endpoints/Track.php',
|
| 321 |
'MailPoet\\Router\\Endpoints\\ViewInBrowser' => __DIR__ . '/../..' . '/lib/Router/Endpoints/ViewInBrowser.php',
|
| 322 |
'MailPoet\\Router\\Router' => __DIR__ . '/../..' . '/lib/Router/Router.php',
|
| 323 |
+
'MailPoet\\Segments\\BulkAction' => __DIR__ . '/../..' . '/lib/Segments/BulkAction.php',
|
| 324 |
'MailPoet\\Segments\\SubscribersFinder' => __DIR__ . '/../..' . '/lib/Segments/SubscribersFinder.php',
|
| 325 |
'MailPoet\\Segments\\SubscribersListings' => __DIR__ . '/../..' . '/lib/Segments/SubscribersListings.php',
|
| 326 |
'MailPoet\\Segments\\WP' => __DIR__ . '/../..' . '/lib/Segments/WP.php',
|
| 986 |
public static function getInitializer(ClassLoader $loader)
|
| 987 |
{
|
| 988 |
return \Closure::bind(function () use ($loader) {
|
| 989 |
+
$loader->prefixLengthsPsr4 = ComposerStaticInit304fcf7f744d8f15317439a24e53ab80::$prefixLengthsPsr4;
|
| 990 |
+
$loader->prefixDirsPsr4 = ComposerStaticInit304fcf7f744d8f15317439a24e53ab80::$prefixDirsPsr4;
|
| 991 |
+
$loader->prefixesPsr0 = ComposerStaticInit304fcf7f744d8f15317439a24e53ab80::$prefixesPsr0;
|
| 992 |
+
$loader->classMap = ComposerStaticInit304fcf7f744d8f15317439a24e53ab80::$classMap;
|
| 993 |
|
| 994 |
}, null, ClassLoader::class);
|
| 995 |
}
|
views/subscribers/importExport/export.html
CHANGED
|
@@ -37,6 +37,12 @@
|
|
| 37 |
<th scope="row">
|
| 38 |
<label for="export_columns">
|
| 39 |
<%= __('List of fields to export') %>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
</label>
|
| 41 |
</th>
|
| 42 |
<td>
|
| 37 |
<th scope="row">
|
| 38 |
<label for="export_columns">
|
| 39 |
<%= __('List of fields to export') %>
|
| 40 |
+
<p class="description">
|
| 41 |
+
<%= __('[link]Read about the Global status.[/link]')
|
| 42 |
+
|replaceLinkTags('http://beta.docs.mailpoet.com/article/245-what-is-global-status', {'target' : '_blank'})
|
| 43 |
+
|raw
|
| 44 |
+
%>
|
| 45 |
+
</p>
|
| 46 |
</label>
|
| 47 |
</th>
|
| 48 |
<td>
|
