Companion Auto Update - Version 2.9.3

Version Description

(4/15/2017) = * Change how often notifications are sent (defaults to daily)

Download this release

Release Info

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

Code changes from version 2.9.2 to 2.9.3

Files changed (2) hide show
  1. companion-auto-update.php +14 -6
  2. readme.txt +4 -1
companion-auto-update.php CHANGED
@@ -3,7 +3,7 @@
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
@@ -282,7 +282,7 @@ function cau_frontend() { ?>
282
  <input type="text" name="cau_email" id="cau_email" class="regular-text" placeholder="<?php echo get_option('admin_email'); ?>" value="<?php echo $toemail; ?>" />
283
  </p>
284
 
285
- <p class="description"><?php _e('Seperate email adresses using commas.', 'companion-auto-update');?></p>
286
  </td>
287
  </tr>
288
  </table>
@@ -324,23 +324,27 @@ function schedule() {
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
 
@@ -403,7 +407,11 @@ function schedule() {
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>
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.3
7
  * Author: Qreative-Web
8
  * Author URI: http://papinschipper.nl
9
  * Contributors: papin
282
  <input type="text" name="cau_email" id="cau_email" class="regular-text" placeholder="<?php echo get_option('admin_email'); ?>" value="<?php echo $toemail; ?>" />
283
  </p>
284
 
285
+ <p class="description"><?php _e('Seperate email addresses using commas.', 'companion-auto-update');?></p>
286
  </td>
287
  </tr>
288
  </table>
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
+ $mail_sc = wp_get_schedule( 'cau_set_schedule_mail' );
328
 
329
  if( isset( $_POST['submit'] ) ) {
330
 
331
  // Set variables
332
+ $plugin_sc = $_POST['plugin_schedule'];
333
+ $theme_sc = $_POST['theme_schedule'];
334
+ $core_sc = $_POST['core_schedule'];
335
+ $schedule_mail = $_POST['schedule_mail'];
336
 
337
  // First clear schedules
338
  wp_clear_scheduled_hook('wp_update_plugins');
339
  wp_clear_scheduled_hook('wp_update_themes');
340
  wp_clear_scheduled_hook('wp_version_check');
341
+ wp_clear_scheduled_hook('cau_set_schedule_mail');
342
 
343
  // Then set the new times
344
  wp_schedule_event( time(), $plugin_sc, 'wp_update_plugins' );
345
  wp_schedule_event( time(), $theme_sc, 'wp_update_themes' );
346
  wp_schedule_event( time(), $core_sc, 'wp_version_check' );
347
+ wp_schedule_event( time(), $schedule_mail, 'cau_set_schedule_mail' );
348
 
349
  echo '<div id="message" class="updated"><p>'.__('Changes were saved. Reload the page to see the changes made.', 'companion-auto-update').'</p></div>';
350
 
407
  <th scope="row"><?php _e('Email Notifications', 'companion-auto-update');?></th>
408
  <td>
409
  <p>
410
+ <select name='schedule_mail'>
411
+ <option value='hourly' <?php if( $mail_sc == 'hourly' ) { echo "SELECTED"; } ?> ><?php _e('Hourly', 'companion-auto-update');?></option>
412
+ <option value='twicedaily' <?php if( $mail_sc == 'twicedaily' ) { echo "SELECTED"; } ?> ><?php _e('Twice Daily', 'companion-auto-update');?></option>
413
+ <option value='daily' <?php if( $mail_sc == 'daily' ) { echo "SELECTED"; } ?> ><?php _e('Daily', 'companion-auto-update');?></option>
414
+ </select>
415
  </p>
416
  </td>
417
  </tr>
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.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -83,6 +83,9 @@ Yes you can. Go to the dashboard > Scheduling
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
 
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.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
83
 
84
  == Changelog ==
85
 
86
+ = 2.9.3 (4/15/2017) =
87
+ * Change how often notifications are sent (defaults to daily)
88
+
89
  = 2.9.2 (3/18/2017) =
90
  * New: Set how often the auto updater should run (defaults to twice daily)
91