Companion Auto Update - Version 3.0.7

Version Description

(March 15, 2018) = * We've recieved a bunch of feedback since the last few updates and we've listened! * If the schedule is NOT daily - hide the hours object. show it only when daily is selected. * Disable Notifications: Many requested a "Never" option for email notifications, this was already there, just on the dashboard. We want to keep this plugin clean so we're not going to add 2 settings for this, instead we now show a message stating "To disable email notifications go to the dashboard and uncheck everything under Email Notifications". * Some people reported settings on the schedule page not saving, they were saved but the page required a reload to display the changes. We get how this can be confusing so we've fixed this.

Download this release

Release Info

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

Code changes from version 3.0.6 to 3.0.7

Files changed (3) hide show
  1. admin/schedule.php +63 -18
  2. companion-auto-update.php +1 -1
  3. readme.txt +7 -1
admin/schedule.php CHANGED
@@ -59,19 +59,24 @@ if( isset( $_POST['submit'] ) ) {
59
  wp_schedule_event( time(), $core_sc, 'wp_version_check' );
60
  wp_schedule_event( time(), $schedule_mail, 'cau_set_schedule_mail' );
61
 
62
- echo '<div id="message" class="updated"><p>'.__('Changes were saved. Reload the page to see the changes made.', 'companion-auto-update').'</p></div>';
63
 
64
  }
 
 
 
 
 
 
 
 
 
 
 
65
  ?>
66
 
67
  <form method="POST">
68
 
69
- <div class="message error warning">
70
- <p class="warning">
71
- <strong><?php _e('Warning', 'companion-auto-update'); ?></strong> &dash; <?php _e('Changing these settings may affect your sites perfomance.', 'companion-auto-update'); ?>
72
- </p>
73
- </div>
74
-
75
  <h2 class="title"><?php _e('Updating', 'companion-auto-update');?></h2>
76
  <?php _e('How often should the auto updater kick in? (Default twice daily)', 'companion-auto-update'); ?>
77
  <table class="form-table">
@@ -79,13 +84,13 @@ if( isset( $_POST['submit'] ) ) {
79
  <th scope="row"><?php _e('Plugin update interval', 'companion-auto-update');?></th>
80
  <td>
81
  <p>
82
- <select name='plugin_schedule'>
83
  <option value='hourly' <?php if( $plugin_schedule == 'hourly' ) { echo "SELECTED"; } ?> ><?php _e('Hourly', 'companion-auto-update');?></option>
84
  <option value='twicedaily' <?php if( $plugin_schedule == 'twicedaily' ) { echo "SELECTED"; } ?> ><?php _e('Twice Daily', 'companion-auto-update');?></option>
85
  <option value='daily' <?php if( $plugin_schedule == 'daily' ) { echo "SELECTED"; } ?> ><?php _e('Daily', 'companion-auto-update');?></option>
86
  </select>
87
  </p>
88
- <p>
89
 
90
  <?php
91
 
@@ -96,18 +101,18 @@ if( isset( $_POST['submit'] ) ) {
96
  ?>
97
 
98
  <div class='cau_schedule_input'>
99
- <input type='text' name='pluginScheduleTimeH' value='<?php echo $setTimePluginsHour; ?>'>
100
  </div><div class='cau_schedule_input_div'>
101
  :
102
  </div><div class='cau_schedule_input'>
103
- <input type='text' name='pluginScheduleTimeM' value='<?php echo $setTimePluginsMin; ?>'>
104
  </div><div class='cau_shedule_notation'>
105
  <b><?php _e('Time notation: 24H', 'companion-auto-update'); ?></b>
106
  </div>
107
 
108
  <p class='description'><?php _e('At what time should the updater run? Only works when set to <u>daily</u>.', 'companion-auto-update'); ?> </p>
109
 
110
- </p>
111
  </td>
112
  </tr>
113
  <tr>
@@ -115,13 +120,13 @@ if( isset( $_POST['submit'] ) ) {
115
  <td>
116
  <p>
117
 
118
- <select name='theme_schedule'>
119
  <option value='hourly' <?php if( $theme_schedule == 'hourly' ) { echo "SELECTED"; } ?> ><?php _e('Hourly', 'companion-auto-update');?></option>
120
  <option value='twicedaily' <?php if( $theme_schedule == 'twicedaily' ) { echo "SELECTED"; } ?> ><?php _e('Twice Daily', 'companion-auto-update');?></option>
121
  <option value='daily' <?php if( $theme_schedule == 'daily' ) { echo "SELECTED"; } ?> ><?php _e('Daily', 'companion-auto-update');?></option>
122
  </select>
123
  </p>
124
- <p>
125
 
126
  <?php
127
 
@@ -132,17 +137,17 @@ if( isset( $_POST['submit'] ) ) {
132
  ?>
133
 
134
  <div class='cau_schedule_input'>
135
- <input type='text' name='ThemeScheduleTimeH' value='<?php echo $setTimeThemesHour; ?>'>
136
  </div><div class='cau_schedule_input_div'>
137
  :
138
  </div><div class='cau_schedule_input'>
139
- <input type='text' name='ThemeScheduleTimeM' value='<?php echo $setTimeThemesMins; ?>'>
140
  </div><div class='cau_shedule_notation'>
141
  <b><?php _e('Time notation: 24H', 'companion-auto-update'); ?></b>
142
  </div>
143
 
144
  <p class='description'><?php _e('At what time should the updater run? Only works when set to <u>daily</u>.', 'companion-auto-update'); ?> </p>
145
- </p>
146
  </td>
147
  </tr>
148
  <tr>
@@ -174,10 +179,50 @@ if( isset( $_POST['submit'] ) ) {
174
  </p>
175
  </td>
176
  </tr>
 
 
 
 
 
 
 
 
177
  </table>
178
 
179
  <?php wp_nonce_field( 'cau_save_schedule' ); ?>
180
 
 
 
181
  <input type='submit' name='submit' id='submit' class='button button-primary' value='<?php _e( "Save changes", "companion-auto-update" ); ?>'>
182
 
183
- </form>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
59
  wp_schedule_event( time(), $core_sc, 'wp_version_check' );
60
  wp_schedule_event( time(), $schedule_mail, 'cau_set_schedule_mail' );
61
 
62
+ header( "Location: ".cau_menloc()."?page=cau-settings&tab=schedule&showmessage=true" );
63
 
64
  }
65
+
66
+ if( isset( $_GET['showmessage'] ) ) {
67
+
68
+ echo '<div id="message" class="updated"><p>'.__('Changes were saved.', 'companion-auto-update').'</p></div>';
69
+
70
+ } else {
71
+
72
+ echo '<div class="message error warning"><p class="warning"><strong>'.__( 'Warning', 'companion-auto-update' ).'</strong> &dash; '.__( 'Changing these settings may affect your sites perfomance.', 'companion-auto-update' ).'</p></div>';
73
+
74
+ }
75
+
76
  ?>
77
 
78
  <form method="POST">
79
 
 
 
 
 
 
 
80
  <h2 class="title"><?php _e('Updating', 'companion-auto-update');?></h2>
81
  <?php _e('How often should the auto updater kick in? (Default twice daily)', 'companion-auto-update'); ?>
82
  <table class="form-table">
84
  <th scope="row"><?php _e('Plugin update interval', 'companion-auto-update');?></th>
85
  <td>
86
  <p>
87
+ <select name='plugin_schedule' id='plugin_schedule'>
88
  <option value='hourly' <?php if( $plugin_schedule == 'hourly' ) { echo "SELECTED"; } ?> ><?php _e('Hourly', 'companion-auto-update');?></option>
89
  <option value='twicedaily' <?php if( $plugin_schedule == 'twicedaily' ) { echo "SELECTED"; } ?> ><?php _e('Twice Daily', 'companion-auto-update');?></option>
90
  <option value='daily' <?php if( $plugin_schedule == 'daily' ) { echo "SELECTED"; } ?> ><?php _e('Daily', 'companion-auto-update');?></option>
91
  </select>
92
  </p>
93
+ <div class='timeSchedulePlugins' <?php if( $plugin_schedule != 'daily' ) { echo "style='display: none;'"; } ?> >
94
 
95
  <?php
96
 
101
  ?>
102
 
103
  <div class='cau_schedule_input'>
104
+ <input type='text' name='pluginScheduleTimeH' value='<?php echo $setTimePluginsHour; ?>' maxlength='2' >
105
  </div><div class='cau_schedule_input_div'>
106
  :
107
  </div><div class='cau_schedule_input'>
108
+ <input type='text' name='pluginScheduleTimeM' value='<?php echo $setTimePluginsMin; ?>' maxlength='2' >
109
  </div><div class='cau_shedule_notation'>
110
  <b><?php _e('Time notation: 24H', 'companion-auto-update'); ?></b>
111
  </div>
112
 
113
  <p class='description'><?php _e('At what time should the updater run? Only works when set to <u>daily</u>.', 'companion-auto-update'); ?> </p>
114
 
115
+ </div>
116
  </td>
117
  </tr>
118
  <tr>
120
  <td>
121
  <p>
122
 
123
+ <select name='theme_schedule' id='theme_schedule'>
124
  <option value='hourly' <?php if( $theme_schedule == 'hourly' ) { echo "SELECTED"; } ?> ><?php _e('Hourly', 'companion-auto-update');?></option>
125
  <option value='twicedaily' <?php if( $theme_schedule == 'twicedaily' ) { echo "SELECTED"; } ?> ><?php _e('Twice Daily', 'companion-auto-update');?></option>
126
  <option value='daily' <?php if( $theme_schedule == 'daily' ) { echo "SELECTED"; } ?> ><?php _e('Daily', 'companion-auto-update');?></option>
127
  </select>
128
  </p>
129
+ <div class='timeScheduleThemes' <?php if( $theme_schedule != 'daily' ) { echo "style='display: none;'"; } ?> >
130
 
131
  <?php
132
 
137
  ?>
138
 
139
  <div class='cau_schedule_input'>
140
+ <input type='text' name='ThemeScheduleTimeH' value='<?php echo $setTimeThemesHour; ?>' maxlength='2' >
141
  </div><div class='cau_schedule_input_div'>
142
  :
143
  </div><div class='cau_schedule_input'>
144
+ <input type='text' name='ThemeScheduleTimeM' value='<?php echo $setTimeThemesMins; ?>' maxlength='2' >
145
  </div><div class='cau_shedule_notation'>
146
  <b><?php _e('Time notation: 24H', 'companion-auto-update'); ?></b>
147
  </div>
148
 
149
  <p class='description'><?php _e('At what time should the updater run? Only works when set to <u>daily</u>.', 'companion-auto-update'); ?> </p>
150
+ </div>
151
  </td>
152
  </tr>
153
  <tr>
179
  </p>
180
  </td>
181
  </tr>
182
+ <tr>
183
+ <th scope="row"><?php _e('Disable Notifications', 'companion-auto-update');?></th>
184
+ <td>
185
+ <p>
186
+ <?php _e('To disable email notifications go to the dashboard and uncheck everything under "Email Notifications".', 'companion-auto-update');?>
187
+ </p>
188
+ </td>
189
+ </tr>
190
  </table>
191
 
192
  <?php wp_nonce_field( 'cau_save_schedule' ); ?>
193
 
194
+ <p><!-- SPACING --></p>
195
+
196
  <input type='submit' name='submit' id='submit' class='button button-primary' value='<?php _e( "Save changes", "companion-auto-update" ); ?>'>
197
 
198
+ </form>
199
+
200
+ <script type="text/javascript">
201
+
202
+ jQuery( '#plugin_schedule' ).change( function() {
203
+
204
+ var selected = jQuery(this).val();
205
+
206
+ if( selected == 'daily' ) {
207
+ jQuery('.timeSchedulePlugins').show();
208
+ } else {
209
+ jQuery('.timeSchedulePlugins').hide();
210
+ }
211
+
212
+
213
+ });
214
+
215
+ jQuery( '#theme_schedule' ).change( function() {
216
+
217
+ var selected = jQuery(this).val();
218
+
219
+ if( selected == 'daily' ) {
220
+ jQuery('.timeScheduleThemes').show();
221
+ } else {
222
+ jQuery('.timeScheduleThemes').hide();
223
+ }
224
+
225
+
226
+ });
227
+
228
+ </script>
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.0.6
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.0.7
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.0.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -77,6 +77,12 @@ If you launched your website a few years ago using cPanel it could be the case t
77
 
78
  == Changelog ==
79
 
 
 
 
 
 
 
80
  = 3.0.6 (March 14, 2018) =
81
  * Fix: Support & Feedback tab not working
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.0.7
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
77
 
78
  == Changelog ==
79
 
80
+ = 3.0.7 (March 15, 2018) =
81
+ * We've recieved a bunch of feedback since the last few updates and we've listened!
82
+ * If the schedule is NOT daily - hide the hours object. show it only when daily is selected.
83
+ * Disable Notifications: Many requested a "Never" option for email notifications, this was already there, just on the dashboard. We want to keep this plugin clean so we're not going to add 2 settings for this, instead we now show a message stating "To disable email notifications go to the dashboard and uncheck everything under Email Notifications".
84
+ * Some people reported settings on the schedule page not saving, they were saved but the page required a reload to display the changes. We get how this can be confusing so we've fixed this.
85
+
86
  = 3.0.6 (March 14, 2018) =
87
  * Fix: Support & Feedback tab not working
88