Newsletter - Version 6.2.2

Version Description

  • Fixed custom blocks style.css loading
  • Fixed loading sequence for Archive Addon
  • Labels translation on profile panel
Download this release

Release Info

Developer satollo
Plugin Icon 128x128 Newsletter
Version 6.2.2
Comparing to
See all releases

Code changes from version 6.2.1 to 6.2.2

emails/emails.php CHANGED
@@ -936,19 +936,14 @@ class NewsletterEmails extends NewsletterModule {
936
 
937
  function get_composer_css() {
938
  $css = file_get_contents(__DIR__ . '/tnp-composer/css/newsletter.css');
939
- $dirs = apply_filters('newsletter_blocks_dir', array());
940
- array_push($dirs, __DIR__ . '/blocks');
941
- foreach ($dirs as $dir) {
942
- $dir = str_replace('\\', '/', $dir);
943
- $list = NewsletterEmails::instance()->scan_blocks_dir($dir);
944
-
945
- foreach ($list as $key => $data) {
946
- if (!file_exists($data['dir'] . '/style.css'))
947
- continue;
948
- $css .= "\n\n";
949
- $css .= "/* " . $data['name'] . " */\n";
950
- $css .= file_get_contents($data['dir'] . '/style.css');
951
  }
 
 
 
952
  }
953
  return $css;
954
  }
936
 
937
  function get_composer_css() {
938
  $css = file_get_contents(__DIR__ . '/tnp-composer/css/newsletter.css');
939
+ $blocks = $this->get_blocks();
940
+ foreach ($blocks as $block) {
941
+ if (!file_exists($block['dir'] . '/style.css')) {
942
+ continue;
 
 
 
 
 
 
 
 
943
  }
944
+ $css .= "\n\n";
945
+ $css .= "/* " . $block['name'] . " */\n";
946
+ $css .= file_get_contents($block['dir'] . '/style.css');
947
  }
948
  return $css;
949
  }
includes/module.php CHANGED
@@ -105,20 +105,18 @@ class NewsletterAddon {
105
  var $name;
106
  var $options;
107
  var $version;
108
- static $instance;
109
 
110
  public function __construct($name, $version = '0.0.0') {
111
- self::$instance = $this;
112
  $this->name = $name;
113
  $this->version = $version;
114
  if (is_admin()) {
115
- $old_version = get_option('newsletter_' . $name . '_version', '0.0.0');
116
- if ($version > $old_version) {
117
- $this->upgrade($old_version === '0.0.0');
118
  update_option('newsletter_' . $name . '_version', $version, false);
119
  }
120
  }
121
- add_action('init', array($this, 'init'));
122
 
123
  if (is_admin()) {
124
  if (!class_exists('NewsletterExtensions')) {
@@ -132,12 +130,7 @@ class NewsletterAddon {
132
  }
133
  }
134
 
135
- static function instance() {
136
- return self::$instance;
137
- }
138
-
139
  function upgrade($first_install = false) {
140
-
141
  }
142
 
143
  function init() {
@@ -1784,7 +1777,7 @@ class NewsletterModule {
1784
 
1785
  // Company info
1786
  // TODO: Move to another module
1787
- $options = Newsletter::instance()->options;
1788
  $text = str_replace('{company_address}', $options['footer_contact'], $text);
1789
  $text = str_replace('{company_name}', $options['footer_title'], $text);
1790
 
105
  var $name;
106
  var $options;
107
  var $version;
 
108
 
109
  public function __construct($name, $version = '0.0.0') {
 
110
  $this->name = $name;
111
  $this->version = $version;
112
  if (is_admin()) {
113
+ $old_version = get_option('newsletter_' . $name . '_version');
114
+ if ($version != $old_version) {
115
+ $this->upgrade($old_version === false);
116
  update_option('newsletter_' . $name . '_version', $version, false);
117
  }
118
  }
119
+ add_action('newsletter_init', array($this, 'init'));
120
 
121
  if (is_admin()) {
122
  if (!class_exists('NewsletterExtensions')) {
130
  }
131
  }
132
 
 
 
 
 
133
  function upgrade($first_install = false) {
 
134
  }
135
 
136
  function init() {
1777
 
1778
  // Company info
1779
  // TODO: Move to another module
1780
+ $options = Newsletter::instance()->get_options('info');
1781
  $text = str_replace('{company_address}', $options['footer_contact'], $text);
1782
  $text = str_replace('{company_name}', $options['footer_title'], $text);
1783
 
plugin.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin Name: Newsletter
5
  Plugin URI: https://www.thenewsletterplugin.com/plugins/newsletter
6
  Description: Newsletter is a cool plugin to create your own subscriber list, to send newsletters, to build your business. <strong>Before update give a look to <a href="https://www.thenewsletterplugin.com/category/release">this page</a> to know what's changed.</strong>
7
- Version: 6.2.1
8
  Author: Stefano Lissa & The Newsletter Team
9
  Author URI: https://www.thenewsletterplugin.com
10
  Disclaimer: Use at your own risk. No warranty expressed or implied is provided.
@@ -29,7 +29,7 @@
29
  */
30
 
31
  // Used as dummy parameter on css and js links
32
- define('NEWSLETTER_VERSION', '6.2.1');
33
 
34
  global $newsletter, $wpdb;
35
 
@@ -459,6 +459,9 @@ class Newsletter extends NewsletterModule {
459
  echo 'ok';
460
  die();
461
  }
 
 
 
462
  }
463
 
464
  function hook_in_admin_header() {
@@ -1253,10 +1256,6 @@ class Newsletter extends NewsletterModule {
1253
  if (function_exists('load_plugin_textdomain')) {
1254
  load_plugin_textdomain('newsletter', false, plugin_basename(dirname(__FILE__)) . '/languages');
1255
  }
1256
-
1257
- if (!empty($this->action)) {
1258
- do_action('newsletter_action', $this->action);
1259
- }
1260
  }
1261
 
1262
  var $panels = array();
4
  Plugin Name: Newsletter
5
  Plugin URI: https://www.thenewsletterplugin.com/plugins/newsletter
6
  Description: Newsletter is a cool plugin to create your own subscriber list, to send newsletters, to build your business. <strong>Before update give a look to <a href="https://www.thenewsletterplugin.com/category/release">this page</a> to know what's changed.</strong>
7
+ Version: 6.2.2
8
  Author: Stefano Lissa & The Newsletter Team
9
  Author URI: https://www.thenewsletterplugin.com
10
  Disclaimer: Use at your own risk. No warranty expressed or implied is provided.
29
  */
30
 
31
  // Used as dummy parameter on css and js links
32
+ define('NEWSLETTER_VERSION', '6.2.2');
33
 
34
  global $newsletter, $wpdb;
35
 
459
  echo 'ok';
460
  die();
461
  }
462
+
463
+ do_action('newsletter_action', $this->action);
464
+
465
  }
466
 
467
  function hook_in_admin_header() {
1256
  if (function_exists('load_plugin_textdomain')) {
1257
  load_plugin_textdomain('newsletter', false, plugin_basename(dirname(__FILE__)) . '/languages');
1258
  }
 
 
 
 
1259
  }
1260
 
1261
  var $panels = array();
readme.txt CHANGED
@@ -2,7 +2,7 @@
2
  Tags: email, email marketing, newsletter, newsletter subscribers, welcome email, signup forms, contact, lead generation, popup, marketing automation
3
  Requires at least: 3.4.0
4
  Tested up to: 5.2.3
5
- Stable tag: 6.2.1
6
  Requires PHP: 5.6
7
  Contributors: satollo,webagile,michael-travan
8
 
@@ -109,6 +109,12 @@ Thank you, The Newsletter Team
109
 
110
  == Changelog ==
111
 
 
 
 
 
 
 
112
  = 6.2.1 =
113
 
114
  * Fixed foreach warning
2
  Tags: email, email marketing, newsletter, newsletter subscribers, welcome email, signup forms, contact, lead generation, popup, marketing automation
3
  Requires at least: 3.4.0
4
  Tested up to: 5.2.3
5
+ Stable tag: 6.2.2
6
  Requires PHP: 5.6
7
  Contributors: satollo,webagile,michael-travan
8
 
109
 
110
  == Changelog ==
111
 
112
+ = 6.2.2 =
113
+
114
+ * Fixed custom blocks style.css loading
115
+ * Fixed loading sequence for Archive Addon
116
+ * Labels translation on profile panel
117
+
118
  = 6.2.1 =
119
 
120
  * Fixed foreach warning
unsubscription/defaults.php CHANGED
@@ -20,6 +20,6 @@ $options['unsubscribed_text'] = "<p>" . __('Your subscription has been deleted.
20
 
21
  $options['unsubscribed_subject'] = __("Goodbye", 'newsletter');
22
 
23
- $options['unsubscribed_message'] = '<p>' . __('This message confirms that you have unsubscribed from our newsletter. Thank you.') . '</p>';
24
 
25
- $options['reactivated_text'] = '<p>' . __('Your subscription has been reactivated.') . '</p>';
20
 
21
  $options['unsubscribed_subject'] = __("Goodbye", 'newsletter');
22
 
23
+ $options['unsubscribed_message'] = '<p>' . __('This message confirms that you have unsubscribed from our newsletter. Thank you.', 'newsletter') . '</p>';
24
 
25
+ $options['reactivated_text'] = '<p>' . __('Your subscription has been reactivated.', 'newsletter') . '</p>';