Companion Auto Update - Version 2.9.2

Version Description

(3/18/2017) = * New: Set how often the auto updater should run (defaults to twice daily)

Download this release

Release Info

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

Code changes from version 2.9.1 to 2.9.2

Files changed (3) hide show
  1. backend/style.css +6 -0
  2. companion-auto-update.php +107 -6
  3. readme.txt +13 -6
backend/style.css CHANGED
@@ -76,4 +76,10 @@ thead .check-column, tfoot .check-column {
76
  }
77
  #the-list tr.active .status {
78
  color: rgba(0,0,0,0.4);
 
 
 
 
 
 
79
  }
76
  }
77
  #the-list tr.active .status {
78
  color: rgba(0,0,0,0.4);
79
+ }
80
+ .message.warning {
81
+ border-left-color: orange;
82
+ }
83
+ p.warning strong {
84
+ color: orange;
85
  }
companion-auto-update.php CHANGED
@@ -1,17 +1,17 @@
1
  <?php
2
  /*
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: 2.9.1
7
  * Author: Qreative-Web
8
- * Author URI: http://codeermeneer.nl
9
  * Contributors: papin
10
  * License: GPLv2 or later
11
  * License URI: https://www.gnu.org/licenses/gpl-2.0.html
12
  * Text Domain: companion-auto-update
13
  * Domain Path: /languages/
14
- */
15
 
16
  // Disable direct access
17
  defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
@@ -152,6 +152,7 @@ function cau_frontend() { ?>
152
  <h2 class="nav-tab-wrapper wp-clearfix">
153
  <a href="tools.php?page=cau-settings" class="nav-tab <?php active_tab(''); ?>"><?php _e('Dashboard', 'companion-auto-update'); ?></a>
154
  <a href="tools.php?page=cau-settings&amp;tab=pluginlist" class="nav-tab <?php active_tab('pluginlist'); ?>"><?php _e('Filter plugins', 'companion-auto-update'); ?></a>
 
155
  </h2>
156
 
157
  <?php
@@ -292,6 +293,10 @@ function cau_frontend() { ?>
292
 
293
  selectPlugins();
294
 
 
 
 
 
295
  } ?>
296
 
297
  </div>
@@ -314,6 +319,102 @@ function donotupdatelist() {
314
 
315
  }
316
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
317
  function selectPlugins() { ?>
318
 
319
  <p><?php _e('Here you can select plugins that you do not wish to automatically update', 'companion-auto-update'); ?>.</p>
@@ -351,7 +452,7 @@ function selectPlugins() { ?>
351
  <form method="POST">
352
 
353
  <p>
354
- <input type='submit' name='submit' id='submit' class='button button-primary' value='<?php _e( "Save changes" ); ?>'>
355
  <input type='submit' name='reset' id='reset' class='button button-alt' value='<?php _e( "Reset list", "companion-auto-update" ); ?>'>
356
  </p>
357
 
@@ -428,7 +529,7 @@ function selectPlugins() { ?>
428
  </table>
429
 
430
  <p>
431
- <input type='submit' name='submit' id='submit' class='button button-primary' value='<?php _e( "Save changes" ); ?>'>
432
  <input type='submit' name='reset' id='reset' class='button button-alt' value='<?php _e( "Reset list", "companion-auto-update" ); ?>'>
433
  </p>
434
 
1
  <?php
2
  /*
3
  * Plugin Name: Companion Auto Update
4
+ * Plugin URI: https://qreative-web.com
5
  * Description: This plugin auto updates all plugins, all themes and the wordpress core.
6
+ * Version: 2.9.2
7
  * Author: Qreative-Web
8
+ * Author URI: http://papinschipper.nl
9
  * Contributors: papin
10
  * License: GPLv2 or later
11
  * License URI: https://www.gnu.org/licenses/gpl-2.0.html
12
  * Text Domain: companion-auto-update
13
  * Domain Path: /languages/
14
+ */
15
 
16
  // Disable direct access
17
  defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
152
  <h2 class="nav-tab-wrapper wp-clearfix">
153
  <a href="tools.php?page=cau-settings" class="nav-tab <?php active_tab(''); ?>"><?php _e('Dashboard', 'companion-auto-update'); ?></a>
154
  <a href="tools.php?page=cau-settings&amp;tab=pluginlist" class="nav-tab <?php active_tab('pluginlist'); ?>"><?php _e('Filter plugins', 'companion-auto-update'); ?></a>
155
+ <a href="tools.php?page=cau-settings&amp;tab=schedule" class="nav-tab <?php active_tab('schedule'); ?>"><?php _e('Scheduling', 'companion-auto-update'); ?></a>
156
  </h2>
157
 
158
  <?php
293
 
294
  selectPlugins();
295
 
296
+ } else if( $_GET['tab'] == 'schedule' ) {
297
+
298
+ schedule();
299
+
300
  } ?>
301
 
302
  </div>
319
 
320
  }
321
 
322
+ function schedule() {
323
+
324
+ $plugin_schedule = wp_get_schedule( 'wp_update_plugins' );
325
+ $theme_schedule = wp_get_schedule( 'wp_update_themes' );
326
+ $core_schedule = wp_get_schedule( 'wp_version_check' );
327
+
328
+ if( isset( $_POST['submit'] ) ) {
329
+
330
+ // Set variables
331
+ $plugin_sc = $_POST['plugin_schedule'];
332
+ $theme_sc = $_POST['theme_schedule'];
333
+ $core_sc = $_POST['core_schedule'];
334
+
335
+ // First clear schedules
336
+ wp_clear_scheduled_hook('wp_update_plugins');
337
+ wp_clear_scheduled_hook('wp_update_themes');
338
+ wp_clear_scheduled_hook('wp_version_check');
339
+
340
+ // Then set the new times
341
+ wp_schedule_event( time(), $plugin_sc, 'wp_update_plugins' );
342
+ wp_schedule_event( time(), $theme_sc, 'wp_update_themes' );
343
+ wp_schedule_event( time(), $core_sc, 'wp_version_check' );
344
+
345
+ echo '<div id="message" class="updated"><p>'.__('Changes were saved. Reload the page to see the changes made.', 'companion-auto-update').'</p></div>';
346
+
347
+ }
348
+ ?>
349
+
350
+ <form method="POST">
351
+
352
+ <div class="message error warning">
353
+ <p class="warning">
354
+ <strong><?php _e('Warning', 'companion-auto-update'); ?></strong> &dash; <?php _e('Changing these settings may affect your sites perfomance.', 'companion-auto-update'); ?>
355
+ </p>
356
+ </div>
357
+
358
+ <h2 class="title"><?php _e('Updating', 'companion-auto-update');?></h2>
359
+ <?php _e('How often should the auto updater kick in? (Default twice daily)', 'companion-auto-update'); ?>
360
+ <table class="form-table">
361
+ <tr>
362
+ <th scope="row"><?php _e('Plugin update interval', 'companion-auto-update');?></th>
363
+ <td>
364
+ <p>
365
+ <select name='plugin_schedule'>
366
+ <option value='hourly' <?php if( $plugin_schedule == 'hourly' ) { echo "SELECTED"; } ?> ><?php _e('Hourly', 'companion-auto-update');?></option>
367
+ <option value='twicedaily' <?php if( $plugin_schedule == 'twicedaily' ) { echo "SELECTED"; } ?> ><?php _e('Twice Daily', 'companion-auto-update');?></option>
368
+ <option value='daily' <?php if( $plugin_schedule == 'daily' ) { echo "SELECTED"; } ?> ><?php _e('Daily', 'companion-auto-update');?></option>
369
+ </select>
370
+ </p>
371
+ </td>
372
+ </tr>
373
+ <tr>
374
+ <th scope="row"><?php _e('Theme update interval', 'companion-auto-update');?></th>
375
+ <td>
376
+ <p>
377
+ <select name='theme_schedule'>
378
+ <option value='hourly' <?php if( $theme_schedule == 'hourly' ) { echo "SELECTED"; } ?> ><?php _e('Hourly', 'companion-auto-update');?></option>
379
+ <option value='twicedaily' <?php if( $theme_schedule == 'twicedaily' ) { echo "SELECTED"; } ?> ><?php _e('Twice Daily', 'companion-auto-update');?></option>
380
+ <option value='daily' <?php if( $theme_schedule == 'daily' ) { echo "SELECTED"; } ?> ><?php _e('Daily', 'companion-auto-update');?></option>
381
+ </select>
382
+ </p>
383
+ </td>
384
+ </tr>
385
+ <tr>
386
+ <th scope="row"><?php _e('Core update interval', 'companion-auto-update');?></th>
387
+ <td>
388
+ <p>
389
+ <select name='core_schedule'>
390
+ <option value='hourly' <?php if( $core_schedule == 'hourly' ) { echo "SELECTED"; } ?> ><?php _e('Hourly', 'companion-auto-update');?></option>
391
+ <option value='twicedaily' <?php if( $core_schedule == 'twicedaily' ) { echo "SELECTED"; } ?> ><?php _e('Twice Daily', 'companion-auto-update');?></option>
392
+ <option value='daily' <?php if( $core_schedule == 'daily' ) { echo "SELECTED"; } ?> ><?php _e('Daily', 'companion-auto-update');?></option>
393
+ </select>
394
+ </p>
395
+ </td>
396
+ </tr>
397
+ </table>
398
+
399
+ <h2 class="title"><?php _e('Email Notifications', 'companion-auto-update');?></h2>
400
+ <?php _e('How often should notifications be send? (Defaul daily)', 'companion-auto-update'); ?>
401
+ <table class="form-table">
402
+ <tr>
403
+ <th scope="row"><?php _e('Email Notifications', 'companion-auto-update');?></th>
404
+ <td>
405
+ <p>
406
+ <label for="cau_send">Coming soon</label>
407
+ </p>
408
+ </td>
409
+ </tr>
410
+ </table>
411
+
412
+ <input type='submit' name='submit' id='submit' class='button button-primary' value='<?php _e( "Save changes", "companion-auto-update" ); ?>'>
413
+
414
+ </form>
415
+
416
+ <?php }
417
+
418
  function selectPlugins() { ?>
419
 
420
  <p><?php _e('Here you can select plugins that you do not wish to automatically update', 'companion-auto-update'); ?>.</p>
452
  <form method="POST">
453
 
454
  <p>
455
+ <input type='submit' name='submit' id='submit' class='button button-primary' value='<?php _e( "Save changes", "companion-auto-update" ); ?>'>
456
  <input type='submit' name='reset' id='reset' class='button button-alt' value='<?php _e( "Reset list", "companion-auto-update" ); ?>'>
457
  </p>
458
 
529
  </table>
530
 
531
  <p>
532
+ <input type='submit' name='submit' id='submit' class='button button-primary' value='<?php _e( "Save changes", "companion-auto-update" ); ?>'>
533
  <input type='submit' name='reset' id='reset' class='button button-alt' value='<?php _e( "Reset list", "companion-auto-update" ); ?>'>
534
  </p>
535
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.me/dakel/1
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.7
7
- Stable tag: 2.9.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -35,6 +35,8 @@ Email notifications are send once a day in order to prevent spamming :)
35
  You can control auto-updating per plugin via the plugin filter.
36
  For example: If you have Woocommerce installed but you do not wan't to have it auto-updated you can now disable auto-updating for Woocommerce only, so your other plugins will continue to be updated.
37
 
 
 
38
  = Want to help development? =
39
  Want to help develop?
40
  Go to our [Github](https://github.com/DakelNL/Companion-Auto-Update)
@@ -54,30 +56,35 @@ Submit your translations [Here](https://translate.wordpress.org/projects/wp-plug
54
  1. Click install.
55
  1. Activate.
56
 
57
- = Settings =
58
- 1. Configure this plugin via Tools > Auto updater.
59
-
60
  == Frequently Asked Questions ==
61
 
 
 
 
 
62
  = How often does this plugin check for updates? =
63
 
64
  It's constantly checking for updates. If you have more visitors, it'll check more often.
65
 
66
  = How often does it actually update? =
67
 
68
- The auto-updater is run once twice a day.
69
 
70
  = Can I change how often it checks and/or updates? =
71
 
72
- Not yet, I'll add an setting to change this soon.
 
73
 
74
  == Screenshots ==
75
 
76
  1. Easily configure what you'd like to auto-update and what not
77
  2. If you have disabled one or multiple auto-updates, we can email you when an update is available.
 
78
 
79
  == Changelog ==
80
 
 
 
81
 
82
  = 2.9.1 (2/25/2017) =
83
  * Added a little bit of styling to the plugin filter to make it easier to understand.
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.7
7
+ Stable tag: 2.9.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
35
  You can control auto-updating per plugin via the plugin filter.
36
  For example: If you have Woocommerce installed but you do not wan't to have it auto-updated you can now disable auto-updating for Woocommerce only, so your other plugins will continue to be updated.
37
 
38
+ You can also change how often the updater runs, it defaults to twice daily but you can change this to hourly or daily.
39
+
40
  = Want to help development? =
41
  Want to help develop?
42
  Go to our [Github](https://github.com/DakelNL/Companion-Auto-Update)
56
  1. Click install.
57
  1. Activate.
58
 
 
 
 
59
  == Frequently Asked Questions ==
60
 
61
+ = Where can I find the settings? =
62
+
63
+ You can find the settings under Tools > Auto updating
64
+
65
  = How often does this plugin check for updates? =
66
 
67
  It's constantly checking for updates. If you have more visitors, it'll check more often.
68
 
69
  = How often does it actually update? =
70
 
71
+ The auto-updater is run once twice a day by default, however you can change this to hourly or daily.
72
 
73
  = Can I change how often it checks and/or updates? =
74
 
75
+ Yes you can. Go to the dashboard > Scheduling
76
+
77
 
78
  == Screenshots ==
79
 
80
  1. Easily configure what you'd like to auto-update and what not
81
  2. If you have disabled one or multiple auto-updates, we can email you when an update is available.
82
+ 3. Control how often the updater kicks in.
83
 
84
  == Changelog ==
85
 
86
+ = 2.9.2 (3/18/2017) =
87
+ * New: Set how often the auto updater should run (defaults to twice daily)
88
 
89
  = 2.9.1 (2/25/2017) =
90
  * Added a little bit of styling to the plugin filter to make it easier to understand.