Companion Auto Update - Version 3.2.0

Version Description

(August 11, 2018) = * Improved: Email notifications just got better and now contain version numbers. * Improved: Explained the difference between major and minor WordPress core updates.

Download this release

Release Info

Developer Papin
Plugin Icon 128x128 Companion Auto Update
Version 3.2.0
Comparing to
See all releases

Code changes from version 3.1.5 to 3.2.0

admin/dashboard.php CHANGED
@@ -72,12 +72,12 @@
72
 
73
  echo '<p><input id="'.$cau_configs[2]->name.'" name="'.$cau_configs[2]->name.'" type="checkbox"';
74
  if( $cau_configs[2]->onoroff == 'on' ) echo 'checked';
75
- echo '/> <label for="'.$cau_configs[2]->name.'">'.__('Auto update minor core updates?', 'companion-auto-update').'</label></p>';
76
 
77
 
78
  echo '<p><input id="'.$cau_configs[3]->name.'" name="'.$cau_configs[3]->name.'" type="checkbox"';
79
  if( $cau_configs[3]->onoroff == 'on' ) echo 'checked';
80
- echo '/> <label for="'.$cau_configs[3]->name.'">'.__('Auto update major core updates?', 'companion-auto-update').'</label></p>';
81
 
82
  echo '<p><input id="'.$cau_configs[8]->name.'" name="'.$cau_configs[8]->name.'" type="checkbox"';
83
  if( $cau_configs[8]->onoroff == 'on' ) echo 'checked';
72
 
73
  echo '<p><input id="'.$cau_configs[2]->name.'" name="'.$cau_configs[2]->name.'" type="checkbox"';
74
  if( $cau_configs[2]->onoroff == 'on' ) echo 'checked';
75
+ echo '/> <label for="'.$cau_configs[2]->name.'">'.__('Auto update minor core updates?', 'companion-auto-update').' <code>4.0.0 > 4.0.1</code></label></p>';
76
 
77
 
78
  echo '<p><input id="'.$cau_configs[3]->name.'" name="'.$cau_configs[3]->name.'" type="checkbox"';
79
  if( $cau_configs[3]->onoroff == 'on' ) echo 'checked';
80
+ echo '/> <label for="'.$cau_configs[3]->name.'">'.__('Auto update major core updates?', 'companion-auto-update').'<code>4.0.0 > 4.1.0</code></label></p>';
81
 
82
  echo '<p><input id="'.$cau_configs[8]->name.'" name="'.$cau_configs[8]->name.'" type="checkbox"';
83
  if( $cau_configs[8]->onoroff == 'on' ) echo 'checked';
admin/status.php CHANGED
@@ -10,7 +10,7 @@
10
  $configs = $wpdb->get_results( "SELECT * FROM $table_name WHERE name = 'major'");
11
  foreach ( $configs as $config ) {
12
 
13
- if( $config->onoroff == 'on' ) {
14
  $majorUpdates = true;
15
  $majorStatus = 'enabled';
16
  $majorIcon = 'yes';
@@ -30,7 +30,7 @@
30
  $configs = $wpdb->get_results( "SELECT * FROM $table_name WHERE name = 'minor'");
31
  foreach ( $configs as $config ) {
32
 
33
- if( $config->onoroff == 'on' ) {
34
  $minorUpdates = true;
35
  $minorStatus = 'enabled';
36
  $minorIcon = 'yes';
@@ -50,7 +50,7 @@
50
  $configs = $wpdb->get_results( "SELECT * FROM $table_name WHERE name = 'plugins'");
51
  foreach ( $configs as $config ) {
52
 
53
- if( $config->onoroff == 'on' ) {
54
  $pluginsUpdates = true;
55
  $pluginsStatus = 'enabled';
56
  $pluginsIcon = 'yes';
@@ -70,7 +70,7 @@
70
  $configs = $wpdb->get_results( "SELECT * FROM $table_name WHERE name = 'themes'");
71
  foreach ( $configs as $config ) {
72
 
73
- if( $config->onoroff == 'on' ) {
74
  $themesUpdates = true;
75
  $themesStatus = 'enabled';
76
  $themesIcon = 'yes';
10
  $configs = $wpdb->get_results( "SELECT * FROM $table_name WHERE name = 'major'");
11
  foreach ( $configs as $config ) {
12
 
13
+ if( $config->onoroff == 'on' && wp_get_schedule( 'wp_version_check' ) ) {
14
  $majorUpdates = true;
15
  $majorStatus = 'enabled';
16
  $majorIcon = 'yes';
30
  $configs = $wpdb->get_results( "SELECT * FROM $table_name WHERE name = 'minor'");
31
  foreach ( $configs as $config ) {
32
 
33
+ if( $config->onoroff == 'on' && wp_get_schedule( 'wp_version_check' ) ) {
34
  $minorUpdates = true;
35
  $minorStatus = 'enabled';
36
  $minorIcon = 'yes';
50
  $configs = $wpdb->get_results( "SELECT * FROM $table_name WHERE name = 'plugins'");
51
  foreach ( $configs as $config ) {
52
 
53
+ if( $config->onoroff == 'on' && wp_get_schedule( 'wp_update_plugins' ) ) {
54
  $pluginsUpdates = true;
55
  $pluginsStatus = 'enabled';
56
  $pluginsIcon = 'yes';
70
  $configs = $wpdb->get_results( "SELECT * FROM $table_name WHERE name = 'themes'");
71
  foreach ( $configs as $config ) {
72
 
73
+ if( $config->onoroff == 'on' && wp_get_schedule( 'wp_update_plugins' ) ) {
74
  $themesUpdates = true;
75
  $themesStatus = 'enabled';
76
  $themesIcon = 'yes';
cau_emails.php CHANGED
@@ -41,17 +41,26 @@ function cau_set_email() {
41
  function cau_pending_message( $single, $plural ) {
42
 
43
  return sprintf( esc_html__(
44
- 'There are one or more %1$s updates available on your WordPress site at: %2$s , but you have disabled auto-updating for %3$s. Login to your dashboard to manually update your %3$s.', 'companion-auto-update'
45
- ), $single, get_site_url(), $plural);
 
 
46
 
47
  }
48
 
49
  // Set the content for the emails about recent updates
50
  function cau_updated_message( $type, $updatedList ) {
51
 
52
- return sprintf( esc_html__(
53
- 'We have updated one or more %1$s on your WordPress site at %2$s , be sure to check if everything still works properly. The following %1$s have been updated: %3$s', 'companion-auto-update'
54
- ), $type, get_site_url(), $updatedList );
 
 
 
 
 
 
 
55
 
56
  }
57
 
@@ -130,6 +139,7 @@ function cau_plugin_updated() {
130
  // Create arrays
131
  $pluginNames = array();
132
  $pluginDates = array();
 
133
  $themeNames = array();
134
  $themeDates = array();
135
 
@@ -168,6 +178,9 @@ function cau_plugin_updated() {
168
  if( $dataKey == 'Name') {
169
  array_push( $pluginNames , $dataValue );
170
  }
 
 
 
171
  }
172
 
173
  array_push( $pluginDates, $fileDate );
@@ -213,7 +226,7 @@ function cau_plugin_updated() {
213
 
214
  foreach ( $pluginDates as $key => $value ) {
215
 
216
- $updatedListP .= "- ".$pluginNames[$key]."\n";
217
  $totalNumP++;
218
 
219
  }
@@ -224,6 +237,7 @@ function cau_plugin_updated() {
224
 
225
  }
226
 
 
227
  // If plugins have been updated, send email
228
  if( $totalNumP > 0 ) {
229
 
41
  function cau_pending_message( $single, $plural ) {
42
 
43
  return sprintf( esc_html__(
44
+ 'Hodwy! There are one or more %1$s updates waiting on your WordPress site at %2$s but we\'ve noticed that you\'ve disabled auto-updating for %3$.
45
+
46
+ Outdated %3$ are a security risk so please consider manually updating them via your dashboard.', 'companion-auto-update'
47
+ ), $single, get_site_url(), $plural );
48
 
49
  }
50
 
51
  // Set the content for the emails about recent updates
52
  function cau_updated_message( $type, $updatedList ) {
53
 
54
+ $text = sprintf( esc_html__(
55
+ 'Howdy! One or more %1$s on your WordPress site at %2$s have been updated by Companion Auto Update. No further action is needed on your part.
56
+ For more info on what is new visit your dashboard and check the changelog.
57
+
58
+ The following %1$s have been updated:', 'companion-auto-update'
59
+ ), $type, get_site_url() );
60
+
61
+ $text .= $updatedList;
62
+
63
+ return $text;
64
 
65
  }
66
 
139
  // Create arrays
140
  $pluginNames = array();
141
  $pluginDates = array();
142
+ $pluginVersion = array();
143
  $themeNames = array();
144
  $themeDates = array();
145
 
178
  if( $dataKey == 'Name') {
179
  array_push( $pluginNames , $dataValue );
180
  }
181
+ if( $dataKey == 'Version') {
182
+ array_push( $pluginVersion , $dataValue );
183
+ }
184
  }
185
 
186
  array_push( $pluginDates, $fileDate );
226
 
227
  foreach ( $pluginDates as $key => $value ) {
228
 
229
+ $updatedListP .= "- ".$pluginNames[$key]." to version ".$pluginVersion[$key]."\n";
230
  $totalNumP++;
231
 
232
  }
237
 
238
  }
239
 
240
+
241
  // If plugins have been updated, send email
242
  if( $totalNumP > 0 ) {
243
 
companion-auto-update.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Companion Auto Update
4
  * Plugin URI: http://codeermeneer.nl/portfolio/companion-auto-update/
5
  * Description: This plugin auto updates all plugins, all themes and the wordpress core.
6
- * Version: 3.1.5
7
  * Author: Papin Schipper
8
  * Author URI: http://codeermeneer.nl/
9
  * Contributors: papin
3
  * Plugin Name: Companion Auto Update
4
  * Plugin URI: http://codeermeneer.nl/portfolio/companion-auto-update/
5
  * Description: This plugin auto updates all plugins, all themes and the wordpress core.
6
+ * Version: 3.2.0
7
  * Author: Papin Schipper
8
  * Author URI: http://codeermeneer.nl/
9
  * Contributors: papin
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.me/dakel/2
4
  Tags: auto, automatic, background, update, updates, updating, automatic updates, automatic background updates, easy update, wordpress update, theme update, plugin update, up-to-date, security, update latest version, update core, update wp, update wp core, major updates, minor updates, update to new version, update core, update plugin, update plugins, update plugins automatically, update theme, plugin, theme, advance, control, mail, notifations, enable
5
  Requires at least: 3.5.0
6
  Tested up to: 4.9
7
- Stable tag: 3.1.5
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -33,6 +33,8 @@ By default the updater will run twice a day, but you can change this to every ho
33
 
34
  == Installation ==
35
 
 
 
36
  = Manual install =
37
  1. Download Companion Auto Update.
38
  1. Upload the 'Companion Auto Update' directory to your '/wp-content/plugins/' directory.
@@ -48,25 +50,17 @@ Settings can be found trough Tools > Auto Updater
48
 
49
  == Frequently Asked Questions ==
50
 
51
- = Where can I find the settings? =
52
-
53
- You can find the settings under Tools > Auto updating
54
-
55
- = How often does this plugin check for updates? =
56
-
57
- By default the updater will run twice a day, but you can change this to every hour or to daily. When set to daily you can even set the time at which it should run.
58
-
59
- = Can I change how often it checks and/or updates? =
60
-
61
- Yes you can. Go to the dashboard > Scheduling
62
-
63
  = Can I disable auto updating for certain plugins? =
64
 
65
  Yes. You can control auto-updating per plugin via the plugin filter.
66
 
67
- = I'm using cPanel and auto-updating doens't work =
 
 
68
 
69
- If you launched your website a few years ago using cPanel it could be the case that auto-updating is broken. We've contacted cPanel and they said to remove the "AUTOMATIC_UPDATER_DISABLED" line from your wp-config file.
 
 
70
 
71
  == Screenshots ==
72
 
@@ -77,6 +71,10 @@ If you launched your website a few years ago using cPanel it could be the case t
77
 
78
  == Changelog ==
79
 
 
 
 
 
80
  = 3.1.5 (August 9, 2018) =
81
  * I almost feel silly for pushing this as an update but the theme update notification said theme instead of themes.
82
 
4
  Tags: auto, automatic, background, update, updates, updating, automatic updates, automatic background updates, easy update, wordpress update, theme update, plugin update, up-to-date, security, update latest version, update core, update wp, update wp core, major updates, minor updates, update to new version, update core, update plugin, update plugins, update plugins automatically, update theme, plugin, theme, advance, control, mail, notifations, enable
5
  Requires at least: 3.5.0
6
  Tested up to: 4.9
7
+ Stable tag: 3.2.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
33
 
34
  == Installation ==
35
 
36
+ How to install Companion Auto Update
37
+
38
  = Manual install =
39
  1. Download Companion Auto Update.
40
  1. Upload the 'Companion Auto Update' directory to your '/wp-content/plugins/' directory.
50
 
51
  == Frequently Asked Questions ==
52
 
 
 
 
 
 
 
 
 
 
 
 
 
53
  = Can I disable auto updating for certain plugins? =
54
 
55
  Yes. You can control auto-updating per plugin via the plugin filter.
56
 
57
+ = I'm using cPanel and auto-updating doesn't work =
58
+
59
+ A few years ago cPanel added a line by default that would disable auto-updating. According to cPanel this can be fixed by removing the line "AUTOMATIC_UPDATER_DISABLED" from your wp-config file.
60
 
61
+ = My theme by Elegant Themes is not updating =
62
+
63
+ For some reason this plugin seems to have trouble with updating themes by Elegant Themes on some installs. I've reached out to Elegant Themes and they couldn't help me. They said that if you're experiencing problems with it you should contact them and they would help you with it.
64
 
65
  == Screenshots ==
66
 
71
 
72
  == Changelog ==
73
 
74
+ = 3.2.0 (August 11, 2018) =
75
+ * Improved: Email notifications just got better and now contain version numbers.
76
+ * Improved: Explained the difference between major and minor WordPress core updates.
77
+
78
  = 3.1.5 (August 9, 2018) =
79
  * I almost feel silly for pushing this as an update but the theme update notification said theme instead of themes.
80