Newsletter - Version 4.9.6

Version Description

=

  • Extension version check improved
  • HTML5 form source code on profile panel

=

Download this release

Release Info

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

Code changes from version 4.9.5 to 4.9.6

Files changed (4) hide show
  1. plugin.php +9 -24
  2. readme.txt +6 -1
  3. subscription/profile.php +1 -1
  4. users/users.php +2 -2
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: 4.9.5
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.
@@ -14,7 +14,7 @@
14
  */
15
 
16
  // Used as dummy parameter on css and js links
17
- define('NEWSLETTER_VERSION', '4.9.5');
18
 
19
  global $wpdb, $newsletter;
20
 
@@ -137,7 +137,7 @@ class Newsletter extends NewsletterModule {
137
  // Here because the upgrade is called by the parent constructor and uses the scheduler
138
  add_filter('cron_schedules', array($this, 'hook_cron_schedules'), 1000);
139
 
140
- parent::__construct('main', '1.2.9');
141
 
142
  $max = $this->options['scheduler_max'];
143
  if (!is_numeric($max)) {
@@ -330,22 +330,7 @@ class Newsletter extends NewsletterModule {
330
  wp_schedule_event(time() + 30, 'newsletter', 'newsletter');
331
 
332
  wp_clear_scheduled_hook('newsletter_extension_versions');
333
- wp_schedule_event(time() + 30, 'newsletter_extension_versions', 'newsletter_weekly');
334
-
335
- add_option('newsletter_extension_versions', array(), null, 'no');
336
-
337
- wp_clear_scheduled_hook('newsletter_update');
338
- wp_clear_scheduled_hook('newsletter_check_versions');
339
-
340
- //wp_mkdir_p(WP_CONTENT_DIR . '/extensions/newsletter');
341
- //wp_mkdir_p(WP_CONTENT_DIR . '/cache/newsletter');
342
- //wp_clear_scheduled_hook('newsletter_updates_run');
343
- wp_clear_scheduled_hook('newsletter_statistics_version_check');
344
- wp_clear_scheduled_hook('newsletter_reports_version_check');
345
- wp_clear_scheduled_hook('newsletter_feed_version_check');
346
- wp_clear_scheduled_hook('newsletter_popup_version_check');
347
-
348
-
349
 
350
  // If the original options has already saved once
351
  if (isset($options['smtp_host'])) {
@@ -965,10 +950,10 @@ class Newsletter extends NewsletterModule {
965
  'interval' => NEWSLETTER_CRON_INTERVAL, // seconds
966
  'display' => 'Newsletter'
967
  );
968
- $schedules['newsletter_weekly'] = array(
969
- 'interval' => 86400 * 7, // seconds
970
- 'display' => 'Newsletter Weekly'
971
- );
972
  return $schedules;
973
  }
974
 
@@ -1340,7 +1325,7 @@ class Newsletter extends NewsletterModule {
1340
  }
1341
 
1342
  $versions = json_decode(wp_remote_retrieve_body($response));
1343
- update_option('newsletter_extension_versions', $versions);
1344
  }
1345
 
1346
  function get_extension_version($extension_id) {
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: 4.9.6
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.
14
  */
15
 
16
  // Used as dummy parameter on css and js links
17
+ define('NEWSLETTER_VERSION', '4.9.6');
18
 
19
  global $wpdb, $newsletter;
20
 
137
  // Here because the upgrade is called by the parent constructor and uses the scheduler
138
  add_filter('cron_schedules', array($this, 'hook_cron_schedules'), 1000);
139
 
140
+ parent::__construct('main', '1.3.0');
141
 
142
  $max = $this->options['scheduler_max'];
143
  if (!is_numeric($max)) {
330
  wp_schedule_event(time() + 30, 'newsletter', 'newsletter');
331
 
332
  wp_clear_scheduled_hook('newsletter_extension_versions');
333
+ wp_schedule_event(time() + 30, 'daily', 'newsletter_extension_versions');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
334
 
335
  // If the original options has already saved once
336
  if (isset($options['smtp_host'])) {
950
  'interval' => NEWSLETTER_CRON_INTERVAL, // seconds
951
  'display' => 'Newsletter'
952
  );
953
+ // $schedules['newsletter_weekly'] = array(
954
+ // 'interval' => 86400 * 7, // seconds
955
+ // 'display' => 'Newsletter Weekly'
956
+ // );
957
  return $schedules;
958
  }
959
 
1325
  }
1326
 
1327
  $versions = json_decode(wp_remote_retrieve_body($response));
1328
+ update_option('newsletter_extension_versions', $versions, false);
1329
  }
1330
 
1331
  function get_extension_version($extension_id) {
readme.txt CHANGED
@@ -2,7 +2,7 @@
2
  Tags: newsletter,email,subscription,mass mail,list build,email marketing,direct mailing,automation,automated
3
  Requires at least: 3.4.0
4
  Tested up to: 4.7.5
5
- Stable tag: 4.9.5
6
  Contributors: satollo,webagile,michael-travan
7
 
8
  Add a real newsletter system to your blog. For free. With unlimited newsletters and subscribers.
@@ -85,6 +85,11 @@ Thank you, The Newsletter Team
85
 
86
  == Changelog ==
87
 
 
 
 
 
 
88
  == 4.9.5 ==
89
 
90
  * Fixed table creation with dbDelta
2
  Tags: newsletter,email,subscription,mass mail,list build,email marketing,direct mailing,automation,automated
3
  Requires at least: 3.4.0
4
  Tested up to: 4.7.5
5
+ Stable tag: 4.9.6
6
  Contributors: satollo,webagile,michael-travan
7
 
8
  Add a real newsletter system to your blog. For free. With unlimited newsletters and subscribers.
85
 
86
  == Changelog ==
87
 
88
+ == 4.9.6 ==
89
+
90
+ * Extension version check improved
91
+ * HTML5 form source code on profile panel
92
+
93
  == 4.9.5 ==
94
 
95
  * Fixed table creation with dbDelta
subscription/profile.php CHANGED
@@ -203,7 +203,7 @@ $rules = array(0 => 'Optional', 1 => 'Required');
203
  <p>This panel shows the form HTML code generated by Newsletter if you want to copy it as starting point for a custom form.</p>
204
 
205
  <h3>Standard form code</h3>
206
- <textarea readonly style="width: 100%; height: 500px; font-family: monospace"><?php echo htmlspecialchars(NewsletterSubscription::instance()->get_subscription_form()); ?></textarea>
207
 
208
  <h3>Widget form code</h3>
209
  <textarea readonly style="width: 100%; height: 500px; font-family: monospace"><?php echo htmlspecialchars(NewsletterSubscription::instance()->get_subscription_form()); ?></textarea>
203
  <p>This panel shows the form HTML code generated by Newsletter if you want to copy it as starting point for a custom form.</p>
204
 
205
  <h3>Standard form code</h3>
206
+ <textarea readonly style="width: 100%; height: 500px; font-family: monospace"><?php echo esc_html(NewsletterSubscription::instance()->get_subscription_form_html5()); ?></textarea>
207
 
208
  <h3>Widget form code</h3>
209
  <textarea readonly style="width: 100%; height: 500px; font-family: monospace"><?php echo htmlspecialchars(NewsletterSubscription::instance()->get_subscription_form()); ?></textarea>
users/users.php CHANGED
@@ -18,7 +18,7 @@ class NewsletterUsers extends NewsletterModule {
18
  }
19
 
20
  function __construct() {
21
- parent::__construct('users', '1.0.8');
22
  add_action('init', array($this, 'hook_init'));
23
  }
24
 
@@ -85,7 +85,7 @@ class NewsletterUsers extends NewsletterModule {
85
  $sql .= "`test` tinyint(4) NOT NULL DEFAULT '0',\n";
86
  $sql .= "PRIMARY KEY (`id`),
87
  UNIQUE KEY `email` (`email`)
88
- ) ENGINE=MyISAM DEFAULT CHARSET=$charset_collate;";
89
 
90
  dbDelta($sql);
91
  $this->upgrade_query("alter table " . NEWSLETTER_USERS_TABLE . " convert to character set $charset_collate");
18
  }
19
 
20
  function __construct() {
21
+ parent::__construct('users', '1.0.9');
22
  add_action('init', array($this, 'hook_init'));
23
  }
24
 
85
  $sql .= "`test` tinyint(4) NOT NULL DEFAULT '0',\n";
86
  $sql .= "PRIMARY KEY (`id`),
87
  UNIQUE KEY `email` (`email`)
88
+ ) ENGINE=MyISAM $charset_collate;";
89
 
90
  dbDelta($sql);
91
  $this->upgrade_query("alter table " . NEWSLETTER_USERS_TABLE . " convert to character set $charset_collate");