MailPoet Newsletters (New) - Version 3.1.0

Version Description

  • 2017-11-07 =
  • Added: a method to create a new list via our public API;
  • Fixed: javascript files are loaded with a dependency on jquery; Thanks George!
  • Fixed: WP users sync no longer chokes on NULL values for first/last names. Thanks @cartpauj!
  • Fixed: superadmin users on Multisite installations can always access MailPoet on subsites. Thanks Ryan!
Download this release

Release Info

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

Code changes from version 3.0.9 to 3.1.0

assets/js/{admin.912a26a8.js → admin.73f15e01.js} RENAMED
@@ -721,7 +721,8 @@ webpackJsonp([0],{
721
  _react2['default'].createElement(_reactRouter.IndexRedirect, { to: 'standard' }),
722
  _react2['default'].createElement(_reactRouter.Route, { path: 'standard(/)**', params: { tab: 'standard' }, component: _newslettersListingsStandardJsx2['default'] }),
723
  _react2['default'].createElement(_reactRouter.Route, { path: 'welcome(/)**', component: _newslettersListingsWelcomeJsx2['default'] }),
724
- _react2['default'].createElement(_reactRouter.Route, { path: 'notification/history/:parent_id(/)**', component: _newslettersListingsNotification_historyJsx2['default'] }),
 
725
  _react2['default'].createElement(_reactRouter.Route, { path: 'notification(/)**', component: _newslettersListingsNotificationJsx2['default'] }),
726
  _react2['default'].createElement(_reactRouter.Route, { path: 'new', component: _newslettersTypesJsx2['default'] }),
727
  _react2['default'].createElement(_reactRouter.Route, { path: 'new/standard', component: _newslettersTypesStandardJsx2['default'] }),
@@ -10353,7 +10354,7 @@ webpackJsonp([0],{
10353
  endpoint: 'segments',
10354
  multiple: true,
10355
  filter: function filter(segment) {
10356
- return !!!segment.deleted_at;
10357
  },
10358
  getLabel: function getLabel(segment) {
10359
  return segment.name + ' (' + parseInt(segment.subscribers, 10).toLocaleString() + ')';
@@ -10570,7 +10571,7 @@ webpackJsonp([0],{
10570
  var jQuery = jq;
10571
 
10572
  var currentTime = window.mailpoet_current_time || '00:00';
10573
- var defaultDateTime = window.mailpoet_current_date + ' ' + '00:00:00';
10574
  var timeOfDayItems = window.mailpoet_schedule_time_of_day;
10575
  var dateDisplayFormat = window.mailpoet_date_display_format;
10576
  var dateStorageFormat = window.mailpoet_date_storage_format;
@@ -10863,7 +10864,7 @@ webpackJsonp([0],{
10863
  endpoint: 'segments',
10864
  multiple: true,
10865
  filter: function filter(segment) {
10866
- return !!!segment.deleted_at;
10867
  },
10868
  getLabel: function getLabel(segment) {
10869
  return segment.name + ' (' + parseInt(segment.subscribers, 10).toLocaleString() + ')';
@@ -11597,94 +11598,93 @@ webpackJsonp([0],{
11597
  null,
11598
  _mailpoet2['default'].I18n.t('paused')
11599
  );
11600
- } else {
11601
- if (newsletter.queue.status === 'scheduled') {
11602
- return _react2['default'].createElement(
11603
- 'span',
11604
- null,
11605
- _mailpoet2['default'].I18n.t('scheduledFor'),
11606
- ' ',
11607
- _mailpoet2['default'].Date.format(newsletter.queue.scheduled_at)
11608
- );
11609
- }
11610
- var progressClasses = (0, _classnames2['default'])('mailpoet_progress', { mailpoet_progress_complete: newsletter.queue.status === 'completed' });
11611
-
11612
- // calculate percentage done
11613
- var percentage = Math.round(newsletter.queue.count_processed * 100 / newsletter.queue.count_total);
11614
-
11615
- var label = undefined;
11616
-
11617
- if (newsletter.queue.status === 'completed') {
11618
- label = _react2['default'].createElement(
11619
- 'span',
11620
- null,
11621
- _mailpoet2['default'].I18n.t('newsletterQueueCompleted').replace('%$1d', parseInt(newsletter.queue.count_processed, 10).toLocaleString()).replace('%$2d', parseInt(newsletter.queue.count_total, 10).toLocaleString())
11622
- );
11623
- } else {
11624
- label = _react2['default'].createElement(
11625
- 'span',
11626
- null,
11627
- newsletter.queue.count_processed,
11628
- ' / ',
11629
- newsletter.queue.count_total,
11630
- '  ',
11631
- _react2['default'].createElement(
11632
- 'a',
11633
- {
11634
- id: 'resume_' + newsletter.id,
11635
- className: 'button',
11636
- style: { display: newsletter.queue.status === 'paused' ? 'inline-block' : 'none' },
11637
- href: 'javascript:;',
11638
- onClick: this.resumeSending.bind(null, newsletter)
11639
- },
11640
- _mailpoet2['default'].I18n.t('resume')
11641
- ),
11642
- _react2['default'].createElement(
11643
- 'a',
11644
- {
11645
- id: 'pause_' + newsletter.id,
11646
- className: 'button mailpoet_pause',
11647
- style: { display: newsletter.queue.status === null ? 'inline-block' : 'none' },
11648
- href: 'javascript:;',
11649
- onClick: this.pauseSending.bind(null, newsletter)
11650
- },
11651
- _mailpoet2['default'].I18n.t('pause')
11652
- )
11653
- );
11654
- }
11655
 
11656
- var progress_bar_width = 0;
 
11657
 
11658
- if (isNaN(percentage)) {
11659
- percentage = _mailpoet2['default'].I18n.t('noSubscribers');
11660
- } else {
11661
- progress_bar_width = percentage;
11662
- percentage += '%';
11663
- }
11664
 
11665
- return _react2['default'].createElement(
11666
- 'div',
 
 
 
 
 
 
 
11667
  null,
 
 
 
 
11668
  _react2['default'].createElement(
11669
- 'div',
11670
- { className: progressClasses },
11671
- _react2['default'].createElement('span', {
11672
- className: 'mailpoet_progress_bar',
11673
- style: { width: progress_bar_width + '%' }
11674
- }),
11675
- _react2['default'].createElement(
11676
- 'span',
11677
- { className: 'mailpoet_progress_label' },
11678
- percentage
11679
- )
11680
  ),
11681
  _react2['default'].createElement(
11682
- 'p',
11683
- { style: { textAlign: 'center' } },
11684
- label
 
 
 
 
 
 
11685
  )
11686
  );
11687
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11688
  }
11689
  };
11690
 
@@ -11870,22 +11870,21 @@ webpackJsonp([0],{
11870
  ),
11871
  after_content
11872
  );
11873
- } else {
11874
- return _react2['default'].createElement(
11875
- 'div',
11876
- null,
11877
- _react2['default'].createElement(
11878
- _reactRouter.Link,
11879
- {
11880
- key: 'stats-' + newsletter.id,
11881
- to: params.link,
11882
- onClick: params.onClick || null
11883
- },
11884
- content
11885
- ),
11886
- after_content
11887
- );
11888
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11889
  }
11890
 
11891
  return _react2['default'].createElement(
@@ -12205,6 +12204,7 @@ webpackJsonp([0],{
12205
  renderSettings: function renderSettings(newsletter) {
12206
  var sendingEvent = undefined;
12207
  var sendingDelay = undefined;
 
12208
 
12209
  // set sending event
12210
  switch (newsletter.options.event) {
@@ -12219,7 +12219,7 @@ webpackJsonp([0],{
12219
 
12220
  case 'segment':
12221
  // get segment
12222
- var segment = _underscore2['default'].find(mailpoet_segments, function (segment) {
12223
  return ~ ~segment.id === ~ ~newsletter.options.segment;
12224
  });
12225
 
@@ -12229,9 +12229,9 @@ webpackJsonp([0],{
12229
  { className: 'mailpoet_error' },
12230
  _mailpoet2['default'].I18n.t('sendingToSegmentsNotSpecified')
12231
  );
12232
- } else {
12233
- sendingEvent = _mailpoet2['default'].I18n.t('welcomeEventSegment').replace('%$1s', segment.name);
12234
  }
 
 
12235
  break;
12236
  }
12237
 
@@ -12547,12 +12547,12 @@ webpackJsonp([0],{
12547
  },
12548
  renderSettings: function renderSettings(newsletter) {
12549
  var sendingFrequency = undefined;
12550
- var sendingToSegments = undefined;
12551
 
12552
  // get list of segments' name
12553
  var segments = newsletter.segments.map(function (segment) {
12554
  return segment.name;
12555
  });
 
12556
 
12557
  // check if the user has specified segments to send to
12558
  if (segments.length === 0) {
@@ -12561,31 +12561,29 @@ webpackJsonp([0],{
12561
  { className: 'mailpoet_error' },
12562
  _mailpoet2['default'].I18n.t('sendingToSegmentsNotSpecified')
12563
  );
12564
- } else {
12565
- sendingToSegments = _mailpoet2['default'].I18n.t('ifNewContentToSegments').replace('%$1s', segments.join(', '));
12566
 
12567
- // set sending frequency
12568
- switch (newsletter.options.intervalType) {
12569
- case 'daily':
12570
- sendingFrequency = _mailpoet2['default'].I18n.t('sendDaily').replace('%$1s', _newslettersSchedulingCommonJsx.timeOfDayValues[newsletter.options.timeOfDay]);
12571
- break;
12572
 
12573
- case 'weekly':
12574
- sendingFrequency = _mailpoet2['default'].I18n.t('sendWeekly').replace('%$1s', _newslettersSchedulingCommonJsx.weekDayValues[newsletter.options.weekDay]).replace('%$2s', _newslettersSchedulingCommonJsx.timeOfDayValues[newsletter.options.timeOfDay]);
12575
- break;
12576
 
12577
- case 'monthly':
12578
- sendingFrequency = _mailpoet2['default'].I18n.t('sendMonthly').replace('%$1s', _newslettersSchedulingCommonJsx.monthDayValues[newsletter.options.monthDay]).replace('%$2s', _newslettersSchedulingCommonJsx.timeOfDayValues[newsletter.options.timeOfDay]);
12579
- break;
12580
 
12581
- case 'nthWeekDay':
12582
- sendingFrequency = _mailpoet2['default'].I18n.t('sendNthWeekDay').replace('%$1s', _newslettersSchedulingCommonJsx.nthWeekDayValues[newsletter.options.nthWeekDay]).replace('%$2s', _newslettersSchedulingCommonJsx.weekDayValues[newsletter.options.weekDay]).replace('%$3s', _newslettersSchedulingCommonJsx.timeOfDayValues[newsletter.options.timeOfDay]);
12583
- break;
12584
 
12585
- case 'immediately':
12586
- sendingFrequency = _mailpoet2['default'].I18n.t('sendImmediately');
12587
- break;
12588
- }
12589
  }
12590
 
12591
  return _react2['default'].createElement(
@@ -12600,15 +12598,14 @@ webpackJsonp([0],{
12600
  var childrenCount = ~ ~newsletter.children_count;
12601
  if (childrenCount === 0) {
12602
  return _mailpoet2['default'].I18n.t('notSentYet');
12603
- } else {
12604
- return _react2['default'].createElement(
12605
- _reactRouter.Link,
12606
- {
12607
- to: '/notification/history/' + newsletter.id
12608
- },
12609
- _mailpoet2['default'].I18n.t('viewHistory')
12610
- );
12611
  }
 
 
 
 
 
 
 
12612
  },
12613
  renderItem: function renderItem(newsletter, actions) {
12614
  var rowClasses = (0, _classnames2['default'])('manage-column', 'column-primary', 'has-row-actions');
@@ -15909,13 +15906,12 @@ webpackJsonp([0],{
15909
  height: '400px'
15910
  }
15911
  });
15912
- } else {
15913
- return _react2['default'].createElement(
15914
- 'p',
15915
- null,
15916
- _mailpoet2['default'].I18n.t('systemInfoDataError')
15917
- );
15918
  }
 
 
 
 
 
15919
  }
15920
 
15921
  function KnowledgeBase() {
721
  _react2['default'].createElement(_reactRouter.IndexRedirect, { to: 'standard' }),
722
  _react2['default'].createElement(_reactRouter.Route, { path: 'standard(/)**', params: { tab: 'standard' }, component: _newslettersListingsStandardJsx2['default'] }),
723
  _react2['default'].createElement(_reactRouter.Route, { path: 'welcome(/)**', component: _newslettersListingsWelcomeJsx2['default'] }),
724
+ _react2['default'].createElement(_reactRouter.Route, { path: 'notification/history/:parent_id(/)**',
725
+ component: _newslettersListingsNotification_historyJsx2['default'] }),
726
  _react2['default'].createElement(_reactRouter.Route, { path: 'notification(/)**', component: _newslettersListingsNotificationJsx2['default'] }),
727
  _react2['default'].createElement(_reactRouter.Route, { path: 'new', component: _newslettersTypesJsx2['default'] }),
728
  _react2['default'].createElement(_reactRouter.Route, { path: 'new/standard', component: _newslettersTypesStandardJsx2['default'] }),
10354
  endpoint: 'segments',
10355
  multiple: true,
10356
  filter: function filter(segment) {
10357
+ return !segment.deleted_at;
10358
  },
10359
  getLabel: function getLabel(segment) {
10360
  return segment.name + ' (' + parseInt(segment.subscribers, 10).toLocaleString() + ')';
10571
  var jQuery = jq;
10572
 
10573
  var currentTime = window.mailpoet_current_time || '00:00';
10574
+ var defaultDateTime = window.mailpoet_current_date + ' 00:00:00';
10575
  var timeOfDayItems = window.mailpoet_schedule_time_of_day;
10576
  var dateDisplayFormat = window.mailpoet_date_display_format;
10577
  var dateStorageFormat = window.mailpoet_date_storage_format;
10864
  endpoint: 'segments',
10865
  multiple: true,
10866
  filter: function filter(segment) {
10867
+ return !segment.deleted_at;
10868
  },
10869
  getLabel: function getLabel(segment) {
10870
  return segment.name + ' (' + parseInt(segment.subscribers, 10).toLocaleString() + ')';
11598
  null,
11599
  _mailpoet2['default'].I18n.t('paused')
11600
  );
11601
+ }
11602
+ if (newsletter.queue.status === 'scheduled') {
11603
+ return _react2['default'].createElement(
11604
+ 'span',
11605
+ null,
11606
+ _mailpoet2['default'].I18n.t('scheduledFor'),
11607
+ ' ',
11608
+ _mailpoet2['default'].Date.format(newsletter.queue.scheduled_at)
11609
+ );
11610
+ }
11611
+ var progressClasses = (0, _classnames2['default'])('mailpoet_progress', { mailpoet_progress_complete: newsletter.queue.status === 'completed' });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11612
 
11613
+ // calculate percentage done
11614
+ var percentage = Math.round(newsletter.queue.count_processed * 100 / newsletter.queue.count_total);
11615
 
11616
+ var label = undefined;
 
 
 
 
 
11617
 
11618
+ if (newsletter.queue.status === 'completed') {
11619
+ label = _react2['default'].createElement(
11620
+ 'span',
11621
+ null,
11622
+ _mailpoet2['default'].I18n.t('newsletterQueueCompleted').replace('%$1d', parseInt(newsletter.queue.count_processed, 10).toLocaleString()).replace('%$2d', parseInt(newsletter.queue.count_total, 10).toLocaleString())
11623
+ );
11624
+ } else {
11625
+ label = _react2['default'].createElement(
11626
+ 'span',
11627
  null,
11628
+ newsletter.queue.count_processed,
11629
+ ' / ',
11630
+ newsletter.queue.count_total,
11631
+ '  ',
11632
  _react2['default'].createElement(
11633
+ 'a',
11634
+ {
11635
+ id: 'resume_' + newsletter.id,
11636
+ className: 'button',
11637
+ style: { display: newsletter.queue.status === 'paused' ? 'inline-block' : 'none' },
11638
+ href: 'javascript:;',
11639
+ onClick: this.resumeSending.bind(null, newsletter)
11640
+ },
11641
+ _mailpoet2['default'].I18n.t('resume')
 
 
11642
  ),
11643
  _react2['default'].createElement(
11644
+ 'a',
11645
+ {
11646
+ id: 'pause_' + newsletter.id,
11647
+ className: 'button mailpoet_pause',
11648
+ style: { display: newsletter.queue.status === null ? 'inline-block' : 'none' },
11649
+ href: 'javascript:;',
11650
+ onClick: this.pauseSending.bind(null, newsletter)
11651
+ },
11652
+ _mailpoet2['default'].I18n.t('pause')
11653
  )
11654
  );
11655
  }
11656
+
11657
+ var progress_bar_width = 0;
11658
+
11659
+ if (isNaN(percentage)) {
11660
+ percentage = _mailpoet2['default'].I18n.t('noSubscribers');
11661
+ } else {
11662
+ progress_bar_width = percentage;
11663
+ percentage += '%';
11664
+ }
11665
+
11666
+ return _react2['default'].createElement(
11667
+ 'div',
11668
+ null,
11669
+ _react2['default'].createElement(
11670
+ 'div',
11671
+ { className: progressClasses },
11672
+ _react2['default'].createElement('span', {
11673
+ className: 'mailpoet_progress_bar',
11674
+ style: { width: progress_bar_width + '%' }
11675
+ }),
11676
+ _react2['default'].createElement(
11677
+ 'span',
11678
+ { className: 'mailpoet_progress_label' },
11679
+ percentage
11680
+ )
11681
+ ),
11682
+ _react2['default'].createElement(
11683
+ 'p',
11684
+ { style: { textAlign: 'center' } },
11685
+ label
11686
+ )
11687
+ );
11688
  }
11689
  };
11690
 
11870
  ),
11871
  after_content
11872
  );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11873
  }
11874
+ return _react2['default'].createElement(
11875
+ 'div',
11876
+ null,
11877
+ _react2['default'].createElement(
11878
+ _reactRouter.Link,
11879
+ {
11880
+ key: 'stats-' + newsletter.id,
11881
+ to: params.link,
11882
+ onClick: params.onClick || null
11883
+ },
11884
+ content
11885
+ ),
11886
+ after_content
11887
+ );
11888
  }
11889
 
11890
  return _react2['default'].createElement(
12204
  renderSettings: function renderSettings(newsletter) {
12205
  var sendingEvent = undefined;
12206
  var sendingDelay = undefined;
12207
+ var segment = undefined;
12208
 
12209
  // set sending event
12210
  switch (newsletter.options.event) {
12219
 
12220
  case 'segment':
12221
  // get segment
12222
+ segment = _underscore2['default'].find(mailpoet_segments, function (segment) {
12223
  return ~ ~segment.id === ~ ~newsletter.options.segment;
12224
  });
12225
 
12229
  { className: 'mailpoet_error' },
12230
  _mailpoet2['default'].I18n.t('sendingToSegmentsNotSpecified')
12231
  );
 
 
12232
  }
12233
+ sendingEvent = _mailpoet2['default'].I18n.t('welcomeEventSegment').replace('%$1s', segment.name);
12234
+
12235
  break;
12236
  }
12237
 
12547
  },
12548
  renderSettings: function renderSettings(newsletter) {
12549
  var sendingFrequency = undefined;
 
12550
 
12551
  // get list of segments' name
12552
  var segments = newsletter.segments.map(function (segment) {
12553
  return segment.name;
12554
  });
12555
+ var sendingToSegments = _mailpoet2['default'].I18n.t('ifNewContentToSegments').replace('%$1s', segments.join(', '));
12556
 
12557
  // check if the user has specified segments to send to
12558
  if (segments.length === 0) {
12561
  { className: 'mailpoet_error' },
12562
  _mailpoet2['default'].I18n.t('sendingToSegmentsNotSpecified')
12563
  );
12564
+ }
 
12565
 
12566
+ // set sending frequency
12567
+ switch (newsletter.options.intervalType) {
12568
+ case 'daily':
12569
+ sendingFrequency = _mailpoet2['default'].I18n.t('sendDaily').replace('%$1s', _newslettersSchedulingCommonJsx.timeOfDayValues[newsletter.options.timeOfDay]);
12570
+ break;
12571
 
12572
+ case 'weekly':
12573
+ sendingFrequency = _mailpoet2['default'].I18n.t('sendWeekly').replace('%$1s', _newslettersSchedulingCommonJsx.weekDayValues[newsletter.options.weekDay]).replace('%$2s', _newslettersSchedulingCommonJsx.timeOfDayValues[newsletter.options.timeOfDay]);
12574
+ break;
12575
 
12576
+ case 'monthly':
12577
+ sendingFrequency = _mailpoet2['default'].I18n.t('sendMonthly').replace('%$1s', _newslettersSchedulingCommonJsx.monthDayValues[newsletter.options.monthDay]).replace('%$2s', _newslettersSchedulingCommonJsx.timeOfDayValues[newsletter.options.timeOfDay]);
12578
+ break;
12579
 
12580
+ case 'nthWeekDay':
12581
+ sendingFrequency = _mailpoet2['default'].I18n.t('sendNthWeekDay').replace('%$1s', _newslettersSchedulingCommonJsx.nthWeekDayValues[newsletter.options.nthWeekDay]).replace('%$2s', _newslettersSchedulingCommonJsx.weekDayValues[newsletter.options.weekDay]).replace('%$3s', _newslettersSchedulingCommonJsx.timeOfDayValues[newsletter.options.timeOfDay]);
12582
+ break;
12583
 
12584
+ case 'immediately':
12585
+ sendingFrequency = _mailpoet2['default'].I18n.t('sendImmediately');
12586
+ break;
 
12587
  }
12588
 
12589
  return _react2['default'].createElement(
12598
  var childrenCount = ~ ~newsletter.children_count;
12599
  if (childrenCount === 0) {
12600
  return _mailpoet2['default'].I18n.t('notSentYet');
 
 
 
 
 
 
 
 
12601
  }
12602
+ return _react2['default'].createElement(
12603
+ _reactRouter.Link,
12604
+ {
12605
+ to: '/notification/history/' + newsletter.id
12606
+ },
12607
+ _mailpoet2['default'].I18n.t('viewHistory')
12608
+ );
12609
  },
12610
  renderItem: function renderItem(newsletter, actions) {
12611
  var rowClasses = (0, _classnames2['default'])('manage-column', 'column-primary', 'has-row-actions');
15906
  height: '400px'
15907
  }
15908
  });
 
 
 
 
 
 
15909
  }
15910
+ return _react2['default'].createElement(
15911
+ 'p',
15912
+ null,
15913
+ _mailpoet2['default'].I18n.t('systemInfoDataError')
15914
+ );
15915
  }
15916
 
15917
  function KnowledgeBase() {
assets/js/{admin_vendor.66f57ed3.js → admin_vendor.fc9d02c2.js} RENAMED
@@ -30983,52 +30983,51 @@ webpackJsonp([1],[
30983
  )
30984
  )
30985
  );
30986
- } else {
30987
- var select_all_classes = (0, _classnames2['default'])('mailpoet_select_all', { mailpoet_hidden: this.props.selection === false || this.props.count <= this.props.limit
30988
- });
30989
 
30990
- return _react2['default'].createElement(
30991
- 'tbody',
30992
- null,
 
 
 
30993
  _react2['default'].createElement(
30994
- 'tr',
30995
- { className: select_all_classes },
 
 
30996
  _react2['default'].createElement(
30997
- 'td',
30998
- { colSpan: this.props.columns.length + (this.props.is_selectable ? 1 : 0) },
30999
- this.props.selection !== 'all' ? _mailpoet2['default'].I18n.t('selectAllLabel') : _mailpoet2['default'].I18n.t('selectedAllLabel').replace('%d', this.props.count),
31000
- ' ',
31001
- _react2['default'].createElement(
31002
- 'a',
31003
- {
31004
- onClick: this.props.onSelectAll,
31005
- href: 'javascript:;' },
31006
- this.props.selection !== 'all' ? _mailpoet2['default'].I18n.t('selectAllLink') : _mailpoet2['default'].I18n.t('clearSelection')
31007
- )
31008
  )
31009
- ),
31010
- this.props.items.map(function (item, index) {
31011
- var renderItem = item;
31012
- renderItem.id = parseInt(item.id, 10);
31013
- renderItem.selected = _this2.props.selected_ids.indexOf(renderItem.id) !== -1;
31014
-
31015
- return _react2['default'].createElement(ListingItem, {
31016
- columns: _this2.props.columns,
31017
- onSelectItem: _this2.props.onSelectItem,
31018
- onRenderItem: _this2.props.onRenderItem,
31019
- onDeleteItem: _this2.props.onDeleteItem,
31020
- onRestoreItem: _this2.props.onRestoreItem,
31021
- onTrashItem: _this2.props.onTrashItem,
31022
- onRefreshItems: _this2.props.onRefreshItems,
31023
- selection: _this2.props.selection,
31024
- is_selectable: _this2.props.is_selectable,
31025
- item_actions: _this2.props.item_actions,
31026
- group: _this2.props.group,
31027
- key: 'item-' + renderItem.id + '-' + index,
31028
- item: renderItem });
31029
- })
31030
- );
31031
- }
31032
  }
31033
  });
31034
 
@@ -31076,9 +31075,9 @@ webpackJsonp([1],[
31076
  var key = _getParam2[0];
31077
  var value = _getParam2[1];
31078
 
 
31079
  switch (key) {
31080
  case 'filter':
31081
- var filters = {};
31082
  value.split('&').map(function (pair) {
31083
  var _pair$split = pair.split('=');
31084
 
@@ -31163,9 +31162,8 @@ webpackJsonp([1],[
31163
  if (base_url !== null) {
31164
  base_url = this.setBaseUrlParams(base_url);
31165
  return '/' + base_url + '/' + params;
31166
- } else {
31167
- return '/' + params;
31168
  }
 
31169
  },
31170
  setBaseUrlParams: function setBaseUrlParams(base_url) {
31171
  var _this5 = this;
@@ -33514,175 +33512,173 @@ webpackJsonp([1],[
33514
  render: function render() {
33515
  if (this.props.count === 0) {
33516
  return false;
33517
- } else {
33518
- var pagination = false;
33519
- var firstPage = React.createElement(
33520
- 'span',
33521
- { 'aria-hidden': 'true', className: 'tablenav-pages-navspan' },
33522
- '«'
33523
- );
33524
- var previousPage = React.createElement(
33525
- 'span',
33526
- { 'aria-hidden': 'true', className: 'tablenav-pages-navspan' },
33527
- '‹'
33528
- );
33529
- var nextPage = React.createElement(
33530
- 'span',
33531
- { 'aria-hidden': 'true', className: 'tablenav-pages-navspan' },
33532
- '›'
33533
- );
33534
- var lastPage = React.createElement(
33535
- 'span',
33536
- { 'aria-hidden': 'true', className: 'tablenav-pages-navspan' },
33537
- '»'
33538
- );
33539
-
33540
- if (this.props.limit > 0 && this.props.count > this.props.limit) {
33541
- if (this.props.page > 1) {
33542
- previousPage = React.createElement(
33543
- 'a',
33544
- { href: 'javascript:;',
33545
- onClick: this.setPreviousPage,
33546
- className: 'prev-page' },
33547
- React.createElement(
33548
- 'span',
33549
- { className: 'screen-reader-text' },
33550
- MailPoet.I18n.t('previousPage')
33551
- ),
33552
- React.createElement(
33553
- 'span',
33554
- { 'aria-hidden': 'true' },
33555
- '‹'
33556
- )
33557
- );
33558
- }
33559
-
33560
- if (this.props.page > 2) {
33561
- firstPage = React.createElement(
33562
- 'a',
33563
- { href: 'javascript:;',
33564
- onClick: this.setFirstPage,
33565
- className: 'first-page' },
33566
- React.createElement(
33567
- 'span',
33568
- { className: 'screen-reader-text' },
33569
- MailPoet.I18n.t('firstPage')
33570
- ),
33571
- React.createElement(
33572
- 'span',
33573
- { 'aria-hidden': 'true' },
33574
- '«'
33575
- )
33576
- );
33577
- }
33578
-
33579
- if (this.props.page < this.getLastPage()) {
33580
- nextPage = React.createElement(
33581
- 'a',
33582
- { href: 'javascript:;',
33583
- onClick: this.setNextPage,
33584
- className: 'next-page' },
33585
- React.createElement(
33586
- 'span',
33587
- { className: 'screen-reader-text' },
33588
- MailPoet.I18n.t('nextPage')
33589
- ),
33590
- React.createElement(
33591
- 'span',
33592
- { 'aria-hidden': 'true' },
33593
- '›'
33594
- )
33595
- );
33596
- }
33597
 
33598
- if (this.props.page < this.getLastPage() - 1) {
33599
- lastPage = React.createElement(
33600
- 'a',
33601
- { href: 'javascript:;',
33602
- onClick: this.setLastPage,
33603
- className: 'last-page' },
33604
- React.createElement(
33605
- 'span',
33606
- { className: 'screen-reader-text' },
33607
- MailPoet.I18n.t('lastPage')
33608
- ),
33609
- React.createElement(
33610
- 'span',
33611
- { 'aria-hidden': 'true' },
33612
- '»'
33613
- )
33614
- );
33615
- }
 
33616
 
33617
- var pageValue = this.props.page;
33618
- if (this.state.page !== null) {
33619
- pageValue = this.state.page;
33620
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33621
 
33622
- pagination = React.createElement(
33623
- 'span',
33624
- { className: 'pagination-links' },
33625
- firstPage,
33626
- ' ',
33627
- previousPage,
33628
- ' ',
33629
  React.createElement(
33630
  'span',
33631
- { className: 'paging-input' },
33632
- React.createElement(
33633
- 'label',
33634
- {
33635
- className: 'screen-reader-text',
33636
- htmlFor: 'current-page-selector' },
33637
- MailPoet.I18n.t('currentPage')
33638
- ),
33639
- React.createElement('input', {
33640
- type: 'text',
33641
- onChange: this.handleChangeManualPage,
33642
- onKeyUp: this.handleSetManualPage,
33643
- onBlur: this.handleBlurManualPage,
33644
- 'aria-describedby': 'table-paging',
33645
- size: '2',
33646
- ref: 'page',
33647
- value: pageValue,
33648
- name: 'paged',
33649
- id: 'current-page-selector',
33650
- className: 'current-page' }),
33651
- ' ',
33652
- MailPoet.I18n.t('pageOutOf'),
33653
- ' ',
33654
- React.createElement(
33655
- 'span',
33656
- { className: 'total-pages' },
33657
- Math.ceil(this.props.count / this.props.limit).toLocaleString()
33658
- )
33659
  ),
33660
- ' ',
33661
- nextPage,
33662
- ' ',
33663
- lastPage
 
33664
  );
33665
  }
33666
 
33667
- var classes = classNames('tablenav-pages', { 'one-page': this.props.count <= this.props.limit });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33668
 
33669
- var numberOfItemsLabel = undefined;
33670
- if (this.props.count == 1) {
33671
- numberOfItemsLabel = MailPoet.I18n.t('numberOfItemsSingular');
33672
- } else {
33673
- numberOfItemsLabel = MailPoet.I18n.t('numberOfItemsMultiple').replace('%$1d', this.props.count.toLocaleString());
33674
  }
33675
- return React.createElement(
33676
- 'div',
33677
- { className: classes },
 
 
 
 
 
33678
  React.createElement(
33679
  'span',
33680
- { className: 'displaying-num' },
33681
- numberOfItemsLabel
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33682
  ),
33683
- pagination
 
 
 
33684
  );
33685
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33686
  }
33687
  });
33688
 
@@ -33710,31 +33706,30 @@ webpackJsonp([1],[
33710
  render: function render() {
33711
  if (this.props.search === false) {
33712
  return false;
33713
- } else {
33714
- return React.createElement(
33715
- 'form',
33716
- { name: 'search', onSubmit: this.handleSearch },
33717
- React.createElement(
33718
- 'p',
33719
- { className: 'search-box' },
33720
- React.createElement(
33721
- 'label',
33722
- { htmlFor: 'search_input', className: 'screen-reader-text' },
33723
- MailPoet.I18n.t('searchLabel')
33724
- ),
33725
- React.createElement('input', {
33726
- type: 'search',
33727
- id: 'search_input',
33728
- ref: 'search',
33729
- name: 's',
33730
- defaultValue: this.props.search }),
33731
- React.createElement('input', {
33732
- type: 'submit',
33733
- defaultValue: MailPoet.I18n.t('searchLabel'),
33734
- className: 'button' })
33735
- )
33736
- );
33737
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33738
  }
33739
  });
33740
 
@@ -33954,13 +33949,10 @@ webpackJsonp([1],[
33954
  templateResult: function templateResult(item) {
33955
  if (item.element && item.element.selected) {
33956
  return null;
33957
- } else {
33958
- if (item.title) {
33959
- return item.title;
33960
- } else {
33961
- return item.text;
33962
- }
33963
  }
 
33964
  }
33965
  });
33966
 
@@ -34049,9 +34041,8 @@ webpackJsonp([1],[
34049
  transformChangedValue: function transformChangedValue(value) {
34050
  if (typeof this.props.field['transformChangedValue'] === 'function') {
34051
  return this.props.field.transformChangedValue.call(this, value);
34052
- } else {
34053
- return value;
34054
  }
 
34055
  },
34056
  render: function render() {
34057
  var _this = this;
@@ -39994,17 +39985,16 @@ webpackJsonp([1],[
39994
  handleValueChange: function handleValueChange(e) {
39995
  if (this.props.onChange) {
39996
  return this.props.onChange(e);
39997
- } else {
39998
- var item = this.state.item;
39999
- var field = e.target.name;
40000
 
40001
- item[field] = e.target.value;
40002
 
40003
- this.setState({
40004
- item: item
40005
- });
40006
- return true;
40007
- }
40008
  },
40009
  render: function render() {
40010
  var _this3 = this;
@@ -40163,14 +40153,13 @@ webpackJsonp([1],[
40163
  field,
40164
  description
40165
  );
40166
- } else {
40167
- return React.createElement(
40168
- 'div',
40169
- { key: 'field-' + (data.index || 0) },
40170
- field,
40171
- description
40172
- );
40173
  }
 
 
 
 
 
 
40174
  },
40175
  render: function render() {
40176
  var _this = this;
@@ -59763,18 +59752,6 @@ webpackJsonp([1],[
59763
  }
59764
 
59765
  _createClass(StatsBadge, [{
59766
- key: 'getBadgeType',
59767
- value: function getBadgeType(stat, rate) {
59768
- var len = stat.badgeRanges.length;
59769
- for (var i = 0; i < len; i += 1) {
59770
- if (rate > stat.badgeRanges[i]) {
59771
- return stat.badgeTypes[i];
59772
- }
59773
- }
59774
- // rate must be zero at this point
59775
- return stat.badgeTypes[len - 1];
59776
- }
59777
- }, {
59778
  key: 'render',
59779
  value: function render() {
59780
  var stat = stats[this.props.stat] || null;
@@ -59787,7 +59764,7 @@ webpackJsonp([1],[
59787
  return null;
59788
  }
59789
 
59790
- var badgeType = this.getBadgeType(stat, rate);
59791
  var badge = badges[badgeType] || null;
59792
  if (!badge) {
59793
  return null;
@@ -59819,6 +59796,18 @@ webpackJsonp([1],[
59819
 
59820
  return content;
59821
  }
 
 
 
 
 
 
 
 
 
 
 
 
59822
  }]);
59823
 
59824
  return StatsBadge;
30983
  )
30984
  )
30985
  );
30986
+ }
30987
+ var select_all_classes = (0, _classnames2['default'])('mailpoet_select_all', { mailpoet_hidden: this.props.selection === false || this.props.count <= this.props.limit
30988
+ });
30989
 
30990
+ return _react2['default'].createElement(
30991
+ 'tbody',
30992
+ null,
30993
+ _react2['default'].createElement(
30994
+ 'tr',
30995
+ { className: select_all_classes },
30996
  _react2['default'].createElement(
30997
+ 'td',
30998
+ { colSpan: this.props.columns.length + (this.props.is_selectable ? 1 : 0) },
30999
+ this.props.selection !== 'all' ? _mailpoet2['default'].I18n.t('selectAllLabel') : _mailpoet2['default'].I18n.t('selectedAllLabel').replace('%d', this.props.count),
31000
+ ' ',
31001
  _react2['default'].createElement(
31002
+ 'a',
31003
+ {
31004
+ onClick: this.props.onSelectAll,
31005
+ href: 'javascript:;' },
31006
+ this.props.selection !== 'all' ? _mailpoet2['default'].I18n.t('selectAllLink') : _mailpoet2['default'].I18n.t('clearSelection')
 
 
 
 
 
 
31007
  )
31008
+ )
31009
+ ),
31010
+ this.props.items.map(function (item, index) {
31011
+ var renderItem = item;
31012
+ renderItem.id = parseInt(item.id, 10);
31013
+ renderItem.selected = _this2.props.selected_ids.indexOf(renderItem.id) !== -1;
31014
+
31015
+ return _react2['default'].createElement(ListingItem, {
31016
+ columns: _this2.props.columns,
31017
+ onSelectItem: _this2.props.onSelectItem,
31018
+ onRenderItem: _this2.props.onRenderItem,
31019
+ onDeleteItem: _this2.props.onDeleteItem,
31020
+ onRestoreItem: _this2.props.onRestoreItem,
31021
+ onTrashItem: _this2.props.onTrashItem,
31022
+ onRefreshItems: _this2.props.onRefreshItems,
31023
+ selection: _this2.props.selection,
31024
+ is_selectable: _this2.props.is_selectable,
31025
+ item_actions: _this2.props.item_actions,
31026
+ group: _this2.props.group,
31027
+ key: 'item-' + renderItem.id + '-' + index,
31028
+ item: renderItem });
31029
+ })
31030
+ );
31031
  }
31032
  });
31033
 
31075
  var key = _getParam2[0];
31076
  var value = _getParam2[1];
31077
 
31078
+ var filters = {};
31079
  switch (key) {
31080
  case 'filter':
 
31081
  value.split('&').map(function (pair) {
31082
  var _pair$split = pair.split('=');
31083
 
31162
  if (base_url !== null) {
31163
  base_url = this.setBaseUrlParams(base_url);
31164
  return '/' + base_url + '/' + params;
 
 
31165
  }
31166
+ return '/' + params;
31167
  },
31168
  setBaseUrlParams: function setBaseUrlParams(base_url) {
31169
  var _this5 = this;
33512
  render: function render() {
33513
  if (this.props.count === 0) {
33514
  return false;
33515
+ }
33516
+ var pagination = false;
33517
+ var firstPage = React.createElement(
33518
+ 'span',
33519
+ { 'aria-hidden': 'true', className: 'tablenav-pages-navspan' },
33520
+ '«'
33521
+ );
33522
+ var previousPage = React.createElement(
33523
+ 'span',
33524
+ { 'aria-hidden': 'true', className: 'tablenav-pages-navspan' },
33525
+ '‹'
33526
+ );
33527
+ var nextPage = React.createElement(
33528
+ 'span',
33529
+ { 'aria-hidden': 'true', className: 'tablenav-pages-navspan' },
33530
+ '›'
33531
+ );
33532
+ var lastPage = React.createElement(
33533
+ 'span',
33534
+ { 'aria-hidden': 'true', className: 'tablenav-pages-navspan' },
33535
+ '»'
33536
+ );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33537
 
33538
+ if (this.props.limit > 0 && this.props.count > this.props.limit) {
33539
+ if (this.props.page > 1) {
33540
+ previousPage = React.createElement(
33541
+ 'a',
33542
+ { href: 'javascript:;',
33543
+ onClick: this.setPreviousPage,
33544
+ className: 'prev-page' },
33545
+ React.createElement(
33546
+ 'span',
33547
+ { className: 'screen-reader-text' },
33548
+ MailPoet.I18n.t('previousPage')
33549
+ ),
33550
+ React.createElement(
33551
+ 'span',
33552
+ { 'aria-hidden': 'true' },
33553
+ '‹'
33554
+ )
33555
+ );
33556
+ }
33557
 
33558
+ if (this.props.page > 2) {
33559
+ firstPage = React.createElement(
33560
+ 'a',
33561
+ { href: 'javascript:;',
33562
+ onClick: this.setFirstPage,
33563
+ className: 'first-page' },
33564
+ React.createElement(
33565
+ 'span',
33566
+ { className: 'screen-reader-text' },
33567
+ MailPoet.I18n.t('firstPage')
33568
+ ),
33569
+ React.createElement(
33570
+ 'span',
33571
+ { 'aria-hidden': 'true' },
33572
+ '«'
33573
+ )
33574
+ );
33575
+ }
33576
 
33577
+ if (this.props.page < this.getLastPage()) {
33578
+ nextPage = React.createElement(
33579
+ 'a',
33580
+ { href: 'javascript:;',
33581
+ onClick: this.setNextPage,
33582
+ className: 'next-page' },
 
33583
  React.createElement(
33584
  'span',
33585
+ { className: 'screen-reader-text' },
33586
+ MailPoet.I18n.t('nextPage')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33587
  ),
33588
+ React.createElement(
33589
+ 'span',
33590
+ { 'aria-hidden': 'true' },
33591
+ '›'
33592
+ )
33593
  );
33594
  }
33595
 
33596
+ if (this.props.page < this.getLastPage() - 1) {
33597
+ lastPage = React.createElement(
33598
+ 'a',
33599
+ { href: 'javascript:;',
33600
+ onClick: this.setLastPage,
33601
+ className: 'last-page' },
33602
+ React.createElement(
33603
+ 'span',
33604
+ { className: 'screen-reader-text' },
33605
+ MailPoet.I18n.t('lastPage')
33606
+ ),
33607
+ React.createElement(
33608
+ 'span',
33609
+ { 'aria-hidden': 'true' },
33610
+ '»'
33611
+ )
33612
+ );
33613
+ }
33614
 
33615
+ var pageValue = this.props.page;
33616
+ if (this.state.page !== null) {
33617
+ pageValue = this.state.page;
 
 
33618
  }
33619
+
33620
+ pagination = React.createElement(
33621
+ 'span',
33622
+ { className: 'pagination-links' },
33623
+ firstPage,
33624
+ ' ',
33625
+ previousPage,
33626
+ ' ',
33627
  React.createElement(
33628
  'span',
33629
+ { className: 'paging-input' },
33630
+ React.createElement(
33631
+ 'label',
33632
+ {
33633
+ className: 'screen-reader-text',
33634
+ htmlFor: 'current-page-selector' },
33635
+ MailPoet.I18n.t('currentPage')
33636
+ ),
33637
+ React.createElement('input', {
33638
+ type: 'text',
33639
+ onChange: this.handleChangeManualPage,
33640
+ onKeyUp: this.handleSetManualPage,
33641
+ onBlur: this.handleBlurManualPage,
33642
+ 'aria-describedby': 'table-paging',
33643
+ size: '2',
33644
+ ref: 'page',
33645
+ value: pageValue,
33646
+ name: 'paged',
33647
+ id: 'current-page-selector',
33648
+ className: 'current-page' }),
33649
+ MailPoet.I18n.t('pageOutOf'),
33650
+ ' ',
33651
+ React.createElement(
33652
+ 'span',
33653
+ { className: 'total-pages' },
33654
+ Math.ceil(this.props.count / this.props.limit).toLocaleString()
33655
+ )
33656
  ),
33657
+ ' ',
33658
+ nextPage,
33659
+ ' ',
33660
+ lastPage
33661
  );
33662
  }
33663
+
33664
+ var classes = classNames('tablenav-pages', { 'one-page': this.props.count <= this.props.limit });
33665
+
33666
+ var numberOfItemsLabel = undefined;
33667
+ if (this.props.count == 1) {
33668
+ numberOfItemsLabel = MailPoet.I18n.t('numberOfItemsSingular');
33669
+ } else {
33670
+ numberOfItemsLabel = MailPoet.I18n.t('numberOfItemsMultiple').replace('%$1d', this.props.count.toLocaleString());
33671
+ }
33672
+ return React.createElement(
33673
+ 'div',
33674
+ { className: classes },
33675
+ React.createElement(
33676
+ 'span',
33677
+ { className: 'displaying-num' },
33678
+ numberOfItemsLabel
33679
+ ),
33680
+ pagination
33681
+ );
33682
  }
33683
  });
33684
 
33706
  render: function render() {
33707
  if (this.props.search === false) {
33708
  return false;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33709
  }
33710
+ return React.createElement(
33711
+ 'form',
33712
+ { name: 'search', onSubmit: this.handleSearch },
33713
+ React.createElement(
33714
+ 'p',
33715
+ { className: 'search-box' },
33716
+ React.createElement(
33717
+ 'label',
33718
+ { htmlFor: 'search_input', className: 'screen-reader-text' },
33719
+ MailPoet.I18n.t('searchLabel')
33720
+ ),
33721
+ React.createElement('input', {
33722
+ type: 'search',
33723
+ id: 'search_input',
33724
+ ref: 'search',
33725
+ name: 's',
33726
+ defaultValue: this.props.search }),
33727
+ React.createElement('input', {
33728
+ type: 'submit',
33729
+ defaultValue: MailPoet.I18n.t('searchLabel'),
33730
+ className: 'button' })
33731
+ )
33732
+ );
33733
  }
33734
  });
33735
 
33949
  templateResult: function templateResult(item) {
33950
  if (item.element && item.element.selected) {
33951
  return null;
33952
+ } else if (item.title) {
33953
+ return item.title;
 
 
 
 
33954
  }
33955
+ return item.text;
33956
  }
33957
  });
33958
 
34041
  transformChangedValue: function transformChangedValue(value) {
34042
  if (typeof this.props.field['transformChangedValue'] === 'function') {
34043
  return this.props.field.transformChangedValue.call(this, value);
 
 
34044
  }
34045
+ return value;
34046
  },
34047
  render: function render() {
34048
  var _this = this;
39985
  handleValueChange: function handleValueChange(e) {
39986
  if (this.props.onChange) {
39987
  return this.props.onChange(e);
39988
+ }
39989
+ var item = this.state.item;
39990
+ var field = e.target.name;
39991
 
39992
+ item[field] = e.target.value;
39993
 
39994
+ this.setState({
39995
+ item: item
39996
+ });
39997
+ return true;
 
39998
  },
39999
  render: function render() {
40000
  var _this3 = this;
40153
  field,
40154
  description
40155
  );
 
 
 
 
 
 
 
40156
  }
40157
+ return React.createElement(
40158
+ 'div',
40159
+ { key: 'field-' + (data.index || 0) },
40160
+ field,
40161
+ description
40162
+ );
40163
  },
40164
  render: function render() {
40165
  var _this = this;
59752
  }
59753
 
59754
  _createClass(StatsBadge, [{
 
 
 
 
 
 
 
 
 
 
 
 
59755
  key: 'render',
59756
  value: function render() {
59757
  var stat = stats[this.props.stat] || null;
59764
  return null;
59765
  }
59766
 
59767
+ var badgeType = StatsBadge.getBadgeType(stat, rate);
59768
  var badge = badges[badgeType] || null;
59769
  if (!badge) {
59770
  return null;
59796
 
59797
  return content;
59798
  }
59799
+ }], [{
59800
+ key: 'getBadgeType',
59801
+ value: function getBadgeType(stat, rate) {
59802
+ var len = stat.badgeRanges.length;
59803
+ for (var i = 0; i < len; i += 1) {
59804
+ if (rate > stat.badgeRanges[i]) {
59805
+ return stat.badgeTypes[i];
59806
+ }
59807
+ }
59808
+ // rate must be zero at this point
59809
+ return stat.badgeTypes[len - 1];
59810
+ }
59811
  }]);
59812
 
59813
  return StatsBadge;
assets/js/manifest.json CHANGED
@@ -1,10 +1,10 @@
1
  {
2
  "mp2migrator.js": "mp2migrator.e755af46.js",
3
  "public.js": "public.8173fe64.js",
4
- "admin.js": "admin.912a26a8.js",
5
- "admin_vendor.js": "admin_vendor.66f57ed3.js",
6
  "form_editor.js": "form_editor.612beb34.js",
7
  "mailpoet.js": "mailpoet.3dd11c86.js",
8
  "newsletter_editor.js": "newsletter_editor.c4722da5.js",
9
- "vendor.js": "vendor.17b09b6c.js"
10
  }
1
  {
2
  "mp2migrator.js": "mp2migrator.e755af46.js",
3
  "public.js": "public.8173fe64.js",
4
+ "admin.js": "admin.73f15e01.js",
5
+ "admin_vendor.js": "admin_vendor.fc9d02c2.js",
6
  "form_editor.js": "form_editor.612beb34.js",
7
  "mailpoet.js": "mailpoet.3dd11c86.js",
8
  "newsletter_editor.js": "newsletter_editor.c4722da5.js",
9
+ "vendor.js": "vendor.b37906c4.js"
10
  }
assets/js/{vendor.17b09b6c.js → vendor.b37906c4.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":"912a26a8","1":"66f57ed3","2":"612beb34","3":"3dd11c86","4":"c4722da5"}[chunkId] + ".chunk.js";
80
  /******/ head.appendChild(script);
81
  /******/ }
82
  /******/ };
76
  /******/ script.charset = 'utf-8';
77
  /******/ script.async = true;
78
 
79
+ /******/ script.src = __webpack_require__.p + "" + ({"0":"admin","1":"admin_vendor","2":"form_editor","3":"mailpoet","4":"newsletter_editor"}[chunkId]||chunkId) + "." + {"0":"73f15e01","1":"fc9d02c2","2":"612beb34","3":"3dd11c86","4":"c4722da5"}[chunkId] + ".chunk.js";
80
  /******/ head.appendChild(script);
81
  /******/ }
82
  /******/ };
lang/index.php CHANGED
@@ -1,3 +0,0 @@
1
- <?php
2
-
3
- // Silence is golden
 
 
 
lang/mailpoet-ca.mo CHANGED
Binary file
lang/mailpoet-da_DK.mo CHANGED
Binary file
lang/mailpoet-de_DE.mo CHANGED
Binary file
lang/mailpoet-en_GB.mo CHANGED
Binary file
lang/mailpoet-es_ES.mo CHANGED
Binary file
lang/mailpoet-fa_IR.mo CHANGED
Binary file
lang/mailpoet-fr_CA.mo CHANGED
Binary file
lang/mailpoet-fr_FR.mo CHANGED
Binary file
lang/mailpoet-it_IT.mo CHANGED
Binary file
lang/mailpoet-ja.mo CHANGED
Binary file
lang/mailpoet-nl_NL.mo CHANGED
Binary file
lang/mailpoet-pl_PL.mo CHANGED
Binary file
lang/mailpoet-pt_BR.mo CHANGED
Binary file
lang/mailpoet-pt_PT.mo CHANGED
Binary file
lang/mailpoet-ru_RU.mo CHANGED
Binary file
lang/mailpoet-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: 2017-10-31 16:04:34+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -82,7 +82,6 @@ msgid "Email"
82
  msgstr ""
83
 
84
  #: lib/API/JSON/v1/Forms.php:80
85
- #: vendor_backup/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:284
86
  msgid "Submit"
87
  msgstr ""
88
 
@@ -253,27 +252,35 @@ msgstr ""
253
  msgid "This subscriber already exists."
254
  msgstr ""
255
 
256
- #: lib/Config/AccessControl.php:74
 
 
 
 
 
 
 
 
257
  msgid "Admin menu item"
258
  msgstr ""
259
 
260
- #: lib/Config/AccessControl.php:75
261
  msgid "Manage settings"
262
  msgstr ""
263
 
264
- #: lib/Config/AccessControl.php:76
265
  msgid "Manage emails"
266
  msgstr ""
267
 
268
- #: lib/Config/AccessControl.php:77
269
  msgid "Manage subscribers"
270
  msgstr ""
271
 
272
- #: lib/Config/AccessControl.php:78
273
  msgid "Manage forms"
274
  msgstr ""
275
 
276
- #: lib/Config/AccessControl.php:79
277
  msgid "Manage segments"
278
  msgstr ""
279
 
@@ -1740,315 +1747,6 @@ msgid ""
1740
  "the plugin."
1741
  msgstr ""
1742
 
1743
- #: vendor_backup/lucatume/wp-browser/src/data/plugins/internationalized-plugin.php:11
1744
- msgid "This is a dummy plugin"
1745
- msgstr ""
1746
-
1747
- #: vendor_backup/lucatume/wp-browser/src/data/plugins/wordpress-importer/parsers.php:42
1748
- #: vendor_backup/lucatume/wp-browser/src/data/plugins/wordpress-importer/parsers.php:72
1749
- #: vendor_backup/lucatume/wp-browser/src/data/plugins/wordpress-importer/parsers.php:80
1750
- msgid "There was an error when reading this WXR file"
1751
- msgstr ""
1752
-
1753
- #: vendor_backup/lucatume/wp-browser/src/data/plugins/wordpress-importer/parsers.php:43
1754
- msgid ""
1755
- "Details are shown above. The importer will now try again with a different "
1756
- "parser..."
1757
- msgstr ""
1758
-
1759
- #: vendor_backup/lucatume/wp-browser/src/data/plugins/wordpress-importer/parsers.php:84
1760
- #: vendor_backup/lucatume/wp-browser/src/data/plugins/wordpress-importer/parsers.php:89
1761
- #: vendor_backup/lucatume/wp-browser/src/data/plugins/wordpress-importer/parsers.php:306
1762
- #: vendor_backup/lucatume/wp-browser/src/data/plugins/wordpress-importer/parsers.php:495
1763
- msgid "This does not appear to be a WXR file, missing/invalid WXR version number"
1764
- msgstr ""
1765
-
1766
- #: vendor_backup/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:132
1767
- #: vendor_backup/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:141
1768
- #: vendor_backup/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:192
1769
- #: vendor_backup/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:196
1770
- #: vendor_backup/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:205
1771
- msgid "Sorry, there has been an error."
1772
- msgstr ""
1773
-
1774
- #: vendor_backup/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:133
1775
- msgid "The file does not exist, please try again."
1776
- msgstr ""
1777
-
1778
- #: vendor_backup/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:176
1779
- msgid "All done."
1780
- msgstr ""
1781
-
1782
- #: vendor_backup/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:176
1783
- msgid "Have fun!"
1784
- msgstr ""
1785
-
1786
- #: vendor_backup/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:177
1787
- msgid "Remember to update the passwords and roles of imported users."
1788
- msgstr ""
1789
-
1790
- #: vendor_backup/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:197
1791
- msgid ""
1792
- "The export file could not be found at <code>%s</code>. It is likely that "
1793
- "this was caused by a permissions problem."
1794
- msgstr ""
1795
-
1796
- #: vendor_backup/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:213
1797
- msgid ""
1798
- "This WXR file (version %s) may not be supported by this version of the "
1799
- "importer. Please consider updating."
1800
- msgstr ""
1801
-
1802
- #: vendor_backup/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:238
1803
- msgid ""
1804
- "Failed to import author %s. Their posts will be attributed to the current "
1805
- "user."
1806
- msgstr ""
1807
-
1808
- #: vendor_backup/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:264
1809
- msgid "Assign Authors"
1810
- msgstr ""
1811
-
1812
- #: vendor_backup/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:265
1813
- msgid ""
1814
- "To make it easier for you to edit and save the imported content, you may "
1815
- "want to reassign the author of the imported item to an existing user of "
1816
- "this site. For example, you may want to import all the entries as "
1817
- "<code>admin</code>s entries."
1818
- msgstr ""
1819
-
1820
- #: vendor_backup/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:267
1821
- msgid ""
1822
- "If a new user is created by WordPress, a new password will be randomly "
1823
- "generated and the new user&#8217;s role will be set as %s. Manually "
1824
- "changing the new user&#8217;s details will be necessary."
1825
- msgstr ""
1826
-
1827
- #: vendor_backup/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:277
1828
- msgid "Import Attachments"
1829
- msgstr ""
1830
-
1831
- #: vendor_backup/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:280
1832
- msgid "Download and import file attachments"
1833
- msgstr ""
1834
-
1835
- #: vendor_backup/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:297
1836
- msgid "Import author:"
1837
- msgstr ""
1838
-
1839
- #: vendor_backup/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:308
1840
- msgid "or create new user with login name:"
1841
- msgstr ""
1842
-
1843
- #: vendor_backup/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:311
1844
- msgid "as a new user:"
1845
- msgstr ""
1846
-
1847
- #: vendor_backup/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:319
1848
- msgid "assign posts to an existing user:"
1849
- msgstr ""
1850
-
1851
- #: vendor_backup/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:321
1852
- msgid "or assign posts to an existing user:"
1853
- msgstr ""
1854
-
1855
- #: vendor_backup/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:322
1856
- msgid "- Select -"
1857
- msgstr ""
1858
-
1859
- #: vendor_backup/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:372
1860
- msgid ""
1861
- "Failed to create new user for %s. Their posts will be attributed to the "
1862
- "current user."
1863
- msgstr ""
1864
-
1865
- #: vendor_backup/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:424
1866
- msgid "Failed to import category %s"
1867
- msgstr ""
1868
-
1869
- #: vendor_backup/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:467
1870
- msgid "Failed to import post tag %s"
1871
- msgstr ""
1872
-
1873
- #: vendor_backup/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:516
1874
- #: vendor_backup/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:738
1875
- msgid "Failed to import %s %s"
1876
- msgstr ""
1877
-
1878
- #: vendor_backup/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:605
1879
- msgid "Failed to import &#8220;%s&#8221;: Invalid post type %s"
1880
- msgstr ""
1881
-
1882
- #: vendor_backup/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:642
1883
- msgid "%s &#8220;%s&#8221; already exists."
1884
- msgstr ""
1885
-
1886
- #: vendor_backup/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:704
1887
- msgid "Failed to import %s &#8220;%s&#8221;"
1888
- msgstr ""
1889
-
1890
- #: vendor_backup/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:869
1891
- msgid "Menu item skipped due to missing menu slug"
1892
- msgstr ""
1893
-
1894
- #: vendor_backup/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:876
1895
- msgid "Menu item skipped due to invalid menu slug: %s"
1896
- msgstr ""
1897
-
1898
- #: vendor_backup/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:939
1899
- msgid "Fetching attachments is not enabled"
1900
- msgstr ""
1901
-
1902
- #: vendor_backup/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:952
1903
- msgid "Invalid file type"
1904
- msgstr ""
1905
-
1906
- #: vendor_backup/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:996
1907
- msgid "Remote server did not respond"
1908
- msgstr ""
1909
-
1910
- #: vendor_backup/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:1002
1911
- msgid "Remote server returned error response %1$d %2$s"
1912
- msgstr ""
1913
-
1914
- #: vendor_backup/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:1009
1915
- msgid "Remote file is incorrect size"
1916
- msgstr ""
1917
-
1918
- #: vendor_backup/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:1014
1919
- msgid "Zero size file downloaded"
1920
- msgstr ""
1921
-
1922
- #: vendor_backup/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:1020
1923
- msgid "Remote file is too large, limit is %s"
1924
- msgstr ""
1925
-
1926
- #: vendor_backup/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:1119
1927
- msgid "Import WordPress"
1928
- msgstr ""
1929
-
1930
- #: vendor_backup/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:1126
1931
- msgid ""
1932
- "A new version of this importer is available. Please update to version %s to "
1933
- "ensure compatibility with newer export files."
1934
- msgstr ""
1935
-
1936
- #: vendor_backup/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:1141
1937
- msgid ""
1938
- "Howdy! Upload your WordPress eXtended RSS (WXR) file and we&#8217;ll import "
1939
- "the posts, pages, comments, custom fields, categories, and tags into this "
1940
- "site."
1941
- msgstr ""
1942
-
1943
- #: vendor_backup/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:1142
1944
- msgid "Choose a WXR (.xml) file to upload, then click Upload file and import."
1945
- msgstr ""
1946
-
1947
- #: vendor_backup/lucatume/wp-browser/src/data/plugins/wordpress-importer/wordpress-importer.php:1216
1948
- msgid ""
1949
- "Import <strong>posts, pages, comments, custom fields, categories, and "
1950
- "tags</strong> from a WordPress export file."
1951
- msgstr ""
1952
-
1953
- #: vendor_backup/lucatume/wp-browser/src/data/themedir1/internationalized-theme/functions.php:7
1954
- msgid "This is a dummy theme"
1955
- msgstr ""
1956
-
1957
- #: vendor_backup/wp-cli/core-command/src/Core_Command.php:644
1958
- msgid "Wildcard DNS may not be configured correctly."
1959
- msgstr ""
1960
-
1961
- #: vendor_backup/wp-cli/cron-command/src/Cron_Event_Command.php:428
1962
- msgid "%s year"
1963
- msgid_plural "%s years"
1964
- msgstr[0] ""
1965
- msgstr[1] ""
1966
-
1967
- #: vendor_backup/wp-cli/cron-command/src/Cron_Event_Command.php:429
1968
- msgid "%s month"
1969
- msgid_plural "%s months"
1970
- msgstr[0] ""
1971
- msgstr[1] ""
1972
-
1973
- #: vendor_backup/wp-cli/cron-command/src/Cron_Event_Command.php:430
1974
- msgid "%s week"
1975
- msgid_plural "%s weeks"
1976
- msgstr[0] ""
1977
- msgstr[1] ""
1978
-
1979
- #: vendor_backup/wp-cli/cron-command/src/Cron_Event_Command.php:431
1980
- msgid "%s day"
1981
- msgid_plural "%s days"
1982
- msgstr[0] ""
1983
- msgstr[1] ""
1984
-
1985
- #: vendor_backup/wp-cli/cron-command/src/Cron_Event_Command.php:432
1986
- msgid "%s hour"
1987
- msgid_plural "%s hours"
1988
- msgstr[0] ""
1989
- msgstr[1] ""
1990
-
1991
- #: vendor_backup/wp-cli/cron-command/src/Cron_Event_Command.php:433
1992
- msgid "%s minute"
1993
- msgid_plural "%s minutes"
1994
- msgstr[0] ""
1995
- msgstr[1] ""
1996
-
1997
- #: vendor_backup/wp-cli/cron-command/src/Cron_Event_Command.php:434
1998
- msgid "%s second"
1999
- msgid_plural "%s seconds"
2000
- msgstr[0] ""
2001
- msgstr[1] ""
2002
-
2003
- #: vendor_backup/wp-cli/entity-command/src/Site_Command.php:118
2004
- msgid "Uncategorized"
2005
- msgstr ""
2006
-
2007
- #: vendor_backup/wp-cli/export-command/src/Export_Command.php:324
2008
- msgid "Invalid start ID: %d"
2009
- msgstr ""
2010
-
2011
- #: vendor_backup/wp-cli/export-command/src/WP_Export_File_Writer.php:15
2012
- #: vendor_backup/wp-cli/export-command/src/WP_Export_Split_Files_Writer.php:63
2013
- msgid "WP Export: error opening %s for writing."
2014
- msgstr ""
2015
-
2016
- #: vendor_backup/wp-cli/export-command/src/WP_Export_File_Writer.php:32
2017
- #: vendor_backup/wp-cli/export-command/src/WP_Export_Split_Files_Writer.php:51
2018
- msgid "WP Export: error writing to export file."
2019
- msgstr ""
2020
-
2021
- #: vendor_backup/wp-cli/export-command/src/WP_Export_Query.php:337
2022
- msgid "Term is missing a parent: %s (%d)"
2023
- msgstr ""
2024
-
2025
- #: vendor_backup/wp-cli/export-command/src/WP_Export_XML_Over_HTTP.php:19
2026
- #: vendor_backup/wp-cli/export-command/src/WP_Export_XML_Over_HTTP.php:23
2027
- msgid "Export Error"
2028
- msgstr ""
2029
-
2030
- #: vendor_backup/wp-cli/extension-command/src/WP_CLI/CommandWithUpgrade.php:605
2031
- msgid " Try again"
2032
- msgstr ""
2033
-
2034
- #: vendor_backup/wp-cli/extension-command/src/WP_CLI/CommandWithUpgrade.php:610
2035
- msgid "API error. Try Again."
2036
- msgstr ""
2037
-
2038
- #: vendor_backup/wp-cli/media-command/src/Media_Command.php:129
2039
- msgid "image"
2040
- msgid_plural "images"
2041
- msgstr[0] ""
2042
- msgstr[1] ""
2043
-
2044
- #: vendor_backup/wp-cli/wp-cli/php/utils-wp.php:171
2045
- msgid "Inactive Widgets"
2046
- msgstr ""
2047
-
2048
- #: vendor_backup/wp-cli/wp-cli/php/utils-wp.php:174
2049
- msgid "Drag widgets here to remove them from the sidebar but keep their settings."
2050
- msgstr ""
2051
-
2052
  #: views/form/editor.html:5
2053
  msgid "Form"
2054
  msgstr ""
@@ -5686,18 +5384,6 @@ msgctxt "segments per page (screen options)"
5686
  msgid "Number of segments per page"
5687
  msgstr ""
5688
 
5689
- #: vendor_backup/wp-cli/core-command/src/Core_Command.php:427
5690
- #: vendor_backup/wp-cli/core-command/src/Core_Command.php:500
5691
- msgctxt "Default network name"
5692
- msgid "%s Sites"
5693
- msgstr ""
5694
-
5695
- #: vendor_backup/wp-cli/entity-command/src/Site_Command.php:121
5696
- #. translators: Default category slug
5697
- msgctxt "Default category slug"
5698
- msgid "Uncategorized"
5699
- msgstr ""
5700
-
5701
  #: views/form/templates/settings/field_form.hbs:37
5702
  msgctxt "Form input type"
5703
  msgid "Select"
4
  msgstr ""
5
  "Project-Id-Version: \n"
6
  "Report-Msgid-Bugs-To: http://support.mailpoet.com/\n"
7
+ "POT-Creation-Date: 2017-11-07 13:13:53+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
82
  msgstr ""
83
 
84
  #: lib/API/JSON/v1/Forms.php:80
 
85
  msgid "Submit"
86
  msgstr ""
87
 
252
  msgid "This subscriber already exists."
253
  msgstr ""
254
 
255
+ #: lib/API/MP/v1/API.php:140
256
+ msgid "List name is required."
257
+ msgstr ""
258
+
259
+ #: lib/API/MP/v1/API.php:147
260
+ msgid "This list already exists."
261
+ msgstr ""
262
+
263
+ #: lib/Config/AccessControl.php:72
264
  msgid "Admin menu item"
265
  msgstr ""
266
 
267
+ #: lib/Config/AccessControl.php:73
268
  msgid "Manage settings"
269
  msgstr ""
270
 
271
+ #: lib/Config/AccessControl.php:74
272
  msgid "Manage emails"
273
  msgstr ""
274
 
275
+ #: lib/Config/AccessControl.php:75
276
  msgid "Manage subscribers"
277
  msgstr ""
278
 
279
+ #: lib/Config/AccessControl.php:76
280
  msgid "Manage forms"
281
  msgstr ""
282
 
283
+ #: lib/Config/AccessControl.php:77
284
  msgid "Manage segments"
285
  msgstr ""
286
 
1747
  "the plugin."
1748
  msgstr ""
1749
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1750
  #: views/form/editor.html:5
1751
  msgid "Form"
1752
  msgstr ""
5384
  msgid "Number of segments per page"
5385
  msgstr ""
5386
 
 
 
 
 
 
 
 
 
 
 
 
 
5387
  #: views/form/templates/settings/field_form.hbs:37
5388
  msgctxt "Form input type"
5389
  msgid "Select"
lib/API/MP/v1/API.php CHANGED
@@ -133,6 +133,37 @@ class API {
133
  return $new_subscriber->withCustomFields()->withSubscriptions()->asArray();
134
  }
135
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
136
  protected function _sendConfirmationEmail(Subscriber $subscriber) {
137
  return $subscriber->sendConfirmationEmail();
138
  }
133
  return $new_subscriber->withCustomFields()->withSubscriptions()->asArray();
134
  }
135
 
136
+ function addList(array $list) {
137
+ // throw exception when list name is missing
138
+ if(empty($list['name'])) {
139
+ throw new \Exception(
140
+ __('List name is required.', 'mailpoet')
141
+ );
142
+ }
143
+
144
+ // throw exception when list already exists
145
+ if(Segment::where('name', $list['name'])->findOne()) {
146
+ throw new \Exception(
147
+ __('This list already exists.', 'mailpoet')
148
+ );
149
+ }
150
+
151
+ // add list
152
+ $new_list = Segment::create();
153
+ $new_list->hydrate($list);
154
+ $new_list->save();
155
+ if($new_list->getErrors() !== false) {
156
+ throw new \Exception(
157
+ __(sprintf('Failed to add list: %s', strtolower(implode(', ', $new_list->getErrors()))), 'mailpoet')
158
+ );
159
+ }
160
+
161
+ // reload list to get the saved created|updated|delete dates/other fields
162
+ $new_list = Segment::findOne($new_list->id);
163
+
164
+ return $new_list->asArray();
165
+ }
166
+
167
  protected function _sendConfirmationEmail(Subscriber $subscriber) {
168
  return $subscriber->sendConfirmationEmail();
169
  }
lib/Analytics/Reporter.php CHANGED
@@ -12,7 +12,7 @@ use MailPoet\Settings\Pages;
12
  class Reporter {
13
 
14
  function getData() {
15
-
16
  $mta = Setting::getValue('mta', array());
17
  $newsletters = Newsletter::getAnalytics();
18
  $isCronTriggerMethodWP = Setting::getValue('cron_trigger.method') === CronTrigger::$available_methods['wordpress'];
@@ -22,6 +22,15 @@ class Reporter {
22
 
23
  return array(
24
  'PHP version' => PHP_VERSION,
 
 
 
 
 
 
 
 
 
25
  'MailPoet Free version' => MAILPOET_VERSION,
26
  'MailPoet Premium version' => (defined('MAILPOET_PREMIUM_VERSION')) ? MAILPOET_PREMIUM_VERSION : 'N/A',
27
  'Total number of subscribers' => Subscriber::getTotalSubscribers(),
12
  class Reporter {
13
 
14
  function getData() {
15
+ global $wpdb, $wp_version;
16
  $mta = Setting::getValue('mta', array());
17
  $newsletters = Newsletter::getAnalytics();
18
  $isCronTriggerMethodWP = Setting::getValue('cron_trigger.method') === CronTrigger::$available_methods['wordpress'];
22
 
23
  return array(
24
  'PHP version' => PHP_VERSION,
25
+ 'MySQL version' => $wpdb->db_version(),
26
+ 'WordPress version' => $wp_version,
27
+ 'Multisite environment' => is_multisite() ? 'yes' : 'no',
28
+ 'RTL' => is_rtl() ? 'yes' : 'no',
29
+ 'WP_MEMORY_LIMIT' => WP_MEMORY_LIMIT,
30
+ 'WP_MAX_MEMORY_LIMIT' => WP_MAX_MEMORY_LIMIT,
31
+ 'PHP memory_limit' => ini_get('memory_limit'),
32
+ 'PHP max_execution_time' => ini_get('max_execution_time'),
33
+ 'users_can_register' => get_option('users_can_register') ? 'yes' : 'no',
34
  'MailPoet Free version' => MAILPOET_VERSION,
35
  'MailPoet Premium version' => (defined('MAILPOET_PREMIUM_VERSION')) ? MAILPOET_PREMIUM_VERSION : 'N/A',
36
  'Total number of subscribers' => Subscriber::getTotalSubscribers(),
lib/Config/AccessControl.php CHANGED
@@ -22,8 +22,6 @@ class AccessControl {
22
 
23
  function __construct() {
24
  $this->permissions = self::getDefaultPermissions();
25
- $this->user_roles = $this->getUserRoles();
26
- $this->user_capabilities = $this->getUserCapabilities();
27
  }
28
 
29
  static function getDefaultPermissions() {
@@ -80,30 +78,8 @@ class AccessControl {
80
  );
81
  }
82
 
83
- function getUserRoles() {
84
- $user = wp_get_current_user();
85
- return $user->roles;
86
- }
87
-
88
- function getUserCapabilities() {
89
- $user = wp_get_current_user();
90
- return array_keys($user->allcaps);
91
- }
92
-
93
- function getUserFirstCapability() {
94
- return (!empty($this->user_capabilities)) ?
95
- $this->user_capabilities[0] :
96
- null;
97
- }
98
-
99
  function validatePermission($permission) {
100
  if($permission === self::NO_ACCESS_RESTRICTION) return true;
101
- foreach($this->user_roles as $role) {
102
- $role_object = get_role($role);
103
- if($role_object && $role_object->has_cap($permission)) {
104
- return true;
105
- }
106
- }
107
- return false;
108
  }
109
  }
22
 
23
  function __construct() {
24
  $this->permissions = self::getDefaultPermissions();
 
 
25
  }
26
 
27
  static function getDefaultPermissions() {
78
  );
79
  }
80
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
  function validatePermission($permission) {
82
  if($permission === self::NO_ACCESS_RESTRICTION) return true;
83
+ return current_user_can($permission);
 
 
 
 
 
 
84
  }
85
  }
lib/Config/Widget.php CHANGED
@@ -105,7 +105,7 @@ class Widget {
105
  wp_enqueue_script(
106
  'mailpoet_public',
107
  Env::$assets_url . '/js/' . $this->renderer->getJsAsset('public.js'),
108
- array(),
109
  Env::$version,
110
  true
111
  );
105
  wp_enqueue_script(
106
  'mailpoet_public',
107
  Env::$assets_url . '/js/' . $this->renderer->getJsAsset('public.js'),
108
+ array('jquery'),
109
  Env::$version,
110
  true
111
  );
lib/Segments/WP.php CHANGED
@@ -124,6 +124,7 @@ class WP {
124
  SET %1$s.first_name = wpum.meta_value
125
  WHERE %1$s.first_name = ""
126
  AND %1$s.wp_user_id IS NOT NULL
 
127
  ', $subscribers_table, $wpdb->usermeta));
128
  }
129
 
@@ -136,6 +137,7 @@ class WP {
136
  SET %1$s.last_name = wpum.meta_value
137
  WHERE %1$s.last_name = ""
138
  AND %1$s.wp_user_id IS NOT NULL
 
139
  ', $subscribers_table, $wpdb->usermeta));
140
  }
141
 
124
  SET %1$s.first_name = wpum.meta_value
125
  WHERE %1$s.first_name = ""
126
  AND %1$s.wp_user_id IS NOT NULL
127
+ AND wpum.meta_value IS NOT NULL
128
  ', $subscribers_table, $wpdb->usermeta));
129
  }
130
 
137
  SET %1$s.last_name = wpum.meta_value
138
  WHERE %1$s.last_name = ""
139
  AND %1$s.wp_user_id IS NOT NULL
140
+ AND wpum.meta_value IS NOT NULL
141
  ', $subscribers_table, $wpdb->usermeta));
142
  }
143
 
mailpoet.php CHANGED
@@ -4,7 +4,7 @@ if(!defined('ABSPATH')) exit;
4
 
5
  /*
6
  * Plugin Name: MailPoet 3 (New)
7
- * Version: 3.0.9
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.0.9',
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.1.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.1.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.6
5
  Tested up to: 4.8
6
  Requires PHP: 5.3
7
- Stable tag: 3.0.9
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -114,6 +114,12 @@ Stop by our [support site](https://www.mailpoet.com/support).
114
 
115
  == Changelog ==
116
 
 
 
 
 
 
 
117
  = 3.0.9 - 2017-10-31 =
118
  * Improved: search forms in listings ignore preceding and trailing whitespace;
119
  * Fixed: tags aren't shown within categories for automated latest content posts anymore. Thanks Gregor!
4
  Requires at least: 4.6
5
  Tested up to: 4.8
6
  Requires PHP: 5.3
7
+ Stable tag: 3.1.0
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
114
 
115
  == Changelog ==
116
 
117
+ = 3.1.0 - 2017-11-07 =
118
+ * Added: a method to create a new list via our public API;
119
+ * Fixed: javascript files are loaded with a dependency on jquery; Thanks George!
120
+ * Fixed: WP users sync no longer chokes on NULL values for first/last names. Thanks @cartpauj!
121
+ * Fixed: superadmin users on Multisite installations can always access MailPoet on subsites. Thanks Ryan!
122
+
123
  = 3.0.9 - 2017-10-31 =
124
  * Improved: search forms in listings ignore preceding and trailing whitespace;
125
  * Fixed: tags aren't shown within categories for automated latest content posts anymore. Thanks Gregor!
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInitf9d2a4b18144ddc75d068b570a0c9a57::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit9f16e334fc76d49aae4f1021acbf4a8f::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInitf9d2a4b18144ddc75d068b570a0c9a57
6
  {
7
  private static $loader;
8
 
@@ -19,15 +19,15 @@ class ComposerAutoloaderInitf9d2a4b18144ddc75d068b570a0c9a57
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInitf9d2a4b18144ddc75d068b570a0c9a57', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInitf9d2a4b18144ddc75d068b570a0c9a57', '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\ComposerStaticInitf9d2a4b18144ddc75d068b570a0c9a57::getInitializer($loader));
31
  } else {
32
  $map = require __DIR__ . '/autoload_namespaces.php';
33
  foreach ($map as $namespace => $path) {
@@ -48,19 +48,19 @@ class ComposerAutoloaderInitf9d2a4b18144ddc75d068b570a0c9a57
48
  $loader->register(true);
49
 
50
  if ($useStaticLoader) {
51
- $includeFiles = Composer\Autoload\ComposerStaticInitf9d2a4b18144ddc75d068b570a0c9a57::$files;
52
  } else {
53
  $includeFiles = require __DIR__ . '/autoload_files.php';
54
  }
55
  foreach ($includeFiles as $fileIdentifier => $file) {
56
- composerRequiref9d2a4b18144ddc75d068b570a0c9a57($fileIdentifier, $file);
57
  }
58
 
59
  return $loader;
60
  }
61
  }
62
 
63
- function composerRequiref9d2a4b18144ddc75d068b570a0c9a57($fileIdentifier, $file)
64
  {
65
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
66
  require $file;
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit9f16e334fc76d49aae4f1021acbf4a8f
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInit9f16e334fc76d49aae4f1021acbf4a8f', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInit9f16e334fc76d49aae4f1021acbf4a8f', '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\ComposerStaticInit9f16e334fc76d49aae4f1021acbf4a8f::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\ComposerStaticInit9f16e334fc76d49aae4f1021acbf4a8f::$files;
52
  } else {
53
  $includeFiles = require __DIR__ . '/autoload_files.php';
54
  }
55
  foreach ($includeFiles as $fileIdentifier => $file) {
56
+ composerRequire9f16e334fc76d49aae4f1021acbf4a8f($fileIdentifier, $file);
57
  }
58
 
59
  return $loader;
60
  }
61
  }
62
 
63
+ function composerRequire9f16e334fc76d49aae4f1021acbf4a8f($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 ComposerStaticInitf9d2a4b18144ddc75d068b570a0c9a57
8
  {
9
  public static $files = array (
10
  '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
@@ -840,10 +840,10 @@ class ComposerStaticInitf9d2a4b18144ddc75d068b570a0c9a57
840
  public static function getInitializer(ClassLoader $loader)
841
  {
842
  return \Closure::bind(function () use ($loader) {
843
- $loader->prefixLengthsPsr4 = ComposerStaticInitf9d2a4b18144ddc75d068b570a0c9a57::$prefixLengthsPsr4;
844
- $loader->prefixDirsPsr4 = ComposerStaticInitf9d2a4b18144ddc75d068b570a0c9a57::$prefixDirsPsr4;
845
- $loader->prefixesPsr0 = ComposerStaticInitf9d2a4b18144ddc75d068b570a0c9a57::$prefixesPsr0;
846
- $loader->classMap = ComposerStaticInitf9d2a4b18144ddc75d068b570a0c9a57::$classMap;
847
 
848
  }, null, ClassLoader::class);
849
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit9f16e334fc76d49aae4f1021acbf4a8f
8
  {
9
  public static $files = array (
10
  '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
840
  public static function getInitializer(ClassLoader $loader)
841
  {
842
  return \Closure::bind(function () use ($loader) {
843
+ $loader->prefixLengthsPsr4 = ComposerStaticInit9f16e334fc76d49aae4f1021acbf4a8f::$prefixLengthsPsr4;
844
+ $loader->prefixDirsPsr4 = ComposerStaticInit9f16e334fc76d49aae4f1021acbf4a8f::$prefixDirsPsr4;
845
+ $loader->prefixesPsr0 = ComposerStaticInit9f16e334fc76d49aae4f1021acbf4a8f::$prefixesPsr0;
846
+ $loader->classMap = ComposerStaticInit9f16e334fc76d49aae4f1021acbf4a8f::$classMap;
847
 
848
  }, null, ClassLoader::class);
849
  }
views/update.html CHANGED
@@ -94,7 +94,7 @@
94
  <div class="feature-section one-col mailpoet_centered">
95
  <h2><%= __('Care to Give Your Opinion?') %></h2>
96
 
97
- <div class="pd-embed" id="pd_1508246191"></div>
98
  <script type="text/javascript">
99
  var _polldaddy = [] || _polldaddy;
100
 
@@ -102,8 +102,8 @@
102
  type: "iframe",
103
  auto: "1",
104
  domain: "mailpoet.polldaddy.com/s/",
105
- id: "what-s-one-feature-that-s-missing-in-mailpoet-1",
106
- placeholder: "pd_1508246191"
107
  } );
108
 
109
  (function(d,c,j){if(!document.getElementById(j)){var pd=d.createElement(c),s;pd.id=j;pd.src=('https:'==document.location.protocol)?'https://polldaddy.com/survey.js':'http://i0.poll.fm/survey.js';s=document.getElementsByTagName(c)[0];s.parentNode.insertBefore(pd,s);}}(document,'script','pd-embed'));
94
  <div class="feature-section one-col mailpoet_centered">
95
  <h2><%= __('Care to Give Your Opinion?') %></h2>
96
 
97
+ <div class="pd-embed" id="pd_1510025011"></div>
98
  <script type="text/javascript">
99
  var _polldaddy = [] || _polldaddy;
100
 
102
  type: "iframe",
103
  auto: "1",
104
  domain: "mailpoet.polldaddy.com/s/",
105
+ id: "mailpoet-interview-sign-up-form",
106
+ placeholder: "pd_1510025011"
107
  } );
108
 
109
  (function(d,c,j){if(!document.getElementById(j)){var pd=d.createElement(c),s;pd.id=j;pd.src=('https:'==document.location.protocol)?'https://polldaddy.com/survey.js':'http://i0.poll.fm/survey.js';s=document.getElementsByTagName(c)[0];s.parentNode.insertBefore(pd,s);}}(document,'script','pd-embed'));