Companion Auto Update - Version 3.5.4

Version Description

(June 19, 2020) = * New: See translations in the update log * New: We've added a few checks to WordPress' Site Health page * Fix: Error with Companion Auto Update Database Update * Fix: Schedule interval duplicates

Also: Check out what features we're working on at our blogpost

Download this release

Release Info

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

Code changes from version 3.5.3 to 3.5.4

admin/dashboard.php CHANGED
@@ -17,7 +17,6 @@ if ( cau_updateLogDBisEmpty() ) {
17
  '.__( 'We need to add some information to your database', 'companion-auto-update' ).'. <a href="'.cau_url( 'status' ).'&run=db_info_update" class="button button-alt" style="background: #FFF;">'.__( 'Run updater now', 'companion-auto-update' ).'</a></p></div>';
18
  }
19
 
20
-
21
  // Save settings
22
  if( isset( $_POST['submit'] ) ) {
23
 
@@ -27,11 +26,11 @@ if( isset( $_POST['submit'] ) ) {
27
  $table_name = $wpdb->prefix . "auto_updates";
28
 
29
  // Auto updater
30
- if( isset( $_POST['plugins'] ) ) $plugins = sanitize_text_field( $_POST['plugins'] ); else $plugins = '';
31
- if( isset( $_POST['themes'] ) ) $themes = sanitize_text_field( $_POST['themes'] ); else $themes = '';
32
- if( isset( $_POST['minor'] ) ) $minor = sanitize_text_field( $_POST['minor'] ); else $minor = '';
33
- if( isset( $_POST['major'] ) ) $major = sanitize_text_field( $_POST['major'] ); else $major = '';
34
- if( isset( $_POST['translations'] ) ) $translations = sanitize_text_field( $_POST['translations'] ); else $translations = '';
35
 
36
  $wpdb->query( $wpdb->prepare( "UPDATE $table_name SET onoroff = %s WHERE name = 'plugins'", $plugins ) );
37
  $wpdb->query( $wpdb->prepare( "UPDATE $table_name SET onoroff = %s WHERE name = 'themes'", $themes ) );
@@ -40,11 +39,11 @@ if( isset( $_POST['submit'] ) ) {
40
  $wpdb->query( $wpdb->prepare( "UPDATE $table_name SET onoroff = %s WHERE name = 'translations'", $translations ) );
41
 
42
  // Emails
43
- if( isset( $_POST['cau_send'] ) ) $send = sanitize_text_field( $_POST['cau_send'] ); else $send = '';
44
- if( isset( $_POST['cau_send_update'] ) ) $sendupdate = sanitize_text_field( $_POST['cau_send_update'] ); else $sendupdate = '';
45
- if( isset( $_POST['wpemails'] ) ) $wpemails = sanitize_text_field( $_POST['wpemails'] ); else $wpemails = '';
46
- if( isset( $_POST['cau_email'] ) ) $email = sanitize_text_field( $_POST['cau_email'] );
47
- if( isset( $_POST['html_or_text'] ) ) $html_or_text = sanitize_text_field( $_POST['html_or_text'] );
48
 
49
  $wpdb->query( $wpdb->prepare( "UPDATE $table_name SET onoroff = %s WHERE name = 'email'", $email ) );
50
  $wpdb->query( $wpdb->prepare( "UPDATE $table_name SET onoroff = %s WHERE name = 'send'", $send ) );
@@ -175,7 +174,7 @@ $core_schedule = wp_get_schedule( 'wp_version_check' );
175
  $schedule_mail = wp_get_schedule( 'cau_set_schedule_mail' );
176
  $cs_hooks_p = wp_get_schedule( 'cau_custom_hooks_plugins' );
177
  $cs_hooks_t = wp_get_schedule( 'cau_custom_hooks_themes' );
178
- $availableIntervals = wp_get_schedules();
179
 
180
  ?>
181
 
@@ -305,11 +304,7 @@ $availableIntervals = wp_get_schedules();
305
  <p>
306
  <select name='plugin_schedule' id='plugin_schedule' class='schedule_interval wide'>
307
  <?php foreach ( $availableIntervals as $key => $value ) {
308
- foreach ( $value as $display => $interval ) {
309
- if( $display == 'display' ) {
310
- echo "<option "; if( $plugin_schedule == $key ) { echo "selected "; } echo "value='".$key."'>".$interval."</option>";
311
- }
312
- }
313
  } ?>
314
  </select>
315
  </p>
@@ -343,11 +338,7 @@ $availableIntervals = wp_get_schedules();
343
  <p>
344
  <select name='theme_schedule' id='theme_schedule' class='schedule_interval wide'>
345
  <?php foreach ( $availableIntervals as $key => $value ) {
346
- foreach ( $value as $display => $interval ) {
347
- if( $display == 'display' ) {
348
- echo "<option "; if( $theme_schedule == $key ) { echo "selected "; } echo "value='".$key."'>".$interval."</option>";
349
- }
350
- }
351
  } ?>
352
  </select>
353
  </p>
@@ -380,11 +371,7 @@ $availableIntervals = wp_get_schedules();
380
  <p>
381
  <select name='core_schedule' id='core_schedule' class='schedule_interval wide'>
382
  <?php foreach ( $availableIntervals as $key => $value ) {
383
- foreach ( $value as $display => $interval ) {
384
- if( $display == 'display' ) {
385
- echo "<option "; if( $core_schedule == $key ) { echo "selected "; } echo "value='".$key."'>".$interval."</option>";
386
- }
387
- }
388
  } ?>
389
  </select>
390
  </p>
@@ -417,11 +404,7 @@ $availableIntervals = wp_get_schedules();
417
  <p>
418
  <select id='schedule_mail' name='schedule_mail'>
419
  <?php foreach ( $availableIntervals as $key => $value ) {
420
- foreach ( $value as $display => $interval ) {
421
- if( $display == 'display' ) {
422
- echo "<option "; if( $schedule_mail == $key ) { echo "selected "; } echo "value='".$key."'>".$interval."</option>";
423
- }
424
- }
425
  } ?>
426
  </select>
427
  </p>
@@ -449,7 +432,6 @@ $availableIntervals = wp_get_schedules();
449
  </div>
450
 
451
  </div>
452
-
453
  </div>
454
 
455
  <?php wp_nonce_field( 'cau_save_settings' ); ?>
17
  '.__( 'We need to add some information to your database', 'companion-auto-update' ).'. <a href="'.cau_url( 'status' ).'&run=db_info_update" class="button button-alt" style="background: #FFF;">'.__( 'Run updater now', 'companion-auto-update' ).'</a></p></div>';
18
  }
19
 
 
20
  // Save settings
21
  if( isset( $_POST['submit'] ) ) {
22
 
26
  $table_name = $wpdb->prefix . "auto_updates";
27
 
28
  // Auto updater
29
+ if( isset( $_POST['plugins'] ) ) $plugins = sanitize_text_field( $_POST['plugins'] ); else $plugins = '';
30
+ if( isset( $_POST['themes'] ) ) $themes = sanitize_text_field( $_POST['themes'] ); else $themes = '';
31
+ if( isset( $_POST['minor'] ) ) $minor = sanitize_text_field( $_POST['minor'] ); else $minor = '';
32
+ if( isset( $_POST['major'] ) ) $major = sanitize_text_field( $_POST['major'] ); else $major = '';
33
+ if( isset( $_POST['translations'] ) ) $translations = sanitize_text_field( $_POST['translations'] ); else $translations = '';
34
 
35
  $wpdb->query( $wpdb->prepare( "UPDATE $table_name SET onoroff = %s WHERE name = 'plugins'", $plugins ) );
36
  $wpdb->query( $wpdb->prepare( "UPDATE $table_name SET onoroff = %s WHERE name = 'themes'", $themes ) );
39
  $wpdb->query( $wpdb->prepare( "UPDATE $table_name SET onoroff = %s WHERE name = 'translations'", $translations ) );
40
 
41
  // Emails
42
+ if( isset( $_POST['cau_send'] ) ) $send = sanitize_text_field( $_POST['cau_send'] ); else $send = '';
43
+ if( isset( $_POST['cau_send_update'] ) ) $sendupdate = sanitize_text_field( $_POST['cau_send_update'] ); else $sendupdate = '';
44
+ if( isset( $_POST['wpemails'] ) ) $wpemails = sanitize_text_field( $_POST['wpemails'] ); else $wpemails = '';
45
+ if( isset( $_POST['cau_email'] ) ) $email = sanitize_text_field( $_POST['cau_email'] );
46
+ if( isset( $_POST['html_or_text'] ) ) $html_or_text = sanitize_text_field( $_POST['html_or_text'] );
47
 
48
  $wpdb->query( $wpdb->prepare( "UPDATE $table_name SET onoroff = %s WHERE name = 'email'", $email ) );
49
  $wpdb->query( $wpdb->prepare( "UPDATE $table_name SET onoroff = %s WHERE name = 'send'", $send ) );
174
  $schedule_mail = wp_get_schedule( 'cau_set_schedule_mail' );
175
  $cs_hooks_p = wp_get_schedule( 'cau_custom_hooks_plugins' );
176
  $cs_hooks_t = wp_get_schedule( 'cau_custom_hooks_themes' );
177
+ $availableIntervals = cau_wp_get_schedules();
178
 
179
  ?>
180
 
304
  <p>
305
  <select name='plugin_schedule' id='plugin_schedule' class='schedule_interval wide'>
306
  <?php foreach ( $availableIntervals as $key => $value ) {
307
+ echo "<option "; if( $plugin_schedule == $key ) { echo "selected "; } echo "value='".$key."'>".$value."</option>";
 
 
 
 
308
  } ?>
309
  </select>
310
  </p>
338
  <p>
339
  <select name='theme_schedule' id='theme_schedule' class='schedule_interval wide'>
340
  <?php foreach ( $availableIntervals as $key => $value ) {
341
+ echo "<option "; if( $theme_schedule == $key ) { echo "selected "; } echo "value='".$key."'>".$value."</option>";
 
 
 
 
342
  } ?>
343
  </select>
344
  </p>
371
  <p>
372
  <select name='core_schedule' id='core_schedule' class='schedule_interval wide'>
373
  <?php foreach ( $availableIntervals as $key => $value ) {
374
+ echo "<option "; if( $core_schedule == $key ) { echo "selected "; } echo "value='".$key."'>".$value."</option>";
 
 
 
 
375
  } ?>
376
  </select>
377
  </p>
404
  <p>
405
  <select id='schedule_mail' name='schedule_mail'>
406
  <?php foreach ( $availableIntervals as $key => $value ) {
407
+ echo "<option "; if( $schedule_mail == $key ) { echo "selected "; } echo "value='".$key."'>".$value."</option>";
 
 
 
 
408
  } ?>
409
  </select>
410
  </p>
432
  </div>
433
 
434
  </div>
 
435
  </div>
436
 
437
  <?php wp_nonce_field( 'cau_save_settings' ); ?>
admin/log.php CHANGED
@@ -11,11 +11,11 @@ if( isset( $_GET['filter'] ) ) {
11
  <ul class="subsubsub">
12
  <li><a <?php if( $filter == 'all' ) { echo "class='current'"; } ?> href='<?php echo cau_url( 'log&filter=all' ); ?>'><?php _e( 'View full changelog', 'companion-auto-update' ); ?></a></li> |
13
  <li><a <?php if( $filter == 'plugins' ) { echo "class='current'"; } ?> href='<?php echo cau_url( 'log&filter=plugins' ); ?>'><?php _e( 'Plugins', 'companion-auto-update' ); ?></a></li> |
14
- <li><a <?php if( $filter == 'themes' ) { echo "class='current'"; } ?> href='<?php echo cau_url( 'log&filter=themes' ); ?>'><?php _e( 'Themes', 'companion-auto-update' ); ?></a></li>
 
15
  </ul>
16
 
17
  <div class='cau_spacing'></div>
18
 
19
  <?php
20
-
21
  cau_fetch_log( 'all', 'table' );
11
  <ul class="subsubsub">
12
  <li><a <?php if( $filter == 'all' ) { echo "class='current'"; } ?> href='<?php echo cau_url( 'log&filter=all' ); ?>'><?php _e( 'View full changelog', 'companion-auto-update' ); ?></a></li> |
13
  <li><a <?php if( $filter == 'plugins' ) { echo "class='current'"; } ?> href='<?php echo cau_url( 'log&filter=plugins' ); ?>'><?php _e( 'Plugins', 'companion-auto-update' ); ?></a></li> |
14
+ <li><a <?php if( $filter == 'themes' ) { echo "class='current'"; } ?> href='<?php echo cau_url( 'log&filter=themes' ); ?>'><?php _e( 'Themes', 'companion-auto-update' ); ?></a></li> |
15
+ <li><a <?php if( $filter == 'translations' ) { echo "class='current'"; } ?> href='<?php echo cau_url( 'log&filter=translations' ); ?>'><?php _e( 'Translations', 'companion-auto-update' ); ?></a></li>
16
  </ul>
17
 
18
  <div class='cau_spacing'></div>
19
 
20
  <?php
 
21
  cau_fetch_log( 'all', 'table' );
admin/rollback.php CHANGED
@@ -1,2 +1,2 @@
1
- <?php
2
- // Currently working on this
1
+ <?php
2
+ // Currently working on this
cau_functions.php CHANGED
@@ -412,21 +412,31 @@ function cau_fetch_log( $limit, $format = 'simple' ) {
412
  switch( $filter ) {
413
 
414
  case 'plugins':
415
- $plugins = true;
416
- $themes = false;
417
- $core = false;
 
418
  break;
419
 
420
  case 'themes':
421
- $plugins = false;
422
- $themes = true;
423
- $core = false;
 
 
 
 
 
 
 
 
424
  break;
425
 
426
  default:
427
- $plugins = true;
428
- $themes = true;
429
- $core = true;
 
430
  break;
431
  }
432
 
@@ -559,6 +569,89 @@ function cau_fetch_log( $limit, $format = 'simple' ) {
559
 
560
  }
561
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
562
  // CORE
563
  if( $core ) {
564
 
@@ -613,9 +706,9 @@ function cau_fetch_log( $limit, $format = 'simple' ) {
613
 
614
  echo '<thead>
615
  <tr>
616
- <th><strong>'.__( 'Name', 'companion-auto-update' ).'</strong></th>
617
- <th><strong>'.__( 'To version', 'companion-auto-update' ).'</strong></th>
618
- <th><strong>'.__( 'Type', 'companion-auto-update' ).'</strong></th>
619
  <th><strong>'.__( 'Last updated on', 'companion-auto-update' ).'</strong></th>
620
  <th><strong>'.__( 'Update method', 'companion-auto-update' ).'</strong></th>
621
  </tr>
@@ -654,7 +747,7 @@ function cau_fetch_log( $limit, $format = 'simple' ) {
654
  $thisType = $type[$key];
655
  }
656
 
657
- echo '<td class="cau_hide_on_mobile column-version" style="min-width: 100px;"><p>'. $pluginVersion[$key] .'</p></td>';
658
  echo '<td class="cau_hide_on_mobile column-description"><p>'. $thisType .'</p></td>';
659
 
660
  }
@@ -816,12 +909,59 @@ function cau_addMoreIntervals( $schedules ) {
816
  'interval' => 2635200,
817
  'display' => __( 'Once a month' ),
818
  );
 
 
 
 
 
 
819
 
820
  return $schedules;
821
 
822
  }
823
  add_filter( 'cron_schedules', 'cau_addMoreIntervals' );
824
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
825
  // Check if the update log db is empty
826
  function cau_updateLogDBisEmpty() {
827
 
@@ -843,6 +983,7 @@ function cau_savePluginInformation( $method = 'New' ) {
843
  global $wpdb;
844
  $updateDB = "update_log";
845
  $updateLog = $wpdb->prefix.$updateDB;
 
846
 
847
  foreach ( $allPlugins as $key => $value ) {
848
  if( !cau_check_if_exists( $key, 'slug', $updateDB ) ) $wpdb->insert( $updateLog, array( 'slug' => $key, 'oldVersion' => '-', 'method' => $method ) );
412
  switch( $filter ) {
413
 
414
  case 'plugins':
415
+ $plugins = true;
416
+ $themes = false;
417
+ $core = false;
418
+ $translations = false;
419
  break;
420
 
421
  case 'themes':
422
+ $plugins = false;
423
+ $themes = true;
424
+ $core = false;
425
+ $translations = false;
426
+ break;
427
+
428
+ case 'translations':
429
+ $plugins = false;
430
+ $themes = false;
431
+ $core = false;
432
+ $translations = true;
433
  break;
434
 
435
  default:
436
+ $plugins = true;
437
+ $themes = true;
438
+ $core = true;
439
+ $translations = false;
440
  break;
441
  }
442
 
569
 
570
  }
571
 
572
+ // TRANSLATIONS
573
+ if( $translations ) {
574
+
575
+ // There is no way (at this time) to check if someone changed this link, so therefore it won't work when it's changed, sorry
576
+ $transFolder = get_home_path().'wp-content/languages';
577
+ if( file_exists( $transFolder ) ) {
578
+
579
+ $allThemTranslations = array();
580
+ $allThemTypes = array();
581
+
582
+ $pt = __( 'Plugin translations', 'companion-auto-update' );
583
+ $tt = __( 'Theme translations', 'companion-auto-update' );
584
+ $ct = __( 'Core translations', 'companion-auto-update' );
585
+
586
+ // Plugin translations
587
+ $files = glob( $transFolder.'/plugins/*.{mo}', GLOB_BRACE );
588
+ foreach( $files as $file ) {
589
+ array_push( $allThemTranslations, $file );
590
+ array_push( $allThemTypes, $pt );
591
+ }
592
+
593
+ // Theme translations
594
+ $files = glob( $transFolder.'/themes/*.{mo}', GLOB_BRACE );
595
+ foreach( $files as $file ) {
596
+ array_push( $allThemTranslations, $file );
597
+ array_push( $allThemTypes, $tt );
598
+ }
599
+
600
+ // Core translations
601
+ $files = glob( $transFolder.'/*.{mo}', GLOB_BRACE );
602
+ foreach( $files as $file ) {
603
+ array_push( $allThemTranslations, $file );
604
+ array_push( $allThemTypes, $ct );
605
+ }
606
+
607
+ foreach( $allThemTranslations as $key => $trans_file ) {
608
+
609
+ $transDate = date( 'YmdHi', filemtime( $trans_file ) );
610
+
611
+ if( $format == 'table' ) {
612
+ $transDateF = date_i18n( $dateFormat, filemtime( $trans_file ) );
613
+ $transDateF .= ' &dash; '.date ( 'H:i', filemtime( $trans_file ) );
614
+ } else {
615
+ $transDateF = date_i18n( $dateFormat, filemtime( $trans_file ) );
616
+ }
617
+
618
+ $trans_name = basename( $trans_file );
619
+ $trans_name = str_replace( "-", " ", $trans_name );
620
+ $trans_name = str_replace( ".mo", "", $trans_name );
621
+ $trans_name = str_replace( ".json", "", $trans_name );
622
+ $trans_lang = substr( $trans_name, strrpos( $trans_name, " " ) + 1 );
623
+ $trans_name = str_replace( $trans_lang, "", $trans_name );
624
+ $trans_lang = substr( $trans_lang, strrpos( $trans_lang, "_" ) + 1 );
625
+
626
+ // Push
627
+ array_push( $pluginNames, ucfirst( $trans_name ).': '.$trans_lang );
628
+ array_push( $type, $allThemTypes[$key] );
629
+ array_push( $pluginVersion, '-' );
630
+ array_push( $pluginDates, $transDate );
631
+ array_push( $pluginDatesF, $transDateF );
632
+ array_push( $plugslug , '' );
633
+ array_push( $method , '-' );
634
+
635
+ }
636
+
637
+ } else {
638
+ $transDate = date('YmdHi');
639
+ $transDateF = 'Could not read translations date.';
640
+
641
+ array_push( $pluginNames, 'Translations' );
642
+ array_push( $type, $trans_type.' translations' );
643
+ array_push( $pluginVersion, '-' );
644
+ array_push( $pluginDates, $transDate );
645
+ array_push( $pluginDatesF, $transDateF );
646
+ array_push( $plugslug , '' );
647
+
648
+ // Get info from database
649
+ array_push( $method , '-' );
650
+
651
+ }
652
+
653
+ }
654
+
655
  // CORE
656
  if( $core ) {
657
 
706
 
707
  echo '<thead>
708
  <tr>
709
+ <th><strong>'.__( 'Name', 'companion-auto-update' ).'</strong></th>';
710
+ if( !$translations ) echo '<th><strong>'.__( 'To version', 'companion-auto-update' ).'</strong></th>';
711
+ echo '<th><strong>'.__( 'Type', 'companion-auto-update' ).'</strong></th>
712
  <th><strong>'.__( 'Last updated on', 'companion-auto-update' ).'</strong></th>
713
  <th><strong>'.__( 'Update method', 'companion-auto-update' ).'</strong></th>
714
  </tr>
747
  $thisType = $type[$key];
748
  }
749
 
750
+ if( !$translations ) echo '<td class="cau_hide_on_mobile column-version" style="min-width: 100px;"><p>'. $pluginVersion[$key] .'</p></td>';
751
  echo '<td class="cau_hide_on_mobile column-description"><p>'. $thisType .'</p></td>';
752
 
753
  }
909
  'interval' => 2635200,
910
  'display' => __( 'Once a month' ),
911
  );
912
+
913
+ // Add a montly interval.
914
+ $schedules['once_monthly'] = array(
915
+ 'interval' => 2635200,
916
+ 'display' => __( 'Once a month' ),
917
+ );
918
 
919
  return $schedules;
920
 
921
  }
922
  add_filter( 'cron_schedules', 'cau_addMoreIntervals' );
923
 
924
+ // Get only unique schedules
925
+ function cau_wp_get_schedules() {
926
+
927
+ // Start variables
928
+ $availableIntervals = wp_get_schedules();
929
+ $array_unique = array();
930
+ $intervalTimes = array();
931
+ $intervalNames = array();
932
+ $intervalUniques = array();
933
+ $counter = 0;
934
+
935
+ // Get all intervals
936
+ foreach ( $availableIntervals as $key => $value ) {
937
+
938
+ // Do a bunch of checks to format them the right way
939
+ foreach ( $value as $display => $interval ) {
940
+ if( $display == 'display' ) {
941
+ $intervalNames[$counter] = $interval; // Add the display name (i.e. "Once a month" or "Once Daily")
942
+ $counter++; // Make sure the next interval gets a new "key" value
943
+ } else {
944
+ $intervalTimes[$counter] = $key; // Add the unix timestamp of this interval, used to identify unique items
945
+ $intervalUniques[$counter] = $interval; // Add the backend name (i.e. "once_monthly" or "daily")
946
+ }
947
+
948
+ }
949
+
950
+ }
951
+
952
+ // Prevent duplicates
953
+ foreach ( array_unique( $intervalUniques ) as $key => $value ) {
954
+ // $value is the timestamp
955
+ // $intervalTimes[$key] is the backend name
956
+ // $intervalNames[$key] is the display name
957
+ $array_unique[$intervalTimes[$key]] = $intervalNames[$key];
958
+ }
959
+
960
+ // Return the array
961
+ return $array_unique;
962
+
963
+ }
964
+
965
  // Check if the update log db is empty
966
  function cau_updateLogDBisEmpty() {
967
 
983
  global $wpdb;
984
  $updateDB = "update_log";
985
  $updateLog = $wpdb->prefix.$updateDB;
986
+ $allPlugins = get_plugins();
987
 
988
  foreach ( $allPlugins as $key => $value ) {
989
  if( !cau_check_if_exists( $key, 'slug', $updateDB ) ) $wpdb->insert( $updateLog, array( 'slug' => $key, 'oldVersion' => '-', 'method' => $method ) );
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.5.3
7
  * Author: Papin Schipper
8
  * Author URI: http://codeermeneer.nl/
9
  * Contributors: papin
@@ -30,7 +30,7 @@ function cau_install() {
30
  if (! wp_next_scheduled ( 'cau_custom_hooks_themes' )) wp_schedule_event( time(), 'daily', 'cau_custom_hooks_themes'); // Run custom hooks on theme updates
31
  }
32
  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
  // Redirect to welcome screen on activation of plugin
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.5.4
7
  * Author: Papin Schipper
8
  * Author URI: http://codeermeneer.nl/
9
  * Contributors: papin
30
  if (! wp_next_scheduled ( 'cau_custom_hooks_themes' )) wp_schedule_event( time(), 'daily', 'cau_custom_hooks_themes'); // Run custom hooks on theme updates
31
  }
32
  add_action( 'cau_set_schedule_mail', 'cau_check_updates_mail' );
33
+ add_action( 'wp_update_plugins', 'cau_run_custom_hooks_p' );
34
  add_action( 'cau_custom_hooks_themes', 'cau_run_custom_hooks_t' );
35
 
36
  // Redirect to welcome screen on activation of plugin
readme.txt CHANGED
@@ -74,6 +74,8 @@ Your feedback is what made this plugin what is and what it’ll become so keep t
74
  * Fix: Error with Companion Auto Update Database Update
75
  * Fix: Schedule interval duplicates
76
 
 
 
77
  = 3.5.3 (June 5, 2020) =
78
  * NEW: We're working on a better update log. You should see the Update method (Manual/Automatic) in the log now. (Only works for Plugins right now)
79
  Please report any issues with this feature over at our sticky post: [Problems with the Update method in the new update log?](https://wordpress.org/support/topic/problems-with-the-update-method-in-the-new-update-log/)
@@ -83,8 +85,6 @@ Please report any issues with this feature over at our sticky post: [Problems wi
83
  * Tweak: The status tab will no longer show turned-off settings as an error
84
  * Tweak: Made some improvements to the "Update pending" emails, you can now see a list of all pending updates and go directly to the update page.
85
 
86
- Also: Check out what features we're working on at [our blogpost](https://codeermeneer.nl/blog/companion-auto-update-and-its-future/)
87
-
88
  = 3.5.2 (April 1, 2020) =
89
  * Fix: Not able to see checks in boxes
90
 
74
  * Fix: Error with Companion Auto Update Database Update
75
  * Fix: Schedule interval duplicates
76
 
77
+ Also: Check out what features we're working on at [our blogpost](https://codeermeneer.nl/blog/companion-auto-update-and-its-future/)
78
+
79
  = 3.5.3 (June 5, 2020) =
80
  * NEW: We're working on a better update log. You should see the Update method (Manual/Automatic) in the log now. (Only works for Plugins right now)
81
  Please report any issues with this feature over at our sticky post: [Problems with the Update method in the new update log?](https://wordpress.org/support/topic/problems-with-the-update-method-in-the-new-update-log/)
85
  * Tweak: The status tab will no longer show turned-off settings as an error
86
  * Tweak: Made some improvements to the "Update pending" emails, you can now see a list of all pending updates and go directly to the update page.
87
 
 
 
88
  = 3.5.2 (April 1, 2020) =
89
  * Fix: Not able to see checks in boxes
90
 
trunk/admin/dashboard.php DELETED
@@ -1,540 +0,0 @@
1
- <?php
2
-
3
- // Event schedules failed
4
- if ( !wp_next_scheduled ( 'cau_set_schedule_mail' ) ) {
5
- echo '<div id="message" class="error"><p><b>'.__( 'Companion Auto Update was not able to set the event for sending you emails, please re-activate the plugin in order to set the event', 'companion-auto-update' ).'.</b></p></div>';
6
- }
7
-
8
- // Database requires an update
9
- if ( cau_incorrectDatabaseVersion() ) {
10
- echo '<div id="message" class="error"><p><b>'.__( 'Companion Auto Update Database Update', 'companion-auto-update' ).' &ndash;</b>
11
- '.__( 'We need you to update to the latest database version', 'companion-auto-update' ).'. <a href="'.cau_url( 'status' ).'&run=db_update" class="button button-alt" style="background: #FFF;">'.__( 'Run updater now', 'companion-auto-update' ).'</a></p></div>';
12
- }
13
-
14
- // Update log DB is empty
15
- if ( cau_updateLogDBisEmpty() ) {
16
- echo '<div id="message" class="error"><p><b>'.__( 'Companion Auto Update Database Update', 'companion-auto-update' ).' &ndash;</b>
17
- '.__( 'We need to add some information to your database', 'companion-auto-update' ).'. <a href="'.cau_url( 'status' ).'&run=db_info_update" class="button button-alt" style="background: #FFF;">'.__( 'Run updater now', 'companion-auto-update' ).'</a></p></div>';
18
- }
19
-
20
- // Save settings
21
- if( isset( $_POST['submit'] ) ) {
22
-
23
- check_admin_referer( 'cau_save_settings' );
24
-
25
- global $wpdb;
26
- $table_name = $wpdb->prefix . "auto_updates";
27
-
28
- // Auto updater
29
- if( isset( $_POST['plugins'] ) ) $plugins = sanitize_text_field( $_POST['plugins'] ); else $plugins = '';
30
- if( isset( $_POST['themes'] ) ) $themes = sanitize_text_field( $_POST['themes'] ); else $themes = '';
31
- if( isset( $_POST['minor'] ) ) $minor = sanitize_text_field( $_POST['minor'] ); else $minor = '';
32
- if( isset( $_POST['major'] ) ) $major = sanitize_text_field( $_POST['major'] ); else $major = '';
33
- if( isset( $_POST['translations'] ) ) $translations = sanitize_text_field( $_POST['translations'] ); else $translations = '';
34
-
35
- $wpdb->query( $wpdb->prepare( "UPDATE $table_name SET onoroff = %s WHERE name = 'plugins'", $plugins ) );
36
- $wpdb->query( $wpdb->prepare( "UPDATE $table_name SET onoroff = %s WHERE name = 'themes'", $themes ) );
37
- $wpdb->query( $wpdb->prepare( "UPDATE $table_name SET onoroff = %s WHERE name = 'minor'", $minor ) );
38
- $wpdb->query( $wpdb->prepare( "UPDATE $table_name SET onoroff = %s WHERE name = 'major'", $major ) );
39
- $wpdb->query( $wpdb->prepare( "UPDATE $table_name SET onoroff = %s WHERE name = 'translations'", $translations ) );
40
-
41
- // Emails
42
- if( isset( $_POST['cau_send'] ) ) $send = sanitize_text_field( $_POST['cau_send'] ); else $send = '';
43
- if( isset( $_POST['cau_send_update'] ) ) $sendupdate = sanitize_text_field( $_POST['cau_send_update'] ); else $sendupdate = '';
44
- if( isset( $_POST['wpemails'] ) ) $wpemails = sanitize_text_field( $_POST['wpemails'] ); else $wpemails = '';
45
- if( isset( $_POST['cau_email'] ) ) $email = sanitize_text_field( $_POST['cau_email'] );
46
- if( isset( $_POST['html_or_text'] ) ) $html_or_text = sanitize_text_field( $_POST['html_or_text'] );
47
-
48
- $wpdb->query( $wpdb->prepare( "UPDATE $table_name SET onoroff = %s WHERE name = 'email'", $email ) );
49
- $wpdb->query( $wpdb->prepare( "UPDATE $table_name SET onoroff = %s WHERE name = 'send'", $send ) );
50
- $wpdb->query( $wpdb->prepare( "UPDATE $table_name SET onoroff = %s WHERE name = 'sendupdate'", $sendupdate ) );
51
- $wpdb->query( $wpdb->prepare( "UPDATE $table_name SET onoroff = %s WHERE name = 'wpemails'", $wpemails ) );
52
- $wpdb->query( $wpdb->prepare( "UPDATE $table_name SET onoroff = %s WHERE name = 'html_or_text'", $html_or_text ) );
53
-
54
- // Intervals
55
-
56
- // Set variables
57
- $plugin_sc = sanitize_text_field( $_POST['plugin_schedule'] );
58
- $theme_sc = sanitize_text_field( $_POST['theme_schedule'] );
59
- $core_sc = sanitize_text_field( $_POST['core_schedule'] );
60
- $schedule_mail = sanitize_text_field( $_POST['schedule_mail'] );
61
- $html_or_text = sanitize_text_field( $_POST['html_or_text'] );
62
-
63
- // First clear schedules
64
- wp_clear_scheduled_hook('wp_update_plugins');
65
- wp_clear_scheduled_hook('wp_update_themes');
66
- wp_clear_scheduled_hook('wp_version_check');
67
- wp_clear_scheduled_hook('cau_set_schedule_mail');
68
- wp_clear_scheduled_hook('cau_custom_hooks_plugins');
69
- wp_clear_scheduled_hook('cau_custom_hooks_themes');
70
-
71
- // Then set the new times
72
-
73
- // Plugins
74
- if( $plugin_sc == 'daily' ) {
75
-
76
- $date = date( 'Y-m-d' );
77
- $hours = sanitize_text_field( $_POST['pluginScheduleTimeH'] );
78
- $minutes = sanitize_text_field( $_POST['pluginScheduleTimeM'] );
79
- $seconds = date( 's' );
80
- $fullDate = $date.' '.$hours.':'.$minutes.':'.$seconds;
81
- $pluginSetTime = strtotime( $fullDate );
82
-
83
- wp_schedule_event( $pluginSetTime, $plugin_sc, 'wp_update_plugins' );
84
- wp_schedule_event( $pluginSetTime, $plugin_sc, 'cau_custom_hooks_plugins' );
85
-
86
- } else {
87
-
88
- wp_schedule_event( time(), $plugin_sc, 'wp_update_plugins' );
89
- wp_schedule_event( time(), $plugin_sc, 'cau_custom_hooks_plugins' );
90
-
91
- }
92
-
93
- // Themes
94
- if( $theme_sc == 'daily' ) {
95
-
96
- $dateT = date( 'Y-m-d' );
97
- $hoursT = sanitize_text_field( $_POST['ThemeScheduleTimeH'] );
98
- $minutesT = sanitize_text_field( $_POST['ThemeScheduleTimeM'] );
99
- $secondsT = date( 's' );
100
- $fullDateT = $dateT.' '.$hoursT.':'.$minutesT.':'.$secondsT;
101
- $themeSetTime = strtotime( $fullDateT );
102
-
103
- wp_schedule_event( $themeSetTime, $theme_sc, 'wp_update_themes' );
104
- wp_schedule_event( $themeSetTime, $theme_sc, 'cau_custom_hooks_themes' );
105
-
106
- } else {
107
-
108
- wp_schedule_event( time(), $theme_sc, 'wp_update_themes' );
109
- wp_schedule_event( time(), $theme_sc, 'cau_custom_hooks_themes' );
110
-
111
- }
112
-
113
- // Core
114
- if( $core_sc == 'daily' ) {
115
-
116
- $dateC = date( 'Y-m-d' );
117
- $hoursC = sanitize_text_field( $_POST['CoreScheduleTimeH'] );
118
- $minutesC = sanitize_text_field( $_POST['CoreScheduleTimeM'] );
119
- $secondsC = date( 's' );
120
- $fullDateC = $dateC.' '.$hoursC.':'.$minutesC.':'.$secondsC;
121
- $coreSetTime = strtotime( $fullDateC );
122
-
123
- wp_schedule_event( $coreSetTime, $core_sc, 'wp_version_check' );
124
-
125
- } else {
126
-
127
- wp_schedule_event( time(), $core_sc, 'wp_version_check' );
128
-
129
- }
130
-
131
- // Emails
132
- if( $schedule_mail == 'daily' ) {
133
-
134
- $dateT = date( 'Y-m-d' );
135
- $hoursT = sanitize_text_field( $_POST['timeScheduleEmailTimeH'] );
136
- $minutesT = sanitize_text_field( $_POST['timeScheduleEmailTimeM'] );
137
- $secondsT = date( 's' );
138
- $fullDateT = $dateT.' '.$hoursT.':'.$minutesT.':'.$secondsT;
139
- $emailSetTime = strtotime( $fullDateT );
140
-
141
- wp_schedule_event( $emailSetTime, $schedule_mail, 'cau_set_schedule_mail' );
142
-
143
- } else {
144
-
145
- wp_schedule_event( time(), $schedule_mail, 'cau_set_schedule_mail' );
146
-
147
- }
148
-
149
- echo '<div id="message" class="updated"><p><b>'.__( 'Settings saved.' ).'</b></p></div>';
150
-
151
- }
152
-
153
- if( isset( $_GET['welcome'] ) ) {
154
-
155
- echo '<div class="welcome-to-cau welcome-bg welcome-panel" style="margin-bottom: 0px;">
156
- <div class="welcome-image">
157
- </div><div class="welcome-content">
158
-
159
- <h3>'.__( 'Welcome to Companion Auto Update', 'companion-auto-update' ).'</h3>
160
- <br />
161
- <p><strong>'.__( 'You\'re set and ready to go', 'companion-auto-update' ).'</strong></p>
162
- <p>'.__( 'The plugin is all set and ready to go with the recommended settings, but if you\'d like you can change them below.' ).'</p>
163
- <br />
164
- <p><strong>'.__( 'Get Started' ).': </strong> <a href="'.cau_url( 'pluginlist' ).'">'.__( 'Update filter', 'companion-auto-update' ).'</a> &nbsp; | &nbsp;
165
- <strong>'.__( 'More Actions' ).': </strong> <a href="http://codeermeneer.nl/cau_poll/" target="_blank">'.__('Give feedback', 'companion-auto-update').'</a> - <a href="https://translate.wordpress.org/projects/wp-plugins/companion-auto-update/" target="_blank">'.__( 'Help us translate', 'companion-auto-update' ).'</a></p>
166
-
167
- </div>
168
- </div>';
169
- }
170
-
171
- $plugin_schedule = wp_get_schedule( 'wp_update_plugins' );
172
- $theme_schedule = wp_get_schedule( 'wp_update_themes' );
173
- $core_schedule = wp_get_schedule( 'wp_version_check' );
174
- $schedule_mail = wp_get_schedule( 'cau_set_schedule_mail' );
175
- $cs_hooks_p = wp_get_schedule( 'cau_custom_hooks_plugins' );
176
- $cs_hooks_t = wp_get_schedule( 'cau_custom_hooks_themes' );
177
- $availableIntervals = cau_wp_get_schedules();
178
-
179
- ?>
180
-
181
- <div class="cau-column-wide">
182
-
183
- <form method="POST">
184
-
185
- <div id="message" class="cau">
186
- <strong>Got a moment?</strong> &dash; <a href="https://forms.gle/B5MMJKk8teGQH8pcA" target="_blank" class="tell_me_more">Please tell me if you like the redesigned dashboard.</a>
187
- </div>
188
-
189
- <div class="welcome-to-cau update-bg welcome-panel cau-dashboard-box">
190
-
191
- <h2 class="title"><?php _e('Auto Updater', 'companion-auto-update');?></h2>
192
-
193
- <table class="form-table">
194
- <tr>
195
- <td>
196
- <fieldset>
197
-
198
- <?php
199
-
200
- echo '<p><input id="plugins" name="plugins" type="checkbox"';
201
- if( cau_get_db_value( 'plugins' ) == 'on' ) echo 'checked';
202
- echo '/> <label for="plugins">'.__('Auto update plugins?', 'companion-auto-update').'</label></p>';
203
-
204
- echo '<p><input id="themes" name="themes" type="checkbox"';
205
- if( cau_get_db_value( 'themes' ) == 'on' ) echo 'checked';
206
- echo '/> <label for="themes">'.__('Auto update themes?', 'companion-auto-update').'</label></p>';
207
-
208
- echo '<p><input id="minor" name="minor" type="checkbox"';
209
- if( cau_get_db_value( 'minor' ) == 'on' ) echo 'checked';
210
- echo '/> <label for="minor">'.__('Auto update minor core updates?', 'companion-auto-update').' <code class="majorMinorExplain">5.3.0 > 5.3.1</code></label></p>';
211
-
212
- echo '<p><input id="major" name="major" type="checkbox"';
213
- if( cau_get_db_value( 'major' ) == 'on' ) echo 'checked';
214
- echo '/> <label for="major">'.__('Auto update major core updates?', 'companion-auto-update').' <code class="majorMinorExplain">5.3.0 > 5.4.0</code></label></p>';
215
-
216
- echo '<p><input id="translations" name="translations" type="checkbox"';
217
- if( cau_get_db_value( 'translations' ) == 'on' ) echo 'checked';
218
- echo '/> <label for="translations">'.__('Auto update translation files?', 'companion-auto-update').'</label></p>';
219
-
220
- ?>
221
-
222
- </fieldset>
223
- </td>
224
- </tr>
225
- </table>
226
-
227
- </div>
228
-
229
- <div class="welcome-to-cau email-bg welcome-panel cau-dashboard-box">
230
-
231
- <h2 class="title"><?php _e( 'Email Notifications', 'companion-auto-update' );?></h2>
232
-
233
- <?php
234
- if( cau_get_db_value( 'email' ) == '' ) $toemail = get_option('admin_email');
235
- else $toemail = cau_get_db_value( 'email' );
236
- ?>
237
-
238
- <table class="form-table">
239
- <tr>
240
- <th scope="row"><?php _e( 'Update available', 'companion-auto-update' );?></th>
241
- <td>
242
- <p>
243
- <input id="cau_send" name="cau_send" type="checkbox" <?php if( cau_get_db_value( 'send' ) == 'on' ) { echo 'checked'; } ?> />
244
- <label for="cau_send"><?php _e('Send me emails when an update is available.', 'companion-auto-update');?></label>
245
- </p>
246
- </td>
247
- </tr>
248
- <tr>
249
- <th scope="row"><?php _e( 'Successful update', 'companion-auto-update' );?></th>
250
- <td>
251
- <p>
252
- <input id="cau_send_update" name="cau_send_update" type="checkbox" <?php if( cau_get_db_value( 'sendupdate' ) == 'on' ) { echo 'checked'; } ?> />
253
- <label for="cau_send_update"><?php _e('Send me emails when something has been updated.', 'companion-auto-update');?></label>
254
- </p>
255
- </td>
256
- </tr>
257
- <tr>
258
- <th scope="row"><?php _e( 'Email Address' );?></th>
259
- <td>
260
- <p>
261
- <label for="cau_email"><?php _e('To', 'companion-auto-update');?>:</label>
262
- <input type="text" name="cau_email" id="cau_email" class="regular-text" placeholder="<?php echo get_option('admin_email'); ?>" value="<?php echo esc_html( $toemail ); ?>" />
263
- </p>
264
-
265
- <p class="description"><?php _e('Seperate email addresses using commas.', 'companion-auto-update');?></p>
266
- </td>
267
- </tr>
268
- <tr>
269
- <th scope="row"><?php _e( 'Use HTML in emails?', 'companion-auto-update' );?></th>
270
- <td>
271
- <p>
272
- <select id='html_or_text' name='html_or_text'>
273
- <option value='html' <?php if( cau_get_db_value( 'html_or_text' ) == 'html' ) { echo "SELECTED"; } ?>><?php _e( 'Use HTML', 'companion-auto-update' ); ?></option>
274
- <option value='text' <?php if( cau_get_db_value( 'html_or_text' ) == 'text' ) { echo "SELECTED"; } ?>><?php _e( 'Use plain text', 'companion-auto-update' ); ?></option>
275
- </select>
276
- </p>
277
- </td>
278
- </tr>
279
- <tr>
280
- <th scope="row">
281
- <?php _e('Core notifications', 'companion-auto-update');?>
282
- <span class='cau_tooltip'><span class="dashicons dashicons-editor-help"></span>
283
- <span class='cau_tooltip_text'><?php _e('Core notifications are handled by WordPress and not by this plugin. You can only disable them, changing your email address in the settings above will not affect these notifications.', 'companion-auto-update');?></span>
284
- </span>
285
- </th>
286
- <td>
287
- <p>
288
- <input id="wpemails" name="wpemails" type="checkbox" <?php if( cau_get_db_value( 'wpemails' ) == 'on' ) { echo 'checked'; } ?> />
289
- <label for="wpemails"><?php _e( 'By default WordPress sends an email when a core update has occurred. Uncheck this box to disable these emails.', 'companion-auto-update' );?></label>
290
- </p>
291
- </td>
292
- </tr>
293
- </table>
294
-
295
- </div>
296
-
297
- <div class="welcome-to-cau interval-bg welcome-panel cau-dashboard-box" style="overflow: hidden;">
298
-
299
- <h2 class="title"><?php _e('Intervals', 'companion-auto-update');?></h2>
300
-
301
- <div class="welcome-column welcome-column-quarter">
302
-
303
- <h4><?php _e( 'Plugin update interval', 'companion-auto-update' );?></h4>
304
- <p>
305
- <select name='plugin_schedule' id='plugin_schedule' class='schedule_interval wide'>
306
- <?php foreach ( $availableIntervals as $key => $value ) {
307
- echo "<option "; if( $plugin_schedule == $key ) { echo "selected "; } echo "value='".$key."'>".$value."</option>";
308
- } ?>
309
- </select>
310
- </p>
311
- <div class='timeSchedulePlugins' <?php if( $plugin_schedule != 'daily' ) { echo "style='display: none;'"; } ?> >
312
-
313
- <?php
314
-
315
- $setTimePlugins = wp_next_scheduled( 'wp_update_plugins' );
316
- $setTimePluginsHour = date( 'H' , $setTimePlugins );
317
- $setTimePluginsMin = date( 'i' , $setTimePlugins );
318
-
319
- ?>
320
-
321
- <div class='cau_schedule_input'>
322
- <input type='number' max='23' name='pluginScheduleTimeH' value='<?php echo $setTimePluginsHour; ?>' maxlength='2' >
323
- </div><div class='cau_schedule_input_div'>
324
- :
325
- </div><div class='cau_schedule_input'>
326
- <input type='number' max='59' name='pluginScheduleTimeM' value='<?php echo $setTimePluginsMin; ?>' maxlength='2' >
327
- </div><div class='cau_shedule_notation'>
328
- <span class='cau_tooltip'><span class="dashicons dashicons-editor-help"></span>
329
- <span class='cau_tooltip_text'><?php _e('At what time should the updater run? Only works when set to <u>daily</u>.', 'companion-auto-update'); ?> - <?php _e( 'Time notation: 24H', 'companion-auto-update'); ?></span>
330
- </span>
331
- </div>
332
-
333
- </div>
334
-
335
- </div><div class="welcome-column welcome-column-quarter">
336
-
337
- <h4><?php _e( 'Theme update interval', 'companion-auto-update' );?></h4>
338
- <p>
339
- <select name='theme_schedule' id='theme_schedule' class='schedule_interval wide'>
340
- <?php foreach ( $availableIntervals as $key => $value ) {
341
- echo "<option "; if( $theme_schedule == $key ) { echo "selected "; } echo "value='".$key."'>".$value."</option>";
342
- } ?>
343
- </select>
344
- </p>
345
- <div class='timeScheduleThemes' <?php if( $theme_schedule != 'daily' ) { echo "style='display: none;'"; } ?> >
346
-
347
- <?php
348
-
349
- $setTimeThemes = wp_next_scheduled( 'wp_update_themes' );
350
- $setTimeThemesHour = date( 'H' , $setTimeThemes );
351
- $setTimeThemesMins = date( 'i' , $setTimeThemes );
352
-
353
- ?>
354
-
355
- <div class='cau_schedule_input'>
356
- <input type='number' max='23' name='ThemeScheduleTimeH' value='<?php echo $setTimeThemesHour; ?>' maxlength='2' >
357
- </div><div class='cau_schedule_input_div'>
358
- :
359
- </div><div class='cau_schedule_input'>
360
- <input type='number' max='59' name='ThemeScheduleTimeM' value='<?php echo $setTimeThemesMins; ?>' maxlength='2' >
361
- </div><div class='cau_shedule_notation'>
362
- <span class='cau_tooltip'><span class="dashicons dashicons-editor-help"></span>
363
- <span class='cau_tooltip_text'><?php _e('At what time should the updater run? Only works when set to <u>daily</u>.', 'companion-auto-update'); ?> - <?php _e( 'Time notation: 24H', 'companion-auto-update'); ?></span>
364
- </span>
365
- </div>
366
- </div>
367
-
368
- </div><div class="welcome-column welcome-column-quarter">
369
-
370
- <h4><?php _e( 'Core update interval', 'companion-auto-update' );?></h4>
371
- <p>
372
- <select name='core_schedule' id='core_schedule' class='schedule_interval wide'>
373
- <?php foreach ( $availableIntervals as $key => $value ) {
374
- echo "<option "; if( $core_schedule == $key ) { echo "selected "; } echo "value='".$key."'>".$value."</option>";
375
- } ?>
376
- </select>
377
- </p>
378
- <div class='timeScheduleCore' <?php if( $core_schedule != 'daily' ) { echo "style='display: none;'"; } ?> >
379
-
380
- <?php
381
-
382
- $setTimeCore = wp_next_scheduled( 'wp_version_check' );
383
- $setTimeCoreHour = date( 'H' , $setTimeCore );
384
- $setTimeCoreMins = date( 'i' , $setTimeCore );
385
-
386
- ?>
387
-
388
- <div class='cau_schedule_input'>
389
- <input type='number' max='23' name='CoreScheduleTimeH' value='<?php echo $setTimeCoreHour; ?>' maxlength='2' >
390
- </div><div class='cau_schedule_input_div'>
391
- :
392
- </div><div class='cau_schedule_input'>
393
- <input type='number' max='59' name='CoreScheduleTimeM' value='<?php echo $setTimeCoreMins; ?>' maxlength='2' >
394
- </div><div class='cau_shedule_notation'>
395
- <span class='cau_tooltip'><span class="dashicons dashicons-editor-help"></span>
396
- <span class='cau_tooltip_text'><?php _e('At what time should the updater run? Only works when set to <u>daily</u>.', 'companion-auto-update'); ?> - <?php _e( 'Time notation: 24H', 'companion-auto-update'); ?></span>
397
- </span>
398
- </div>
399
- </div>
400
-
401
- </div><div class="welcome-column welcome-column-quarter">
402
-
403
- <h4><?php _e( 'Email Notifications', 'companion-auto-update' );?></h4>
404
- <p>
405
- <select id='schedule_mail' name='schedule_mail'>
406
- <?php foreach ( $availableIntervals as $key => $value ) {
407
- echo "<option "; if( $schedule_mail == $key ) { echo "selected "; } echo "value='".$key."'>".$value."</option>";
408
- } ?>
409
- </select>
410
- </p>
411
- <div class='timeScheduleEmail' <?php if( $schedule_mail != 'daily' ) { echo "style='display: none;'"; } ?> >
412
-
413
- <?php
414
-
415
- $setTimeEmails = wp_next_scheduled( 'cau_set_schedule_mail' );
416
- $setTimeEmailHour = date( 'H' , $setTimeEmails );
417
- $setTimeEmailMins = date( 'i' , $setTimeEmails );
418
-
419
- ?>
420
-
421
- <div class='cau_schedule_input'>
422
- <input type='number' max='23' name='timeScheduleEmailTimeH' value='<?php echo $setTimeEmailHour; ?>' maxlength='2' >
423
- </div><div class='cau_schedule_input_div'>
424
- :
425
- </div><div class='cau_schedule_input'>
426
- <input type='number' max='59' name='timeScheduleEmailTimeM' value='<?php echo $setTimeEmailMins; ?>' maxlength='2' >
427
- </div><div class='cau_shedule_notation'>
428
- <span class='cau_tooltip'><span class="dashicons dashicons-editor-help"></span>
429
- <span class='cau_tooltip_text'><?php _e( 'Time notation: 24H', 'companion-auto-update'); ?></span>
430
- </span>
431
- </div>
432
- </div>
433
-
434
- </div>
435
- </div>
436
-
437
- <?php wp_nonce_field( 'cau_save_settings' ); ?>
438
- <?php submit_button(); ?>
439
-
440
- </form>
441
-
442
- </div><div class="cau-column-small">
443
-
444
- <div class="welcome-to-cau help-bg welcome-panel cau-dashboard-box">
445
- <div class="welcome-column welcome-column.welcome-column-half">
446
- <h3 class="support-sidebar-title"><?php _e( 'Help' ); ?></h3>
447
- <ul class="support-sidebar-list">
448
- <li><a href="https://codeermeneer.nl/stuffs/faq-auto-updater/" target="_blank"><?php _e( 'Frequently Asked Questions', 'companion-auto-update' ); ?></a></li>
449
- <li><a href="https://wordpress.org/support/plugin/companion-auto-update" target="_blank"><?php _e( 'Support Forums' ); ?></a></li>
450
- </ul>
451
-
452
- <h3 class="support-sidebar-title"><?php _e( 'Want to contribute?', 'companion-auto-update' ); ?></h3>
453
- <ul class="support-sidebar-list">
454
- <li><a href="http://codeermeneer.nl/cau_poll/" target="_blank"><?php _e( 'Give feedback', 'companion-auto-update' ); ?></a></li>
455
- <li><a href="https://codeermeneer.nl/blog/companion-auto-update-and-its-future/" target="_blank"><?php _e( 'Feature To-Do List', 'companion-auto-update' ); ?></a></li>
456
- <li><a href="https://translate.wordpress.org/projects/wp-plugins/companion-auto-update/" target="_blank"><?php _e( 'Help us translate', 'companion-auto-update' ); ?></a></li>
457
- </ul>
458
- </div>
459
- <div class="welcome-column welcome-column.welcome-column-half">
460
- <h3 class="support-sidebar-title"><?php _e( 'Developer?', 'companion-auto-update' ); ?></h3>
461
- <ul class="support-sidebar-list">
462
- <li><a href="https://codeermeneer.nl/documentation/auto-update/" target="_blank"><?php _e( 'Documentation' ); ?></a></li>
463
- </ul>
464
- </div>
465
- </div>
466
-
467
- <div class="welcome-to-cau support-bg welcome-panel cau-dashboard-box">
468
- <div class="welcome-column welcome-column">
469
- <h3><?php _e('Support', 'companion-auto-update');?></h3>
470
- <p><?php _e('Feel free to reach out to us if you have any questions or feedback.', 'companion-auto-update'); ?></p>
471
- <p><a href="https://codeermeneer.nl/contact/" target="_blank" class="button button-primary"><?php _e( 'Contact us', 'companion-auto-update' ); ?></a></p>
472
- <p><a href="https://codeermeneer.nl/plugins/" target="_blank" class="button button-alt"><?php _e('Check out our other plugins', 'companion-auto-update');?></a></p>
473
- </div>
474
- </div>
475
-
476
- <div class="welcome-to-cau love-bg cau-show-love welcome-panel cau-dashboard-box">
477
- <h3><?php _e( 'Like our plugin?', 'companion-auto-update' ); ?></h3>
478
- <p><?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'); ?></p>
479
- <a href="https://wordpress.org/support/plugin/companion-auto-update/reviews/#new-post" target="_blank" class="button button-alt button-hero">
480
- <?php _e('Rate us (5 stars?)', 'companion-auto-update'); ?>
481
- </a>
482
- <a href="<?php echo cau_donateUrl(); ?>" target="_blank" class="button button-primary button-hero">
483
- <?php _e('Donate to help development', 'companion-auto-update'); ?>
484
- </a>
485
- <p style="font-size: 12px; color: #BDBDBD;">Donations via PayPal. Amount can be changed.</p>
486
- </div>
487
-
488
- </div>
489
-
490
- <script type="text/javascript">
491
-
492
- jQuery( '#plugin_schedule' ).change( function() {
493
-
494
- var selected = jQuery(this).val();
495
-
496
- if( selected == 'daily' ) {
497
- jQuery('.timeSchedulePlugins').show();
498
- } else {
499
- jQuery('.timeSchedulePlugins').hide();
500
- }
501
-
502
- });
503
-
504
- jQuery( '#theme_schedule' ).change( function() {
505
-
506
- var selected = jQuery(this).val();
507
-
508
- if( selected == 'daily' ) {
509
- jQuery('.timeScheduleThemes').show();
510
- } else {
511
- jQuery('.timeScheduleThemes').hide();
512
- }
513
-
514
- });
515
-
516
- jQuery( '#core_schedule' ).change( function() {
517
-
518
- var selected = jQuery(this).val();
519
-
520
- if( selected == 'daily' ) {
521
- jQuery('.timeScheduleCore').show();
522
- } else {
523
- jQuery('.timeScheduleCore').hide();
524
- }
525
-
526
- });
527
-
528
- jQuery( '#schedule_mail' ).change( function() {
529
-
530
- var selected = jQuery(this).val();
531
-
532
- if( selected == 'daily' ) {
533
- jQuery('.timeScheduleEmail').show();
534
- } else {
535
- jQuery('.timeScheduleEmail').hide();
536
- }
537
-
538
- });
539
-
540
- </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/admin/log.php DELETED
@@ -1,21 +0,0 @@
1
- <h2><?php _e( 'Update log', 'companion-auto-update' ); ?></h2>
2
-
3
- <?php
4
- if( isset( $_GET['filter'] ) ) {
5
- $filter = $_GET['filter'];
6
- } else {
7
- $filter = 'all';
8
- }
9
- ?>
10
-
11
- <ul class="subsubsub">
12
- <li><a <?php if( $filter == 'all' ) { echo "class='current'"; } ?> href='<?php echo cau_url( 'log&filter=all' ); ?>'><?php _e( 'View full changelog', 'companion-auto-update' ); ?></a></li> |
13
- <li><a <?php if( $filter == 'plugins' ) { echo "class='current'"; } ?> href='<?php echo cau_url( 'log&filter=plugins' ); ?>'><?php _e( 'Plugins', 'companion-auto-update' ); ?></a></li> |
14
- <li><a <?php if( $filter == 'themes' ) { echo "class='current'"; } ?> href='<?php echo cau_url( 'log&filter=themes' ); ?>'><?php _e( 'Themes', 'companion-auto-update' ); ?></a></li> |
15
- <li><a <?php if( $filter == 'translations' ) { echo "class='current'"; } ?> href='<?php echo cau_url( 'log&filter=translations' ); ?>'><?php _e( 'Translations', 'companion-auto-update' ); ?></a></li>
16
- </ul>
17
-
18
- <div class='cau_spacing'></div>
19
-
20
- <?php
21
- cau_fetch_log( 'all', 'table' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/admin/pluginlist.php DELETED
@@ -1,186 +0,0 @@
1
- <?php
2
-
3
- // Get selected filter type
4
- if( isset( $_GET['filter'] ) ) {
5
- $filter = sanitize_key( $_GET['filter'] );
6
- } else {
7
- $filter = 'plugins';
8
- }
9
-
10
- // Select correct database row
11
- switch ( $filter ) {
12
- case 'themes':
13
- $db_table = 'notUpdateListTh';
14
- $filter_name = __( 'Themes', 'companion-auto-update' );
15
- $filterFunction = wp_get_themes();
16
- break;
17
- case 'plugins':
18
- $db_table = 'notUpdateList';
19
- $filter_name = __( 'Plugins', 'companion-auto-update' );
20
- $filterFunction = get_plugins();
21
- break;
22
- default:
23
- $db_table = 'notUpdateList';
24
- $filter_name = __( 'Plugins', 'companion-auto-update' );
25
- $filterFunction = get_plugins();
26
- break;
27
- }
28
-
29
- ?>
30
-
31
- <ul class="subsubsub">
32
- <li><a <?php if( $filter == 'plugins' ) { echo "class='current'"; } ?> href='<?php echo cau_url( 'pluginlist&filter=plugins' ); ?>'><?php _e( 'Plugins', 'companion-auto-update' ); ?></a></li> |
33
- <li><a <?php if( $filter == 'themes' ) { echo "class='current'"; } ?> href='<?php echo cau_url( 'pluginlist&filter=themes' ); ?>'><?php _e( 'Themes', 'companion-auto-update' ); ?></a></li>
34
- </ul>
35
-
36
- <div style='clear: both;'></div>
37
-
38
- <?php if( $filter == 'themes' ) { ?>
39
- <div id="message" class="cau">
40
- We've had to (temporarily) disable the theme filter because it was causing issues on some installations. We'll try to get it working again in a future update.
41
- </div>
42
- <?php } ?>
43
-
44
- <p><?php echo sprintf( esc_html__( 'Prevent certain %s from updating automatically. %s that you select here will be skipped by Companion Auto Update and will require manual updating.', 'companion-auto-update' ), strtolower( $filter_name ), $filter_name ); ?></p>
45
-
46
- <?php
47
-
48
- global $wpdb;
49
- $table_name = $wpdb->prefix."auto_updates";
50
-
51
- // Save list
52
- if( isset( $_POST['submit'] ) ) {
53
-
54
- check_admin_referer( 'cau_save_pluginlist' );
55
-
56
- $noUpdateList = '';
57
- $i = 0;
58
- $noUpdateCount = 0;
59
-
60
- if( isset( $_POST['post'] ) ) {
61
- $noUpdateCount = count( $_POST['post'] );
62
- }
63
-
64
- if( $noUpdateCount > 0 ) {
65
- foreach ( $_POST['post'] as $key ) {
66
- $noUpdateList .= sanitize_text_field( $key );
67
- $i++;
68
- if( $i != $noUpdateCount ) $noUpdateList .= ', ';
69
- }
70
- }
71
-
72
- $wpdb->query( $wpdb->prepare( "UPDATE $table_name SET onoroff = '%s' WHERE name = '%s'", $noUpdateList, $db_table ) );
73
- echo '<div id="message" class="updated"><p><b>'.__( 'Succes', 'companion-auto-update' ).' &ndash;</b> '.sprintf( esc_html__( '%1$s %2$s have been added to the no-update-list', 'companion-auto-update' ), $noUpdateCount, strtolower( $filter_name ) ).'.</p></div>';
74
- }
75
-
76
-
77
- // Reset list
78
- if( isset( $_POST['reset'] ) ) {
79
-
80
- check_admin_referer( 'cau_save_pluginlist' );
81
-
82
- $wpdb->query( $wpdb->prepare( "UPDATE $table_name SET onoroff = '%s' WHERE name = %s", "", $db_table ) );
83
- echo '<div id="message" class="updated"><p><b>'.__( 'Succes', 'companion-auto-update' ).' &ndash;</b> '.sprintf( esc_html__( 'The no-update-list has been reset, all %s will be auto-updated from now on', 'companion-auto-update' ), strtolower( $filter_name ) ).'.</p></div>';
84
- }
85
-
86
-
87
- ?>
88
-
89
- <form method="POST">
90
-
91
- <div class='pluginListButtons'>
92
- <?php submit_button(); ?>
93
- <input type='submit' name='reset' id='reset' class='button button-alt' value='<?php _e( "Reset list", "companion-auto-update" ); ?>'>
94
- </div>
95
-
96
- <table class="wp-list-table widefat autoupdate striped">
97
- <thead>
98
- <tr>
99
- <td>&nbsp;</td>
100
- <th class="head-plugin"><strong><?php _e( 'Name', 'companion-auto-update' ); ?></strong></th>
101
- <th class="head-status"><strong><?php _e( 'Status', 'companion-auto-update' ); ?></strong></th>
102
- <th class="head-description"><strong><?php _e( 'Description' ); ?></strong></th>
103
- </tr>
104
- </thead>
105
-
106
- <tbody id="the-list">
107
-
108
- <?php
109
-
110
- foreach ( $filterFunction as $key => $value ) {
111
-
112
- $slug = $key;
113
- $explosion = explode( '/', $slug );
114
- $actualSlug = array_shift( $explosion );
115
- $slug_hash = md5( $slug[0] );
116
-
117
- if( $filter == 'themes' ) {
118
-
119
- $theme = wp_get_theme( $actualSlug );
120
- $name = $theme->get( 'Name' );
121
- $description = $theme->get( 'Description' );
122
-
123
- } else {
124
-
125
- foreach ( $value as $k => $v ) {
126
-
127
- if( $k == "Name" ) $name = $v;
128
- if( $k == "Description" ) $description = $v;
129
-
130
- }
131
-
132
- }
133
-
134
- if( in_array( $actualSlug, donotupdatelist( $filter ) ) ) {
135
-
136
- $class = 'inactive';
137
- $checked = 'CHECKED';
138
- $statusicon = 'no';
139
- $statusName = 'disabled';
140
-
141
- } else {
142
-
143
- $class = 'active';
144
- $checked = '';
145
- $statusicon = 'yes';
146
- $statusName = 'enabled';
147
- }
148
-
149
- echo '<tr id="post-'.$slug_hash.'" class="'.$class.'">
150
-
151
- <th class="check-column">
152
- <label class="screen-reader-text" for="cb-select-'.$slug_hash.'">Select '. $name .'</label>
153
- <input id="cb-select-'.$slug_hash.'" type="checkbox" name="post[]" value="'.$actualSlug.'" '.$checked.' ><label></label>
154
- <div class="locked-indicator"></div>
155
- </th>
156
-
157
- <td class="column-name">
158
- <p style="margin-bottom: 0px;"><strong>'. $name .'</strong></p>
159
- <small class="description" style="opacity: 0.5; margin-bottom: 3px;">'.$actualSlug.'</small>
160
- <p>'.cau_updatePluginInformation( $actualSlug, 'Auto', 'Version' ).'</p>
161
- </td>
162
-
163
- <td class="cau_hide_on_mobile column-status">
164
- <p><span class="nowrap">'.__( 'Auto Updater', 'companion-auto-update' ).': <span class="cau_'.$statusName.'"><span class="dashicons dashicons-'.$statusicon.'"></span></span></span></p>
165
- </td>
166
-
167
- <td class="cau_hide_on_mobile column-description">
168
- <p>'.$description.'</p>
169
- </td>
170
-
171
- </tr>';
172
-
173
- }
174
- ?>
175
-
176
- </tbody>
177
- </table>
178
-
179
- <?php wp_nonce_field( 'cau_save_pluginlist' ); ?>
180
-
181
- <div class='pluginListButtons'>
182
- <?php submit_button(); ?>
183
- <input type='submit' name='reset' id='reset' class='button button-alt' value='<?php _e( "Reset list", "companion-auto-update" ); ?>'>
184
- </div>
185
-
186
- </form>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/admin/rollback.php DELETED
@@ -1,2 +0,0 @@
1
- <?php
2
- // Currently working on this
 
 
trunk/admin/status.php DELETED
@@ -1,483 +0,0 @@
1
- <?php
2
-
3
- // Update the database
4
- if( isset( $_GET['run'] ) && $_GET['run'] == 'db_update' ) {
5
- cau_manual_update();
6
- echo '<div id="message" class="updated"><p><b>'.__( 'Database update completed' ).'</b></p></div>';
7
- }
8
-
9
- if( isset( $_GET['run'] ) && $_GET['run'] == 'db_info_update' ) {
10
- cau_savePluginInformation();
11
- echo '<div id="message" class="updated"><p><b>'.__( 'Database information update completed' ).'</b></p></div>';
12
- }
13
-
14
- // Date format
15
- $dateFormat = get_option( 'date_format' );
16
- $dateFormat .= ' '.get_option( 'time_format' );
17
-
18
- global $wpdb;
19
- $table_name = $wpdb->prefix . "auto_updates";
20
-
21
- // Minor updates
22
- $configs = $wpdb->get_results( "SELECT * FROM {$table_name} WHERE name = 'minor'");
23
- foreach ( $configs as $config ) {
24
-
25
- if( $config->onoroff == 'on' && wp_get_schedule( 'wp_version_check' ) ) {
26
- $minorUpdates = true;
27
- $minorStatus = 'enabled';
28
- $minorIcon = 'yes-alt';
29
- $minorInterval = wp_get_schedule( 'wp_version_check' );
30
- $minorNext = date_i18n( $dateFormat, wp_next_scheduled( 'wp_version_check' ) );
31
- $minorText = __( 'Enabled', 'companion-auto-update' );
32
- } else {
33
- $minorUpdates = false;
34
- $minorStatus = 'disabled';
35
- $minorIcon = 'marker';
36
- $minorInterval = '&dash;';
37
- $minorNext = '&dash;';
38
- $minorText = __( 'Disabled', 'companion-auto-update' );
39
- }
40
-
41
- }
42
-
43
- // Major updates
44
- $configs = $wpdb->get_results( "SELECT * FROM {$table_name} WHERE name = 'major'");
45
- foreach ( $configs as $config ) {
46
-
47
- if( $config->onoroff == 'on' && wp_get_schedule( 'wp_version_check' ) ) {
48
- $majorUpdates = true;
49
- $majorStatus = 'enabled';
50
- $majorIcon = 'yes-alt';
51
- $majorInterval = wp_get_schedule( 'wp_version_check' );
52
- $majorNext = date_i18n( $dateFormat, wp_next_scheduled( 'wp_version_check' ) );
53
- $majorText = __( 'Enabled', 'companion-auto-update' );
54
- } else {
55
- $majorUpdates = false;
56
- $majorStatus = 'disabled';
57
- $majorIcon = 'marker';
58
- $majorInterval = '&dash;';
59
- $majorNext = '&dash;';
60
- $majorText = __( 'Disabled', 'companion-auto-update' );
61
- }
62
-
63
- }
64
-
65
- // Plugin updates
66
- $configs = $wpdb->get_results( "SELECT * FROM {$table_name} WHERE name = 'plugins'");
67
- foreach ( $configs as $config ) {
68
-
69
- if( $config->onoroff == 'on' && wp_get_schedule( 'wp_update_plugins' ) ) {
70
- $pluginsUpdates = true;
71
- $pluginsStatus = 'enabled';
72
- $pluginsIcon = 'yes-alt';
73
- $pluginsInterval = wp_get_schedule( 'wp_update_plugins' );
74
- $pluginsNext = date_i18n( $dateFormat, wp_next_scheduled( 'wp_update_plugins' ) );
75
- $pluginsText = __( 'Enabled', 'companion-auto-update' );
76
- } else {
77
- $pluginsUpdates = false;
78
- $pluginsStatus = 'disabled';
79
- $pluginsIcon = 'marker';
80
- $pluginsInterval = '&dash;';
81
- $pluginsNext = '&dash;';
82
- $pluginsText = __( 'Disabled', 'companion-auto-update' );
83
- }
84
-
85
- }
86
-
87
- // Themes updates
88
- $configs = $wpdb->get_results( "SELECT * FROM {$table_name} WHERE name = 'themes'");
89
- foreach ( $configs as $config ) {
90
-
91
- if( $config->onoroff == 'on' && wp_get_schedule( 'wp_update_plugins' ) ) {
92
- $themesUpdates = true;
93
- $themesStatus = 'enabled';
94
- $themesIcon = 'yes-alt';
95
- $themesInterval = wp_get_schedule( 'wp_update_plugins' );
96
- $themesNext = date_i18n( $dateFormat, wp_next_scheduled( 'wp_update_plugins' ) );
97
- $themesText = __( 'Enabled', 'companion-auto-update' );
98
- } else {
99
- $themesUpdates = false;
100
- $themesStatus = 'disabled';
101
- $themesIcon = 'marker';
102
- $themesInterval = '&dash;';
103
- $themesNext = '&dash;';
104
- $themesText = __( 'Disabled', 'companion-auto-update' );
105
- }
106
-
107
- }
108
-
109
- // E-mail notifications
110
- if ( wp_next_scheduled ( 'cau_set_schedule_mail' ) ) {
111
-
112
- $emailCase = false;
113
-
114
- $configs = $wpdb->get_results( "SELECT * FROM {$table_name} WHERE name = 'send'");
115
- foreach ( $configs as $config ) {
116
- if( $config->onoroff == 'on' ) {
117
- $emailCase = true;
118
- }
119
- }
120
- $configs = $wpdb->get_results( "SELECT * FROM {$table_name} WHERE name = 'sendupdate'");
121
- foreach ( $configs as $config ) {
122
- if( $config->onoroff == 'on' ) {
123
- $emailCase = true;
124
- }
125
- }
126
-
127
- if( $emailCase ) {
128
- $setScheduleStatus = 'enabled';
129
- $setScheduleIcon = 'yes-alt';
130
- $setScheduleInterval = wp_get_schedule( 'cau_set_schedule_mail' );
131
- $setScheduleNext = date_i18n( $dateFormat, wp_next_scheduled( 'cau_set_schedule_mail' ) );
132
- $setScheduleText = __( 'Enabled', 'companion-auto-update' );
133
- } else {
134
- $setScheduleStatus = 'warning';
135
- $setScheduleIcon = 'marker';
136
- $setScheduleInterval = '&dash;';
137
- $setScheduleNext = '&dash;';
138
- $setScheduleText = __( 'Disabled', 'companion-auto-update' );
139
- }
140
-
141
- } else {
142
- $setScheduleStatus = 'disabled';
143
- $setScheduleIcon = 'dismiss';
144
- $setScheduleInterval = '&dash;';
145
- $setScheduleNext = '&dash;';
146
- $setScheduleText = __( 'Error', 'companion-auto-update' );
147
- }
148
-
149
- // Core notifcations
150
- $configs = $wpdb->get_results( "SELECT * FROM {$table_name} WHERE name = 'wpemails'");
151
- foreach ( $configs as $config ) {
152
- if( $config->onoroff == 'on' ) {
153
- $setCoreStatus = 'enabled';
154
- $setCoreIcon = 'yes-alt';
155
- $setCoreInterval = wp_get_schedule( 'cau_set_schedule_mail' );
156
- $setCoreNext = date_i18n( $dateFormat, wp_next_scheduled( 'cau_set_schedule_mail' ) );
157
- $setCoreText = __( 'Enabled', 'companion-auto-update' );
158
- } else {
159
- $setCoreStatus = 'warning';
160
- $setCoreIcon = 'marker';
161
- $setCoreInterval = '&dash;';
162
- $setCoreNext = '&dash;';
163
- $setCoreText = __( 'Disabled', 'companion-auto-update' );
164
- }
165
- }
166
-
167
- $schedules = wp_get_schedules();
168
-
169
- ?>
170
-
171
- <h2><?php _e('Status', 'companion-auto-update'); ?></h2>
172
-
173
- <div class="cau_status_page">
174
-
175
- <table class="cau_status_list widefat striped">
176
-
177
- <thead>
178
- <tr>
179
- <th width="300" class="cau_status_name"><strong><?php _e( 'Auto Updater', 'companion-auto-update' ); ?></strong></th>
180
- <th class="cau_status_active_state"><strong><?php _e( 'Status', 'companion-auto-update' ); ?></strong></th>
181
- <th class="cau_status_interval"><strong><?php _e( 'Interval', 'companion-auto-update' ); ?></strong></th>
182
- <th class="cau_status_next"><strong><?php _e( 'Next', 'companion-auto-update' ); ?></strong></th>
183
- </tr>
184
- </thead>
185
-
186
- <tbody id="the-list">
187
- <tr>
188
- <td class="cau_status_name"><?php _e( 'Plugins', 'companion-auto-update' ); ?></td>
189
- <td class="cau_status_active_state"><span class='cau_<?php echo $pluginsStatus; ?>'><span class="dashicons dashicons-<?php echo $pluginsIcon; ?>"></span> <?php echo $pluginsText; ?></span></td>
190
- <td class="cau_status_interval"><?php echo $schedules[$pluginsInterval]['display']; ?></td>
191
- <td class="cau_status_next"><span class="cau_mobile_prefix"><?php _e( 'Next', 'companion-auto-update' ); ?>: </span><?php echo $pluginsNext; ?></td>
192
- </tr>
193
- <tr>
194
- <td class="cau_status_name"><?php _e( 'Themes', 'companion-auto-update' ); ?></td>
195
- <td class="cau_status_active_state"><span class='cau_<?php echo $themesStatus; ?>'><span class="dashicons dashicons-<?php echo $themesIcon; ?>"></span> <?php echo $themesText; ?></span></td>
196
- <td class="cau_status_interval"><?php echo $schedules[$themesInterval]['display']; ?></td>
197
- <td class="cau_status_next"><span class="cau_mobile_prefix"><?php _e( 'Next', 'companion-auto-update' ); ?>: </span><?php echo $themesNext; ?></td>
198
- </tr>
199
- <tr>
200
- <td class="cau_status_name"><?php _e( 'Core (Minor)', 'companion-auto-update' ); ?></td>
201
- <td class="cau_status_active_state"><span class='cau_<?php echo $minorStatus; ?>'><span class="dashicons dashicons-<?php echo $minorIcon; ?>"></span> <?php echo $minorText; ?></span></td>
202
- <td class="cau_status_interval"><?php echo $schedules[$minorInterval]['display']; ?></td>
203
- <td class="cau_status_next"><span class="cau_mobile_prefix"><?php _e( 'Next', 'companion-auto-update' ); ?>: </span><?php echo $minorNext; ?></td>
204
- </tr>
205
- <tr>
206
- <td class="cau_status_name"><?php _e( 'Core (Major)', 'companion-auto-update' ); ?></td>
207
- <td class="cau_status_active_state"><span class='cau_<?php echo $majorStatus; ?>'><span class="dashicons dashicons-<?php echo $majorIcon; ?>"></span> <?php echo $majorText; ?></span></td>
208
- <td class="cau_status_interval"><?php echo $schedules[$majorInterval]['display']; ?></td>
209
- <td class="cau_status_next"><span class="cau_mobile_prefix"><?php _e( 'Next', 'companion-auto-update' ); ?>: </span><?php echo $majorNext; ?></td>
210
- </tr>
211
- </tbody>
212
-
213
- </table>
214
-
215
- <table class="cau_status_list widefat striped">
216
-
217
- <thead>
218
- <tr>
219
- <th width="300" class="cau_status_name"><strong><?php _e( 'Email Notifications', 'companion-auto-update' ); ?></strong></th>
220
- <th class="cau_status_active_state"><strong><?php _e( 'Status', 'companion-auto-update' ); ?></strong></th>
221
- <th class="cau_status_interval"><strong><?php _e( 'Interval', 'companion-auto-update' ); ?></strong></th>
222
- <th class="cau_status_next"><strong><?php _e( 'Next', 'companion-auto-update' ); ?></strong></th>
223
- </tr>
224
- </thead>
225
-
226
- <tbody id="the-list">
227
- <tr>
228
- <td class="cau_status_name"><?php _e( 'Email Notifications', 'companion-auto-update' ); ?></td>
229
- <td class="cau_status_active_state"><span class='cau_<?php echo $setScheduleStatus; ?>'><span class="dashicons dashicons-<?php echo $setScheduleIcon; ?>"></span> <?php echo $setScheduleText; ?></span></td>
230
- <td class="cau_status_interval"><?php echo $schedules[$setScheduleInterval]['display']; ?></td>
231
- <td class="cau_status_next"><span class="cau_mobile_prefix"><?php _e( 'Next', 'companion-auto-update' ); ?>: </span><?php echo $setScheduleNext; ?></td>
232
- </tr>
233
- <tr>
234
- <td class="cau_status_name"><?php _e( 'Core notifications', 'companion-auto-update' ); ?></td>
235
- <td class="cau_status_active_state"><span class='cau_<?php echo $setCoreStatus; ?>'><span class="dashicons dashicons-<?php echo $setCoreIcon; ?>"></span> <?php echo $setCoreText; ?></span></td>
236
- <td class="cau_status_interval"><?php echo $schedules[$setCoreInterval]['display']; ?></td>
237
- <td class="cau_status_next"><span class="cau_mobile_prefix"><?php _e( 'Next', 'companion-auto-update' ); ?>: </span><?php echo $setCoreNext; ?></td>
238
- </tr>
239
- </tbody>
240
-
241
- </table>
242
-
243
- <?php
244
-
245
- if( get_option( 'blog_public' ) == 0 ) { ?>
246
-
247
- <table class="cau_status_list widefat striped cau_status_warnings">
248
-
249
- <thead>
250
- <tr>
251
- <th class="cau_plugin_issue_name"><strong><?php _e( 'Search Engine Visibility' ); ?></strong></th>
252
- <th class="cau_plugin_issue_explain"> </th>
253
- <th class="cau_plugin_issue_fixit"><strong><?php _e( 'Fix it', 'companion-auto-update' ); ?></strong></th>
254
- </tr>
255
- </thead>
256
-
257
- <tbody id="the-list">
258
- <tr>
259
- <td class="cau_plugin_issue_name"><span class='cau_warning'><span class="dashicons dashicons-warning"></span> <?php _e( 'Warning', 'companion-auto-update' ); ?></span></td>
260
- <td class="cau_plugin_issue_explain">
261
- <?php _e( 'You’ve chosen to disscourage Search Engines from indexing your site. Auto-updating works best on sites with more traffic, consider enabling indexing for your site.', 'companion-auto-update' ); ?>
262
- </td>
263
- <td class="cau_plugin_issue_fixit">
264
- <a href="<?php echo admin_url( 'options-reading.php' ); ?>" class="button button-alt"><?php _e( 'Fix it', 'companion-auto-update' ); ?></a>
265
- </td>
266
- </tr>
267
- </tbody>
268
-
269
- </table>
270
-
271
- <?php }
272
-
273
- if( checkAutomaticUpdaterDisabled() ) { ?>
274
-
275
- <table class="cau_status_list widefat striped cau_status_warnings">
276
-
277
- <thead>
278
- <tr>
279
- <th class="cau_plugin_issue_name"><strong><?php _e( 'Critical Error', 'companion-auto-update' ); ?></strong></th>
280
- <th class="cau_plugin_issue_explain"> </th>
281
- <th class="cau_plugin_issue_explain"> </th>
282
- <th class="cau_plugin_issue_fixit"><strong><?php _e( 'How to fix', 'companion-auto-update' ); ?></strong></th>
283
- </tr>
284
- </thead>
285
-
286
- <tbody id="the-list">
287
- <tr>
288
- <td class="cau_plugin_issue_name"><span class='cau_disabled'><span class="dashicons dashicons-no"></span> <?php _e( 'Critical Error', 'companion-auto-update' ); ?></span></td>
289
- <td class="cau_plugin_issue_explain">
290
- <?php _e( 'Updating is globally disabled.', 'companion-auto-update' ); ?>
291
- </td>
292
- <td class="cau_plugin_issue_explain">
293
- <code>AUTOMATIC_UPDATER_DISABLED true</code>
294
- </td>
295
- <td class="cau_plugin_issue_fixit">
296
- <form method="POST">
297
- <?php wp_nonce_field( 'cau_fixit' ); ?>
298
- <button type="submit" name="fixit" class="button button-primary"><?php _e( 'Fix it', 'companion-auto-update' ); ?></button>
299
- <a href="<?php echo cau_url( 'support' ); ?>" class="button"><?php _e( 'Contact for support', 'companion-auto-update' ); ?></a>
300
- </form>
301
- </td>
302
- </tr>
303
- </tbody>
304
-
305
- </table>
306
-
307
- <?php }
308
-
309
- if( checkCronjobsDisabled() ) { ?>
310
-
311
- <table class="cau_status_list widefat striped cau_status_warnings">
312
-
313
- <thead>
314
- <tr>
315
- <th class="cau_plugin_issue_name"><strong><?php _e( 'Warning', 'companion-auto-update' ); ?></strong></th>
316
- <th class="cau_plugin_issue_explain"> </th>
317
- <th class="cau_plugin_issue_explain"> </th>
318
- <th class="cau_plugin_issue_fixit"><strong><?php _e( 'How to fix', 'companion-auto-update' ); ?></strong></th>
319
- </tr>
320
- </thead>
321
-
322
- <tbody id="the-list">
323
- <tr>
324
- <td class="cau_plugin_issue_name"><span class='cau_warning'><span class="dashicons dashicons-warning"></span> <?php _e( 'Warning', 'companion-auto-update' ); ?></span></td>
325
- <td class="cau_plugin_issue_explain">
326
- <?php _e( 'Cronjobs are disabled.', 'companion-auto-update' ); ?>
327
- </td>
328
- <td class="cau_plugin_issue_explain">
329
- <code>DISABLE_WP_CRON true</code>
330
- </td>
331
- <td class="cau_plugin_issue_fixit">
332
- <a href="<?php echo cau_url( 'support' ); ?>" class="button"><?php _e( 'Contact for support', 'companion-auto-update' ); ?></a>
333
- </td>
334
- </tr>
335
- </tbody>
336
-
337
- </table>
338
-
339
- <?php }
340
-
341
- // Remove the line
342
- if( isset( $_POST['fixit'] ) ) {
343
- check_admin_referer( 'cau_fixit' );
344
- cau_removeErrorLine();
345
- echo "<div id='message' class='updated'><p><strong>".__( 'Error fixed', 'companion-auto-update' )."</strong></p></div>";
346
- }
347
-
348
- // Get wp-config location
349
- function cau_configFile() {
350
-
351
- // Config file
352
- if ( file_exists( ABSPATH . 'wp-config.php') ) {
353
- $conFile = ABSPATH . 'wp-config.php';
354
- } else {
355
- $conFile = dirname(ABSPATH) . '/wp-config.php';
356
- }
357
-
358
- return $conFile;
359
-
360
- }
361
-
362
- // Change the AUTOMATIC_UPDATER_DISABLED line
363
- function cau_removeErrorLine() {
364
-
365
- // Config file
366
- $conFile = cau_configFile();
367
-
368
- // Lines to check and replace
369
- $revLine = "define('AUTOMATIC_UPDATER_DISABLED', false);"; // We could just remove the line, but replacing it will be safer
370
- $posibleLines = array( "define( 'AUTOMATIC_UPDATER_DISABLED', true );", "define( 'AUTOMATIC_UPDATER_DISABLED', minor );" ); // The two base options
371
- foreach ( $posibleLines as $value ) array_push( $posibleLines, strtolower( $value ) ); // Support lowercase variants
372
- foreach ( $posibleLines as $value ) array_push( $posibleLines, str_replace( ' ', '', $value ) ); // For variants without spaces
373
-
374
- // Check for each string if it exists
375
- foreach ( $posibleLines as $key => $string ) {
376
-
377
- if( strpos( file_get_contents( $conFile ), $string ) !== false) {
378
- $contents = file_get_contents( $conFile );
379
- $contents = str_replace( $string, $revLine, $contents );
380
- file_put_contents( $conFile, $contents );
381
- }
382
-
383
- }
384
-
385
- }
386
-
387
- // If has incomptable plugins
388
- if( cau_incompatiblePlugins() ) { ?>
389
-
390
- <p>&nbsp;</p>
391
- <h2 style="margin-bottom: 3px"><?php _e('Possible plugin issues', 'companion-auto-update'); ?></h2>
392
- <span class='cau_disabled'><?php _e("You're using one or more plugins that <i>might</i> cause issues.", "companion-auto-update"); ?></span>
393
-
394
- <table class="cau_status_list widefat striped cau_status_warnings">
395
-
396
- <thead>
397
- <tr>
398
- <th class="cau_plugin_issue_name"><strong><?php _e( 'Name', 'companion-auto-update' ); ?></strong></th>
399
- <th class="cau_plugin_issue_explain"><strong><?php _e( 'Possible issue', 'companion-auto-update' ); ?></strong></th>
400
- <th class="cau_plugin_issue_fixit"><strong><?php _e( 'How to fix', 'companion-auto-update' ); ?></strong></th>
401
- </tr>
402
- </thead>
403
-
404
- <tbody id="the-list">
405
- <?php
406
- foreach ( cau_incompatiblePluginlist() as $key => $value ) {
407
- if( is_plugin_active( $key ) ) {
408
-
409
- echo '<tr>
410
- <td class="cau_plugin_issue_name">'.$key.'</td>
411
- <td class="cau_plugin_issue_explain">'.$value.'</td>
412
- <td class="cau_plugin_issue_fixit"><a href="https://codeermeneer.nl/documentation/known-issues-fixes/#plugins" target="_blank" class="button">'.__( 'How to fix', 'companion-auto-update' ).'</a></td>
413
- </tr>';
414
-
415
- }
416
- }
417
- ?>
418
- </tbody>
419
-
420
- </table>
421
-
422
- <?php } ?>
423
-
424
- <table class="autoupdate cau_status_list widefat striped cau_status_warnings">
425
-
426
- <thead>
427
- <tr>
428
- <th colspan="2"><strong><?php _e( 'Systeminfo', 'companion-auto-update' ); ?></strong></th>
429
- </tr>
430
- </thead>
431
-
432
- <tbody id="the-list">
433
- <tr>
434
- <td width="200">WordPress</td>
435
- <td><?php echo get_bloginfo( 'version' ); ?></td>
436
- </tr>
437
- <tr>
438
- <td>PHP</td>
439
- <td><?php echo phpversion(); ?></td>
440
- </tr>
441
- <tr <?php if( cau_incorrectDatabaseVersion() ) { echo "class='inactive'"; } ?>>
442
- <td>Database</td>
443
- <td><?php echo get_option( "cau_db_version" ); ?> <code>(Latest: <?php echo cau_db_version(); ?>)</code></td>
444
- </tr>
445
- <tr>
446
- <td class="cau_status_name"><?php _e( 'Timezone' ); ?></td>
447
- <td class="cau_status_active_state"><?php echo cau_get_proper_timezone(); ?> (GMT <?php echo get_option('gmt_offset'); ?>) - <?php echo date_default_timezone_get(); ?></td>
448
- </tr>
449
- </tbody>
450
-
451
- </table>
452
-
453
- <table class="autoupdate cau_status_list widefat striped cau_status_warnings">
454
-
455
- <thead>
456
- <tr>
457
- <th><strong><?php _e( 'Advanced info', 'companion-auto-update' ); ?></strong> &dash; <?php _e( 'For when you need our help fixing an issue.', 'companion-auto-update' ); ?></th>
458
- </tr>
459
- </thead>
460
- <tbody id="the-list">
461
- <tr>
462
- <td>
463
- <div class='button button-primary toggle_advanced_button'>Toggle</div>
464
-
465
- <div class='toggle_advanced_content' style='display: none;'>
466
- <?php
467
- global $wpdb;
468
- $autoupdates = $wpdb->prefix."auto_updates";
469
- $cau_configs = $wpdb->get_results( "SELECT * FROM $autoupdates" );
470
-
471
- echo "<pre>";
472
- print_r( $cau_configs );
473
- echo "</pre>";
474
- ?>
475
- </div>
476
- </td>
477
- </tr>
478
- </tbody>
479
- </table>
480
-
481
- </div>
482
-
483
- <script>jQuery( '.toggle_advanced_button' ).click( function() { jQuery( '.toggle_advanced_content' ).toggle(); });</script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/backend/images/check.svg DELETED
@@ -1,55 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
- <svg
3
- xmlns:dc="http://purl.org/dc/elements/1.1/"
4
- xmlns:cc="http://creativecommons.org/ns#"
5
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
6
- xmlns:svg="http://www.w3.org/2000/svg"
7
- xmlns="http://www.w3.org/2000/svg"
8
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
9
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
10
- height="417pt"
11
- viewBox="0 -46 417.81333 417"
12
- width="417pt"
13
- version="1.1"
14
- id="svg4"
15
- sodipodi:docname="check.svg"
16
- inkscape:version="0.92.0 r15299">
17
- <metadata
18
- id="metadata10">
19
- <rdf:RDF>
20
- <cc:Work
21
- rdf:about="">
22
- <dc:format>image/svg+xml</dc:format>
23
- <dc:type
24
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
25
- </cc:Work>
26
- </rdf:RDF>
27
- </metadata>
28
- <defs
29
- id="defs8" />
30
- <sodipodi:namedview
31
- pagecolor="#ffffff"
32
- bordercolor="#666666"
33
- borderopacity="1"
34
- objecttolerance="10"
35
- gridtolerance="10"
36
- guidetolerance="10"
37
- inkscape:pageopacity="0"
38
- inkscape:pageshadow="2"
39
- inkscape:window-width="2560"
40
- inkscape:window-height="1017"
41
- id="namedview6"
42
- showgrid="false"
43
- inkscape:zoom="0.42446043"
44
- inkscape:cx="278"
45
- inkscape:cy="278"
46
- inkscape:window-x="-8"
47
- inkscape:window-y="-8"
48
- inkscape:window-maximized="1"
49
- inkscape:current-layer="svg4" />
50
- <path
51
- d="m 185.111,248.00297 c -2.2287,2.2418 -5.26943,3.49257 -8.42804,3.49257 -3.15861,0 -6.19935,-1.25077 -8.42805,-3.49257 l -67.30869,-67.31961 c -6.985172,-6.98517 -6.985172,-18.31207 0,-25.28413 l 8.42805,-8.43023 c 6.98735,-6.98518 18.30114,-6.98518 25.28632,0 l 42.02237,42.02454 113.55053,-113.552722 c 6.98736,-6.985172 18.31207,-6.985172 25.28633,0 l 8.42805,8.43023 c 6.98516,6.985175 6.98516,18.309882 0,25.284142 z m 0,0"
52
- id="path2"
53
- style="fill:#9178b7;fill-opacity:1;stroke-width:0.55881381"
54
- inkscape:connector-curvature="0" />
55
- </svg>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/backend/images/email.svg DELETED
@@ -1,96 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
- <!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
-
4
- <svg
5
- xmlns:dc="http://purl.org/dc/elements/1.1/"
6
- xmlns:cc="http://creativecommons.org/ns#"
7
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8
- xmlns:svg="http://www.w3.org/2000/svg"
9
- xmlns="http://www.w3.org/2000/svg"
10
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12
- version="1.1"
13
- id="Layer_1"
14
- x="0px"
15
- y="0px"
16
- viewBox="0 0 505 505"
17
- style="enable-background:new 0 0 505 505;"
18
- xml:space="preserve"
19
- sodipodi:docname="email.svg"
20
- inkscape:version="0.92.0 r15299"><metadata
21
- id="metadata43"><rdf:RDF><cc:Work
22
- rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
23
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs
24
- id="defs41" /><sodipodi:namedview
25
- pagecolor="#ffffff"
26
- bordercolor="#666666"
27
- borderopacity="1"
28
- objecttolerance="10"
29
- gridtolerance="10"
30
- guidetolerance="10"
31
- inkscape:pageopacity="0"
32
- inkscape:pageshadow="2"
33
- inkscape:window-width="1920"
34
- inkscape:window-height="1017"
35
- id="namedview39"
36
- showgrid="false"
37
- inkscape:zoom="0.6608998"
38
- inkscape:cx="-110.05455"
39
- inkscape:cy="410.34145"
40
- inkscape:window-x="-8"
41
- inkscape:window-y="-8"
42
- inkscape:window-maximized="1"
43
- inkscape:current-layer="Layer_1"
44
- borderlayer="true" /><path
45
- style="fill:#ded1f2;fill-opacity:1;stroke-width:1.194754"
46
- d="m 54.471192,356.14658 c 0,-166.66819 135.007198,-301.675388 301.675388,-301.675388 166.5487,0 301.67538,135.007198 301.67538,301.675388 0,166.66817 -135.12668,301.67538 -301.67538,301.67538 -166.66819,0 -301.675388,-135.00721 -301.675388,-301.67538 z"
47
- id="path2"
48
- inkscape:connector-curvature="0" /><g
49
- id="g8"
50
- transform="scale(1.3026177)" /><g
51
- id="g10"
52
- transform="scale(1.3026177)" /><g
53
- id="g12"
54
- transform="scale(1.3026177)" /><g
55
- id="g14"
56
- transform="scale(1.3026177)" /><g
57
- id="g16"
58
- transform="scale(1.3026177)" /><g
59
- id="g18"
60
- transform="scale(1.3026177)" /><g
61
- id="g20"
62
- transform="scale(1.3026177)" /><g
63
- id="g22"
64
- transform="scale(1.3026177)" /><g
65
- id="g24"
66
- transform="scale(1.3026177)" /><g
67
- id="g26"
68
- transform="scale(1.3026177)" /><g
69
- id="g28"
70
- transform="scale(1.3026177)" /><g
71
- id="g30"
72
- transform="scale(1.3026177)" /><g
73
- id="g32"
74
- transform="scale(1.3026177)" /><g
75
- id="g34"
76
- transform="scale(1.3026177)" /><g
77
- id="g36"
78
- transform="scale(1.3026177)" /><path
79
- inkscape:connector-curvature="0"
80
- d="m 281.76716,529.19554 c 27.99462,9.77382 58.38437,-1.99616 72.99376,-26.55557 L 241.14037,462.9714 c -3.82831,28.32342 12.63218,56.45033 40.62679,66.22414 z m 0,0"
81
- id="path4"
82
- style="fill:#9178b7;fill-opacity:1;stroke-width:1.53536594" /><path
83
- inkscape:connector-curvature="0"
84
- d="m 454.97461,381.50764 c -0.0736,-0.0257 -0.11887,-0.0415 -0.18687,-0.0653 -59.67543,-20.8346 -91.29336,-86.33378 -70.45084,-146.03188 5.72511,-16.39813 14.92428,-30.59236 26.36198,-42.26448 -3.29602,-1.51283 -6.65995,-2.92233 -10.15928,-4.14406 -59.766,-20.86622 -125.15573,10.65649 -146.03184,70.45084 l -15.05215,43.11307 c -10.68122,30.59363 -34.17187,54.79029 -64.63445,66.47768 -10.17733,3.96817 -17.38414,13.4202 -18.20325,24.79116 -0.9164,13.28721 8.329,25.17993 20.89938,29.56865 l 251.64586,87.85762 c 13.1706,4.59829 28.58431,0.40642 35.75467,-11.56127 5.54241,-9.2518 5.48702,-20.48337 0.002,-29.68445 -15.90548,-26.7325 -19.22019,-58.96007 -9.94599,-88.50764 z m 0,0"
85
- id="path6"
86
- style="fill:#9178b7;fill-opacity:1;stroke-width:1.53536594" /><path
87
- inkscape:connector-curvature="0"
88
- d="m 569.88056,300.18973 c -14.90587,42.69409 -61.59697,65.2195 -104.29102,50.31364 -42.69409,-14.90587 -65.21947,-61.59696 -50.3136,-104.29106 14.90586,-42.69403 61.59693,-65.21944 104.29101,-50.31357 42.69406,14.90586 65.21947,61.59694 50.31361,104.29099 z m 0,0"
89
- id="path8"
90
- style="fill:#9178b7;fill-opacity:1;stroke-width:1.53536594" /><rect
91
- style="opacity:0.5;fill:#ffffff;fill-opacity:0.78431373;fill-rule:evenodd;stroke:none;stroke-width:5.62767839;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke fill markers"
92
- id="rect4504"
93
- width="768.56519"
94
- height="678.05548"
95
- x="-61.99469"
96
- y="-11.059112" /></svg>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/backend/images/help.svg DELETED
@@ -1,67 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
- <svg
3
- xmlns:dc="http://purl.org/dc/elements/1.1/"
4
- xmlns:cc="http://creativecommons.org/ns#"
5
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
6
- xmlns:svg="http://www.w3.org/2000/svg"
7
- xmlns="http://www.w3.org/2000/svg"
8
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
9
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
10
- height="512pt"
11
- viewBox="0 0 512 512"
12
- width="512pt"
13
- version="1.1"
14
- id="svg6"
15
- sodipodi:docname="help.svg"
16
- inkscape:version="0.92.0 r15299">
17
- <metadata
18
- id="metadata12">
19
- <rdf:RDF>
20
- <cc:Work
21
- rdf:about="">
22
- <dc:format>image/svg+xml</dc:format>
23
- <dc:type
24
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
25
- </cc:Work>
26
- </rdf:RDF>
27
- </metadata>
28
- <defs
29
- id="defs10" />
30
- <sodipodi:namedview
31
- pagecolor="#ffffff"
32
- bordercolor="#666666"
33
- borderopacity="1"
34
- objecttolerance="10"
35
- gridtolerance="10"
36
- guidetolerance="10"
37
- inkscape:pageopacity="0"
38
- inkscape:pageshadow="2"
39
- inkscape:window-width="2560"
40
- inkscape:window-height="1017"
41
- id="namedview8"
42
- showgrid="false"
43
- inkscape:zoom="0.69140625"
44
- inkscape:cx="132.67442"
45
- inkscape:cy="151.29307"
46
- inkscape:window-x="1912"
47
- inkscape:window-y="-8"
48
- inkscape:window-maximized="1"
49
- inkscape:current-layer="svg6" />
50
- <path
51
- d="m 494.10169,605.28813 h -320 c -53.02344,0 -95.999997,-42.97656 -95.999997,-96 v -320 c 0,-53.02344 42.976557,-95.999997 95.999997,-95.999997 h 320 c 53.02344,0 96,42.976557 96,95.999997 v 320 c 0,53.02344 -42.97656,96 -96,96 z m 0,0"
52
- id="path2"
53
- style="fill:#ded1f2;fill-opacity:1"
54
- inkscape:connector-curvature="0" />
55
- <path
56
- d="m 334.10169,221.28813 c -70.57422,0 -128,57.42578 -128,128 0,70.57422 57.42578,128 128,128 70.57422,0 128,-57.42578 128,-128 0,-70.57422 -57.42578,-128 -128,-128 z m 56,138.67188 h -45.32812 v 45.32812 c 0,5.88672 -4.78516,10.67188 -10.67188,10.67188 -5.88672,0 -10.67187,-4.78516 -10.67187,-10.67188 v -45.32812 h -45.32813 c -5.88672,0 -10.67187,-4.78516 -10.67187,-10.67188 0,-5.88672 4.78515,-10.67187 10.67187,-10.67187 h 45.32813 v -45.32813 c 0,-5.88672 4.78515,-10.67187 10.67187,-10.67187 5.88672,0 10.67188,4.78515 10.67188,10.67187 v 45.32813 h 45.32812 c 5.88672,0 10.67188,4.78515 10.67188,10.67187 0,5.88672 -4.78516,10.67188 -10.67188,10.67188 z m 0,0"
57
- id="path4"
58
- style="fill:#9178b7;fill-opacity:1"
59
- inkscape:connector-curvature="0" />
60
- <rect
61
- style="opacity:0.5;fill:#ffffff;fill-opacity:0.78431373;fill-rule:evenodd;stroke:none;stroke-width:4.51278925;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke fill markers"
62
- id="rect4504"
63
- width="614.39001"
64
- height="545.42297"
65
- x="38.296513"
66
- y="74.407166" />
67
- </svg>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/backend/images/interval.svg DELETED
@@ -1,69 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
- <!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
-
4
- <svg
5
- xmlns:dc="http://purl.org/dc/elements/1.1/"
6
- xmlns:cc="http://creativecommons.org/ns#"
7
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8
- xmlns:svg="http://www.w3.org/2000/svg"
9
- xmlns="http://www.w3.org/2000/svg"
10
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12
- version="1.1"
13
- id="Layer_1"
14
- x="0px"
15
- y="0px"
16
- viewBox="0 0 512 512"
17
- style="enable-background:new 0 0 512 512;"
18
- xml:space="preserve"
19
- width="512"
20
- height="512"
21
- sodipodi:docname="interval.svg"
22
- inkscape:version="0.92.0 r15299"><metadata
23
- id="metadata39"><rdf:RDF><cc:Work
24
- rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
25
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
26
- id="defs37" /><sodipodi:namedview
27
- pagecolor="#ffffff"
28
- bordercolor="#666666"
29
- borderopacity="1"
30
- objecttolerance="10"
31
- gridtolerance="10"
32
- guidetolerance="10"
33
- inkscape:pageopacity="0"
34
- inkscape:pageshadow="2"
35
- inkscape:window-width="2560"
36
- inkscape:window-height="1017"
37
- id="namedview35"
38
- showgrid="false"
39
- inkscape:zoom="0.46093749"
40
- inkscape:cx="369.01074"
41
- inkscape:cy="360.3966"
42
- inkscape:window-x="1912"
43
- inkscape:window-y="-8"
44
- inkscape:window-maximized="1"
45
- inkscape:current-layer="g32" /><g
46
- id="g32"><circle
47
- cx="388.33899"
48
- cy="373.15256"
49
- r="326.50848"
50
- id="circle2"
51
- style="fill:#9178b7;fill-opacity:1;stroke-width:1.27542377" /><path
52
- d="m 388.33899,124.4449 c -137.13356,0 -248.70763,111.57407 -248.70763,248.70763 0,137.13356 111.57407,249.98305 248.70763,249.98305 137.13356,0 248.70763,-112.84949 248.70763,-249.98305 0,-137.13356 -111.57407,-248.70763 -248.70763,-248.70763 z"
53
- id="path6"
54
- inkscape:connector-curvature="0"
55
- style="fill:#eceff1;fill-opacity:1;stroke-width:1.27542377" /><path
56
- d="m 388.33899,200.97033 c -10.57454,0 -19.13136,8.55682 -19.13136,19.13135 v 191.31356 c 0,10.57454 8.55682,19.13136 19.13136,19.13136 10.57454,0 19.13135,-8.55682 19.13135,-19.13136 V 220.10168 c 0,-10.57453 -8.55681,-19.13135 -19.13135,-19.13135 z"
57
- id="path10"
58
- inkscape:connector-curvature="0"
59
- style="fill:#90a4ae;fill-opacity:1;stroke-width:1.27542377" /><path
60
- d="M 503.12712,354.02118 H 388.33899 350.07628 c -10.57454,0 -19.13136,8.55681 -19.13136,19.13135 0,10.57454 8.55682,19.13136 19.13136,19.13136 h 38.26271 114.78813 c 10.57454,0 19.13136,-8.55682 19.13136,-19.13136 0,-10.57454 -8.55682,-19.13135 -19.13136,-19.13135 z"
61
- id="path14"
62
- inkscape:connector-curvature="0"
63
- style="fill:#90a4ae;fill-opacity:1;stroke-width:1.27542377" /><rect
64
- style="opacity:0.5;fill:#ffffff;fill-opacity:0.78431373;fill-rule:evenodd;stroke:none;stroke-width:5.62767839;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke fill markers"
65
- id="rect4504"
66
- width="768.56519"
67
- height="678.05548"
68
- x="-17.638517"
69
- y="36.294277" /></g></svg>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/backend/images/love.svg DELETED
@@ -1,116 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
- <svg
3
- xmlns:dc="http://purl.org/dc/elements/1.1/"
4
- xmlns:cc="http://creativecommons.org/ns#"
5
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
6
- xmlns:svg="http://www.w3.org/2000/svg"
7
- xmlns="http://www.w3.org/2000/svg"
8
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
9
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
10
- id="Capa_1"
11
- enable-background="new 0 0 512 512"
12
- height="512"
13
- viewBox="0 0 512 512"
14
- width="512"
15
- version="1.1"
16
- sodipodi:docname="love.svg"
17
- inkscape:version="0.92.0 r15299">
18
- <metadata
19
- id="metadata97">
20
- <rdf:RDF>
21
- <cc:Work
22
- rdf:about="">
23
- <dc:format>image/svg+xml</dc:format>
24
- <dc:type
25
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
26
- </cc:Work>
27
- </rdf:RDF>
28
- </metadata>
29
- <defs
30
- id="defs95" />
31
- <sodipodi:namedview
32
- pagecolor="#ffffff"
33
- bordercolor="#666666"
34
- borderopacity="1"
35
- objecttolerance="10"
36
- gridtolerance="10"
37
- guidetolerance="10"
38
- inkscape:pageopacity="0"
39
- inkscape:pageshadow="2"
40
- inkscape:window-width="2560"
41
- inkscape:window-height="1017"
42
- id="namedview93"
43
- showgrid="false"
44
- inkscape:zoom="0.4609375"
45
- inkscape:cx="-161.41471"
46
- inkscape:cy="87.761635"
47
- inkscape:window-x="1912"
48
- inkscape:window-y="-8"
49
- inkscape:window-maximized="1"
50
- inkscape:current-layer="g88" />
51
- <g
52
- id="g90">
53
- <g
54
- id="g88"
55
- transform="matrix(1.941682,0,0,1.941682,-258.91443,105.22034)">
56
- <g
57
- id="g52"
58
- style="fill:#eceff1;fill-opacity:1">
59
- <path
60
- d="m 182.795,15.986 v 165.382 c 0,8.829 7.157,15.986 15.986,15.986 h 20.359 c 2.854,0 5.364,1.885 6.16,4.626 l 11.126,38.317 c 1.404,4.836 7.578,6.242 10.938,2.491 l 38.788,-43.3 c 1.217,-1.358 2.954,-2.134 4.778,-2.134 h 192.658 c 8.829,0 15.986,-7.157 15.986,-15.986 V 15.986 C 499.573,7.157 492.416,0 483.587,0 H 198.781 c -8.829,0 -15.986,7.157 -15.986,15.986 z"
61
- id="path50"
62
- inkscape:connector-curvature="0"
63
- style="fill:#eceff1;fill-opacity:1" />
64
- </g>
65
- <g
66
- id="g64"
67
- style="fill:#9178b7;fill-opacity:1">
68
- <path
69
- d="m 256.62,39.06 6.423,13.015 c 0.54,1.095 1.585,1.854 2.794,2.03 l 14.363,2.087 c 3.043,0.442 4.259,4.182 2.056,6.329 l -10.393,10.131 c -0.875,0.852 -1.274,2.081 -1.067,3.284 l 2.453,14.305 c 0.52,3.031 -2.662,5.343 -5.384,3.911 l -12.847,-6.754 c -1.081,-0.568 -2.372,-0.568 -3.453,0 l -12.847,6.754 c -2.722,1.431 -5.904,-0.88 -5.384,-3.911 l 2.453,-14.305 c 0.206,-1.204 -0.193,-2.432 -1.067,-3.284 L 224.327,62.521 c -2.202,-2.147 -0.987,-5.887 2.056,-6.329 l 14.363,-2.087 c 1.209,-0.176 2.253,-0.935 2.794,-2.03 l 6.423,-13.015 c 1.364,-2.758 5.296,-2.758 6.657,0 z"
70
- id="path58"
71
- inkscape:connector-curvature="0"
72
- style="fill:#9178b7;fill-opacity:1" />
73
- <path
74
- d="m 344.511,39.06 6.423,13.015 c 0.54,1.095 1.585,1.854 2.794,2.03 l 14.363,2.087 c 3.043,0.442 4.259,4.182 2.056,6.329 l -10.393,10.131 c -0.875,0.852 -1.274,2.081 -1.067,3.284 l 2.453,14.305 c 0.52,3.031 -2.662,5.343 -5.384,3.911 l -12.847,-6.754 c -1.081,-0.568 -2.372,-0.568 -3.453,0 l -12.847,6.754 c -2.722,1.431 -5.904,-0.88 -5.384,-3.911 l 2.453,-14.305 c 0.206,-1.204 -0.193,-2.432 -1.067,-3.284 L 312.22,62.521 c -2.202,-2.147 -0.987,-5.887 2.056,-6.329 l 14.363,-2.087 c 1.209,-0.176 2.253,-0.935 2.794,-2.03 l 6.423,-13.015 c 1.362,-2.758 5.294,-2.758 6.655,0 z"
75
- id="path60"
76
- inkscape:connector-curvature="0"
77
- style="fill:#9178b7;fill-opacity:1" />
78
- <path
79
- d="m 432.402,39.06 6.423,13.015 c 0.54,1.095 1.585,1.854 2.794,2.03 l 14.363,2.087 c 3.043,0.442 4.259,4.182 2.056,6.329 l -10.393,10.131 c -0.874,0.852 -1.274,2.081 -1.067,3.284 l 2.453,14.305 c 0.52,3.031 -2.662,5.343 -5.384,3.911 L 430.8,87.398 c -1.081,-0.568 -2.372,-0.568 -3.453,0 L 414.5,94.152 c -2.722,1.431 -5.904,-0.88 -5.384,-3.911 l 2.453,-14.305 c 0.206,-1.204 -0.193,-2.432 -1.067,-3.284 L 400.109,62.521 c -2.202,-2.147 -0.987,-5.887 2.056,-6.329 l 14.363,-2.087 c 1.209,-0.176 2.253,-0.935 2.794,-2.03 l 6.423,-13.015 c 1.363,-2.758 5.296,-2.758 6.657,0 z"
80
- id="path62"
81
- inkscape:connector-curvature="0"
82
- style="fill:#9178b7;fill-opacity:1" />
83
- </g>
84
- <g
85
- id="g76" />
86
- <g
87
- id="g86">
88
- <g
89
- id="g80"
90
- style="fill:#90a4ae;fill-opacity:1">
91
- <path
92
- d="M 459.163,137.933 H 220.989 c -4.142,0 -7.5,-3.358 -7.5,-7.5 0,-4.142 3.358,-7.5 7.5,-7.5 h 238.174 c 4.142,0 7.5,3.358 7.5,7.5 0,4.142 -3.358,7.5 -7.5,7.5 z"
93
- id="path78"
94
- inkscape:connector-curvature="0"
95
- style="fill:#90a4ae;fill-opacity:1" />
96
- </g>
97
- <g
98
- id="g84"
99
- style="fill:#90a4ae;fill-opacity:1;stroke:none;stroke-opacity:1">
100
- <path
101
- d="M 340.076,167.863 H 220.989 c -4.142,0 -7.5,-3.358 -7.5,-7.5 0,-4.142 3.358,-7.5 7.5,-7.5 h 119.087 c 4.142,0 7.5,3.358 7.5,7.5 0,4.142 -3.358,7.5 -7.5,7.5 z"
102
- id="path82"
103
- inkscape:connector-curvature="0"
104
- style="fill:#90a4ae;fill-opacity:1;stroke:none;stroke-opacity:1" />
105
- </g>
106
- </g>
107
- <rect
108
- style="opacity:0.5;fill:#ffffff;fill-opacity:0.78431373;fill-rule:evenodd;stroke:none;stroke-width:2.89835215;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke fill markers"
109
- id="rect4504"
110
- width="395.82443"
111
- height="349.21036"
112
- x="139.90385"
113
- y="-53.375328" />
114
- </g>
115
- </g>
116
- </svg>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/backend/images/support.svg DELETED
@@ -1,102 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
- <!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
-
4
- <svg
5
- xmlns:dc="http://purl.org/dc/elements/1.1/"
6
- xmlns:cc="http://creativecommons.org/ns#"
7
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8
- xmlns:svg="http://www.w3.org/2000/svg"
9
- xmlns="http://www.w3.org/2000/svg"
10
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12
- version="1.1"
13
- id="Capa_1"
14
- x="0px"
15
- y="0px"
16
- viewBox="0 0 512 512"
17
- style="enable-background:new 0 0 512 512;"
18
- xml:space="preserve"
19
- sodipodi:docname="support.svg"
20
- inkscape:version="0.92.0 r15299"><metadata
21
- id="metadata75"><rdf:RDF><cc:Work
22
- rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
23
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
24
- id="defs73" /><sodipodi:namedview
25
- pagecolor="#ffffff"
26
- bordercolor="#666666"
27
- borderopacity="1"
28
- objecttolerance="10"
29
- gridtolerance="10"
30
- guidetolerance="10"
31
- inkscape:pageopacity="0"
32
- inkscape:pageshadow="2"
33
- inkscape:window-width="2560"
34
- inkscape:window-height="1017"
35
- id="namedview71"
36
- showgrid="false"
37
- inkscape:zoom="0.92187498"
38
- inkscape:cx="127.5288"
39
- inkscape:cy="162.24021"
40
- inkscape:window-x="1912"
41
- inkscape:window-y="-8"
42
- inkscape:window-maximized="1"
43
- inkscape:current-layer="g22" /><path
44
- style="fill:#9178b7;fill-opacity:1;stroke:none"
45
- d="m 374.18666,111.86429 c -136.624,0 -247.29601,110.672 -247.29601,247.296 0,136.624 110.67201,247.296 247.29601,247.296 136.624,0 247.296,-110.672 247.296,-247.296 0,-136.624 -110.672,-247.296 -247.296,-247.296 z m 0,368.576 c -66.928,0 -121.12,-54.336 -121.12,-121.264 0,-66.928 54.192,-121.12 121.12,-121.12 66.928,0 121.264,54.192 121.264,121.12 0.016,66.912 -54.336,121.264 -121.264,121.264 z"
46
- id="path10"
47
- inkscape:connector-curvature="0" /><g
48
- id="g22"
49
- transform="translate(81.305295,78.237171)"
50
- style="stroke:none"><path
51
- style="fill:#eceff1;fill-opacity:1;stroke:#eceff1;stroke-opacity:1"
52
- d="m 195.61736,53.531119 53.776,114.448001 c 13.504,-5.2 28.128,-8.16 43.488,-8.16 15.344,0 29.968,2.96 43.488,8.16 l 53.776,-114.448001 c -29.856,-12.784 -62.72,-19.904 -97.264,-19.904 -34.544,0 -67.408,7.12 -97.264,19.904 z"
53
- id="path14"
54
- inkscape:connector-curvature="0" /><path
55
- style="fill:#eceff1;fill-opacity:1;stroke:#eceff1;stroke-opacity:1"
56
- d="m 171.76136,280.92312 c 0,-15.36 2.976,-29.984 8.176,-43.488 l -114.448003,-53.776 c -12.784,29.856 -19.904,62.72 -19.904,97.264 0,34.544 7.12,67.408 19.904,97.264 l 114.432003,-53.776 c -5.184,-13.52 -8.16,-28.144 -8.16,-43.488 z"
57
- id="path16"
58
- inkscape:connector-curvature="0" /><path
59
- style="fill:#eceff1;fill-opacity:1;stroke:#eceff1;stroke-opacity:1"
60
- d="m 390.14536,508.31512 -53.728,-114.32 c -13.536,5.216 -28.176,8.208 -43.536,8.208 -15.376,0 -30.016,-2.992 -43.552,-8.208 l -53.728,114.336 c 29.856,12.784 62.72,19.904 97.264,19.904 34.56,-0.016 67.424,-7.136 97.28,-19.92 z"
61
- id="path18"
62
- inkscape:connector-curvature="0" /><path
63
- style="fill:#eceff1;fill-opacity:1;stroke:#eceff1;stroke-opacity:1"
64
- d="m 414.16136,280.92312 c 0,15.36 -2.976,30 -8.208,43.536 l 114.32,53.728 c 12.784,-29.856 19.904,-62.72 19.904,-97.264 0,-34.544 -7.12,-67.408 -19.904,-97.264 l -114.336,53.728 c 5.232,13.52 8.224,28.176 8.224,43.536 z"
65
- id="path20"
66
- inkscape:connector-curvature="0" /><rect
67
- style="opacity:0.5;fill:#ffffff;fill-opacity:0.78431373;fill-rule:evenodd;stroke:none;stroke-width:5.62767839;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke fill markers"
68
- id="rect4504"
69
- width="768.56519"
70
- height="678.05548"
71
- x="-178.1302"
72
- y="-39.773388" /></g><g
73
- id="g40"
74
- transform="translate(81.305295,78.237171)" /><g
75
- id="g42"
76
- transform="translate(81.305295,78.237171)" /><g
77
- id="g44"
78
- transform="translate(81.305295,78.237171)" /><g
79
- id="g46"
80
- transform="translate(81.305295,78.237171)" /><g
81
- id="g48"
82
- transform="translate(81.305295,78.237171)" /><g
83
- id="g50"
84
- transform="translate(81.305295,78.237171)" /><g
85
- id="g52"
86
- transform="translate(81.305295,78.237171)" /><g
87
- id="g54"
88
- transform="translate(81.305295,78.237171)" /><g
89
- id="g56"
90
- transform="translate(81.305295,78.237171)" /><g
91
- id="g58"
92
- transform="translate(81.305295,78.237171)" /><g
93
- id="g60"
94
- transform="translate(81.305295,78.237171)" /><g
95
- id="g62"
96
- transform="translate(81.305295,78.237171)" /><g
97
- id="g64"
98
- transform="translate(81.305295,78.237171)" /><g
99
- id="g66"
100
- transform="translate(81.305295,78.237171)" /><g
101
- id="g68"
102
- transform="translate(81.305295,78.237171)" /></svg>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/backend/images/update.svg DELETED
@@ -1,91 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
- <!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
-
4
- <svg
5
- xmlns:dc="http://purl.org/dc/elements/1.1/"
6
- xmlns:cc="http://creativecommons.org/ns#"
7
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8
- xmlns:svg="http://www.w3.org/2000/svg"
9
- xmlns="http://www.w3.org/2000/svg"
10
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12
- version="1.1"
13
- id="Layer_1"
14
- x="0px"
15
- y="0px"
16
- viewBox="0 0 505 505"
17
- style="enable-background:new 0 0 505 505;"
18
- xml:space="preserve"
19
- sodipodi:docname="update.svg"
20
- inkscape:version="0.92.0 r15299"><metadata
21
- id="metadata43"><rdf:RDF><cc:Work
22
- rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
23
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
24
- id="defs41" /><sodipodi:namedview
25
- pagecolor="#ffffff"
26
- bordercolor="#666666"
27
- borderopacity="1"
28
- objecttolerance="10"
29
- gridtolerance="10"
30
- guidetolerance="10"
31
- inkscape:pageopacity="0"
32
- inkscape:pageshadow="2"
33
- inkscape:window-width="2560"
34
- inkscape:window-height="1017"
35
- id="namedview39"
36
- showgrid="false"
37
- inkscape:zoom="0.6608998"
38
- inkscape:cx="-41.965565"
39
- inkscape:cy="289.29436"
40
- inkscape:window-x="1912"
41
- inkscape:window-y="-8"
42
- inkscape:window-maximized="1"
43
- inkscape:current-layer="Layer_1" /><path
44
- style="fill:#ded1f2;fill-opacity:1;stroke-width:1.194754"
45
- d="m 54.471192,356.14658 c 0,-166.66819 135.007198,-301.675388 301.675388,-301.675388 166.5487,0 301.67538,135.007198 301.67538,301.675388 0,166.66817 -135.12668,301.67538 -301.67538,301.67538 -166.66819,0 -301.675388,-135.00721 -301.675388,-301.67538 z"
46
- id="path2"
47
- inkscape:connector-curvature="0" /><path
48
- style="fill:#9178b7;fill-opacity:1;stroke-width:1.194754"
49
- d="m 287.44822,389.59968 h 18.51868 c 14.33706,0 22.46138,-16.36813 13.85915,-27.83776 l -72.64104,-95.81927 c -6.92957,-9.19961 -20.78872,-9.19961 -27.71829,0 l -72.64105,95.81927 c -8.7217,11.46963 -0.4779,27.83776 13.85915,27.83776 h 16.72655 c 26.04564,120.07278 140.50308,170.25245 226.16694,142.7731 7.52694,-2.3895 6.09324,-13.50072 -1.91161,-14.09809 -78.97324,-5.73482 -122.58176,-74.55265 -114.21848,-128.67501 z"
50
- id="path4"
51
- inkscape:connector-curvature="0" /><path
52
- style="fill:#9178b7;fill-opacity:1;stroke-width:1.194754"
53
- d="m 424.84493,322.69346 h -18.51869 c -14.33705,0 -22.46137,16.36813 -13.85914,27.83777 l 72.64104,95.93875 c 6.92957,9.19961 20.78871,9.19961 27.71829,0 l 72.64104,-95.93875 c 8.7217,-11.46964 0.4779,-27.83777 -13.85914,-27.83777 H 534.88177 C 508.71666,202.62069 394.25922,152.44102 308.59536,179.92036 c -7.52695,2.38951 -6.09324,13.50072 1.91161,14.0981 79.09271,5.73482 122.70123,74.55265 114.33796,128.675 z"
54
- id="path6"
55
- inkscape:connector-curvature="0" /><g
56
- id="g8"
57
- transform="scale(1.3026177)" /><g
58
- id="g10"
59
- transform="scale(1.3026177)" /><g
60
- id="g12"
61
- transform="scale(1.3026177)" /><g
62
- id="g14"
63
- transform="scale(1.3026177)" /><g
64
- id="g16"
65
- transform="scale(1.3026177)" /><g
66
- id="g18"
67
- transform="scale(1.3026177)" /><g
68
- id="g20"
69
- transform="scale(1.3026177)" /><g
70
- id="g22"
71
- transform="scale(1.3026177)" /><g
72
- id="g24"
73
- transform="scale(1.3026177)" /><g
74
- id="g26"
75
- transform="scale(1.3026177)" /><g
76
- id="g28"
77
- transform="scale(1.3026177)" /><g
78
- id="g30"
79
- transform="scale(1.3026177)" /><g
80
- id="g32"
81
- transform="scale(1.3026177)" /><g
82
- id="g34"
83
- transform="scale(1.3026177)" /><g
84
- id="g36"
85
- transform="scale(1.3026177)" /><rect
86
- style="opacity:0.5;fill:#ffffff;fill-opacity:0.78431373;fill-rule:evenodd;stroke:none;stroke-width:5.62767839;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke fill markers"
87
- id="rect4504"
88
- width="768.56519"
89
- height="678.05548"
90
- x="-71.073227"
91
- y="-6.5198488" /></svg>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/backend/images/welcome.svg DELETED
@@ -1,181 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
- <!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
-
4
- <svg
5
- xmlns:dc="http://purl.org/dc/elements/1.1/"
6
- xmlns:cc="http://creativecommons.org/ns#"
7
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8
- xmlns:svg="http://www.w3.org/2000/svg"
9
- xmlns="http://www.w3.org/2000/svg"
10
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
11
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
12
- version="1.1"
13
- id="Capa_1"
14
- x="0px"
15
- y="0px"
16
- viewBox="0 0 512.001 512.001"
17
- style="enable-background:new 0 0 512.001 512.001;"
18
- xml:space="preserve"
19
- sodipodi:docname="welcome.svg"
20
- inkscape:version="0.92.0 r15299"><metadata
21
- id="metadata99"><rdf:RDF><cc:Work
22
- rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
23
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
24
- id="defs97" /><sodipodi:namedview
25
- pagecolor="#ffffff"
26
- bordercolor="#666666"
27
- borderopacity="1"
28
- objecttolerance="10"
29
- gridtolerance="10"
30
- guidetolerance="10"
31
- inkscape:pageopacity="0"
32
- inkscape:pageshadow="2"
33
- inkscape:window-width="1920"
34
- inkscape:window-height="1017"
35
- id="namedview95"
36
- showgrid="false"
37
- inkscape:zoom="1.3037256"
38
- inkscape:cx="154.95189"
39
- inkscape:cy="223.3697"
40
- inkscape:window-x="-8"
41
- inkscape:window-y="-8"
42
- inkscape:window-maximized="1"
43
- inkscape:current-layer="Capa_1" /><circle
44
- style="fill:#ded1f2;fill-opacity:1;stroke-width:0.8621738"
45
- cx="256.00003"
46
- cy="252.93185"
47
- r="220.71649"
48
- id="circle2" /><g
49
- id="g20"
50
- transform="matrix(0.86217384,0,0,0.86217384,35.283516,32.215367)"><path
51
- style="fill:#34abe0"
52
- d="m 469.869,206.196 c -3.882,0 -7.029,-3.147 -7.029,-7.029 v -11.259 c 0,-3.882 3.147,-7.029 7.029,-7.029 3.882,0 7.029,3.147 7.029,7.029 v 11.259 c -0.001,3.883 -3.148,7.029 -7.029,7.029 z"
53
- id="path4"
54
- inkscape:connector-curvature="0" /><path
55
- style="fill:#34abe0"
56
- d="m 469.869,263.776 c -3.882,0 -7.029,-3.147 -7.029,-7.029 V 245.49 c 0,-3.882 3.147,-7.029 7.029,-7.029 3.882,0 7.029,3.147 7.029,7.029 v 11.258 c -0.001,3.881 -3.148,7.028 -7.029,7.028 z"
57
- id="path6"
58
- inkscape:connector-curvature="0" /><path
59
- style="fill:#34abe0"
60
- d="m 504.288,229.358 h -11.259 c -3.882,0 -7.029,-3.147 -7.029,-7.029 0,-3.882 3.147,-7.029 7.029,-7.029 h 11.259 c 3.882,0 7.029,3.147 7.029,7.029 0,3.881 -3.148,7.029 -7.029,7.029 z"
61
- id="path8"
62
- inkscape:connector-curvature="0" /><path
63
- style="fill:#34abe0"
64
- d="M 446.707,229.358 H 435.45 c -3.882,0 -7.029,-3.147 -7.029,-7.029 0,-3.882 3.147,-7.029 7.029,-7.029 h 11.258 c 3.882,0 7.029,3.147 7.029,7.029 -0.002,3.881 -3.148,7.029 -7.03,7.029 z"
65
- id="path10"
66
- inkscape:connector-curvature="0" /><path
67
- style="fill:#34abe0"
68
- d="m 391.867,22.724 c -3.882,0 -7.029,-3.147 -7.029,-7.029 V 7.029 c 0,-3.882 3.147,-7.029 7.029,-7.029 3.882,0 7.029,3.147 7.029,7.029 v 8.666 c 0,3.883 -3.147,7.029 -7.029,7.029 z"
69
- id="path12"
70
- inkscape:connector-curvature="0" /><path
71
- style="fill:#34abe0"
72
- d="m 391.867,67.048 c -3.882,0 -7.029,-3.147 -7.029,-7.029 v -8.666 c 0,-3.882 3.147,-7.029 7.029,-7.029 3.882,0 7.029,3.147 7.029,7.029 v 8.666 c 0,3.882 -3.147,7.029 -7.029,7.029 z"
73
- id="path14"
74
- inkscape:connector-curvature="0" /><path
75
- style="fill:#34abe0"
76
- d="m 418.362,40.553 h -8.666 c -3.882,0 -7.029,-3.147 -7.029,-7.029 0,-3.882 3.147,-7.029 7.029,-7.029 h 8.666 c 3.882,0 7.029,3.147 7.029,7.029 0,3.882 -3.147,7.029 -7.029,7.029 z"
77
- id="path16"
78
- inkscape:connector-curvature="0" /><path
79
- style="fill:#34abe0"
80
- d="m 374.038,40.553 h -8.666 c -3.882,0 -7.029,-3.147 -7.029,-7.029 0,-3.882 3.147,-7.029 7.029,-7.029 h 8.666 c 3.882,0 7.029,3.147 7.029,7.029 0,3.882 -3.147,7.029 -7.029,7.029 z"
81
- id="path18"
82
- inkscape:connector-curvature="0" /></g><path
83
- style="fill:#9178b7;fill-opacity:1;stroke-width:0.8621738"
84
- d="m 298.98111,139.77931 c -1.09841,0 -2.21061,-0.29831 -3.21073,-0.92511 -2.83569,-1.77694 -3.69529,-5.51619 -1.9192,-8.35187 8.88986,-14.19398 16.29077,-28.09049 21.99663,-41.303308 1.32689,-3.071925 4.89112,-4.486752 7.96563,-3.160729 3.07192,1.326886 4.48762,4.893699 3.15987,7.965625 -5.94815,13.774092 -13.63787,28.218092 -22.85278,42.931942 -1.14842,1.83643 -3.12107,2.84345 -5.13942,2.84345 z"
85
- id="path22"
86
- inkscape:connector-curvature="0" /><path
87
- style="fill:#34abe0;stroke-width:0.8621738"
88
- d="m 221.49065,234.60809 c -1.61572,0 -3.22798,-0.64233 -4.42037,-1.91403 -2.28993,-2.44081 -2.1675,-6.27489 0.27331,-8.56569 0.27849,-0.26124 28.13963,-26.53427 55.9456,-63.72931 2.00368,-2.6805 5.80157,-3.2297 8.48293,-1.22514 2.68049,2.00368 3.22884,5.80156 1.22514,8.48291 -28.47845,38.09258 -56.19562,64.21816 -57.36214,65.3114 -1.17083,1.09583 -2.65895,1.63986 -4.14447,1.63986 z"
89
- id="path24"
90
- inkscape:connector-curvature="0" /><path
91
- style="fill:#f9f9f9;stroke-width:0.8621738"
92
- d="m 275.09631,243.34881 c -1.64503,0 -3.28488,-0.6656 -4.47986,-1.97782 -2.25372,-2.47358 -2.07784,-6.30594 0.3966,-8.5614 28.21033,-25.71433 84.0654,-71.36126 141.18269,-88.17193 3.20988,-0.94408 6.57925,0.89148 7.52419,4.10223 0.94495,3.21073 -0.89149,6.57924 -4.10222,7.52419 -54.78597,16.12438 -108.99946,60.49098 -136.43987,85.50264 -1.16308,1.05961 -2.62446,1.58209 -4.08153,1.58209 z"
93
- id="path26"
94
- inkscape:connector-curvature="0" /><g
95
- id="g32"
96
- transform="matrix(0.86217384,0,0,0.86217384,35.283516,32.215367)"><path
97
- style="fill:#9178b7;fill-opacity:1"
98
- d="m 290.023,308.794 c -2.069,0 -4.119,-0.909 -5.507,-2.655 -2.416,-3.039 -1.91,-7.461 1.128,-9.875 2.334,-1.855 58.024,-45.266 133.17,-30.816 3.812,0.732 6.308,4.417 5.575,8.229 -0.732,3.813 -4.415,6.314 -8.229,5.575 -68.879,-13.246 -121.248,27.602 -121.769,28.017 -1.292,1.025 -2.835,1.525 -4.368,1.525 z"
99
- id="path28"
100
- inkscape:connector-curvature="0" /><path
101
- style="fill:#9178b7;fill-opacity:1"
102
- d="m 194.779,177.404 c -1.061,0 -2.137,-0.24 -3.148,-0.749 -3.469,-1.742 -4.869,-5.966 -3.126,-9.435 11.361,-22.624 23.205,-58.429 15.111,-100.516 -0.734,-3.812 1.763,-7.496 5.575,-8.229 3.811,-0.734 7.496,1.763 8.229,5.575 8.84,45.966 -4.013,84.906 -16.353,109.479 -1.234,2.456 -3.713,3.875 -6.288,3.875 z"
103
- id="path30"
104
- inkscape:connector-curvature="0" /></g><path
105
- style="fill:#f9f9f9;stroke-width:0.8621738"
106
- d="m 282.19114,351.70423 -99.61988,49.64742 -57.9993,28.91818 C 95.167528,408.4413 71.374975,379.46881 55.771353,345.91991 l 9.59427,-19.25148 45.683997,-91.6646 18.10738,-36.33287 z"
107
- id="path34"
108
- inkscape:connector-curvature="0" /><g
109
- id="g42"
110
- transform="matrix(0.86217384,0,0,0.86217384,35.283516,32.215367)"><path
111
- style="fill:#9178b7;fill-opacity:1"
112
- d="M 76.667,438.689 C 54.839,417.258 36.825,391.94 23.764,363.864 v -0.01 l 11.139,-22.329 z"
113
- id="path38"
114
- inkscape:connector-curvature="0" /><polygon
115
- style="fill:#9178b7;fill-opacity:1"
116
- points="170.839,428.138 152.074,384.51 87.885,235.211 108.888,193.068 237.301,321.481 286.379,370.559 "
117
- id="polygon40" /></g><path
118
- style="fill:#f9f9f9;stroke-width:0.8621738"
119
- d="M 268.15494,353.91226 126.94639,212.70371 c -6.84393,-6.84395 -6.84393,-17.93926 0,-24.78319 v 0 c 6.84394,-6.84394 17.93925,-6.84394 24.78318,0 l 141.2077,141.20769 c 6.84394,6.84393 6.84394,17.93925 0,24.78318 v 0 c -6.84308,6.84394 -17.93925,6.84394 -24.78233,8.7e-4 z"
120
- id="path46"
121
- inkscape:connector-curvature="0" /><circle
122
- style="fill:#f9f9f9;stroke-width:0.8621738"
123
- cx="176.15497"
124
- cy="142.5831"
125
- r="6.0602198"
126
- id="circle50" /><circle
127
- style="fill:#9178b7;fill-opacity:1;stroke-width:0.8621738"
128
- cx="257.1355"
129
- cy="119.44839"
130
- r="6.0602198"
131
- id="circle52" /><circle
132
- style="fill:#34abe0;stroke-width:0.8621738"
133
- cx="356.29495"
134
- cy="137.62819"
135
- r="6.0602198"
136
- id="circle54" /><g
137
- id="g60"
138
- transform="matrix(0.86217384,0,0,0.86217384,35.283516,32.215367)"><circle
139
- style="fill:#f9f9f9"
140
- cx="372.328"
141
- cy="323.53201"
142
- r="7.0289998"
143
- id="circle56" /><path
144
- style="fill:#f9f9f9"
145
- d="m 254.9,10.029 8.735,7.769 c 0.739,0.657 1.753,0.909 2.714,0.673 L 277.7,15.68 c 2.418,-0.595 4.468,1.841 3.469,4.122 l -4.69,10.708 c -0.397,0.906 -0.322,1.949 0.199,2.789 l 6.163,9.934 c 1.312,2.116 -0.371,4.818 -2.848,4.574 L 268.36,46.656 c -0.984,-0.097 -1.953,0.296 -2.59,1.051 l -7.543,8.931 c -1.607,1.902 -4.697,1.136 -5.23,-1.296 l -2.5,-11.42 c -0.211,-0.965 -0.885,-1.766 -1.8,-2.139 l -10.824,-4.415 c -2.305,-0.94 -2.532,-4.116 -0.383,-5.374 l 10.088,-5.907 c 0.854,-0.499 1.406,-1.387 1.479,-2.373 l 0.854,-11.659 c 0.178,-2.483 3.128,-3.681 4.989,-2.026 z"
146
- id="path58"
147
- inkscape:connector-curvature="0" /></g><path
148
- style="fill:#9178b7;fill-opacity:1;stroke-width:0.8621738"
149
- d="m 454.29051,92.257154 5.2722,11.110836 c 0.44574,0.93977 1.32516,1.60019 2.35201,1.76486 l 12.14113,1.95542 c 2.58566,0.41643 3.57199,3.61768 1.66831,5.41703 l -8.93729,8.44672 c -0.75613,0.71474 -1.11134,1.75453 -0.95184,2.7831 l 1.89161,12.15148 c 0.40263,2.58824 -2.3365,4.51434 -4.63592,3.25987 l -10.79527,-5.89036 c -0.91391,-0.49834 -2.01232,-0.51559 -2.94088,-0.0448 l -10.97202,5.55411 c -2.33649,1.18291 -5.01613,-0.82682 -4.53331,-3.40213 l 2.26579,-12.08682 c 0.19226,-1.02253 -0.13278,-2.07352 -0.86562,-2.81069 l -8.67261,-8.71916 c -1.84677,-1.85712 -0.76303,-5.02561 1.83384,-5.36272 l 12.19545,-1.58036 c 1.03117,-0.13364 1.93127,-0.76648 2.40633,-1.69159 l 5.61276,-10.941845 c 1.19323,-2.331318 4.54279,-2.278727 5.66533,0.08708 z"
150
- id="path62"
151
- inkscape:connector-curvature="0" /><g
152
- id="g64"
153
- transform="matrix(0.86217384,0,0,0.86217384,35.283516,32.215367)" /><g
154
- id="g66"
155
- transform="matrix(0.86217384,0,0,0.86217384,35.283516,32.215367)" /><g
156
- id="g68"
157
- transform="matrix(0.86217384,0,0,0.86217384,35.283516,32.215367)" /><g
158
- id="g70"
159
- transform="matrix(0.86217384,0,0,0.86217384,35.283516,32.215367)" /><g
160
- id="g72"
161
- transform="matrix(0.86217384,0,0,0.86217384,35.283516,32.215367)" /><g
162
- id="g74"
163
- transform="matrix(0.86217384,0,0,0.86217384,35.283516,32.215367)" /><g
164
- id="g76"
165
- transform="matrix(0.86217384,0,0,0.86217384,35.283516,32.215367)" /><g
166
- id="g78"
167
- transform="matrix(0.86217384,0,0,0.86217384,35.283516,32.215367)" /><g
168
- id="g80"
169
- transform="matrix(0.86217384,0,0,0.86217384,35.283516,32.215367)" /><g
170
- id="g82"
171
- transform="matrix(0.86217384,0,0,0.86217384,35.283516,32.215367)" /><g
172
- id="g84"
173
- transform="matrix(0.86217384,0,0,0.86217384,35.283516,32.215367)" /><g
174
- id="g86"
175
- transform="matrix(0.86217384,0,0,0.86217384,35.283516,32.215367)" /><g
176
- id="g88"
177
- transform="matrix(0.86217384,0,0,0.86217384,35.283516,32.215367)" /><g
178
- id="g90"
179
- transform="matrix(0.86217384,0,0,0.86217384,35.283516,32.215367)" /><g
180
- id="g92"
181
- transform="matrix(0.86217384,0,0,0.86217384,35.283516,32.215367)" /></svg>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/backend/style.css DELETED
@@ -1,537 +0,0 @@
1
- /* Default Stylings */
2
- .nowrap {
3
- white-space: nowrap;
4
- }
5
- .cau_spacing {
6
- height: 25px;
7
- }
8
- .cau_support_buttons {
9
- display: inline-block;
10
- }
11
-
12
- /* Welcome screen */
13
- .welcome-to-cau {
14
- background: #FFF;
15
- border: 1px solid #CCD0D4;
16
- margin: 25px 0;
17
- padding: 30px;
18
- background-size: 140px;
19
- background-position: left bottom;
20
- background-repeat: no-repeat;
21
- box-shadow: 0 1px 1px rgba(0,0,0,.04);
22
- }
23
- .welcome-to-cau .welcome-image {
24
- display: inline-block;
25
- vertical-align: middle;
26
- width: 100px;
27
- height: 100px;
28
- background-image: url('images/welcome.svg');
29
- background-size: contain;
30
- background-position: center;
31
- box-sizing: border-box;
32
- }
33
- .welcome-to-cau .welcome-content {
34
- display: inline-block;
35
- vertical-align: middle;
36
- width: calc(100% - 100px);
37
- padding-left: 25px;
38
- box-sizing: border-box;
39
- }
40
- .welcome-to-cau .welcome-content strong {
41
- color: #000;
42
- }
43
- .welcome-to-cau .welcome-content p {
44
- margin: 2px 0;
45
- }
46
- .welcome-to-cau.help-bg {
47
- background-image: url('images/help.svg');
48
- }
49
- .welcome-to-cau.support-bg {
50
- background-image: url('images/support.svg');
51
- }
52
- .welcome-to-cau.love-bg {
53
- background-image: url('images/love.svg');
54
- }
55
- .welcome-to-cau.update-bg {
56
- background-image: url('images/update.svg');
57
- }
58
- .welcome-to-cau.email-bg {
59
- background-image: url('images/email.svg');
60
- }
61
- .welcome-to-cau.interval-bg {
62
- background-image: url('images/interval.svg');
63
- }
64
- .welcome-to-cau h2 {
65
- margin: 0;
66
- margin-bottom: 25px;
67
- font-size: 21px;
68
- font-weight: 400;
69
- line-height: 1.2;
70
- }
71
- .welcome-to-cau h2.title {
72
- margin-bottom: 10px;
73
- }
74
- .welcome-to-cau h3 {
75
- font-size: 16px;
76
- margin-top: 0;
77
- }
78
- .welcome-to-cau a {
79
- text-decoration: none;
80
- }
81
- .welcome-to-cau .welcome-column {
82
- display: inline-block;
83
- vertical-align: top;
84
- box-sizing: border-box;
85
- }
86
- .welcome-to-cau.cau-show-love .welcome-column {
87
- vertical-align: middle;
88
- }
89
- .welcome-to-cau .welcome-column.welcome-column-first {
90
- display: block;
91
- width: 100%;
92
- }
93
- .first-column {
94
- padding-left: 140px;
95
- }
96
- .welcome-to-cau .welcome-column.welcome-column-half {
97
- width: 50%;
98
- }
99
- .welcome-to-cau .welcome-column.welcome-column-third {
100
- width: 33%;
101
- }
102
- .welcome-to-cau .welcome-column.welcome-column-quarter {
103
- width: 25%;
104
- }
105
- .welcome-to-cau a.minimal-button {
106
- display: inline-block;
107
- padding: 5px;
108
- }
109
-
110
- /* Overwrite core UI */
111
- /*.cau_content input[type="checkbox"]:checked::before {
112
- content: "";
113
- background: url( 'images/check.svg' );
114
- background-size: contain;
115
- background-position: center center;
116
- }*/
117
- .cau_content a {
118
- color: #9178B7;
119
- }
120
- .cau_content a.nav-tab {
121
- color: #23282D;
122
- }
123
- .cau_content .button-primary {
124
- background-color: #9178B7!important;
125
- border-color: #9178B7!important;
126
- }
127
- .cau_content .button-alt {
128
- color: #9178B7!important;
129
- border-color: #9178B7!important;
130
- }
131
- .cau_content .button-hero {
132
- font-weight: 500;
133
- padding: 15px 30px!important;
134
- }
135
- #message.cau {
136
- background: #FFF;
137
- border: 1px solid #CCD0D4;
138
- border-left-width: 4px;
139
- border-left-color: #9178B7;
140
- box-shadow: 0 1px 1px rgba(0,0,0,.04);
141
- margin: 25px 0px 5px 0;
142
- padding: 15px;
143
- }
144
- #message.cau a, #message.cau strong {
145
- color: #9178B7;
146
- }
147
-
148
- /* Dashboard */
149
- .cau-column-wide {
150
- box-sizing: border-box;
151
- display: inline-block;
152
- vertical-align: top;
153
- width: calc(100% - 450px);
154
- padding-right: 25px;
155
- }
156
- .cau-column-small {
157
- display: inline-block;
158
- vertical-align: top;
159
- width: 450px;
160
- }
161
- .cau-dashboard-box {
162
- background-position: right bottom;
163
- }
164
- .cau-column-wide .cau-dashboard-box {
165
- padding-right: 125px;
166
- }
167
- .cau-dashboard-box a {
168
- margin-left: 0px;
169
- margin-top: 10px;
170
- }
171
- .cau-dashboard-box .welcome-column {
172
- padding-right: 25px;
173
- }
174
- .support-sidebar-list {
175
- margin-bottom: 25px;
176
- }
177
- .nav-tab {
178
- position: relative;
179
- }
180
- .nav-tab .cau_melding {
181
- display: inline-block;
182
- width: 11px;
183
- height: 11px;
184
- border-radius: 10px;
185
- margin-left: 5px;
186
- position: relative;
187
- bottom: -1px;
188
- }
189
- .nav-tab .cau_melding.level-okay {
190
- background: #7AD03A;
191
- }
192
- .nav-tab .cau_melding.level-low {
193
- background: #FFBA00;
194
- }
195
- .nav-tab .cau_melding.level-high {
196
- background: #FF0000;
197
- }
198
-
199
- /* Table Styling */
200
- .widefat td {
201
- vertical-align: middle!important;
202
- }
203
- table.autoupdate th.head-plugin {
204
- min-width: 250px;
205
- }
206
- table.autoupdate th.head-status {
207
- min-width: 150px;
208
- }
209
- table.autoupdate th.check-column {
210
- position: relative;
211
- min-width: 55px;
212
- }
213
- table.autoupdate tr.inactive {
214
- background: #FEF7F1;
215
- }
216
- table.autoupdate tr.active .check-column {
217
- border-left: 3px solid transparent;
218
- }
219
- table.autoupdate tr.inactive .check-column {
220
- border-left: 3px solid #D54E21;
221
- }
222
- table.autoupdate tr.inactive td.column-status p {
223
- color: #BF3D3C;
224
- }
225
- table.autoupdate tr.active td.column-status p {
226
- color: #000;
227
- }
228
- table.autoupdate tr td.column-description p {
229
- overflow: hidden;
230
- max-height: 18px;
231
- }
232
-
233
- /* Update Log */
234
- table.autoupdatelog {
235
- margin-top: 25px;
236
- }
237
- table.autoupdatelog strong {
238
- color: #000;
239
- }
240
- table.autoupdatelog .dashicons {
241
- color: #00A0D2;
242
- }
243
-
244
- /* Status */
245
- table.cau_status_list {
246
- margin-top: 25px;
247
- }
248
- .cau_enabled {
249
- color: #7AD03A;
250
- }
251
- .cau_disabled {
252
- color: #FF0000;
253
- }
254
- .cau_warning {
255
- color: #FFBA00;
256
- }
257
- .cau_mobile_prefix {
258
- display: none;
259
- }
260
-
261
- /* Rollback list */
262
- table.rollbacklist {
263
- max-width: 650px;
264
- }
265
- table.rollbacklist td {
266
- vertical-align: middle;
267
- }
268
- table.rollbacklist td a.versionselectbutton {
269
- display: inline-block;
270
- width: 100px;
271
- text-align: center;
272
- }
273
-
274
- /* Plugin list */
275
- .pluginListButtons {
276
- display: block;
277
- padding: 15px 0;
278
- }
279
- .pluginListButtons p.submit {
280
- display: inline-block;
281
- margin: 0!important;
282
- padding: 0!important;
283
- }
284
- #the-list input[type="checkbox"]:not(:checked), #the-list input[type="checkbox"]:checked {
285
- width: 45px;
286
- height: 45px;
287
- position: absolute;
288
- top: 0;
289
- bottom: 0;
290
- z-index: 100;
291
- display: block;
292
- opacity: 0;
293
- }
294
- #the-list input[type="checkbox"]:not(:checked) + label, #the-list input[type="checkbox"]:checked + label {
295
- position: absolute;
296
- top: 15px;
297
- left: 12px;
298
- cursor: pointer;
299
- }
300
- #the-list input[type="checkbox"]:not(:checked) + label:before, #the-list input[type="checkbox"]:checked + label:before, #the-list input[type="checkbox"]:not(:checked) + label:after, #the-list input[type="checkbox"]:checked + label:after {
301
- content: '';
302
- position: absolute;
303
- }
304
- #the-list input[type="checkbox"]:not(:checked) + label:before, #the-list input[type="checkbox"]:checked + label:before {
305
- left: 0;
306
- top: -3px;
307
- width: 30px;
308
- height: 16px;
309
- background: transparent;
310
- border: 2px solid #9178B7;
311
- border-radius: 15px;
312
- transition: background-color .2s;
313
- }
314
- #the-list input[type="checkbox"]:not(:checked) + label:after, #the-list input[type="checkbox"]:checked + label:after {
315
- width: 8px;
316
- height: 8px;
317
- transition: all .2s;
318
- border-radius: 500px;
319
- background: transparent;
320
- border: 2px solid #9178B7;
321
- top: 1px;
322
- left: 5px;
323
- }
324
- #the-list input[type="checkbox"]:not(:checked) + label:before {
325
- background: #9178B7;
326
- border: 2px solid #9178B7;
327
- }
328
- #the-list input[type="checkbox"]:not(:checked) + label:after {
329
- background: #9178B7;
330
- border-color: #FFF;
331
- left: 18px;
332
- }
333
-
334
- /* Scheduling */
335
- .cau_schedule_input {
336
- display: inline-block;
337
- vertical-align: middle;
338
- width: 50px;
339
- padding-top: 5px;
340
- }
341
- .cau_schedule_input input {
342
- max-width: 100%;
343
- text-align: center;
344
- }
345
- .cau_schedule_input_div {
346
- display: inline-block;
347
- vertical-align: middle;
348
- padding: 0 6px;
349
- font-weight: bold;
350
- }
351
- .cau_shedule_notation {
352
- display: inline-block;
353
- vertical-align: middle;
354
- width: 125px;
355
- padding-left: 5px;
356
- }
357
- .cau_shedule_notation .dashicons {
358
- position: relative;
359
- bottom: -5px;
360
- }
361
-
362
- /* Tooltip */
363
- .cau_tooltip {
364
- position: relative;
365
- }
366
- .cau_tooltip .cau_tooltip_text {
367
- visibility: hidden;
368
- background-color: rgba(0,0,0,0.7);
369
- color: #FFF;
370
- text-align: left;
371
- font-size: 14px;
372
- padding: 15px;
373
- border-radius: 6px;
374
- position: absolute;
375
- z-index: 1;
376
- width: 240px;
377
- bottom: 100%;
378
- left: 50%;
379
- margin-left: -60px;
380
- margin-bottom: 10px;
381
- opacity: 0;
382
- transition: .3s;
383
- font-weight: normal;
384
- }
385
- .cau_tooltip:hover .cau_tooltip_text {
386
- visibility: visible;
387
- opacity: 1;
388
- }
389
- .cau_tooltip .cau_tooltip_text::after {
390
- content: " ";
391
- position: absolute;
392
- top: 100%;
393
- left: 50%;
394
- margin-left: -75px;
395
- border-width: 5px;
396
- border-style: solid;
397
- border-color: rgba(0,0,0,0.7) transparent transparent transparent;
398
- }
399
-
400
- /* Responsive */
401
- @media screen and (max-width: 1400px) {
402
-
403
- .cau-column-wide {
404
- width: calc(100% - 350px);
405
- }
406
- .cau-column-small {
407
- width: 350px;
408
- }
409
- .welcome-to-cau .welcome-column.welcome-column-quarter {
410
- width: 50%;
411
- padding-bottom: 35px;
412
- }
413
- .cau-column-small .welcome-to-cau {
414
- background-image: none;
415
- }
416
-
417
- }
418
- @media screen and (max-width: 1150px) {
419
-
420
- .cau-column-wide, .cau-column-small {
421
- width: 100%;
422
- padding: 0;
423
- }
424
-
425
- }
426
- @media screen and (max-width: 1000px) {
427
-
428
- /* Basics */
429
- .cau_hide_on_mobile, table.autoupdate thead {
430
- display: none!important;
431
- }
432
- .form-table td fieldset p {
433
- display: block;
434
- padding: 5px 0;
435
- }
436
- .form-table td fieldset input[type="checkbox"] {
437
- display: inline-block;
438
- vertical-align: middle;
439
- width: 25px;
440
- }
441
- .form-table td fieldset label {
442
- display: inline-block;
443
- vertical-align: middle;
444
- width: calc(100% - 40px);
445
- box-sizing: border-box;
446
- padding-left: 5px;
447
- }
448
- .nav-tab-wrapper {
449
- position: relative;
450
- top: -20px;
451
- border-bottom: 1px solid #CCC!important;
452
- padding-bottom: 15px!important;
453
- margin-bottom: 0px!important;
454
- }
455
- .nav-tab {
456
- font-size: 12px;
457
- margin: 5px 5px 0 0!important;
458
- box-sizing: border-box;
459
- text-align: center;
460
- }
461
-
462
- /* Scheduling */
463
- .cau_schedule_input {
464
- width: 75px;
465
- }
466
-
467
- /* Custom buttons */
468
- .cau-button {
469
- display: block;
470
- text-align: center;
471
- margin: 5px 0;
472
- }
473
- .cau-button .dashicons {
474
- float: left;
475
- }
476
-
477
- /* Dashboard */
478
- .welcome-to-cau {
479
- background-position: right bottom;
480
- }
481
- .welcome-to-cau.love-bg {
482
- background-image: none;
483
- }
484
- .welcome-to-cau .welcome-column {
485
- min-width: 100%;
486
- }
487
- .welcome-to-cau .welcome-column.welcome-column-first {
488
- padding-left: 0px;
489
- }
490
- .cau-column-wide .cau-dashboard-box {
491
- padding-right: 30px;
492
- padding-bottom: 125px
493
- }
494
- .majorMinorExplain {
495
- display: none;
496
- }
497
-
498
- /* Status */
499
- table.cau_status_list .cau_status_name {
500
- display: inline-block;
501
- width: 50%;
502
- box-sizing: border-box;
503
- font-weight: 500;
504
- }
505
- table.cau_status_list .cau_status_interval {
506
- display: none;
507
- }
508
- table.cau_status_list th.cau_status_next {
509
- display: none;
510
- }
511
- table.cau_status_list td.cau_status_next {
512
- display: block;
513
- width: 100%;
514
- }
515
- table.cau_status_list .cau_status_active_state {
516
- display: inline-block;
517
- width: 50%;
518
- box-sizing: border-box;
519
- text-align: right;
520
- }
521
- .cau_mobile_prefix {
522
- display: inline-block;
523
- padding-right: 5px;
524
- }
525
- table.cau_status_list.cau_status_warnings td {
526
- display: block;
527
- width: 100%;
528
- box-sizing: border-box;
529
- }
530
- table.cau_status_list.cau_status_warnings th.cau_plugin_issue_explain, table.cau_status_list.cau_status_warnings th.cau_plugin_issue_fixit {
531
- display: none;
532
- }
533
- table.cau_status_list.cau_status_warnings td.cau_plugin_issue_name {
534
- font-weight: 500;
535
- }
536
-
537
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/backend/warningbar.css DELETED
@@ -1,11 +0,0 @@
1
- #wpadminbar #wp-admin-bar-cau-has-issues .ab-icon:before {
2
- /*content: "\f463";*/
3
- content: "\f332";
4
- top: 3px;
5
- }
6
- #wpadminbar #wp-admin-bar-cau-has-issues .cau-level-low {
7
- /*color: #FFBA00;*/
8
- }
9
- #wpadminbar #wp-admin-bar-cau-has-issues .cau-level-high {
10
- color: #FF0000;
11
- }
 
 
 
 
 
 
 
 
 
 
 
trunk/cau_emails.php DELETED
@@ -1,387 +0,0 @@
1
- <?php
2
-
3
- // Check if emails should be send or not
4
- function cau_check_updates_mail() {
5
-
6
- if( cau_get_db_value( 'send' ) == 'on' ) {
7
- cau_list_theme_updates(); // Check for theme updates
8
- cau_list_plugin_updates(); // Check for plugin updates
9
- }
10
-
11
- if( cau_get_db_value( 'sendupdate' ) == 'on' && cau_get_db_value( 'plugins' ) == 'on' ) cau_plugin_updated(); // Check for updated plugins
12
- }
13
-
14
- // Ge the emailadresses it should be send to
15
- function cau_set_email() {
16
-
17
- $emailArray = array();
18
-
19
- if( cau_get_db_value( 'email' ) == '' ) {
20
- array_push( $emailArray, get_option('admin_email') );
21
- } else {
22
- $emailAdresses = cau_get_db_value( 'email' );
23
- $list = explode( ", ", $emailAdresses );
24
- foreach ( $list as $key ) {
25
- array_push( $emailArray, $list );
26
- }
27
- }
28
-
29
- return $emailArray;
30
-
31
- }
32
- // Mail format
33
- function cau_is_html() {
34
-
35
- // Check if cau_get_db_value() function exists.
36
- if ( !function_exists( 'cau_get_db_value' ) ) require_once( plugin_dir_path( __FILE__ ) . 'cau_function.php' );
37
-
38
- // Check if html
39
- if( cau_get_db_value( 'html_or_text' ) == 'html' ) {
40
- $html = true;
41
- } else {
42
- $html = false;
43
- }
44
-
45
- }
46
-
47
- // Set the content for the emails about pending updates
48
- function cau_pending_message( $single, $plural, $list ) {
49
-
50
- // What markup to use
51
- if( cau_is_html() ) $break = '<br />';
52
- else $break = "\n";
53
-
54
- // Base text
55
- $text = sprintf( esc_html__( 'You have pending %1$s updates on your WordPress site at %2$s.', 'companion-auto-update' ), $single, get_site_url() );
56
- $text .= $break;
57
-
58
- if( !empty( $list ) ) {
59
-
60
- $text .= $break;
61
- $text .= sprintf( esc_html__( 'The following %1$s have new versions available.', 'companion-auto-update' ), $plural );
62
- $text .= $break;
63
-
64
- if( cau_is_html() ) $text .= "<ol>";
65
- foreach ( $list as $key => $value ) {
66
- if( cau_is_html() ) {
67
- $text .= "<li>$value</li>";
68
- } else {
69
- $text .= "-$value\n";
70
- }
71
- }
72
- if( cau_is_html() ) $text .= "</ol>";
73
-
74
- $text .= $break;
75
- }
76
-
77
- $text .= __( 'Leaving your site outdated is a security risk so please consider manually updating them.', 'companion-auto-update' );
78
- $text .= $break;
79
-
80
- // End
81
- $text .= sprintf( esc_html__( 'Head over to %1$s and check the ones you want to update.', 'companion-auto-update' ), get_admin_url().'update-core.php' );
82
-
83
- return $text;
84
-
85
- }
86
-
87
- // Set the content for the emails about recent updates
88
- function cau_updated_message( $type, $updatedList ) {
89
-
90
- // What markup to use
91
- if( cau_is_html() ) $break = '<br />';
92
- else $break = "\n";
93
-
94
- // The message
95
- $text = sprintf( esc_html__(
96
- 'One or more %1$s on your WordPress site at %2$s have been updated by Companion Auto Update. No further action is needed on your part.
97
- For more info on what is new visit your dashboard and check the changelog.', 'companion-auto-update'
98
- ), $type, get_site_url() );
99
-
100
- $text .= $break;
101
- $text .= $break;
102
- $text .= sprintf( esc_html__(
103
- 'The following %1$s have been updated:', 'companion-auto-update'
104
- ), $type );
105
-
106
- $text .= $break;
107
- $text .= $updatedList;
108
-
109
- $text .= $break;
110
- $text .= __( "(You'll also receive this email if you manually updated a plugin or theme)", "companion-auto-update" );
111
-
112
- return $text;
113
-
114
- }
115
-
116
- // Checks if theme updates are available
117
- function cau_list_theme_updates() {
118
-
119
- global $wpdb;
120
- $table_name = $wpdb->prefix . "auto_updates";
121
-
122
- $configs = $wpdb->get_results( "SELECT * FROM $table_name WHERE name = 'themes'");
123
- foreach ( $configs as $config ) {
124
-
125
- if( $config->onoroff != 'on' ) {
126
-
127
- require_once ABSPATH . '/wp-admin/includes/update.php';
128
- $themes = get_theme_updates();
129
- $list = array();
130
-
131
- if ( !empty( $themes ) ) {
132
-
133
- foreach ( $themes as $stylesheet => $theme ) {
134
- array_push( $list, $theme->get( 'Name' ) );
135
- }
136
-
137
- $subject = '[' . get_bloginfo( 'name' ) . '] ' . __( 'Theme update available.', 'companion-auto-update' );
138
- $type = __('theme', 'companion-auto-update');
139
- $type_plural = __('themes', 'companion-auto-update');
140
- $message = cau_pending_message( $type, $type_plural, $list );
141
-
142
- foreach ( cau_set_email() as $key => $value) {
143
- foreach ($value as $k => $v) {
144
- wp_mail( $v, $subject, $message );
145
- }
146
- break;
147
- }
148
- }
149
-
150
- }
151
-
152
- }
153
-
154
- }
155
-
156
- // Checks if plugin updates are available
157
- function cau_list_plugin_updates() {
158
-
159
- global $wpdb;
160
- $table_name = $wpdb->prefix . "auto_updates";
161
-
162
- $configs = $wpdb->get_results( "SELECT * FROM $table_name WHERE name = 'plugins'");
163
- foreach ( $configs as $config ) {
164
-
165
- if( $config->onoroff != 'on' ) {
166
-
167
- require_once(ABSPATH . 'wp-admin/includes/plugin-install.php');
168
- $plugins = get_plugin_updates();
169
-
170
- if ( !empty( $plugins ) ) {
171
-
172
- $list = array();
173
- foreach ( (array) $plugins as $plugin_file => $plugin_data ) {
174
- $plugin_data = (object) _get_plugin_data_markup_translate( $plugin_file, (array) $plugin_data, false, true );
175
- $name = $plugin_data->Name;
176
- array_push( $list, $name );
177
- }
178
-
179
- $subject = '[' . get_bloginfo( 'name' ) . '] ' . __( 'Plugin update available.', 'companion-auto-update' );
180
- $type = __('plugin', 'companion-auto-update');
181
- $type_plural = __('plugins', 'companion-auto-update');
182
- $message = cau_pending_message( $type, $type_plural, $list );
183
-
184
- foreach ( cau_set_email() as $key => $value) {
185
- foreach ($value as $k => $v) {
186
- wp_mail( $v, $subject, $message );
187
- }
188
- break;
189
- }
190
- }
191
-
192
- }
193
-
194
- }
195
- }
196
-
197
- // Alerts when plugin has been updated
198
- function cau_plugin_updated() {
199
-
200
- // Check if cau_get_db_value() function exists.
201
- if ( !function_exists( 'cau_get_db_value' ) ) require_once( plugin_dir_path( __FILE__ ) . 'cau_function.php' );
202
-
203
- // Create arrays
204
- $pluginNames = array();
205
- $pluginDates = array();
206
- $pluginVersion = array();
207
- $pluginSlug = array();
208
- $themeNames = array();
209
- $themeDates = array();
210
-
211
- // Where to look for plugins
212
- $plugdir = plugin_dir_path( __DIR__ );
213
- if ( !function_exists( 'get_plugins' ) ) require_once( ABSPATH . 'wp-admin/includes/plugin.php' ); // Check if get_plugins() function exists.
214
- $allPlugins = get_plugins();
215
-
216
- // Where to look for themes
217
- $themedir = get_theme_root();
218
- $allThemes = wp_get_themes();
219
-
220
- // Mail schedule
221
- $schedule_mail = wp_get_schedule( 'cau_set_schedule_mail' );
222
-
223
- // Loop trough all plugins
224
- foreach ( $allPlugins as $key => $value ) {
225
-
226
- // Get plugin data
227
- $fullPath = $plugdir.'/'.$key;
228
- $getFile = $path_parts = pathinfo( $fullPath );
229
- $pluginData = get_plugin_data( $fullPath );
230
-
231
- // Get the slug
232
- $explosion = explode( '/', $key );
233
- $actualSlug = array_shift( $explosion );
234
-
235
- // Get last update date
236
- $fileDate = date ( 'YmdHi', filemtime( $fullPath ) );
237
-
238
- switch ( $schedule_mail ) {
239
- case 'hourly':
240
- $lastday = date( 'YmdHi', strtotime( '-1 hour' ) );
241
- break;
242
- case 'twicedaily':
243
- $lastday = date( 'YmdHi', strtotime( '-12 hours' ) );
244
- break;
245
- default:
246
- $lastday = date( 'YmdHi', strtotime( '-1 day' ) );
247
- break;
248
- }
249
-
250
- if( $fileDate >= $lastday ) {
251
-
252
- // Get plugin name
253
- foreach ( $pluginData as $dataKey => $dataValue ) {
254
- if( $dataKey == 'Name') {
255
- array_push( $pluginNames , $dataValue );
256
- }
257
- if( $dataKey == 'Version') {
258
- array_push( $pluginVersion , $dataValue );
259
- }
260
- }
261
-
262
- array_push( $pluginDates, $fileDate );
263
- array_push( $pluginSlug, $actualSlug );
264
- }
265
-
266
- }
267
-
268
- // Loop trough all themes
269
- foreach ( $allThemes as $key => $value ) {
270
-
271
- // Get theme data
272
- $fullPath = $themedir.'/'.$key;
273
- $getFile = $path_parts = pathinfo( $fullPath );
274
-
275
- // Get last update date
276
- $dateFormat = get_option( 'date_format' );
277
- $fileDate = date ( 'YmdHi', filemtime( $fullPath ) );
278
-
279
- if( $schedule_mail == 'hourly' ) {
280
- $lastday = date( 'YmdHi', strtotime( '-1 hour' ) );
281
- } elseif( $schedule_mail == 'twicedaily' ) {
282
- $lastday = date( 'YmdHi', strtotime( '-12 hours' ) );
283
- } elseif( $schedule_mail == 'daily' ) {
284
- $lastday = date( 'YmdHi', strtotime( '-1 day' ) );
285
- }
286
-
287
- if( $fileDate >= $lastday ) {
288
-
289
- // Get theme name
290
- array_push( $themeNames, $path_parts['filename'] );
291
- array_push( $themeDates, $fileDate );
292
-
293
- }
294
-
295
-
296
- }
297
-
298
- $totalNumP = 0;
299
- $totalNumT = 0;
300
- $updatedListP = '';
301
- $updatedListT = '';
302
-
303
- if( cau_get_db_value( 'html_or_text' ) == 'html' ) {
304
- $updatedListP .= '<ol>';
305
- $updatedListT .= '<ol>';
306
- }
307
-
308
- foreach ( $pluginDates as $key => $value ) {
309
- if( cau_get_db_value( 'html_or_text' ) == 'html' ) {
310
- $updatedListP .= "<li><strong>".$pluginNames[$key]." </strong><br />
311
- to version ".$pluginVersion[$key]." <a href='https://wordpress.org/plugins/".$pluginSlug[$key]."/#developers'>".__( "Release notes", "companion-auto-update" )."</a></li>";
312
- } else {
313
- $updatedListP .= "- ".$pluginNames[$key]." to version ".$pluginVersion[$key]."\n";
314
- $updatedListP .= " Release notes: https://wordpress.org/plugins/".$pluginSlug[$key]."/#developers\n";
315
- }
316
- $totalNumP++;
317
- }
318
-
319
- foreach ( $themeNames as $key => $value ) {
320
- if( cau_get_db_value( 'html_or_text' ) == 'html' ) {
321
- $updatedListT .= "<li>".$themeNames[$key]."</li>";
322
- } else {
323
- $updatedListT .= "- ".$themeNames[$key]."\n";
324
- }
325
- $totalNumT++;
326
- }
327
-
328
- if( cau_get_db_value( 'html_or_text' ) == 'html' ) {
329
- $updatedListP .= '</ol>';
330
- $updatedListT .= '</ol>';
331
- }
332
-
333
- // Set the email content type
334
- if( cau_get_db_value( 'html_or_text' ) == 'html' ) {
335
- function cau_mail_content_type() {
336
- return 'text/html';
337
- }
338
- add_filter( 'wp_mail_content_type', 'cau_mail_content_type' );
339
- }
340
-
341
- // If plugins have been updated, send email
342
- if( $totalNumP > 0 ) {
343
-
344
- // E-mail content
345
- $subject = '[' . get_bloginfo( 'name' ) . '] ' . __('One or more plugins have been updated.', 'companion-auto-update');
346
- $type = __('plugins', 'companion-auto-update');
347
- $message = cau_updated_message( $type, $updatedListP );
348
-
349
- // Send to all addresses
350
- foreach ( cau_set_email() as $key => $value) {
351
- foreach ($value as $k => $v) {
352
- wp_mail( $v, $subject, $message );
353
- }
354
- break;
355
- }
356
-
357
- }
358
-
359
- // If themes have been updated, send email
360
- if( $totalNumT > 0 ) {
361
-
362
- // E-mail content
363
- $subject = '[' . get_bloginfo( 'name' ) . '] ' . __('One or more themes have been updated.', 'companion-auto-update');
364
- $type = __('themes', 'companion-auto-update');
365
- $message = cau_updated_message( $type, $updatedListT );
366
-
367
- // Send to all addresses
368
- foreach ( cau_set_email() as $key => $value) {
369
- foreach ($value as $k => $v) {
370
- wp_mail( $v, $subject, $message );
371
- }
372
- break;
373
- }
374
-
375
- }
376
-
377
- if( cau_get_db_value( 'html_or_text' ) == 'html' ) remove_filter( 'wp_mail_content_type', 'cau_mail_content_type' );
378
-
379
- // Prevent duplicate emails by setting the event again
380
- if( $totalNumT > 0 OR $totalNumP > 0 ) {
381
- if( $schedule_mail == 'hourly' ) {
382
- wp_clear_scheduled_hook('cau_set_schedule_mail');
383
- wp_schedule_event( strtotime( '+1 hour', time() ) , 'hourly', 'cau_set_schedule_mail' );
384
- }
385
- }
386
-
387
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/cau_functions.php DELETED
@@ -1,1001 +0,0 @@
1
- <?php
2
-
3
- // Get database value
4
- function cau_get_db_value( $name, $table = 'auto_updates' ) {
5
-
6
- global $wpdb;
7
- $table_name = $wpdb->prefix.$table;
8
- $cau_configs = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$table_name} WHERE name = '%s'", $name ) );
9
- foreach ( $cau_configs as $config ) return $config->onoroff;
10
-
11
- }
12
-
13
- // Get database value
14
- function cau_get_plugininfo( $check, $field ) {
15
-
16
- global $wpdb;
17
- $table_name = $wpdb->prefix.'update_log';
18
- $cau_configs = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$table_name} WHERE slug = '%s'", $check ) );
19
- foreach ( $cau_configs as $config ) return $config->$field;
20
-
21
- }
22
-
23
- // Get the set timezone
24
- function cau_get_proper_timezone() {
25
-
26
- // WP 5.3 adds the wp_timezone_string function
27
- if ( !function_exists( 'wp_timezone_string' ) ) {
28
- $timezone = get_option( 'timezone_string' );
29
- } else {
30
- $timezone = wp_timezone_string();
31
- }
32
-
33
- // Should fix an reported issue
34
- if( $timezone == '+00:00' ) {
35
- $timezone = 'UTC';
36
- }
37
-
38
- return $timezone;
39
-
40
- }
41
-
42
- // Copy of the wp_timezone_string for < 5.3 compat
43
- if ( !function_exists( 'wp_timezone_string' ) ) {
44
- function wp_timezone_string() {
45
- $timezone_string = get_option( 'timezone_string' );
46
-
47
- if ( $timezone_string ) {
48
- return $timezone_string;
49
- }
50
-
51
- $offset = (float) get_option( 'gmt_offset' );
52
- $hours = (int) $offset;
53
- $minutes = ( $offset - $hours );
54
-
55
- $sign = ( $offset < 0 ) ? '-' : '+';
56
- $abs_hour = abs( $hours );
57
- $abs_mins = abs( $minutes * 60 );
58
- $tz_offset = sprintf( '%s%02d:%02d', $sign, $abs_hour, $abs_mins );
59
-
60
- return $tz_offset;
61
- }
62
- }
63
-
64
- // List of incompatible plugins
65
- function cau_incompatiblePluginlist() {
66
-
67
- // Pluginlist, write as Plugin path => Issue
68
- $pluginList = array(
69
- 'better-wp-security/better-wp-security.php' => 'May block auto-updating for everything.',
70
- 'updraftplus/updraftplus.php' => 'Does not update automatically, needs to be done manually. Causes no issues with other plugins.'
71
- );
72
-
73
- return $pluginList;
74
-
75
- }
76
- function cau_incompatiblePlugins() {
77
-
78
- $return = false;
79
-
80
- foreach ( cau_incompatiblePluginlist() as $key => $value ) {
81
- if( is_plugin_active( $key ) ) {
82
- $return = true;
83
- }
84
- }
85
-
86
- return $return;
87
-
88
- }
89
-
90
- // Check if has issues
91
- function cau_pluginHasIssues() {
92
-
93
- $return = false;
94
-
95
- if( get_option( 'blog_public' ) == 0 ) {
96
- $return = true;
97
- }
98
-
99
- if( checkAutomaticUpdaterDisabled() ) {
100
- $return = true;
101
- }
102
-
103
- if( checkCronjobsDisabled() ) {
104
- $return = true;
105
- }
106
-
107
- if( cau_incorrectDatabaseVersion() ) {
108
- $return = true;
109
- }
110
-
111
- return $return;
112
- }
113
- function cau_pluginIssueLevels() {
114
-
115
- if( checkAutomaticUpdaterDisabled() ) {
116
- $level = 'high';
117
- } else {
118
- $level = 'low';
119
- }
120
-
121
- return $level;
122
- }
123
- function cau_pluginIssueCount() {
124
-
125
- $count = 0;
126
-
127
- if( get_option( 'blog_public' ) == 0 ) {
128
- $count++;
129
- }
130
- if( checkAutomaticUpdaterDisabled() ) {
131
- $count++;
132
- }
133
- if( checkCronjobsDisabled() ) {
134
- $count++;
135
- }
136
- if( cau_incompatiblePlugins() ) {
137
- foreach ( cau_incompatiblePluginlist() as $key => $value ) {
138
- if( is_plugin_active( $key ) ) {
139
- $count++;
140
- }
141
- }
142
- }
143
-
144
- return $count;
145
- }
146
- function cau_incorrectDatabaseVersion() {
147
- if( get_option( "cau_db_version" ) != cau_db_version() ) {
148
- return true;
149
- } else {
150
- return false;
151
- }
152
- }
153
-
154
- // Run custom hooks on plugin update
155
- function cau_run_custom_hooks_p() {
156
-
157
- // Create array
158
- $allDates = array();
159
-
160
- // Where to look for plugins
161
- $dirr = plugin_dir_path( __DIR__ );
162
- $listOfAll = get_plugins();
163
-
164
- // Loop trough all plugins
165
- foreach ( $listOfAll as $key => $value ) {
166
-
167
- // Get data
168
- $fullPath = $dirr.'/'.$key;
169
- $fileDate = date ( 'YmdHi', filemtime( $fullPath ) );
170
- $fileTime = date ( 'Hi', filemtime( $fullPath ) );
171
- $updateSched = wp_get_schedule( 'wp_update_plugins' );
172
-
173
- // Check when the last update was
174
- if( $updateSched == 'hourly' ) {
175
- $lastday = date( 'YmdHi', strtotime( '-1 hour' ) );
176
- } elseif( $updateSched == 'twicedaily' ) {
177
- $lastday = date( 'YmdHi', strtotime( '-12 hours' ) );
178
- } elseif( $updateSched == 'daily' ) {
179
- $lastday = date( 'YmdHi', strtotime( '-1 day' ) );
180
- }
181
-
182
- $update_time = wp_next_scheduled( 'wp_update_plugins' );
183
- $range_start = date( 'Hi', strtotime( '-30 minutes', $update_time ) );
184
- $range_end = date( 'Hi', strtotime( '+30 minutes', $update_time ) );
185
-
186
- if( $fileDate >= $lastday ) {
187
-
188
- // Push to array
189
- array_push( $allDates, $fileDate );
190
-
191
- // Update info
192
- if( $fileTime > $range_start && $fileTime < $range_end ) {
193
- $status = __( 'Automatic', 'companion-auto-update' );
194
- } else {
195
- $status = __( 'Manual', 'companion-auto-update' );
196
- }
197
- cau_updatePluginInformation( $key, $status );
198
-
199
- }
200
-
201
- }
202
-
203
- $totalNum = 0;
204
-
205
- // Count number of updated plugins
206
- foreach ( $allDates as $key => $value ) $totalNum++;
207
-
208
- // If there have been plugin updates run hook
209
- if( $totalNum > 0 ) {
210
- do_action( 'cau_after_plugin_update' );
211
- }
212
-
213
- }
214
-
215
- // Run custom hooks on theme update
216
- function cau_run_custom_hooks_t() {
217
-
218
- // Create array
219
- $allDates = array();
220
-
221
- // Where to look for plugins
222
- $dirr = get_theme_root();
223
- $listOfAll = wp_get_themes();
224
-
225
- // Loop trough all plugins
226
- foreach ( $listOfAll as $key => $value) {
227
-
228
- // Get data
229
- $fullPath = $dirr.'/'.$key;
230
- $fileDate = date ( 'YmdHi', filemtime( $fullPath ) );
231
- $updateSched = wp_get_schedule( 'wp_update_themes' );
232
-
233
- // Check when the last update was
234
- if( $updateSched == 'hourly' ) {
235
- $lastday = date( 'YmdHi', strtotime( '-1 hour' ) );
236
- } elseif( $updateSched == 'twicedaily' ) {
237
- $lastday = date( 'YmdHi', strtotime( '-12 hours' ) );
238
- } elseif( $updateSched == 'daily' ) {
239
- $lastday = date( 'YmdHi', strtotime( '-1 day' ) );
240
- }
241
-
242
- // Push to array
243
- if( $fileDate >= $lastday ) {
244
- array_push( $allDates, $fileDate );
245
- }
246
-
247
- }
248
-
249
- $totalNum = 0;
250
-
251
- // Count number of updated plugins
252
- foreach ( $allDates as $key => $value ) $totalNum++;
253
-
254
- // If there have been plugin updates run hook
255
- if( $totalNum > 0 ) {
256
- do_action( 'cau_after_theme_update' );
257
- }
258
-
259
- }
260
-
261
- // Check if automatic updating is disabled globally
262
- function checkAutomaticUpdaterDisabled() {
263
-
264
- // 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 :)
265
-
266
- if ( defined( 'automatic_updater_disabled' ) ) {
267
- if( doing_filter( 'automatic_updater_disabled' ) ) {
268
- return true;
269
- } elseif( constant( 'automatic_updater_disabled' ) == 'true' ) {
270
- return true;
271
- } elseif( constant( 'automatic_updater_disabled' ) == 'minor' ) {
272
- return true;
273
- } else {
274
- return false;
275
- }
276
-
277
- } else if ( defined( 'AUTOMATIC_UPDATER_DISABLED' ) ) {
278
- if( doing_filter( 'AUTOMATIC_UPDATER_DISABLED' ) ) {
279
- return true;
280
- } elseif( constant( 'AUTOMATIC_UPDATER_DISABLED' ) == 'true' ) {
281
- return true;
282
- } elseif( constant( 'AUTOMATIC_UPDATER_DISABLED' ) == 'minor' ) {
283
- return true;
284
- } else {
285
- return false;
286
- }
287
-
288
- } else {
289
- return false;
290
- }
291
-
292
- }
293
-
294
- // Check if cronjobs are disabled
295
- function checkCronjobsDisabled() {
296
-
297
- // 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 :)
298
-
299
- if ( defined( 'disable_wp_cron' ) ) {
300
- if( constant( 'disable_wp_cron' ) == 'true' ) {
301
- return true;
302
- } else {
303
- return false;
304
- }
305
-
306
- } else if ( defined( 'DISABLE_WP_CRON' ) ) {
307
- if( constant( 'DISABLE_WP_CRON' ) == 'true' ) {
308
- return true;
309
- } else {
310
- return false;
311
- }
312
-
313
- } else {
314
- return false;
315
- }
316
-
317
- }
318
-
319
- // Menu location
320
- function cau_menloc( $after = '' ) {
321
- return 'tools.php'.$after;
322
- }
323
- function cau_url( $tab = '' ) {
324
- return admin_url( cau_menloc( '?page=cau-settings&tab='.$tab ) );
325
- }
326
-
327
- // Get the active tab
328
- function active_tab( $page, $identifier = 'tab' ) {
329
- echo _active_tab( $page, $identifier );
330
- }
331
- function _active_tab( $page, $identifier = 'tab' ) {
332
-
333
- if( !isset( $_GET[ $identifier ] ) ) {
334
- $cur_page = '';
335
- } else {
336
- $cur_page = $_GET[ $identifier ];
337
- }
338
-
339
- if( $page == $cur_page ) {
340
- return 'nav-tab-active';
341
- }
342
-
343
- }
344
-
345
- // Get the active subtab
346
- function active_subtab( $page, $identifier = 'tab' ) {
347
-
348
- if( !isset( $_GET[ $identifier ] ) ) {
349
- $cur_page = '';
350
- } else {
351
- $cur_page = $_GET[ $identifier ];
352
- }
353
-
354
- if( $page == $cur_page ) {
355
- echo 'current';
356
- }
357
-
358
- }
359
-
360
- // List of plugins that should not be updated
361
- function donotupdatelist( $filter = 'plugins' ) {
362
-
363
- // Select correct database row
364
- switch ( $filter ) {
365
- case 'themes':
366
- $db_table = 'notUpdateListTh';
367
- break;
368
- case 'plugins':
369
- $db_table = 'notUpdateList';
370
- break;
371
- default:
372
- $db_table = 'notUpdateList';
373
- break;
374
- }
375
-
376
- // Create list
377
- global $wpdb;
378
- $table_name = $wpdb->prefix."auto_updates";
379
- $config = $wpdb->get_results( "SELECT * FROM {$table_name} WHERE name = '{$db_table}'");
380
-
381
- $list = $config[0]->onoroff;
382
- $list = explode( ", ", $list );
383
- $returnList = array();
384
-
385
- foreach ( $list as $key ) array_push( $returnList, $key );
386
-
387
- return $returnList;
388
-
389
- }
390
- function plugins_donotupdatelist() {
391
- return donotupdatelist( 'plugins' );
392
- }
393
- function themes_donotupdatelist() {
394
- return donotupdatelist( 'themes' );
395
- }
396
-
397
- // Show the update log
398
- function cau_fetch_log( $limit, $format = 'simple' ) {
399
-
400
- // Database
401
- global $wpdb;
402
- $updateLog = "update_log";
403
- $updateLogDB = $wpdb->prefix.$updateLog;
404
-
405
- // Filter log
406
- if( isset( $_GET['filter'] ) ) {
407
- $filter = $_GET['filter'];
408
- } else {
409
- $filter = 'all';
410
- }
411
-
412
- switch( $filter ) {
413
-
414
- case 'plugins':
415
- $plugins = true;
416
- $themes = false;
417
- $core = false;
418
- $translations = false;
419
- break;
420
-
421
- case 'themes':
422
- $plugins = false;
423
- $themes = true;
424
- $core = false;
425
- $translations = false;
426
- break;
427
-
428
- case 'translations':
429
- $plugins = false;
430
- $themes = false;
431
- $core = false;
432
- $translations = true;
433
- break;
434
-
435
- default:
436
- $plugins = true;
437
- $themes = true;
438
- $core = true;
439
- $translations = false;
440
- break;
441
- }
442
-
443
- // Create arrays
444
- $pluginNames = array();
445
- $pluginVersion = array();
446
- $pluginDates = array();
447
- $pluginDatesF = array();
448
- $plugslug = array();
449
- $type = array();
450
- $method = array();
451
-
452
- // Date format
453
- $dateFormat = get_option( 'date_format' );
454
-
455
- // PLUGINS
456
- if( $plugins ) {
457
-
458
- // Where to look for plugins
459
- $plugdir = plugin_dir_path( __DIR__ );
460
- $allPlugins = get_plugins();
461
-
462
- // Loop trough all plugins
463
- foreach ( $allPlugins as $key => $value) {
464
-
465
- // Get plugin data
466
- $fullPath = $plugdir.'/'.$key;
467
- $getFile = $path_parts = pathinfo( $fullPath );
468
- $pluginData = get_plugin_data( $fullPath );
469
- $pluginSlug = explode( "/", plugin_basename( $key ) );
470
- $pluginSlug = $pluginSlug[0];
471
-
472
- array_push( $plugslug , $pluginSlug );
473
-
474
- // Automatic or Manual (non-db-version)
475
- $date_tod = date ( 'ydm' );
476
- $fileDay = date ( 'ydm', filemtime( $fullPath ) );
477
- $fileTime = date ( 'Hi', filemtime( $fullPath ) );
478
- $updateSched = wp_next_scheduled( 'wp_update_plugins' );
479
- $range_start = date( 'Hi', strtotime( '-30 minutes', $updateSched ) );
480
- $range_end = date( 'Hi', strtotime( '+30 minutes', $updateSched ) );
481
-
482
- if( $date_tod == $fileDay ) {
483
-
484
- if( $fileTime > $range_start && $fileTime < $range_end ) {
485
- $status = __( 'Automatic', 'companion-auto-update' );
486
- } else {
487
- $status = __( 'Manual', 'companion-auto-update' );
488
- }
489
-
490
- array_push( $method , $status );
491
-
492
- } else {
493
-
494
- // Get info from database
495
- if( cau_check_if_exists( $key, 'slug', $updateLog ) ) {
496
- array_push( $method , cau_get_plugininfo( $key, 'method' ) );
497
- } else {
498
- array_push( $method , '-' );
499
- }
500
-
501
- }
502
-
503
- // Get plugin name
504
- foreach ( $pluginData as $dataKey => $dataValue ) {
505
- if( $dataKey == 'Name') {
506
- array_push( $pluginNames , $dataValue );
507
- }
508
- if( $dataKey == 'Version') {
509
- array_push( $pluginVersion , $dataValue );
510
- }
511
- }
512
-
513
- // Get last update date
514
- $fileDate = date ( 'YmdHi', filemtime( $fullPath ) );
515
- if( $format == 'table' ) {
516
- $fileDateF = date_i18n( $dateFormat, filemtime( $fullPath ) );
517
- $fileDateF .= ' &dash; '.date( 'H:i', filemtime( $fullPath ) );
518
- } else {
519
- $fileDateF = date_i18n( $dateFormat, filemtime( $fullPath ) );
520
- }
521
- array_push( $pluginDates, $fileDate );
522
- array_push( $pluginDatesF, $fileDateF );
523
- array_push( $type, 'Plugin' );
524
-
525
- }
526
-
527
- }
528
-
529
- // THEMES
530
- if( $themes ) {
531
-
532
- // Where to look for themes
533
- $themedir = get_theme_root();
534
- $allThemes = wp_get_themes();
535
-
536
- // Loop trough all themes
537
- foreach ( $allThemes as $key => $value) {
538
-
539
- // Get theme data
540
- $fullPath = $themedir.'/'.$key;
541
- $getFile = $path_parts = pathinfo( $fullPath );
542
-
543
- // Get theme name
544
- $theme_data = wp_get_theme( $path_parts['filename'] );
545
- $themeName = $theme_data->get( 'Name' );
546
- $themeVersion = $theme_data->get( 'Version' );
547
- array_push( $pluginNames , $themeName );
548
- array_push( $pluginVersion , $themeVersion );
549
-
550
- // Get info from database
551
- array_push( $method , '-' );
552
-
553
- // Get last update date
554
- $fileDate = date( 'YmdHi', filemtime( $fullPath ) );
555
-
556
- if( $format == 'table' ) {
557
- $fileDateF = date_i18n( $dateFormat, filemtime( $fullPath ) );
558
- $fileDateF .= ' &dash; '.date ( 'H:i', filemtime( $fullPath ) );
559
- } else {
560
- $fileDateF = date_i18n( $dateFormat, filemtime( $fullPath ) );
561
- }
562
-
563
- array_push( $pluginDates, $fileDate );
564
- array_push( $pluginDatesF, $fileDateF );
565
- array_push( $type, 'Theme' );
566
- array_push( $plugslug , '' );
567
-
568
- }
569
-
570
- }
571
-
572
- // TRANSLATIONS
573
- if( $translations ) {
574
-
575
- // There is no way (at this time) to check if someone changed this link, so therefore it won't work when it's changed, sorry
576
- $transFolder = get_home_path().'wp-content/languages';
577
- if( file_exists( $transFolder ) ) {
578
-
579
- $allThemTranslations = array();
580
- $allThemTypes = array();
581
-
582
- $pt = __( 'Plugin translations', 'companion-auto-update' );
583
- $tt = __( 'Theme translations', 'companion-auto-update' );
584
- $ct = __( 'Core translations', 'companion-auto-update' );
585
-
586
- // Plugin translations
587
- $files = glob( $transFolder.'/plugins/*.{mo}', GLOB_BRACE );
588
- foreach( $files as $file ) {
589
- array_push( $allThemTranslations, $file );
590
- array_push( $allThemTypes, $pt );
591
- }
592
-
593
- // Theme translations
594
- $files = glob( $transFolder.'/themes/*.{mo}', GLOB_BRACE );
595
- foreach( $files as $file ) {
596
- array_push( $allThemTranslations, $file );
597
- array_push( $allThemTypes, $tt );
598
- }
599
-
600
- // Core translations
601
- $files = glob( $transFolder.'/*.{mo}', GLOB_BRACE );
602
- foreach( $files as $file ) {
603
- array_push( $allThemTranslations, $file );
604
- array_push( $allThemTypes, $ct );
605
- }
606
-
607
- foreach( $allThemTranslations as $key => $trans_file ) {
608
-
609
- $transDate = date( 'YmdHi', filemtime( $trans_file ) );
610
-
611
- if( $format == 'table' ) {
612
- $transDateF = date_i18n( $dateFormat, filemtime( $trans_file ) );
613
- $transDateF .= ' &dash; '.date ( 'H:i', filemtime( $trans_file ) );
614
- } else {
615
- $transDateF = date_i18n( $dateFormat, filemtime( $trans_file ) );
616
- }
617
-
618
- $trans_name = basename( $trans_file );
619
- $trans_name = str_replace( "-", " ", $trans_name );
620
- $trans_name = str_replace( ".mo", "", $trans_name );
621
- $trans_name = str_replace( ".json", "", $trans_name );
622
- $trans_lang = substr( $trans_name, strrpos( $trans_name, " " ) + 1 );
623
- $trans_name = str_replace( $trans_lang, "", $trans_name );
624
- $trans_lang = substr( $trans_lang, strrpos( $trans_lang, "_" ) + 1 );
625
-
626
- // Push
627
- array_push( $pluginNames, ucfirst( $trans_name ).': '.$trans_lang );
628
- array_push( $type, $allThemTypes[$key] );
629
- array_push( $pluginVersion, '-' );
630
- array_push( $pluginDates, $transDate );
631
- array_push( $pluginDatesF, $transDateF );
632
- array_push( $plugslug , '' );
633
- array_push( $method , '-' );
634
-
635
- }
636
-
637
- } else {
638
- $transDate = date('YmdHi');
639
- $transDateF = 'Could not read translations date.';
640
-
641
- array_push( $pluginNames, 'Translations' );
642
- array_push( $type, $trans_type.' translations' );
643
- array_push( $pluginVersion, '-' );
644
- array_push( $pluginDates, $transDate );
645
- array_push( $pluginDatesF, $transDateF );
646
- array_push( $plugslug , '' );
647
-
648
- // Get info from database
649
- array_push( $method , '-' );
650
-
651
- }
652
-
653
- }
654
-
655
- // CORE
656
- if( $core ) {
657
-
658
- // There is no way (at this time) to check if someone changed this link, so therefore it won't work when it's changed, sorry
659
- $coreFile = get_home_path().'wp-admin/about.php';
660
- if( file_exists( $coreFile ) ) {
661
- $coreDate = date( 'YmdHi', filemtime( $coreFile ) );
662
-
663
- if( $format == 'table' ) {
664
- $coreDateF = date_i18n( $dateFormat, filemtime( $coreFile ) );
665
- $coreDateF .= ' &dash; '.date ( 'H:i', filemtime( $coreFile ) );
666
- } else {
667
- $coreDateF = date_i18n( $dateFormat, filemtime( $coreFile ) );
668
- }
669
-
670
- } else {
671
- $coreDate = date('YmdHi');
672
- $coreDateF = 'Could not read core date.';
673
- }
674
-
675
- array_push( $pluginNames, 'WordPress' );
676
- array_push( $type, 'WordPress' );
677
- array_push( $pluginVersion, get_bloginfo( 'version' ) );
678
- array_push( $pluginDates, $coreDate );
679
- array_push( $pluginDatesF, $coreDateF );
680
- array_push( $plugslug , '' );
681
-
682
- // Get info from database
683
- array_push( $method , '-' );
684
-
685
- }
686
-
687
- // Sort array by date
688
- arsort( $pluginDates );
689
-
690
- if( $limit == 'all' ) {
691
- $limit = 999;
692
- }
693
-
694
- $listClasses = 'wp-list-table widefat autoupdate autoupdatelog';
695
-
696
- if( $format == 'table' ) {
697
- $listClasses .= ' autoupdatelog striped';
698
- } else {
699
- $listClasses .= ' autoupdatewidget';
700
- }
701
-
702
- echo '<table class="'.$listClasses.'">';
703
-
704
- // Show the last updated plugins
705
- if( $format == 'table' ) {
706
-
707
- echo '<thead>
708
- <tr>
709
- <th><strong>'.__( 'Name', 'companion-auto-update' ).'</strong></th>';
710
- if( !$translations ) echo '<th><strong>'.__( 'To version', 'companion-auto-update' ).'</strong></th>';
711
- echo '<th><strong>'.__( 'Type', 'companion-auto-update' ).'</strong></th>
712
- <th><strong>'.__( 'Last updated on', 'companion-auto-update' ).'</strong></th>
713
- <th><strong>'.__( 'Update method', 'companion-auto-update' ).'</strong></th>
714
- </tr>
715
- </thead>';
716
-
717
- }
718
-
719
- echo '<tbody id="the-list">';
720
-
721
- $loopings = 0;
722
-
723
- foreach ( $pluginDates as $key => $value ) {
724
-
725
- if( $loopings < $limit ) {
726
-
727
- echo '<tr>';
728
-
729
- if( $format == 'table' ) {
730
- $pluginName = $pluginNames[$key];
731
- } else {
732
- $pluginName = substr( $pluginNames[$key], 0, 25);
733
- if( strlen( $pluginNames[$key] ) > 25 ) {
734
- $pluginName .= '...';
735
- }
736
- }
737
-
738
- echo '<td class="column-updatetitle"><p><strong title="'. $pluginNames[$key] .'">'.cau_getChangelogUrl( $type[$key], $pluginNames[$key], $plugslug[$key] ).'</strong></p></td>';
739
-
740
- if( $format == 'table' ) {
741
-
742
- if( $type[$key] == 'Plugin' ) {
743
- $thisType = __( 'Plugin', 'companion-auto-update' );
744
- } else if( $type[$key] == 'Theme' ) {
745
- $thisType = __( 'Theme', 'companion-auto-update' );
746
- } else {
747
- $thisType = $type[$key];
748
- }
749
-
750
- if( !$translations ) echo '<td class="cau_hide_on_mobile column-version" style="min-width: 100px;"><p>'. $pluginVersion[$key] .'</p></td>';
751
- echo '<td class="cau_hide_on_mobile column-description"><p>'. $thisType .'</p></td>';
752
-
753
- }
754
-
755
- echo '<td class="column-date" style="min-width: 100px;"><p>'. $pluginDatesF[$key] .'</p></td>';
756
-
757
- if( $format == 'table' ) {
758
- echo '<td class="column-method"><p>'. $method[$key] .'</p></td>';
759
- }
760
-
761
- echo '</tr>';
762
-
763
- $loopings++;
764
-
765
- }
766
-
767
- }
768
-
769
- echo "</tbody></table>";
770
-
771
- }
772
-
773
- // Get the proper changelog URL
774
- function cau_getChangelogUrl( $type, $name, $plugslug ) {
775
-
776
- switch( $type ) {
777
- case 'WordPress':
778
- $url = '';
779
- break;
780
- case 'Plugin':
781
- $url = admin_url( 'plugin-install.php?tab=plugin-information&plugin='.$plugslug.'&section=changelog&TB_iframe=true&width=772&height=772' );
782
- break;
783
- case 'Theme':
784
- $url = '';
785
- break;
786
- }
787
-
788
- if( !empty( $url ) ) {
789
- return '<a href="'.$url.'" class="thickbox open-plugin-details-modal" aria-label="More information about '.$name.'" data-title="'.$name.'">'.$name.'</a>';
790
- } else {
791
- return $name;
792
- }
793
-
794
- }
795
-
796
- // Only update plugins which are enabled
797
- function cau_dontUpdatePlugins( $update, $item ) {
798
-
799
- $plugins = plugins_donotupdatelist();
800
-
801
- if ( in_array( $item->slug, $plugins ) ) {
802
- return false; // Don't update these plugins
803
- } else {
804
- return true; // Always update these plugins
805
- }
806
-
807
-
808
- }
809
- function cau_dontUpdateThemes( $update, $item ) {
810
-
811
- $themes = themes_donotupdatelist();
812
-
813
- if( !empty( $themes ) ) {
814
- if ( in_array( $item->slug, $themes ) ) {
815
- return false; // Don't update these themes
816
- } else {
817
- return true; // Always update these themes
818
- }
819
- } else {
820
- return true;
821
- }
822
-
823
-
824
- }
825
-
826
- // Get plugin information of repository
827
- function cau_plugin_info( $slug, $what ) {
828
-
829
- $slug = sanitize_title( $slug );
830
- $cau_transient_name = 'cau' . $slug;
831
- $cau_info = get_transient( $cau_transient_name );
832
-
833
- require_once( ABSPATH.'wp-admin/includes/plugin-install.php' );
834
- $cau_info = plugins_api( 'plugin_information', array( 'slug' => $slug ) );
835
-
836
- if ( ! $cau_info or is_wp_error( $cau_info ) ) {
837
- return false;
838
- }
839
-
840
- set_transient( $cau_transient_name, $cau_info, 3600 );
841
-
842
- switch ( $what ) {
843
- case 'versions':
844
- return $cau_info->versions;
845
- break;
846
- case 'version':
847
- return $cau_info->version;
848
- break;
849
- case 'name':
850
- return $cau_info->name;
851
- break;
852
- case 'slug':
853
- return $cau_info->slug;
854
- break;
855
- }
856
-
857
- }
858
-
859
- // Get plugin information of currently installed plugins
860
- function cau_active_plugin_info( $slug, $what ) {
861
-
862
- $allPlugins = get_plugins();
863
-
864
- foreach ($allPlugins as $key => $value) {
865
- $thisSlug = explode('/', $key);
866
- $thisSlugE = $thisSlug[0];
867
- if( $thisSlug == $slug ) {
868
-
869
- if( $what == 'version' ) return $value['Version'];
870
-
871
- }
872
- }
873
-
874
- }
875
-
876
- // Remove update nag when major updates are disabled
877
- function cau_hideUpdateNag() {
878
-
879
- global $wpdb;
880
- $table_name = $wpdb->prefix . "auto_updates";
881
- $configs = $wpdb->get_results( "SELECT * FROM {$table_name} WHERE name = 'major'");
882
- foreach ( $configs as $config ) {
883
- if( $config->onoroff != 'on' ) {
884
- remove_action( 'admin_notices', 'update_nag', 3 );
885
- remove_action( 'network_admin_notices', 'maintenance_nag', 10 );
886
- }
887
- }
888
- }
889
-
890
- add_action( 'admin_head', 'cau_hideUpdateNag', 100 );
891
-
892
- // Add more intervals to event schedules
893
- function cau_addMoreIntervals( $schedules ) {
894
-
895
- // Add a weekly interval.
896
- $schedules['weekly'] = array(
897
- 'interval' => 604800,
898
- 'display' => __( 'Once Weekly' ),
899
- );
900
-
901
- // Add a twice montly interval.
902
- $schedules['twice_monthly'] = array(
903
- 'interval' => 1317600,
904
- 'display' => __( 'Twice a month' ),
905
- );
906
-
907
- // Add a montly interval.
908
- $schedules['monthly'] = array(
909
- 'interval' => 2635200,
910
- 'display' => __( 'Once a month' ),
911
- );
912
-
913
- // Add a montly interval.
914
- $schedules['once_monthly'] = array(
915
- 'interval' => 2635200,
916
- 'display' => __( 'Once a month' ),
917
- );
918
-
919
- return $schedules;
920
-
921
- }
922
- add_filter( 'cron_schedules', 'cau_addMoreIntervals' );
923
-
924
- // Get only unique schedules
925
- function cau_wp_get_schedules() {
926
-
927
- // Start variables
928
- $availableIntervals = wp_get_schedules();
929
- $array_unique = array();
930
- $intervalTimes = array();
931
- $intervalNames = array();
932
- $intervalUniques = array();
933
- $counter = 0;
934
-
935
- // Get all intervals
936
- foreach ( $availableIntervals as $key => $value ) {
937
-
938
- // Do a bunch of checks to format them the right way
939
- foreach ( $value as $display => $interval ) {
940
- if( $display == 'display' ) {
941
- $intervalNames[$counter] = $interval; // Add the display name (i.e. "Once a month" or "Once Daily")
942
- $counter++; // Make sure the next interval gets a new "key" value
943
- } else {
944
- $intervalTimes[$counter] = $key; // Add the unix timestamp of this interval, used to identify unique items
945
- $intervalUniques[$counter] = $interval; // Add the backend name (i.e. "once_monthly" or "daily")
946
- }
947
-
948
- }
949
-
950
- }
951
-
952
- // Prevent duplicates
953
- foreach ( array_unique( $intervalUniques ) as $key => $value ) {
954
- // $value is the timestamp
955
- // $intervalTimes[$key] is the backend name
956
- // $intervalNames[$key] is the display name
957
- $array_unique[$intervalTimes[$key]] = $intervalNames[$key];
958
- }
959
-
960
- // Return the array
961
- return $array_unique;
962
-
963
- }
964
-
965
- // Check if the update log db is empty
966
- function cau_updateLogDBisEmpty() {
967
-
968
- global $wpdb;
969
- $updateDB = "update_log";
970
- $updateLog = $wpdb->prefix.$updateDB;
971
- $row_count = $wpdb->get_var( "SELECT COUNT(*) FROM $updateLog" );
972
-
973
- if( $row_count > 0 ) {
974
- return false;
975
- } else {
976
- return true;
977
- }
978
- }
979
-
980
- // Plugin information to DB
981
- function cau_savePluginInformation( $method = 'New' ) {
982
-
983
- global $wpdb;
984
- $updateDB = "update_log";
985
- $updateLog = $wpdb->prefix.$updateDB;
986
- $allPlugins = get_plugins();
987
-
988
- foreach ( $allPlugins as $key => $value ) {
989
- if( !cau_check_if_exists( $key, 'slug', $updateDB ) ) $wpdb->insert( $updateLog, array( 'slug' => $key, 'oldVersion' => '-', 'method' => $method ) );
990
- }
991
-
992
- }
993
-
994
- function cau_updatePluginInformation( $slug, $method = '-', $newVersion = '-' ) {
995
-
996
- global $wpdb;
997
- $updateDB = "update_log";
998
- $updateLog = $wpdb->prefix.$updateDB;
999
- $wpdb->query( $wpdb->prepare( "UPDATE $updateLog SET newVersion = '%s', method = %s WHERE slug = '%s'", $newVersion, $method, $slug ) );
1000
-
1001
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/companion-auto-update.php DELETED
@@ -1,384 +0,0 @@
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: 3.5.4
7
- * Author: Papin Schipper
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!' );
18
-
19
- // Load translations
20
- function cau_load_translations() {
21
- load_plugin_textdomain( 'companion-auto-update', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
22
- }
23
- add_action( 'init', 'cau_load_translations' );
24
-
25
- // Set up the database and required schedules
26
- function cau_install() {
27
- cau_database_creation(); // Db handle
28
- if (! wp_next_scheduled ( 'cau_set_schedule_mail' )) wp_schedule_event( time(), 'daily', 'cau_set_schedule_mail'); // Set schedule for mail etc.
29
- if (! wp_next_scheduled ( 'cau_custom_hooks_plugins' )) wp_schedule_event( time(), 'daily', 'cau_custom_hooks_plugins'); // Run custom hooks on plugin updates
30
- if (! wp_next_scheduled ( 'cau_custom_hooks_themes' )) wp_schedule_event( time(), 'daily', 'cau_custom_hooks_themes'); // Run custom hooks on theme updates
31
- }
32
- add_action( 'cau_set_schedule_mail', 'cau_check_updates_mail' );
33
- add_action( 'wp_update_plugins', 'cau_run_custom_hooks_p' );
34
- add_action( 'cau_custom_hooks_themes', 'cau_run_custom_hooks_t' );
35
-
36
- // Redirect to welcome screen on activation of plugin
37
- function cau_pluginActivateWelcome() {
38
- add_option( 'cau_redirectToWelcomeScreen', true );
39
- }
40
- register_activation_hook(__FILE__, 'cau_pluginActivateWelcome');
41
-
42
- function cau_pluginRedirectWelcomeScreen() {
43
- if ( get_option( 'cau_redirectToWelcomeScreen', false ) ) {
44
- delete_option( 'cau_redirectToWelcomeScreen' );
45
- if( !isset( $_GET['activate-multi'] ) ) {
46
- wp_redirect( admin_url( cau_menloc().'?page=cau-settings&welcome=1' ) );
47
- }
48
- }
49
- }
50
- add_action('admin_init', 'cau_pluginRedirectWelcomeScreen');
51
-
52
- // Donate url
53
- function cau_donateUrl() {
54
- return 'https://www.paypal.me/dakel/10/';
55
- }
56
-
57
- // Database version
58
- function cau_db_version() {
59
- return '3.5.3';
60
- }
61
- function cau_database_creation() {
62
-
63
- global $wpdb;
64
-
65
- $cau_db_version = cau_db_version();
66
- $autoupdates = $wpdb->prefix."auto_updates";
67
- $updateLog = $wpdb->prefix."update_log";
68
-
69
- // Create db table
70
- $sql = "CREATE TABLE $autoupdates (
71
- id INT(9) NOT NULL AUTO_INCREMENT,
72
- name VARCHAR(255) NOT NULL,
73
- onoroff TEXT NOT NULL,
74
- UNIQUE KEY id (id)
75
- )";
76
-
77
- // Create second db table
78
- $sql2 = "CREATE TABLE $updateLog (
79
- id INT(9) NOT NULL AUTO_INCREMENT,
80
- slug VARCHAR(255) NOT NULL,
81
- oldVersion VARCHAR(10) NOT NULL,
82
- newVersion VARCHAR(10) NOT NULL,
83
- method VARCHAR(10) NOT NULL,
84
- UNIQUE KEY id (id)
85
- )";
86
-
87
- require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
88
- dbDelta( $sql );
89
- dbDelta( $sql2 );
90
-
91
- // Database version
92
- add_option( "cau_db_version", "$cau_db_version" );
93
-
94
- // Insert data
95
- cau_install_data();
96
-
97
- }
98
-
99
- // Check if database table exists before creating
100
- function cau_check_if_exists( $whattocheck, $id = 'name', $db_table = 'auto_updates' ) {
101
-
102
- global $wpdb;
103
- $table_name = $wpdb->prefix.$db_table;
104
-
105
- $rows = $wpdb->get_col( "SELECT COUNT(*) as num_rows FROM {$table_name} WHERE {$id} = '{$whattocheck}'" );
106
- $check = $rows[0];
107
-
108
- if( $check > 0 ) {
109
- return true;
110
- } else {
111
- return false;
112
- }
113
-
114
- }
115
-
116
- // Insert date into database
117
- function cau_install_data() {
118
-
119
- global $wpdb;
120
- $table_name = $wpdb->prefix . "auto_updates";
121
- $toemail = get_option('admin_email');
122
-
123
- // Update configs
124
- if( !cau_check_if_exists( 'plugins' ) ) $wpdb->insert( $table_name, array( 'name' => 'plugins', 'onoroff' => 'on' ) ); // 0
125
- if( !cau_check_if_exists( 'themes' ) ) $wpdb->insert( $table_name, array( 'name' => 'themes', 'onoroff' => 'on' ) ); // 1
126
- if( !cau_check_if_exists( 'minor' ) ) $wpdb->insert( $table_name, array( 'name' => 'minor', 'onoroff' => 'on' ) ); // 2
127
- if( !cau_check_if_exists( 'major' ) ) $wpdb->insert( $table_name, array( 'name' => 'major', 'onoroff' => '' ) ); // 3
128
-
129
- // Email configs
130
- if( !cau_check_if_exists( 'email' ) ) $wpdb->insert( $table_name, array( 'name' => 'email', 'onoroff' => '' ) ); // 4
131
- if( !cau_check_if_exists( 'send' ) ) $wpdb->insert( $table_name, array( 'name' => 'send', 'onoroff' => '' ) ); // 5
132
- if( !cau_check_if_exists( 'sendupdate' ) ) $wpdb->insert( $table_name, array( 'name' => 'sendupdate', 'onoroff' => '' ) ); // 6
133
-
134
- // Advanced
135
- if( !cau_check_if_exists( 'notUpdateList' ) ) $wpdb->insert( $table_name, array( 'name' => 'notUpdateList', 'onoroff' => '' ) ); // 7
136
- if( !cau_check_if_exists( 'translations' ) ) $wpdb->insert( $table_name, array( 'name' => 'translations', 'onoroff' => 'on' ) ); // 8
137
- if( !cau_check_if_exists( 'wpemails' ) ) $wpdb->insert( $table_name, array( 'name' => 'wpemails', 'onoroff' => 'on' ) ); // 9
138
- if( !cau_check_if_exists( 'notUpdateListTh' ) ) $wpdb->insert( $table_name, array( 'name' => 'notUpdateListTh', 'onoroff' => '' ) ); // 10
139
-
140
- // Stuff
141
- if( !cau_check_if_exists( 'html_or_text' ) ) $wpdb->insert( $table_name, array( 'name' => 'html_or_text', 'onoroff' => 'html' ) ); // 11
142
-
143
-
144
- }
145
- register_activation_hook( __FILE__, 'cau_install' );
146
-
147
- // Clear everything on deactivation
148
- function cau_remove() {
149
- global $wpdb;
150
- $autoupdates = $wpdb->prefix."auto_updates";
151
- $updateLog = $wpdb->prefix."update_log";
152
- $wpdb->query( "DROP TABLE IF EXISTS $autoupdates" );
153
- $wpdb->query( "DROP TABLE IF EXISTS $updateLog" );
154
- wp_clear_scheduled_hook('cau_set_schedule_mail');
155
- }
156
- register_deactivation_hook( __FILE__, 'cau_remove' );
157
-
158
- // Update
159
- function cau_update_db_check() {
160
- $cau_db_version = cau_db_version();
161
- if ( get_site_option( 'cau_db_version' ) != $cau_db_version ) {
162
- cau_database_creation();
163
- update_option( "cau_db_version", $cau_db_version );
164
- }
165
- }
166
- add_action( 'upgrader_process_complete', 'cau_update_db_check' );
167
-
168
- // Manual update
169
- function cau_manual_update() {
170
- cau_update_db_check();
171
- }
172
-
173
- // Load custom functions
174
- require_once( plugin_dir_path( __FILE__ ) . 'cau_functions.php' );
175
-
176
- // Add plugin to menu
177
- function register_cau_menu_page() {
178
- add_submenu_page( cau_menloc() , __( 'Auto Updater', 'companion-auto-update' ), __( 'Auto Updater', 'companion-auto-update' ), 'manage_options', 'cau-settings', 'cau_frontend' );
179
- }
180
- add_action( 'admin_menu', 'register_cau_menu_page' );
181
-
182
- // Settings page
183
- function cau_frontend() { ?>
184
-
185
- <div class='wrap cau_content_wrap cau_content'>
186
-
187
- <h1 class="wp-heading-inline"><?php _e('Companion Auto Update', 'companion-auto-update'); ?></h1>
188
-
189
- <hr class="wp-header-end">
190
-
191
- <?php
192
-
193
- // Make sure the correct timezone is used
194
- date_default_timezone_set( cau_get_proper_timezone() );
195
-
196
- // Allow only access to these pages
197
- $allowedPages = array(
198
- 'dashboard' => __( 'Dashboard' ),
199
- 'pluginlist' => __( 'Update filter', 'companion-auto-update' ),
200
- 'log' => __( 'Update log', 'companion-auto-update' ),
201
- 'status' => __( 'Status', 'companion-auto-update' ),
202
- );
203
-
204
- // Show subtabs
205
- echo "<h2 class='nav-tab-wrapper wp-clearfix'>";
206
- foreach ( $allowedPages as $page => $title ) {
207
- echo "<a href='".cau_url( $page )."' id='tab-".$page."' class='nav-tab "._active_tab( $page )."'>".$title;
208
- if( $page == 'status' ) {
209
- if( cau_pluginHasIssues() ) {
210
- echo "<span class='cau_melding level-".cau_pluginIssueLevels()."'></span>";
211
- } else {
212
- echo "<span class='cau_melding level-okay'></span>";
213
- }
214
- }
215
- echo "</a>";
216
- }
217
- echo "</h2>";
218
-
219
- // Show page content
220
- if( !isset( $_GET['tab'] ) ) {
221
- $requestedPage = 'dashboard';
222
- echo "<script>jQuery('#tab-dashboard').addClass('nav-tab-active');</script>"; // Set active tab class
223
- } else {
224
- $requestedPage = sanitize_key( $_GET['tab'] );
225
- }
226
-
227
- if( array_key_exists( $requestedPage, $allowedPages ) ) {
228
- require_once( plugin_dir_path( __FILE__ ) . 'admin/'.$requestedPage.'.php' );
229
- } else {
230
- wp_die( 'You\'re not allowed to view <strong>'.$requestedPage.'</strong>.' );
231
- }
232
-
233
- ?>
234
-
235
- </div>
236
-
237
- <?php }
238
-
239
- // Add a widget to the dashboard.
240
- function cau_add_widget() {
241
- if ( current_user_can( 'manage_options' ) ) wp_add_dashboard_widget( 'cau-update-log', __('Update log', 'companion-auto-update'), 'cau_widget' );
242
- }
243
- add_action( 'wp_dashboard_setup', 'cau_add_widget' );
244
-
245
- function cau_widget() {
246
-
247
- echo '<style>table.autoupdatewidget { border: 0px solid transparent; border-bottom: 1px solid #EEEEEE; margin: 0 -12px; width: calc(100% + 24px); } table.autoupdatewidget tr td { border-top: 1px solid #EEEEEE; padding: 9px 12px 5px 12px; background: #FAFAFA; } .cau_divide { display: inline-block; color: #E7E0DF; padding: 0 2px; } </style>';
248
- echo '<p>'.__('Below are the last 7 updates ran on this site. Includes plugins and themes, both automatically updated and manually updated.', 'companion-auto-update').'</p>';
249
- cau_fetch_log( '7' );
250
- echo '<p>
251
- <a href="'.cau_url( 'log' ).'">'.__('View full changelog', 'companion-auto-update').'</a>
252
- <span class="cau_divide">|</span>
253
- <a href="'.cau_url( 'dashboard' ).'">'.__( 'Settings' ).'</a>
254
- </p>';
255
-
256
- }
257
-
258
- // Load admin styles
259
- function load_cau_sytyles( $hook ) {
260
-
261
- // Only load on plugins' pages
262
- if( $hook != 'tools_page_cau-settings' && $hook != 'index_page_cau-settings' ) return;
263
-
264
- // Plugin scripts
265
- wp_enqueue_style( 'cau_admin_styles', plugins_url( 'backend/style.css' , __FILE__ ) );
266
-
267
- // WordPress scripts we need
268
- wp_enqueue_style( 'thickbox' );
269
- wp_enqueue_script( 'thickbox' );
270
- wp_enqueue_script( 'plugin-install' );
271
-
272
- // Check for issues
273
- wp_enqueue_style( 'cau_warning_styles', plugins_url( 'backend/warningbar.css' , __FILE__ ) );
274
-
275
- }
276
- add_action( 'admin_enqueue_scripts', 'load_cau_sytyles', 100 );
277
-
278
- // Send e-mails
279
- require_once( plugin_dir_path( __FILE__ ) . 'cau_emails.php' );
280
-
281
- // Add settings link on plugin page
282
- function cau_settings_link( $links ) {
283
-
284
- $settings_link = '<a href="'.cau_url( 'dashboard' ).'">'.__( 'Settings' ).'</a>';
285
- $settings_link2 = '<a href="https://translate.wordpress.org/projects/wp-plugins/companion-auto-update">'.__( 'Help us translate', 'companion-auto-update' ).'</a>';
286
- $settings_link3 = '<a href="'.cau_donateUrl().'">'.__( 'Donate to help development', 'companion-auto-update' ).'</a>';
287
-
288
- array_unshift( $links, $settings_link2 );
289
- array_unshift( $links, $settings_link3 );
290
- array_unshift( $links, $settings_link );
291
-
292
- return $links;
293
-
294
- }
295
- $plugin = plugin_basename(__FILE__);
296
- add_filter( "plugin_action_links_$plugin", "cau_settings_link" );
297
-
298
- // Auto Update Class
299
- class CAU_auto_update {
300
-
301
- public function __construct() {
302
-
303
- // Enable Update filters
304
- add_action( 'plugins_loaded', array( &$this, 'CAU_auto_update_filters' ), 1 );
305
-
306
- }
307
-
308
- public function CAU_auto_update_filters() {
309
-
310
- global $wpdb;
311
- $table_name = $wpdb->prefix . "auto_updates";
312
-
313
- // Enable for major updates
314
- $configs = $wpdb->get_results( "SELECT * FROM {$table_name} WHERE name = 'major'");
315
- foreach ( $configs as $config ) {
316
- if( $config->onoroff == 'on' ) add_filter( 'allow_major_auto_core_updates', '__return_true', 1 ); // Turn on
317
- else add_filter( 'allow_major_auto_core_updates', '__return_false', 1 ); // Turn off
318
- }
319
-
320
- // Enable for minor updates
321
- $configs = $wpdb->get_results( "SELECT * FROM {$table_name} WHERE name = 'minor'");
322
- foreach ( $configs as $config ) {
323
- if( $config->onoroff == 'on' ) add_filter( 'allow_minor_auto_core_updates', '__return_true', 1 ); // Turn on
324
- else add_filter( 'allow_minor_auto_core_updates', '__return_false', 1 ); // Turn off
325
- }
326
-
327
- // Enable for plugins
328
- $configs = $wpdb->get_results( "SELECT * FROM {$table_name} WHERE name = 'plugins'");
329
- foreach ( $configs as $config ) {
330
- if( $config->onoroff == 'on' ) add_filter( 'auto_update_plugin', 'cau_dontUpdatePlugins', 10, 2 ); // Turn on
331
- else add_filter( 'auto_update_plugin', '__return_false', 1 ); // Turn off
332
- }
333
-
334
- // Enable for themes
335
- $configs = $wpdb->get_results( "SELECT * FROM {$table_name} WHERE name = 'themes'");
336
- foreach ( $configs as $config ) {
337
- if( $config->onoroff == 'on' ) add_filter( 'auto_update_theme', '__return_true' ); // Turn on
338
- else add_filter( 'auto_update_theme', '__return_false', 1 ); // Turn off
339
- }
340
-
341
- // Enable for translation files
342
- $configs = $wpdb->get_results( "SELECT * FROM {$table_name} WHERE name = 'translations'");
343
- foreach ( $configs as $config ) {
344
- if( $config->onoroff == 'on' ) add_filter( 'auto_update_translation', '__return_true', 1 ); // Turn on
345
- else add_filter( 'auto_update_translation', '__return_false', 1 ); // Turn off
346
- }
347
-
348
- // WP Email Config
349
- $configs = $wpdb->get_results( "SELECT * FROM {$table_name} WHERE name = 'wpemails'");
350
- foreach ( $configs as $config ) {
351
- if( $config->onoroff == 'on' ) add_filter( 'auto_core_update_send_email', '__return_true' ); // Turn on
352
- else add_filter( 'auto_core_update_send_email', '__return_false' ); // Turn off
353
- }
354
-
355
-
356
- }
357
-
358
- }
359
- new CAU_auto_update();
360
-
361
- // Check for issues
362
- function cau_checkForIssues( $admin_bar ) {
363
-
364
- if( cau_pluginHasIssues() && is_admin() ) {
365
-
366
- if( cau_pluginIssueLevels() == 'high' ) {
367
- $cauWaningBarTitle = __( 'Companion Auto Update ran into a critical error. View the status log for more info.', 'companion-auto-update' );
368
-
369
- $admin_bar->add_menu( array(
370
- 'id' => 'cau-has-issues',
371
- 'title' => '<span class="ab-icon"></span><span class="cau-level-'.cau_pluginIssueLevels().'">'.cau_pluginIssueCount().'</span>',
372
- 'href' => cau_url( 'status' ),
373
- 'meta' => array(
374
- 'target' => '_self',
375
- 'title' => $cauWaningBarTitle,
376
- ),
377
- ));
378
-
379
- }
380
-
381
- }
382
-
383
- }
384
- add_action( 'admin_bar_menu', 'cau_checkForIssues', 150 );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/languages/companion-auto-update.pot DELETED
@@ -1,62 +0,0 @@
1
- # Copyright (C) 2016 Companion Auto Update
2
- # This file is distributed under the same license as the Companion Auto Update package.
3
- msgid ""
4
- msgstr ""
5
- "Project-Id-Version: Companion Auto Update 1.0\n"
6
- "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/companion-auto-"
7
- "update\n"
8
- "POT-Creation-Date: 2016-05-24 08:16:37+00:00\n"
9
- "MIME-Version: 1.0\n"
10
- "Content-Type: text/plain; charset=UTF-8\n"
11
- "Content-Transfer-Encoding: 8bit\n"
12
- "PO-Revision-Date: 2016-MO-DA HO:MI+ZONE\n"
13
- "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
- "Language-Team: LANGUAGE <LL@li.org>\n"
15
-
16
- #: companion_portfolio.php:96
17
- msgid "Auto Updater"
18
- msgstr ""
19
-
20
- #: companion_portfolio.php:122
21
- msgid "Auto update plugins?"
22
- msgstr ""
23
-
24
- #: companion_portfolio.php:122
25
- msgid "Auto update themes?"
26
- msgstr ""
27
-
28
- #: companion_portfolio.php:122
29
- msgid "Auto update minor core updates?"
30
- msgstr ""
31
-
32
- #: companion_portfolio.php:122
33
- msgid "Auto update major core updates?"
34
- msgstr ""
35
-
36
- #: companion_portfolio.php:125
37
- msgid "Settings saved"
38
- msgstr ""
39
-
40
- #: companion_portfolio.php:125
41
- msgid "Settings"
42
- msgstr ""
43
-
44
- #. Plugin Name of the plugin/theme
45
- msgid "Companion Auto Update"
46
- msgstr ""
47
-
48
- #. #-#-#-#-# plugin.pot (Companion Auto Update 1.0) #-#-#-#-#
49
- #. Plugin URI of the plugin/theme
50
- #. #-#-#-#-# plugin.pot (Companion Auto Update 1.0) #-#-#-#-#
51
- #. Author URI of the plugin/theme
52
- msgid "https://qreative-web.com"
53
- msgstr ""
54
-
55
- #. Description of the plugin/theme
56
- msgid ""
57
- "This plugin auto updates all plugins, all themes and the wordpress core."
58
- msgstr ""
59
-
60
- #. Author of the plugin/theme
61
- msgid "Qreative-Web"
62
- msgstr ""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
trunk/languages/index.php DELETED
@@ -1,4 +0,0 @@
1
- <?php
2
- /**
3
- * Nothing to see here
4
- */
 
 
 
 
trunk/readme.txt DELETED
@@ -1,275 +0,0 @@
1
- === Companion Auto Update ===
2
- 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.4
7
- Requires PHP: 5.1
8
- Stable tag: 3.5.4
9
- License: GPLv2 or later
10
- License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
-
12
- This plugin automatically updates all plugins, all themes and the wordpress core in the background.
13
-
14
- == Description ==
15
-
16
- = Keep your website safe! =
17
- We understand that you might not always be able to check if your wordpress site has any updates that need to be installed, especially when you maintain multiple websites keeping them up-to-date can be a lot of work.
18
- This plugin enables background auto-updating for all plugins, all themes and the wordpress core (both major and minor updates).
19
- We give you full control over what is updated and what isn't, via the settings page you can easily disallow auto-updating for either plugins, themes or wordpress core.
20
-
21
- = Available settings =
22
- Full control, that's what this plugin is all about. We offer settings to enable or disable automatic updating for plugins, themes, wordpress core updates (both minor and major can be changed separately) and for translation files.
23
-
24
- = Know what's happening =
25
- We want you to know what's happening on your website. This plugin offers settings for various email notifications. We can send you an email when an update is available, when a plugin has been updated or when wordpress has been updated.
26
- But if you don't want to recieve emails about this you can still log in and view the changelog to see what happened.
27
-
28
- = Advanced Controls =
29
- You might not want to update all plugins or themes automatically, no problem! With the advanced filters you can easily select single plugins and/or themes that you want the plugin to skip. We can notify you when one of the selected plugins has an update ready so you can then head over to your dashboard and update them manually.
30
-
31
- = Scheduling =
32
- By default the updater will run twice a day, but you can change this to every hour or to daily. When set to daily you can even set the time at which it should run, this way you can make sure that it will not overload your server by letting it run at times with less activity. The same settings can be set for notifications.
33
-
34
- == Installation ==
35
-
36
- How to install Companion Auto Update
37
-
38
- = Manual install =
39
- 1. Download Companion Auto Update.
40
- 1. Upload the 'Companion Auto Update' directory to your '/wp-content/plugins/' directory.
41
- 1. Activate Companion Auto Update from your Plugins page.
42
-
43
- = Via WordPress =
44
- 1. Search for 'Companion Auto Update'.
45
- 1. Click install.
46
- 1. Activate.
47
-
48
- = Settings =
49
- Settings can be found trough Tools > Auto Updater
50
-
51
- == Frequently Asked Questions ==
52
-
53
- = Check our website for the FAQ =
54
-
55
- [https://codeermeneer.nl/documentation/auto-update/faq-auto-updater/](https://codeermeneer.nl/documentation/auto-update/faq-auto-updater/)
56
-
57
- = What features can I expect to see in the future? =
58
-
59
- Your feedback is what made this plugin what is and what it’ll become so keep the feedback coming! To see what features you've suggested and what we're working on [read our blogpost here](https://codeermeneer.nl/blog/companion-auto-update-and-its-future/)
60
-
61
-
62
- == Screenshots ==
63
-
64
- 1. Full control over what to update and when to recieve notifications
65
- 2. Disable auto-updating for certain plugins and/or themes
66
- 3. Advanced scheduling options for updating and notifcations
67
- 4. Keep track of updates with the update log
68
-
69
- == Changelog ==
70
-
71
- = 3.5.4 (DATE?) =
72
- * New: See translations in the update log
73
- * New: We've added a few checks to WordPress' Site Health page
74
- * Fix: Error with Companion Auto Update Database Update
75
- * Fix: Schedule interval duplicates
76
-
77
- = 3.5.3 (June 5, 2020) =
78
- * NEW: We're working on a better update log. You should see the Update method (Manual/Automatic) in the log now. (Only works for Plugins right now)
79
- Please report any issues with this feature over at our sticky post: [Problems with the Update method in the new update log?](https://wordpress.org/support/topic/problems-with-the-update-method-in-the-new-update-log/)
80
-
81
- * Fix: Not able to see checks in boxes (reverted back to before it all went wrong)
82
- * Fix: Error date_default_timezone_set(): Timezone ID +00:00 is invalid
83
- * Tweak: The status tab will no longer show turned-off settings as an error
84
- * Tweak: Made some improvements to the "Update pending" emails, you can now see a list of all pending updates and go directly to the update page.
85
-
86
- Also: Check out what features we're working on at [our blogpost](https://codeermeneer.nl/blog/companion-auto-update-and-its-future/)
87
-
88
- = 3.5.2 (April 1, 2020) =
89
- * Fix: Not able to see checks in boxes
90
-
91
- = 3.5.1 (March 25, 2020) =
92
- * Tweak: You seem to like the new dashboard, we've fixed a few issues regarding the responsiveness of the design. We've also tweaked the icons to be a bit more transparant.
93
- * Tweak: We've added the release notes link to Plain text emails
94
- * Tweak: Fixed a few typos
95
- * Tweak: Various minor security improvements
96
-
97
- = 3.5.0 (March 5, 2020) =
98
- * We've had to (temporarily) disable the theme filter because it was causing issues on some installations. We'll try to get it working again in a future update.
99
- * We should've fixed an issue where on occasion nothing would update
100
- * Made some improvements to the "Fix it" button for the AUTOMATIC_UPDATER_DISABLED error
101
- * In version 3.4.6 we've changed to HTML emails rather than plain text, in this version you can opt to change it back to plain text emails
102
- * Redesigned dashboard: We've changed the dashboard, moved both the settings page and de support page to the dashboard. Please let us know if you like this change or not.
103
-
104
- = 3.4.8 (January 2, 2020) =
105
- * This update brings a few under the hood changes to ensure better updates in the future
106
- * We've also fixed a (rare) Undefined variable: headers error
107
-
108
- = 3.4.7 (January 1, 2020) =
109
- * Fix: Cronjob error
110
-
111
- = 3.4.6 (December 31, 2019) =
112
- * New: Filter themes, just like you do with plugins
113
- * New: Link to the release notes of the plugin in the email
114
- * Fixed: Sometimes the pluginfilter wouldn't save when using a lot of plugins
115
- * Fixed: A few errors regarding emails
116
- * Fixed: Errors regarding the set timezone
117
- * Tweak: Changing settings no longer requires page reload to see the changes
118
- * Few tweaks in code for better performance
119
-
120
- = 3.4.5 (November 26, 2019) =
121
- * Fix: Some of you reported several database errors in version 3.4.4, these are fixed now
122
- * Tweak: Few minor design changes to fit the changes made in WordPress 5.3
123
- * Tweak: Explained that emails will also be sent on manual plugin updates
124
-
125
- = 3.4.4 (November 16, 2019) =
126
- * Sometimes the database wouldn't correctly update to the newest version, we've added a manual button for this now.
127
- * Sometimes plugins excluded from the updater would still update, this should be fixed now.
128
-
129
- = 3.4.3 (November 8, 2019) =
130
- * New: Options for "Weekly", "Twice a month" and "Monthly" for scheduling
131
- * New: Added Database version to status page
132
- * Tweak: cau_database_creation() query is no longer running on every page load, just on activation or updating of the plugin
133
-
134
- = 3.4.2 (June 28, 2019) =
135
- * Fixed: Times being all messed up
136
- * New: Set the time of email notifications
137
- * Fixed: Email notifications will no longer show as active on the status page when they actually aren't active
138
-
139
- = 3.4.1 (May 4, 2019) =
140
- * Fixed issue where sometimes settings wouldn't safe
141
- * Fixed issue where sometimes the status page would show incorrect times at events
142
-
143
- = 3.4.0 (April 4, 2019) =
144
- * (Actually) Fixed: Cronjobs disabled shouldn't be a 'critical error'
145
- * New status icon at the status tab to quicker see issues
146
- * Fixed: You're not allowed to view error
147
-
148
- = 3.3.9 (March 11, 2019) =
149
- * Fix: Sometimes emails would be sent twice
150
- * Fix: Cronjobs disabled shouldn't be a critical error
151
- * Fix: Sometimes update reminder emails would not send at all
152
- * Improvement: Removed "Howdy" from emails
153
- * Improvement: Fixed a few typos
154
-
155
- = 3.3.8 (March 1, 2019) =
156
- * Fix: Show correct timestamp in log
157
- * Fix: Fixed a few typos
158
- * New: Filter the log for Plugins, Themes or All
159
- * New: Click on a plugins' name to show the changelog
160
- * Improvement: Added more checks to the status log
161
- * Improvement: Added better documentation when issues show up
162
-
163
- = 3.3.7 (February 2, 2019) =
164
- * Fix: In some rare cases various errors showed up when saving settings, this is fixed now
165
-
166
- = 3.3.6 (January 14, 2019) =
167
- * Security improvements
168
-
169
- = 3.3.5 (January 5, 2019) =
170
- * New: See WordPress & PHP version on the status page
171
- * New: WordPress core updates now show in status log
172
- * Improvement: Split Update log and Status tab
173
- * Improvement: Update log now shows new version (no old version yet, sorry)
174
- * Improvement: If major updates are disabled the update nag will no longer show
175
- * Fix: Error Notice: Undefined index: menloc
176
-
177
- = 3.3.4 (December 24, 2018) =
178
- * Improved: Few tweaks to the new warning icon
179
- * Improved: Changed a few strings to be clearer to understand
180
-
181
- = 3.3.3 (December 22, 2018) =
182
- * New: Set the time for Core updates
183
- * New: Welcome screen after plugin activation to help new users find their way
184
- * New: Warning icon in the top bar when something is wrong
185
- * Improvement: More logs have been added to the status page
186
- * Improvement: Redesigned support tab
187
- * Improvement: We've checked all the text in the plugin and made some changes to make translating this plugin a little bit easier
188
- * Improvement: The mobile design has been improved big time
189
- * Fix: Some sites still recieved core update emails even when disabled, this should not happen anymore.
190
-
191
- = 3.3.2 (December 20, 2018) =
192
- * Global error? No need to contact us anymore, let the plugin fix it for you!
193
-
194
- = 3.3.1 (November 15, 2018) =
195
- * Fix: Can't Find constant error
196
- * Improvement: We've listened, Scheduling and Plugin filter are now two seperate tabs and Plugin filter is renamed to Select plugins
197
- * Improvement: Major core updates are now disabled by default for new installs
198
-
199
- = 3.3.0 (November 5, 2018) =
200
- * New: Custom hooks afer succesfull update, [How to use custom hooks in Companion Auto Update](https://codeermeneer.nl/stuffs/codex-auto-updater/)
201
-
202
- = 3.2.5 (October 26, 2018) =
203
- * Improvement: Few minor tweaks to the critical error messages
204
-
205
- = 3.2.4 (October 25, 2018) =
206
- * Fix: Errors with PHP 7.2
207
-
208
- = 3.2.3 (October 25, 2018) =
209
- * Improved: New error notification when plugins runs into a critical error
210
-
211
- = 3.2.2 (October 5, 2018) =
212
- * Fix: Parse error: syntax error, unexpected [ in cau_functions.php on line 247
213
-
214
- = 3.2.1 ( October 2, 2018) =
215
- * Fix: Cross-site request forgery (CSRF)/local file inclusion (LFI) vulnerability.
216
-
217
- = 3.2.0 (August 11, 2018) =
218
- * Improved: Email notifications just got better and now contain version numbers.
219
- * Improved: Explained the difference between major and minor WordPress core updates.
220
-
221
- = 3.1.5 (August 9, 2018) =
222
- * I almost feel silly for pushing this as an update but the theme update notification said theme instead of themes.
223
-
224
- = 3.1.4 (August 8, 2018) =
225
- * Fix: No theme update notification
226
-
227
- = 3.1.3 (August 3, 2018) =
228
- * Fix: Issue with , in links in email notifications
229
-
230
- = 3.1.2 (May 14, 2018) =
231
- * Fix error: Notice: Undefined index: cau_page
232
-
233
- = 3.1.1 (May 12, 2018) =
234
- * Reorganized the dashboard to cleaner
235
-
236
- = 3.1.0 (May 11, 2018) =
237
- * New: Status page. We've introduced a status page to be able to provide better help when an error occurs. This page will be updated with even more info in coming updates.
238
-
239
- = 3.0.9 (April 17, 2018) =
240
- * Fix: Successful update emails to multiple adresses. We took our time to really test this one but it works now! Promise!
241
- * Update available emails might still be broken.
242
- * Improvement: Email notifications no long show updates done in the last 2 days but instead changed depending on the interval of the emails.
243
-
244
- = 3.0.8 (March 22, 2018) =
245
- * Fix: Error "Notice: Only variables should be passed by reference"
246
-
247
- = 3.0.7 (March 15, 2018) =
248
- * We've recieved a bunch of feedback since the last few updates and we've listened!
249
- * If the schedule is NOT daily - hide the hours object. show it only when daily is selected.
250
- * 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".
251
- * 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.
252
-
253
- = 3.0.6 (March 14, 2018) =
254
- * Fix: Support & Feedback tab not working
255
-
256
- = 3.0.5 (March 14, 2018) =
257
- * Fix: Time schedule scheduling an hour before set time
258
- * New: Support & Feedback page
259
-
260
- = 3.0.4 (March 12, 2018) =
261
- * Fix: Schedule Time not able to set! [Read support topic here](https://wordpress.org/support/topic/schedule-time-not-able-to-set/)
262
-
263
- = 3.0.3 (February 28, 2018) =
264
- * Added update time to changelog
265
- * Minor tweaks to mobile design
266
-
267
- = 3.0.2 (February 10, 2018) =
268
- * Security improvements
269
-
270
- = 3.0 (February 10, 2018) =
271
- * New: Set the update time, many requested this feature so here it is :)
272
- * New: Update log
273
- * Fixed issue where multiple emailaddresses wouldn't work.
274
-
275
- [View full changelog](https://codeermeneer.nl/stuffs/auto-updater-changelog/)