Companion Auto Update - Version 3.3.2

Version Description

(December 20, 2018) = * Global error? No need to contact us anymore, let the plugin fix it for you! * Some sites still recieved core update emails even when disabled, this should not happen anymore.

Download this release

Release Info

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

Code changes from version 3.3.0 to 3.3.2

admin/dashboard.php CHANGED
@@ -77,7 +77,7 @@
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';
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/pluginlist.php CHANGED
@@ -41,7 +41,7 @@ if( isset( $_POST['reset'] ) ) {
41
  <input type='submit' name='reset' id='reset' class='button button-alt' value='<?php _e( "Reset list", "companion-auto-update" ); ?>'>
42
  </p>
43
 
44
- <table class="wp-list-table widefat autoupdate">
45
  <thead>
46
  <tr>
47
  <td>&nbsp;</td>
41
  <input type='submit' name='reset' id='reset' class='button button-alt' value='<?php _e( "Reset list", "companion-auto-update" ); ?>'>
42
  </p>
43
 
44
+ <table class="wp-list-table widefat autoupdate striped">
45
  <thead>
46
  <tr>
47
  <td>&nbsp;</td>
admin/status.php CHANGED
@@ -173,6 +173,7 @@ if( checkAutomaticUpdaterDisabled() ) { ?>
173
  <thead>
174
  <tr>
175
  <th colspan="2"><strong><?php _e('Global', 'companion-auto-update'); ?></strong></th>
 
176
  </tr>
177
  </thead>
178
 
@@ -180,8 +181,10 @@ if( checkAutomaticUpdaterDisabled() ) { ?>
180
  <tr>
181
  <td><span class='cau_disabled'><span class="dashicons dashicons-no"></span> Error</span></td>
182
  <td>
183
- <?php _e('Updating is globally disabled. Please contact us for further assistance.', 'companion-auto-update'); ?>
184
- <?php _e('Tell us about the following error: ', 'companion-auto-update'); ?> <code>AUTOMATIC_UPDATER_DISABLED</code>
 
 
185
  </td>
186
  </tr>
187
  </tbody>
@@ -190,6 +193,49 @@ if( checkAutomaticUpdaterDisabled() ) { ?>
190
 
191
  <?php }
192
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
193
  function cau_incompatiblePlugins() {
194
 
195
  if( is_plugin_active( 'better-wp-security/better-wp-security.php' ) ) {
173
  <thead>
174
  <tr>
175
  <th colspan="2"><strong><?php _e('Global', 'companion-auto-update'); ?></strong></th>
176
+ <th><strong><?php _e('Fix it', 'companion-auto-update'); ?></strong></th>
177
  </tr>
178
  </thead>
179
 
181
  <tr>
182
  <td><span class='cau_disabled'><span class="dashicons dashicons-no"></span> Error</span></td>
183
  <td>
184
+ <?php _e('Updating is globally disabled.', 'companion-auto-update'); ?>
185
+ </td>
186
+ <td>
187
+ <form method="POST"><button type="submit" name="fixit" class="button button-alt"><?php _e('Fix it', 'companion-auto-update'); ?></button></form>
188
  </td>
189
  </tr>
190
  </tbody>
193
 
194
  <?php }
195
 
196
+ // Remove the line
197
+ if( isset( $_POST['fixit'] ) ) {
198
+ cau_removeErrorLine();
199
+ echo "<div id='message' class='updated'><p><strong>".__( 'Error fixed', 'companion-auto-update' )."</strong> &dash; ".__( 'Everything should work just fine again :)', 'companion-auto-update' )."</p></div>";
200
+ }
201
+
202
+ // Get wp-config location
203
+ function cau_configFile() {
204
+
205
+ // Config file
206
+ if ( file_exists( ABSPATH . 'wp-config.php') ) {
207
+ $conFile = ABSPATH . 'wp-config.php';
208
+ } else {
209
+ $conFile = dirname(ABSPATH) . '/wp-config.php';
210
+ }
211
+
212
+ return $conFile;
213
+
214
+ }
215
+
216
+ // Change the AUTOMATIC_UPDATER_DISABLED line
217
+ function cau_removeErrorLine() {
218
+
219
+ // Config file
220
+ $conFile = cau_configFile();
221
+
222
+ // Lines to check and replace
223
+ $revLine = "define( 'AUTOMATIC_UPDATER_DISABLED', false );"; // We could just remove the line, but replacing it will be safer
224
+ $oldLine = array( "define('AUTOMATIC_UPDATER_DISABLED', true );", "define('AUTOMATIC_UPDATER_DISABLED', minor );", "define('automatic_updater_disabled', true );", "define('automatic_updater_disabled', minor );" );
225
+
226
+ // Check for each string if it exists
227
+ foreach ( $oldLine as $key => $string ) {
228
+
229
+ if( strpos( file_get_contents( $conFile ), $string ) !== false) {
230
+ $contents = file_get_contents( $conFile );
231
+ $contents = str_replace( $string, $revLine, $contents );
232
+ file_put_contents( $conFile, $contents );
233
+ }
234
+
235
+ }
236
+
237
+ }
238
+
239
  function cau_incompatiblePlugins() {
240
 
241
  if( is_plugin_active( 'better-wp-security/better-wp-security.php' ) ) {
admin/support.php CHANGED
@@ -50,7 +50,7 @@
50
  <?php _e('Companion Auto Update is free to use. It has required a great deal of time and effort to develop and you can help support this development by making a small donation.<br />You get useful software and we get to carry on making it better.', 'companion-auto-update'); ?>
51
 
52
  <p class="cau_support">
53
- <a href="https://www.paypal.me/dakel/5/" target="_blank" class="button button-primary donate-button">
54
  <span class="dashicons dashicons-heart"></span>
55
  <?php _e('Donate to help development', 'companion-auto-update'); ?>
56
  </a>
50
  <?php _e('Companion Auto Update is free to use. It has required a great deal of time and effort to develop and you can help support this development by making a small donation.<br />You get useful software and we get to carry on making it better.', 'companion-auto-update'); ?>
51
 
52
  <p class="cau_support">
53
+ <a href="<?php echo cau_donateUrl(); ?>" target="_blank" class="button button-primary donate-button">
54
  <span class="dashicons dashicons-heart"></span>
55
  <?php _e('Donate to help development', 'companion-auto-update'); ?>
56
  </a>
backend/style.css CHANGED
@@ -101,7 +101,7 @@ table.rollbacklist td a.versionselectbutton {
101
  width: 30px;
102
  height: 16px;
103
  background: transparent;
104
- border: 2px solid #9178B7;
105
  border-radius: 15px;
106
  transition: background-color .2s;
107
  }
@@ -111,16 +111,16 @@ table.rollbacklist td a.versionselectbutton {
111
  transition: all .2s;
112
  border-radius: 500px;
113
  background: transparent;
114
- border: 2px solid #9178B7;
115
  top: 1px;
116
  left: 5px;
117
  }
118
  #the-list input[type="checkbox"]:not(:checked) + label:before {
119
- background: #9178B7;
120
- border: 2px solid #9178B7;
121
  }
122
  #the-list input[type="checkbox"]:not(:checked) + label:after {
123
- background: #9178B7;
124
  border-color: #FFF;
125
  left: 18px;
126
  }
@@ -150,25 +150,6 @@ table.rollbacklist td a.versionselectbutton {
150
  bottom: -6px;
151
  font-size: 1.3em;
152
  }
153
- .cau_content_wrap .button {
154
- box-shadow: none!important;
155
- text-shadow: none!important;
156
- height: auto;
157
- }
158
- .cau_content_wrap .button-primary {
159
- background-color: #9178B7;
160
- border-color: #6B5887;
161
- color: #FFF;
162
- }
163
- .cau_content_wrap .button-primary:hover {
164
- background-color: #796597;
165
- border-color: #5B4C72;
166
- color: #FFF;
167
- }
168
- .cau_content_wrap .button-primary:active {
169
- background-color: #796597;
170
- border-color: #5B4C72;
171
- }
172
  .cau_content_wrap .buttonIsLoading {
173
  background: #DDD!important;
174
  }
@@ -185,24 +166,25 @@ table.rollbacklist td a.versionselectbutton {
185
  .cau_support .donate-button {
186
  padding: 10px 15px;
187
  height: auto;
188
- }
189
- .cau_support .rate-button {
190
- padding: 10px 20px;
191
- height: auto;
192
- color: #735F91!important;
193
- }
194
- .cau_support_buttons .donate-button {
195
  background-color: #9178B7;
 
196
  color: #FFF;
197
- border: 0px!important;
198
  }
199
- .cau_support_buttons .donate-button:hover {
200
- background-color: #735F91;
 
201
  color: #FFF;
202
  }
203
- .cau_support_buttons .donate-button:active {
204
- background-color: #735F91;
205
- color: #FFF;
 
 
 
 
 
206
  }
207
 
208
  @media screen and (max-width: 1000px) {
101
  width: 30px;
102
  height: 16px;
103
  background: transparent;
104
+ border: 2px solid #0085BA;
105
  border-radius: 15px;
106
  transition: background-color .2s;
107
  }
111
  transition: all .2s;
112
  border-radius: 500px;
113
  background: transparent;
114
+ border: 2px solid #0085BA;
115
  top: 1px;
116
  left: 5px;
117
  }
118
  #the-list input[type="checkbox"]:not(:checked) + label:before {
119
+ background: #0085BA;
120
+ border: 2px solid #0085BA;
121
  }
122
  #the-list input[type="checkbox"]:not(:checked) + label:after {
123
+ background: #0085BA;
124
  border-color: #FFF;
125
  left: 18px;
126
  }
150
  bottom: -6px;
151
  font-size: 1.3em;
152
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
153
  .cau_content_wrap .buttonIsLoading {
154
  background: #DDD!important;
155
  }
166
  .cau_support .donate-button {
167
  padding: 10px 15px;
168
  height: auto;
169
+ box-shadow: none!important;
170
+ text-shadow: none!important;
 
 
 
 
 
171
  background-color: #9178B7;
172
+ border-color: #6B5887;
173
  color: #FFF;
 
174
  }
175
+ .cau_support .donate-button:hover {
176
+ background-color: #796597;
177
+ border-color: #5B4C72;
178
  color: #FFF;
179
  }
180
+ .cau_support .donate-button:active {
181
+ background-color: #796597;
182
+ border-color: #5B4C72;
183
+ }
184
+ .cau_support .rate-button {
185
+ padding: 10px 20px;
186
+ height: auto;
187
+ color: #735F91!important;
188
  }
189
 
190
  @media screen and (max-width: 1000px) {
cau_functions.php CHANGED
@@ -95,16 +95,30 @@ function cau_run_custom_hooks_t() {
95
  // Check if automatic updating is disabled globally
96
  function checkAutomaticUpdaterDisabled() {
97
 
98
- if ( defined( 'automatic_updater_disabled' ) OR defined( 'AUTOMATIC_UPDATER_DISABLED' ) ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
99
  if( doing_filter( 'AUTOMATIC_UPDATER_DISABLED' ) ) {
100
  return true;
101
- } elseif( constant('automatic_updater_disabled') == 'true' OR constant('AUTOMATIC_UPDATER_DISABLED') == 'true' ) {
102
  return true;
103
- } elseif( constant('automatic_updater_disabled') == 'minor' OR constant('AUTOMATIC_UPDATER_DISABLED') == 'minor' ) {
104
  return true;
105
  } else {
106
  return false;
107
  }
 
108
  } else {
109
  return false;
110
  }
@@ -146,7 +160,7 @@ function active_subtab( $page, $identifier = 'tab' ) {
146
 
147
  }
148
 
149
-
150
  function donotupdatelist() {
151
 
152
  global $wpdb;
@@ -163,6 +177,7 @@ function donotupdatelist() {
163
 
164
  }
165
 
 
166
  function cau_fetch_log( $limit, $format = 'simple' ) {
167
 
168
  // Create arrays
@@ -217,7 +232,12 @@ function cau_fetch_log( $limit, $format = 'simple' ) {
217
  $getFile = $path_parts = pathinfo( $fullPath );
218
 
219
  // Get theme name
220
- array_push( $pluginNames , $path_parts['filename'] );
 
 
 
 
 
221
 
222
  // Get last update date
223
  $dateFormat = get_option( 'date_format' );
@@ -313,7 +333,7 @@ function cau_fetch_log( $limit, $format = 'simple' ) {
313
 
314
  }
315
 
316
- // Only update plugin which are enabled
317
  function cau_dont_update( $update, $item ) {
318
 
319
  $plugins = donotupdatelist();
95
  // Check if automatic updating is disabled globally
96
  function checkAutomaticUpdaterDisabled() {
97
 
98
+ // I mean, I know this can be done waaaay better but I's quite late and I need to push a fix so take it or leave it untill I decide to fix this :)
99
+
100
+ if ( defined( 'automatic_updater_disabled' ) ) {
101
+ if( doing_filter( 'automatic_updater_disabled' ) ) {
102
+ return true;
103
+ } elseif( constant( 'automatic_updater_disabled' ) == 'true' ) {
104
+ return true;
105
+ } elseif( constant( 'automatic_updater_disabled' ) == 'minor' ) {
106
+ return true;
107
+ } else {
108
+ return false;
109
+ }
110
+
111
+ } else if ( defined( 'AUTOMATIC_UPDATER_DISABLED' ) ) {
112
  if( doing_filter( 'AUTOMATIC_UPDATER_DISABLED' ) ) {
113
  return true;
114
+ } elseif( constant( 'AUTOMATIC_UPDATER_DISABLED' ) == 'true' ) {
115
  return true;
116
+ } elseif( constant( 'AUTOMATIC_UPDATER_DISABLED' ) == 'minor' ) {
117
  return true;
118
  } else {
119
  return false;
120
  }
121
+
122
  } else {
123
  return false;
124
  }
160
 
161
  }
162
 
163
+ // List of plugins that should not be updated
164
  function donotupdatelist() {
165
 
166
  global $wpdb;
177
 
178
  }
179
 
180
+ // Show the update log
181
  function cau_fetch_log( $limit, $format = 'simple' ) {
182
 
183
  // Create arrays
232
  $getFile = $path_parts = pathinfo( $fullPath );
233
 
234
  // Get theme name
235
+ // array_push( $pluginNames , $path_parts['filename'] );
236
+
237
+ $theme_data = wp_get_theme( $path_parts['filename'] );
238
+ $themeName = $theme_data->get( 'Name' );
239
+ array_push( $pluginNames , $themeName );
240
+
241
 
242
  // Get last update date
243
  $dateFormat = get_option( 'date_format' );
333
 
334
  }
335
 
336
+ // Only update plugins which are enabled
337
  function cau_dont_update( $update, $item ) {
338
 
339
  $plugins = donotupdatelist();
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.3.0
7
  * Author: Papin Schipper
8
  * Author URI: http://codeermeneer.nl/
9
  * Contributors: papin
@@ -33,6 +33,11 @@ add_action('cau_set_schedule_mail', 'cau_check_updates_mail');
33
  add_action('cau_custom_hooks_plugins', 'cau_run_custom_hooks_p');
34
  add_action('cau_custom_hooks_themes', 'cau_run_custom_hooks_t');
35
 
 
 
 
 
 
36
  // Create database
37
  function cau_database_creation() {
38
 
@@ -94,7 +99,7 @@ function cau_install_data() {
94
  if( !cau_check_if_exists( 'plugins' ) ) $wpdb->insert( $table_name, array( 'name' => 'plugins', 'onoroff' => 'on' ) );
95
  if( !cau_check_if_exists( 'themes' ) ) $wpdb->insert( $table_name, array( 'name' => 'themes', 'onoroff' => 'on' ) );
96
  if( !cau_check_if_exists( 'minor' ) ) $wpdb->insert( $table_name, array( 'name' => 'minor', 'onoroff' => 'on' ) );
97
- if( !cau_check_if_exists( 'major' ) ) $wpdb->insert( $table_name, array( 'name' => 'major', 'onoroff' => 'on' ) );
98
 
99
  // Email configs
100
  if( !cau_check_if_exists( 'email' ) ) $wpdb->insert( $table_name, array( 'name' => 'email', 'onoroff' => '' ) );
@@ -144,14 +149,15 @@ function cau_frontend() { ?>
144
  <h1 class="wp-heading-inline"><?php _e('Auto Updater', 'companion-auto-update'); ?></h1>
145
 
146
  <div class='cau_support_buttons'>
147
- <a href="https://www.paypal.me/dakel/1/" target="_blank" class="donate-button page-title-action"><?php _e('Donate to help development', 'companion-auto-update'); ?></a>
148
  </div>
149
 
150
  <hr class="wp-header-end">
151
 
152
  <h2 class="nav-tab-wrapper wp-clearfix">
153
  <a href="<?php echo cau_menloc(); ?>?page=cau-settings" class="nav-tab <?php active_tab(''); ?>"><?php _e('Dashboard', 'companion-auto-update'); ?></a>
154
- <a href="<?php echo cau_menloc(); ?>?page=cau-settings&amp;tab=schedule&cau_page=advanced" class="nav-tab <?php active_tab('advanced', 'cau_page'); ?>"><?php _e('Advanced settings', 'companion-auto-update'); ?></a>
 
155
  <a href="<?php echo cau_menloc(); ?>?page=cau-settings&amp;tab=log&amp;cau_page=system" class="nav-tab <?php active_tab('system', 'cau_page'); ?>"><?php _e('Systeminfo', 'companion-auto-update'); ?></a>
156
  <a href="<?php echo cau_menloc(); ?>?page=cau-settings&amp;tab=support" class="nav-tab <?php active_tab('support'); ?>"><?php _e('Support & Feedback', 'companion-auto-update'); ?></a>
157
  </h2>
@@ -168,15 +174,6 @@ function cau_frontend() { ?>
168
 
169
  <br class="clear" />
170
 
171
- <?php } if( $cau_page == 'advanced' ) { ?>
172
-
173
- <ul class="subsubsub">
174
- <li><a class="<?php active_subtab('pluginlist'); ?>" href="<?php echo cau_menloc(); ?>?page=cau-settings&amp;tab=pluginlist&amp;cau_page=advanced"><?php _e('Filter plugins', 'companion-auto-update'); ?></a> | </li>
175
- <li><a class="<?php active_subtab('schedule'); ?>" href="<?php echo cau_menloc(); ?>?page=cau-settings&amp;tab=schedule&amp;cau_page=advanced"><?php _e('Scheduling', 'companion-auto-update'); ?></a></li>
176
- </ul>
177
-
178
- <br class="clear" />
179
-
180
  <?php } ?>
181
 
182
  <?php
@@ -238,7 +235,7 @@ function cau_settings_link( $links ) {
238
 
239
  $settings_link = '<a href="'.get_admin_url().''.cau_menloc().'?page=cau-settings">'.__('Settings', 'companion-auto-update' ).'</a>';
240
  $settings_link2 = '<a href="https://translate.wordpress.org/projects/wp-plugins/companion-auto-update">'.__('Translate', 'companion-auto-update' ).'</a>';
241
- $settings_link3 = '<a href="https://www.paypal.me/dakel/1/">'.__('Donate', 'companion-auto-update' ).'</a>';
242
  $settings_link4 = '<a href="http://codeermeneer.nl/cau_poll/">'.__('Feedback', 'companion-auto-update' ).'</a>';
243
 
244
  array_unshift( $links, $settings_link2 );
@@ -322,15 +319,15 @@ class CAU_auto_update {
322
  // Enable for translation files
323
  $configs = $wpdb->get_results( "SELECT * FROM $table_name WHERE name = 'translations'");
324
  foreach ( $configs as $config ) {
325
- if( $config->onoroff == 'on' ) add_filter( 'auto_update_translation', '__return_true' ); // Turn on
326
- if( $config->onoroff != 'on' ) add_filter( 'auto_update_translation', '__return_false' ); // Turn off
327
  }
328
 
329
  // WP Email Config
330
  $configs = $wpdb->get_results( "SELECT * FROM $table_name WHERE name = 'wpemail'");
331
  foreach ( $configs as $config ) {
332
- if( $config->onoroff == 'on' ) add_filter( 'auto_core_update_send_email', '__return_true' );
333
- if( $config->onoroff != 'on' ) add_filter( 'auto_core_update_send_email', '__return_false' );
334
  }
335
 
336
 
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.3.2
7
  * Author: Papin Schipper
8
  * Author URI: http://codeermeneer.nl/
9
  * Contributors: papin
33
  add_action('cau_custom_hooks_plugins', 'cau_run_custom_hooks_p');
34
  add_action('cau_custom_hooks_themes', 'cau_run_custom_hooks_t');
35
 
36
+ // Donate url
37
+ function cau_donateUrl() {
38
+ return 'https://www.paypal.me/dakel/5/';
39
+ }
40
+
41
  // Create database
42
  function cau_database_creation() {
43
 
99
  if( !cau_check_if_exists( 'plugins' ) ) $wpdb->insert( $table_name, array( 'name' => 'plugins', 'onoroff' => 'on' ) );
100
  if( !cau_check_if_exists( 'themes' ) ) $wpdb->insert( $table_name, array( 'name' => 'themes', 'onoroff' => 'on' ) );
101
  if( !cau_check_if_exists( 'minor' ) ) $wpdb->insert( $table_name, array( 'name' => 'minor', 'onoroff' => 'on' ) );
102
+ if( !cau_check_if_exists( 'major' ) ) $wpdb->insert( $table_name, array( 'name' => 'major', 'onoroff' => '' ) );
103
 
104
  // Email configs
105
  if( !cau_check_if_exists( 'email' ) ) $wpdb->insert( $table_name, array( 'name' => 'email', 'onoroff' => '' ) );
149
  <h1 class="wp-heading-inline"><?php _e('Auto Updater', 'companion-auto-update'); ?></h1>
150
 
151
  <div class='cau_support_buttons'>
152
+ <a href="<?php echo cau_donateUrl(); ?>" target="_blank" class="donate-button page-title-action"><?php _e('Donate to help development', 'companion-auto-update'); ?></a>
153
  </div>
154
 
155
  <hr class="wp-header-end">
156
 
157
  <h2 class="nav-tab-wrapper wp-clearfix">
158
  <a href="<?php echo cau_menloc(); ?>?page=cau-settings" class="nav-tab <?php active_tab(''); ?>"><?php _e('Dashboard', 'companion-auto-update'); ?></a>
159
+ <a href="<?php echo cau_menloc(); ?>?page=cau-settings&amp;tab=schedule&cau_page=advanced" class="nav-tab <?php active_tab('schedule', 'tab'); ?>"><?php _e('Advanced settings', 'companion-auto-update'); ?></a>
160
+ <a href="<?php echo cau_menloc(); ?>?page=cau-settings&amp;tab=pluginlist&cau_page=advanced" class="nav-tab <?php active_tab('pluginlist', 'tab'); ?>"><?php _e('Select plugins', 'companion-auto-update'); ?></a>
161
  <a href="<?php echo cau_menloc(); ?>?page=cau-settings&amp;tab=log&amp;cau_page=system" class="nav-tab <?php active_tab('system', 'cau_page'); ?>"><?php _e('Systeminfo', 'companion-auto-update'); ?></a>
162
  <a href="<?php echo cau_menloc(); ?>?page=cau-settings&amp;tab=support" class="nav-tab <?php active_tab('support'); ?>"><?php _e('Support & Feedback', 'companion-auto-update'); ?></a>
163
  </h2>
174
 
175
  <br class="clear" />
176
 
 
 
 
 
 
 
 
 
 
177
  <?php } ?>
178
 
179
  <?php
235
 
236
  $settings_link = '<a href="'.get_admin_url().''.cau_menloc().'?page=cau-settings">'.__('Settings', 'companion-auto-update' ).'</a>';
237
  $settings_link2 = '<a href="https://translate.wordpress.org/projects/wp-plugins/companion-auto-update">'.__('Translate', 'companion-auto-update' ).'</a>';
238
+ $settings_link3 = '<a href="'.cau_donateUrl().'">'.__('Donate', 'companion-auto-update' ).'</a>';
239
  $settings_link4 = '<a href="http://codeermeneer.nl/cau_poll/">'.__('Feedback', 'companion-auto-update' ).'</a>';
240
 
241
  array_unshift( $links, $settings_link2 );
319
  // Enable for translation files
320
  $configs = $wpdb->get_results( "SELECT * FROM $table_name WHERE name = 'translations'");
321
  foreach ( $configs as $config ) {
322
+ if( $config->onoroff == 'on' ) add_filter( 'auto_update_translation', '__return_true', 1 ); // Turn on
323
+ if( $config->onoroff != 'on' ) add_filter( 'auto_update_translation', '__return_false', 1 ); // Turn off
324
  }
325
 
326
  // WP Email Config
327
  $configs = $wpdb->get_results( "SELECT * FROM $table_name WHERE name = 'wpemail'");
328
  foreach ( $configs as $config ) {
329
+ if( $config->onoroff == 'on' ) add_filter( 'auto_core_update_send_email', '__return_true', 1 ); // Turn on
330
+ if( $config->onoroff != 'on' ) add_filter( 'auto_core_update_send_email', '__return_false', 1 ); // Turn off
331
  }
332
 
333
 
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Companion Auto Update ===
2
  Contributors: Papin, qweb
3
- 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: 5.0
7
- Stable tag: 3.3.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -71,6 +71,15 @@ For some reason this plugin seems to have trouble with updating themes by Elegan
71
 
72
  == Changelog ==
73
 
 
 
 
 
 
 
 
 
 
74
  = 3.3.0 (November 5, 2018) =
75
  * New: Custom hooks afer succesfull update, [How to use custom hooks in Companion Auto Update](https://codeermeneer.nl/stuffs/codex-auto-updater/)
76
 
1
  === Companion Auto Update ===
2
  Contributors: Papin, qweb
3
+ Donate link: https://www.paypal.me/dakel/5/
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: 5.0
7
+ Stable tag: 3.3.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
71
 
72
  == Changelog ==
73
 
74
+ = 3.3.2 (December 20, 2018) =
75
+ * Global error? No need to contact us anymore, let the plugin fix it for you!
76
+ * Some sites still recieved core update emails even when disabled, this should not happen anymore.
77
+
78
+ = 3.3.1 (November 15, 2018) =
79
+ * Fix: Can't Find constant error
80
+ * Improvement: We've listened, Scheduling and Plugin filter are now two seperate tabs and Plugin filter is renamed to Select plugins
81
+ * Improvement: Major core updates are now disabled by default for new installs
82
+
83
  = 3.3.0 (November 5, 2018) =
84
  * New: Custom hooks afer succesfull update, [How to use custom hooks in Companion Auto Update](https://codeermeneer.nl/stuffs/codex-auto-updater/)
85