Companion Auto Update - Version 3.7.1.1

Version Description

(November 2, 2020) = * Fix: Type in wp_next_scheduled

Download this release

Release Info

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

Code changes from version 3.7.1 to 3.7.1.1

Files changed (3) hide show
  1. cau_functions.php +25 -11
  2. companion-auto-update.php +1 -1
  3. readme.txt +5 -2
cau_functions.php CHANGED
@@ -199,9 +199,15 @@ function cau_run_custom_hooks_p() {
199
  $lastday = date( 'YmdHi', strtotime( '-12 hours', time() ) );
200
  } elseif( $updateSched == 'daily' ) {
201
  $lastday = date( 'YmdHi', strtotime( '-1 day', time() ) );
 
 
 
 
 
 
202
  }
203
 
204
- $update_time = wp_next_schedule( 'wp_update_plugins' );
205
  $range_start = date( 'Hi', strtotime( '-30 minutes', $update_time ) );
206
  $range_end = date( 'Hi', strtotime( '+30 minutes', $update_time ) );
207
 
@@ -258,6 +264,12 @@ function cau_run_custom_hooks_t() {
258
  $lastday = date( 'YmdHi', strtotime( '-12 hours', time() ) );
259
  } elseif( $updateSched == 'daily' ) {
260
  $lastday = date( 'YmdHi', strtotime( '-1 day', time() ) );
 
 
 
 
 
 
261
  }
262
 
263
  $update_time = wp_next_scheduled( 'wp_update_themes' );
@@ -311,17 +323,23 @@ function cau_run_custom_hooks_c() {
311
  $lastday = date( 'YmdHi', strtotime( '-12 hours', time() ) );
312
  } elseif( $updateSched == 'daily' ) {
313
  $lastday = date( 'YmdHi', strtotime( '-1 day', time() ) );
 
 
 
 
 
 
314
  }
315
 
316
  // Check manual or automatic
317
- $update_time = wp_next_schedule( 'wp_version_check' );
318
  $range_start = date( 'Hi', strtotime( '-30 minutes', $update_time ) );
319
  $range_end = date( 'Hi', strtotime( '+30 minutes', $update_time ) );
320
 
321
  if( $fileDate >= $lastday ) {
322
 
323
  // Update info
324
- if( $fileTime > $range_start && $fileTime < $range_end ) {
325
  $status = __( 'Automatic', 'companion-auto-update' );
326
  } else {
327
  $status = __( 'Manual', 'companion-auto-update' );
@@ -375,12 +393,8 @@ function checkAutomaticUpdaterDisabled() {
375
  // Check if cronjobs are disabled
376
  function checkCronjobsDisabled() {
377
 
378
- if ( defined( 'disable_wp_cron' ) OR defined( 'DISABLE_WP_CRON' ) ) {
379
- if( constant( 'disable_wp_cron' ) == 'true' OR constant( 'DISABLE_WP_CRON' ) == 'true' ) {
380
- return true;
381
- } else {
382
- return false;
383
- }
384
  } else {
385
  return false;
386
  }
@@ -767,7 +781,7 @@ function cau_fetch_log( $limit, $format = 'simple' ) {
767
  if( $core ) {
768
 
769
  $coreFile = ABSPATH.'wp-includes/version.php';
770
- $updateSched = wp_get_schedule( 'wp_version_check' );
771
 
772
  if( file_exists( $coreFile ) ) {
773
 
@@ -784,7 +798,7 @@ function cau_fetch_log( $limit, $format = 'simple' ) {
784
  $date_tod = date ( 'ydm' );
785
  $fileDay = date ( 'ydm', filemtime( $coreFile ) );
786
  $fileTime = date ( 'Hi', filemtime( $coreFile ) );
787
- $update_time = wp_next_schedule( 'wp_version_check' );
788
  $range_start = date( 'Hi', strtotime( '-30 minutes', $update_time ) );
789
  $range_end = date( 'Hi', strtotime( '+30 minutes', $update_time ) );
790
 
199
  $lastday = date( 'YmdHi', strtotime( '-12 hours', time() ) );
200
  } elseif( $updateSched == 'daily' ) {
201
  $lastday = date( 'YmdHi', strtotime( '-1 day', time() ) );
202
+ } elseif( $updateSched == 'weekly' ) {
203
+ $lastday = date( 'YmdHi', strtotime( '-1 week', time() ) );
204
+ } elseif( $updateSched == 'monthly' ) {
205
+ $lastday = date( 'YmdHi', strtotime( '-1 month', time() ) );
206
+ } else {
207
+ $lastday = date( 'YmdHi', strtotime( '-1 month', time() ) );
208
  }
209
 
210
+ $update_time = wp_next_scheduled( 'wp_update_plugins' );
211
  $range_start = date( 'Hi', strtotime( '-30 minutes', $update_time ) );
212
  $range_end = date( 'Hi', strtotime( '+30 minutes', $update_time ) );
213
 
264
  $lastday = date( 'YmdHi', strtotime( '-12 hours', time() ) );
265
  } elseif( $updateSched == 'daily' ) {
266
  $lastday = date( 'YmdHi', strtotime( '-1 day', time() ) );
267
+ } elseif( $updateSched == 'weekly' ) {
268
+ $lastday = date( 'YmdHi', strtotime( '-1 week', time() ) );
269
+ } elseif( $updateSched == 'monthly' ) {
270
+ $lastday = date( 'YmdHi', strtotime( '-1 month', time() ) );
271
+ } else {
272
+ $lastday = date( 'YmdHi', strtotime( '-1 month', time() ) );
273
  }
274
 
275
  $update_time = wp_next_scheduled( 'wp_update_themes' );
323
  $lastday = date( 'YmdHi', strtotime( '-12 hours', time() ) );
324
  } elseif( $updateSched == 'daily' ) {
325
  $lastday = date( 'YmdHi', strtotime( '-1 day', time() ) );
326
+ } elseif( $updateSched == 'weekly' ) {
327
+ $lastday = date( 'YmdHi', strtotime( '-1 week', time() ) );
328
+ } elseif( $updateSched == 'monthly' ) {
329
+ $lastday = date( 'YmdHi', strtotime( '-1 month', time() ) );
330
+ } else {
331
+ $lastday = date( 'YmdHi', strtotime( '-1 month', time() ) );
332
  }
333
 
334
  // Check manual or automatic
335
+ $update_time = wp_next_scheduled( 'wp_version_check' );
336
  $range_start = date( 'Hi', strtotime( '-30 minutes', $update_time ) );
337
  $range_end = date( 'Hi', strtotime( '+30 minutes', $update_time ) );
338
 
339
  if( $fileDate >= $lastday ) {
340
 
341
  // Update info
342
+ if( $fileDate > $range_start && $fileDate < $range_end ) {
343
  $status = __( 'Automatic', 'companion-auto-update' );
344
  } else {
345
  $status = __( 'Manual', 'companion-auto-update' );
393
  // Check if cronjobs are disabled
394
  function checkCronjobsDisabled() {
395
 
396
+ if ( defined('DISABLE_WP_CRON') && DISABLE_WP_CRON ) {
397
+ return true;
 
 
 
 
398
  } else {
399
  return false;
400
  }
781
  if( $core ) {
782
 
783
  $coreFile = ABSPATH.'wp-includes/version.php';
784
+ $updateSched = wp_next_scheduled( 'wp_version_check' );
785
 
786
  if( file_exists( $coreFile ) ) {
787
 
798
  $date_tod = date ( 'ydm' );
799
  $fileDay = date ( 'ydm', filemtime( $coreFile ) );
800
  $fileTime = date ( 'Hi', filemtime( $coreFile ) );
801
+ $update_time = wp_next_scheduled( 'wp_version_check' );
802
  $range_start = date( 'Hi', strtotime( '-30 minutes', $update_time ) );
803
  $range_end = date( 'Hi', strtotime( '+30 minutes', $update_time ) );
804
 
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.7.1
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.7.1.1
7
  * Author: Papin Schipper
8
  * Author URI: http://codeermeneer.nl/
9
  * Contributors: papin
readme.txt CHANGED
@@ -3,9 +3,9 @@ Contributors: Papin, qweb
3
  Donate link: https://www.paypal.me/dakel/10/
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.6.0
6
- Tested up to: 5.5
7
  Requires PHP: 5.1
8
- Stable tag: 3.7.1
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -81,6 +81,9 @@ So obviously, some of you wondered what the difference would be between the defa
81
 
82
  == Changelog ==
83
 
 
 
 
84
  = 3.7.1 (October 30, 2020) =
85
  * Fix: PHP Warning: strtotime() expects parameter 2 to be integer, string given
86
 
3
  Donate link: https://www.paypal.me/dakel/10/
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.6.0
6
+ Tested up to: 5.6
7
  Requires PHP: 5.1
8
+ Stable tag: 3.7.1.1
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
81
 
82
  == Changelog ==
83
 
84
+ = 3.7.1.1 (November 2, 2020) =
85
+ * Fix: Type in wp_next_scheduled
86
+
87
  = 3.7.1 (October 30, 2020) =
88
  * Fix: PHP Warning: strtotime() expects parameter 2 to be integer, string given
89