Companion Auto Update - Version 1.1

Version Description

(08/12/2017) = * New: Disable post revisions

Download this release

Release Info

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

Code changes from version 3.0.9 to 1.1

admin/dashboard.php DELETED
@@ -1,150 +0,0 @@
1
- <?php
2
-
3
- if ( !wp_next_scheduled ( 'cau_set_schedule_mail' ) ) {
4
- 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>';
5
- }
6
-
7
- global $cau_db_version;
8
-
9
- if ( get_site_option( 'cau_db_version' ) != $cau_db_version ) {
10
- echo '<div id="message" class="error"><p><b>'.__('Database Update', 'companion-auto-update').' &ndash;</b> '.__('It seems like something went wrong while updating the database, please re-activate this plugin', 'companion-auto-update').'.</p></div>';
11
- }
12
-
13
- if( isset( $_POST['submit'] ) ) {
14
-
15
- check_admin_referer( 'cau_save_settings' );
16
-
17
- global $wpdb;
18
- $table_name = $wpdb->prefix . "auto_updates";
19
-
20
- $plugins = $_POST['plugins'];
21
- $themes = $_POST['themes'];
22
- $minor = $_POST['minor'];
23
- $major = $_POST['major'];
24
- $translations = $_POST['translations'];
25
- $send = $_POST['cau_send'];
26
- $sendupdate = $_POST['cau_send_update'];
27
- $wpemails = $_POST['wpemails'];
28
- $menloc = $_POST['menloc'];
29
-
30
- $email = sanitize_text_field( $_POST['cau_email'] );
31
-
32
- $wpdb->query( " UPDATE $table_name SET onoroff = '$plugins' WHERE name = 'plugins' " );
33
- $wpdb->query( " UPDATE $table_name SET onoroff = '$themes' WHERE name = 'themes' " );
34
- $wpdb->query( " UPDATE $table_name SET onoroff = '$minor' WHERE name = 'minor' " );
35
- $wpdb->query( " UPDATE $table_name SET onoroff = '$major' WHERE name = 'major' " );
36
- $wpdb->query( " UPDATE $table_name SET onoroff = '$translations' WHERE name = 'translations' " );
37
- $wpdb->query( " UPDATE $table_name SET onoroff = '$email' WHERE name = 'email' " );
38
- $wpdb->query( " UPDATE $table_name SET onoroff = '$send' WHERE name = 'send' " );
39
- $wpdb->query( " UPDATE $table_name SET onoroff = '$sendupdate' WHERE name = 'sendupdate' " );
40
- $wpdb->query( " UPDATE $table_name SET onoroff = '$wpemails' WHERE name = 'wpemails' " );
41
- $wpdb->query( " UPDATE $table_name SET onoroff = '$menloc' WHERE name = 'menloc' " );
42
-
43
- echo '<div id="message" class="updated"><p><b>'.__('Settings saved', 'companion-auto-update').'.</b></p></div>';
44
-
45
- }
46
-
47
- ?>
48
-
49
- <form method="POST">
50
-
51
- <table class="form-table">
52
- <tr>
53
- <th scope="row"><?php _e('Auto Updater', 'companion-auto-update');?></th>
54
- <td>
55
- <fieldset>
56
-
57
- <?php
58
-
59
- global $wpdb;
60
- $table_name = $wpdb->prefix . "auto_updates";
61
-
62
- $cau_configs = $wpdb->get_results( "SELECT * FROM $table_name" );
63
-
64
- echo '<p><input id="'.$cau_configs[0]->name.'" name="'.$cau_configs[0]->name.'" type="checkbox"';
65
- if( $cau_configs[0]->onoroff == 'on' ) echo 'checked';
66
- echo '/> <label for="'.$cau_configs[0]->name.'">'.__('Auto update plugins?', 'companion-auto-update').'</label></p>';
67
-
68
- echo '<p><input id="'.$cau_configs[1]->name.'" name="'.$cau_configs[1]->name.'" type="checkbox"';
69
- if( $cau_configs[1]->onoroff == 'on' ) echo 'checked';
70
- echo '/> <label for="'.$cau_configs[1]->name.'">'.__('Auto update themes?', 'companion-auto-update').'</label></p>';
71
-
72
-
73
- echo '<p><input id="'.$cau_configs[2]->name.'" name="'.$cau_configs[2]->name.'" type="checkbox"';
74
- if( $cau_configs[2]->onoroff == 'on' ) echo 'checked';
75
- echo '/> <label for="'.$cau_configs[2]->name.'">'.__('Auto update minor core updates?', 'companion-auto-update').'</label></p>';
76
-
77
-
78
- echo '<p><input id="'.$cau_configs[3]->name.'" name="'.$cau_configs[3]->name.'" type="checkbox"';
79
- if( $cau_configs[3]->onoroff == 'on' ) echo 'checked';
80
- echo '/> <label for="'.$cau_configs[3]->name.'">'.__('Auto update major core updates?', 'companion-auto-update').'</label></p>';
81
-
82
- echo '<p><input id="'.$cau_configs[8]->name.'" name="'.$cau_configs[8]->name.'" type="checkbox"';
83
- if( $cau_configs[8]->onoroff == 'on' ) echo 'checked';
84
- echo '/> <label for="'.$cau_configs[8]->name.'">'.__('Auto update translation files?', 'companion-auto-update').'</label></p>';
85
-
86
- ?>
87
-
88
- </fieldset>
89
- </td>
90
- </tr>
91
- </table>
92
-
93
- <h2 class="title"><?php _e('Email Notifications', 'companion-auto-update');?></h2>
94
- <p><?php _e('Email notifications are send once a day, you can choose what notifications to send below.', 'companion-auto-update');?></p>
95
-
96
- <?php
97
- if( $cau_configs[4]->onoroff == '' ) $toemail = get_option('admin_email');
98
- else $toemail = $cau_configs[4]->onoroff;
99
- ?>
100
-
101
- <table class="form-table">
102
- <tr>
103
- <th scope="row"><?php _e('Update available', 'companion-auto-update');?></th>
104
- <td>
105
- <p>
106
- <input id="cau_send" name="cau_send" type="checkbox" <?php if( $cau_configs[5]->onoroff == 'on' ) { echo 'checked'; } ?> />
107
- <label for="cau_send"><?php _e('Send me emails when an update is available.', 'companion-auto-update');?></label>
108
- </p>
109
- </td>
110
- </tr>
111
- <tr>
112
- <th scope="row"><?php _e('Successful update', 'companion-auto-update');?></th>
113
- <td>
114
- <p>
115
- <input id="cau_send_update" name="cau_send_update" type="checkbox" <?php if( $cau_configs[6]->onoroff == 'on' ) { echo 'checked'; } ?> />
116
- <label for="cau_send_update"><?php _e('Send me emails when something has been updated.', 'companion-auto-update');?></label>
117
- </p>
118
- </td>
119
- </tr>
120
- <tr>
121
- <th scope="row"><?php _e('Email address', 'companion-auto-update');?></th>
122
- <td>
123
- <p>
124
- <label for="cau_email"><?php _e('To', 'companion-auto-update');?>:</label>
125
- <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 ); ?>" />
126
- </p>
127
-
128
- <p class="description"><?php _e('Seperate email addresses using commas.', 'companion-auto-update');?></p>
129
- </td>
130
- </tr>
131
- </table>
132
-
133
- <h2 class="title"><?php _e('Core notifications', 'companion-auto-update');?></h2>
134
- <p><?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');?></p>
135
-
136
- <table class="form-table">
137
- <tr>
138
- <th scope="row"><?php _e('Core notifications', 'companion-auto-update');?></th>
139
- <td>
140
- <p>
141
- <input id="wpemails" name="wpemails" type="checkbox" <?php if( $cau_configs[9]->onoroff == 'on' ) { echo 'checked'; } ?> />
142
- <label for="wpemails"><?php _e('By default wordpress sends an email when a core update happend. Uncheck this box to disable these emails.', 'companion-auto-update');?></label>
143
- </p>
144
- </td>
145
- </tr>
146
- </table>
147
-
148
- <?php wp_nonce_field( 'cau_save_settings' ); ?>
149
-
150
- <?php submit_button(); ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/log.php DELETED
@@ -1,2 +0,0 @@
1
- <p><!-- SPACING --></p>
2
- <?php cau_fetch_log( 'all', 'table' ); ?>
 
 
admin/pluginlist.php DELETED
@@ -1,121 +0,0 @@
1
- <p><?php _e('Here you can select plugins that you do not wish to automatically update', 'companion-auto-update'); ?>.</p>
2
-
3
- <?php
4
-
5
- global $wpdb;
6
- $table_name = $wpdb->prefix . "auto_updates";
7
-
8
- $configs = $wpdb->get_results( "SELECT * FROM $table_name WHERE name = 'plugins'");
9
- foreach ( $configs as $config ) if( $config->onoroff != 'on' ) echo '<div id="message" class="error"><p><b>'.__('Auto updating disabled', 'companion-auto-update').' &ndash;</b> '.__('You have <strong>disabled</strong> auto updating, these settings do not work unless you <strong>enable</strong> it', 'companion-auto-update').'.</p></div>';
10
-
11
- if( isset( $_POST['submit'] ) ) {
12
-
13
- check_admin_referer( 'cau_save_pluginlis' );
14
-
15
- $noUpdateList = '';
16
- $noUpdateCount = 0;
17
-
18
- foreach ( $_POST['post'] as $key ) {
19
- $noUpdateList .= $key.', ';
20
- $noUpdateCount++;
21
- }
22
-
23
- $wpdb->query( " UPDATE $table_name SET onoroff = '$noUpdateList' WHERE name = 'notUpdateList' " );
24
- echo '<div id="message" class="updated"><p><b>'.__('Succes', 'companion-auto-update').' &ndash;</b> '.sprintf( esc_html__( '%1$s plugins have been added to the no-update-list', 'companion-auto-update' ), $noUpdateCount ).'.</p></div>';
25
- }
26
-
27
- if( isset( $_POST['reset'] ) ) {
28
-
29
- check_admin_referer( 'cau_save_pluginlis' );
30
-
31
- $wpdb->query( " UPDATE $table_name SET onoroff = '' WHERE name = 'notUpdateList' " );
32
- echo '<div id="message" class="updated"><p><b>'.__('Succes', 'companion-auto-update').' &ndash;</b> '.__( 'The no-update-list has been reset, all plugins will be auto-updated from now on', 'companion-auto-update' ).'.</p></div>';
33
- }
34
-
35
- ?>
36
-
37
- <form method="POST">
38
-
39
- <p>
40
- <input type='submit' name='submit' id='submit' class='button button-primary' value='<?php _e( "Save changes", "companion-auto-update" ); ?>'>
41
- <input type='submit' name='reset' id='reset' class='button button-alt' value='<?php _e( "Reset list", "companion-auto-update" ); ?>'>
42
- </p>
43
-
44
- <table class="wp-list-table widefat autoupdate">
45
- <thead>
46
- <tr>
47
- <td>&nbsp;</td>
48
- <th class="head-plugin"><strong><?php _e('Plugin', 'companion-auto-update'); ?></strong></th>
49
- <th class="head-status"><strong><?php _e('Status', 'companion-auto-update'); ?></strong></th>
50
- <th class="head-description"><strong><?php _e('Description', 'companion-auto-update'); ?></strong></th>
51
- </tr>
52
- </thead>
53
-
54
- <tbody id="the-list">
55
-
56
- <?php
57
-
58
- foreach ( get_plugins() as $key => $value ) {
59
-
60
- $slug = $key;
61
- $explosion = explode( '/', $slug );
62
- $actualSlug = array_shift( $explosion );
63
- $slug_hash = md5( $slug[0] );
64
-
65
- foreach ( $value as $k => $v ) {
66
-
67
- if( $k == "Name" ) $name = $v;
68
- if( $k == "Description" ) $description = $v;
69
-
70
- }
71
-
72
- if( in_array( $actualSlug, donotupdatelist() ) ) {
73
-
74
- $class = 'inactive';
75
- $checked = 'CHECKED';
76
- $status = __( 'Auto-updating: disabled' , 'companion-auto-update' );
77
-
78
- } else {
79
-
80
- $class = 'active';
81
- $checked = '';
82
- $status = __( 'Auto-updating: enabled' , 'companion-auto-update' );
83
-
84
- }
85
-
86
- echo '<tr id="post-'.$slug_hash.'" class="'.$class.'">
87
-
88
- <th class="check-column">
89
- <label class="screen-reader-text" for="cb-select-'.$slug_hash.'">Select '. $name .'</label>
90
- <input id="cb-select-'.$slug_hash.'" type="checkbox" name="post[]" value="'.$actualSlug.'" '.$checked.' ><label></label>
91
- <div class="locked-indicator"></div>
92
- </th>
93
-
94
- <td class="column-name">
95
- <p><strong>'. $name .'</strong></p>
96
- </td>
97
-
98
- <td class="cau_hide_on_mobile column-status">
99
- <p>'. $status .'</p>
100
- </td>
101
-
102
- <td class="cau_hide_on_mobile column-description">
103
- <p>'.$description.'</p>
104
- </td>
105
-
106
- </tr>';
107
-
108
- }
109
- ?>
110
-
111
- </tbody>
112
- </table>
113
-
114
- <?php wp_nonce_field( 'cau_save_pluginlis' ); ?>
115
-
116
- <p>
117
- <input type='submit' name='submit' id='submit' class='button button-primary' value='<?php _e( "Save changes", "companion-auto-update" ); ?>'>
118
- <input type='submit' name='reset' id='reset' class='button button-alt' value='<?php _e( "Reset list", "companion-auto-update" ); ?>'>
119
- </p>
120
-
121
- </form>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/rollback.php DELETED
@@ -1,3 +0,0 @@
1
- <?php
2
-
3
- ?>
 
 
 
admin/schedule.php DELETED
@@ -1,228 +0,0 @@
1
- <?php
2
-
3
- $plugin_schedule = wp_get_schedule( 'wp_update_plugins' );
4
- $theme_schedule = wp_get_schedule( 'wp_update_themes' );
5
- $core_schedule = wp_get_schedule( 'wp_version_check' );
6
- $mail_sc = wp_get_schedule( 'cau_set_schedule_mail' );
7
-
8
- if( isset( $_POST['submit'] ) ) {
9
-
10
- check_admin_referer( 'cau_save_schedule' );
11
-
12
- // Set variables
13
- $plugin_sc = $_POST['plugin_schedule'];
14
- $theme_sc = $_POST['theme_schedule'];
15
- $core_sc = $_POST['core_schedule'];
16
- $schedule_mail = $_POST['schedule_mail'];
17
-
18
-
19
- // First clear schedules
20
- wp_clear_scheduled_hook('wp_update_plugins');
21
- wp_clear_scheduled_hook('wp_update_themes');
22
- wp_clear_scheduled_hook('wp_version_check');
23
- wp_clear_scheduled_hook('cau_set_schedule_mail');
24
-
25
- // Then set the new times
26
- if( $plugin_sc == 'daily' ) {
27
-
28
- $date = date( 'Y-m-d' );
29
- $hours = $_POST['pluginScheduleTimeH'];
30
- $minutes = $_POST['pluginScheduleTimeM'];
31
- $seconds = date( 's' );
32
- $fullDate = $date.' '.$hours.':'.$minutes.':'.$seconds;
33
- $pluginSetTime = strtotime( $fullDate );
34
-
35
- wp_schedule_event( $pluginSetTime, $plugin_sc, 'wp_update_plugins' );
36
-
37
- } else {
38
-
39
- wp_schedule_event( time(), $plugin_sc, 'wp_update_plugins' );
40
-
41
- }
42
- if( $theme_sc == 'daily' ) {
43
-
44
- $dateT = date( 'Y-m-d' );
45
- $hoursT = $_POST['ThemeScheduleTimeH'];
46
- $minutesT = $_POST['ThemeScheduleTimeM'];
47
- $secondsT = date( 's' );
48
- $fullDateT = $dateT.' '.$hoursT.':'.$minutesT.':'.$secondsT;
49
- $themeSetTime = strtotime( $fullDateT );
50
-
51
- wp_schedule_event( $themeSetTime, $theme_sc, 'wp_update_themes' );
52
-
53
- } else {
54
-
55
- wp_schedule_event( time(), $theme_sc, 'wp_update_themes' );
56
-
57
- }
58
-
59
- wp_schedule_event( time(), $core_sc, 'wp_version_check' );
60
- wp_schedule_event( time(), $schedule_mail, 'cau_set_schedule_mail' );
61
-
62
- header( "Location: ".cau_menloc()."?page=cau-settings&tab=schedule&showmessage=true" );
63
-
64
- }
65
-
66
- if( isset( $_GET['showmessage'] ) ) {
67
-
68
- echo '<div id="message" class="updated"><p>'.__('Changes were saved.', 'companion-auto-update').'</p></div>';
69
-
70
- } else {
71
-
72
- echo '<div class="message error warning"><p class="warning"><strong>'.__( 'Warning', 'companion-auto-update' ).'</strong> &dash; '.__( 'Changing these settings may affect your sites perfomance.', 'companion-auto-update' ).'</p></div>';
73
-
74
- }
75
-
76
- ?>
77
-
78
- <form method="POST">
79
-
80
- <h2 class="title"><?php _e('Updating', 'companion-auto-update');?></h2>
81
- <?php _e('How often should the auto updater kick in? (Default twice daily)', 'companion-auto-update'); ?>
82
- <table class="form-table">
83
- <tr>
84
- <th scope="row"><?php _e('Plugin update interval', 'companion-auto-update');?></th>
85
- <td>
86
- <p>
87
- <select name='plugin_schedule' id='plugin_schedule'>
88
- <option value='hourly' <?php if( $plugin_schedule == 'hourly' ) { echo "SELECTED"; } ?> ><?php _e('Hourly', 'companion-auto-update');?></option>
89
- <option value='twicedaily' <?php if( $plugin_schedule == 'twicedaily' ) { echo "SELECTED"; } ?> ><?php _e('Twice Daily', 'companion-auto-update');?></option>
90
- <option value='daily' <?php if( $plugin_schedule == 'daily' ) { echo "SELECTED"; } ?> ><?php _e('Daily', 'companion-auto-update');?></option>
91
- </select>
92
- </p>
93
- <div class='timeSchedulePlugins' <?php if( $plugin_schedule != 'daily' ) { echo "style='display: none;'"; } ?> >
94
-
95
- <?php
96
-
97
- $setTimePlugins = wp_next_scheduled( 'wp_update_plugins' );
98
- $setTimePluginsHour = date( 'H' , $setTimePlugins );
99
- $setTimePluginsMin = date( 'i' , $setTimePlugins );
100
-
101
- ?>
102
-
103
- <div class='cau_schedule_input'>
104
- <input type='text' name='pluginScheduleTimeH' value='<?php echo $setTimePluginsHour; ?>' maxlength='2' >
105
- </div><div class='cau_schedule_input_div'>
106
- :
107
- </div><div class='cau_schedule_input'>
108
- <input type='text' name='pluginScheduleTimeM' value='<?php echo $setTimePluginsMin; ?>' maxlength='2' >
109
- </div><div class='cau_shedule_notation'>
110
- <b><?php _e('Time notation: 24H', 'companion-auto-update'); ?></b>
111
- </div>
112
-
113
- <p class='description'><?php _e('At what time should the updater run? Only works when set to <u>daily</u>.', 'companion-auto-update'); ?> </p>
114
-
115
- </div>
116
- </td>
117
- </tr>
118
- <tr>
119
- <th scope="row"><?php _e('Theme update interval', 'companion-auto-update');?></th>
120
- <td>
121
- <p>
122
-
123
- <select name='theme_schedule' id='theme_schedule'>
124
- <option value='hourly' <?php if( $theme_schedule == 'hourly' ) { echo "SELECTED"; } ?> ><?php _e('Hourly', 'companion-auto-update');?></option>
125
- <option value='twicedaily' <?php if( $theme_schedule == 'twicedaily' ) { echo "SELECTED"; } ?> ><?php _e('Twice Daily', 'companion-auto-update');?></option>
126
- <option value='daily' <?php if( $theme_schedule == 'daily' ) { echo "SELECTED"; } ?> ><?php _e('Daily', 'companion-auto-update');?></option>
127
- </select>
128
- </p>
129
- <div class='timeScheduleThemes' <?php if( $theme_schedule != 'daily' ) { echo "style='display: none;'"; } ?> >
130
-
131
- <?php
132
-
133
- $setTimeThemes = wp_next_scheduled( 'wp_update_themes' );
134
- $setTimeThemesHour = date( 'H' , $setTimeThemes );
135
- $setTimeThemesMins = date( 'i' , $setTimeThemes );
136
-
137
- ?>
138
-
139
- <div class='cau_schedule_input'>
140
- <input type='text' name='ThemeScheduleTimeH' value='<?php echo $setTimeThemesHour; ?>' maxlength='2' >
141
- </div><div class='cau_schedule_input_div'>
142
- :
143
- </div><div class='cau_schedule_input'>
144
- <input type='text' name='ThemeScheduleTimeM' value='<?php echo $setTimeThemesMins; ?>' maxlength='2' >
145
- </div><div class='cau_shedule_notation'>
146
- <b><?php _e('Time notation: 24H', 'companion-auto-update'); ?></b>
147
- </div>
148
-
149
- <p class='description'><?php _e('At what time should the updater run? Only works when set to <u>daily</u>.', 'companion-auto-update'); ?> </p>
150
- </div>
151
- </td>
152
- </tr>
153
- <tr>
154
- <th scope="row"><?php _e('Core update interval', 'companion-auto-update');?></th>
155
- <td>
156
- <p>
157
- <select name='core_schedule'>
158
- <option value='hourly' <?php if( $core_schedule == 'hourly' ) { echo "SELECTED"; } ?> ><?php _e('Hourly', 'companion-auto-update');?></option>
159
- <option value='twicedaily' <?php if( $core_schedule == 'twicedaily' ) { echo "SELECTED"; } ?> ><?php _e('Twice Daily', 'companion-auto-update');?></option>
160
- <option value='daily' <?php if( $core_schedule == 'daily' ) { echo "SELECTED"; } ?> ><?php _e('Daily', 'companion-auto-update');?></option>
161
- </select>
162
- </p>
163
- </td>
164
- </tr>
165
- </table>
166
-
167
- <h2 class="title"><?php _e('Email Notifications', 'companion-auto-update');?></h2>
168
- <?php _e('How often should notifications be send? (Default daily)', 'companion-auto-update'); ?>
169
- <table class="form-table">
170
- <tr>
171
- <th scope="row"><?php _e('Email Notifications', 'companion-auto-update');?></th>
172
- <td>
173
- <p>
174
- <select name='schedule_mail'>
175
- <option value='hourly' <?php if( $mail_sc == 'hourly' ) { echo "SELECTED"; } ?> ><?php _e('Hourly', 'companion-auto-update');?></option>
176
- <option value='twicedaily' <?php if( $mail_sc == 'twicedaily' ) { echo "SELECTED"; } ?> ><?php _e('Twice Daily', 'companion-auto-update');?></option>
177
- <option value='daily' <?php if( $mail_sc == 'daily' ) { echo "SELECTED"; } ?> ><?php _e('Daily', 'companion-auto-update');?></option>
178
- </select>
179
- </p>
180
- </td>
181
- </tr>
182
- <tr>
183
- <th scope="row"><?php _e('Disable Notifications', 'companion-auto-update');?></th>
184
- <td>
185
- <p>
186
- <?php _e('To disable email notifications go to the dashboard and uncheck everything under "Email Notifications".', 'companion-auto-update');?>
187
- </p>
188
- </td>
189
- </tr>
190
- </table>
191
-
192
- <?php wp_nonce_field( 'cau_save_schedule' ); ?>
193
-
194
- <p><!-- SPACING --></p>
195
-
196
- <input type='submit' name='submit' id='submit' class='button button-primary' value='<?php _e( "Save changes", "companion-auto-update" ); ?>'>
197
-
198
- </form>
199
-
200
- <script type="text/javascript">
201
-
202
- jQuery( '#plugin_schedule' ).change( function() {
203
-
204
- var selected = jQuery(this).val();
205
-
206
- if( selected == 'daily' ) {
207
- jQuery('.timeSchedulePlugins').show();
208
- } else {
209
- jQuery('.timeSchedulePlugins').hide();
210
- }
211
-
212
-
213
- });
214
-
215
- jQuery( '#theme_schedule' ).change( function() {
216
-
217
- var selected = jQuery(this).val();
218
-
219
- if( selected == 'daily' ) {
220
- jQuery('.timeScheduleThemes').show();
221
- } else {
222
- jQuery('.timeScheduleThemes').hide();
223
- }
224
-
225
-
226
- });
227
-
228
- </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/support.php DELETED
@@ -1,44 +0,0 @@
1
-
2
- <h2 class="title"><?php _e('Support', 'companion-auto-update');?></h2>
3
- <?php _e('Feel free to reach out to me if you have any questions or feedback.', 'companion-auto-update'); ?>
4
-
5
- <table class="form-table cau_support">
6
-
7
- <tr>
8
- <th scope="row"><?php _e('Give feedback', 'companion-auto-update');?></th>
9
- <td>
10
- <a href="http://codeermeneer.nl/cau_poll/" target="_blank" class="button"><span class="dashicons dashicons-format-status"></span> <?php _e('Give feedback', 'companion-auto-update'); ?></a>
11
- <a href="https://wordpress.org/support/plugin/companion-auto-update" target="_blank" class="button"><span class="dashicons dashicons-megaphone"></span> <?php _e('WordPress Support Forum', 'companion-auto-update'); ?></a>
12
- </td>
13
- </tr>
14
- <tr>
15
- <th scope="row"><?php _e('Contact us', 'companion-auto-update');?></th>
16
- <td>
17
- <a href="http://codeermeneer.nl/contact/" target="_blank" class="button"><span class="dashicons dashicons-email"></span> <?php _e('Email', 'companion-auto-update'); ?></a>
18
- <a href="http://twitter.com/papino120/" target="_blank" class="button"><span class="dashicons dashicons-twitter"></span> Twitter</a>
19
- </td>
20
- </tr>
21
- <tr>
22
- <th scope="row"><?php _e('Want to contribute?', 'companion-auto-update');?></th>
23
- <td>
24
- <a href="https://translate.wordpress.org/projects/wp-plugins/companion-auto-update/" target="_blank" class="button"><span class="dashicons dashicons-welcome-learn-more"></span> <?php _e('Help us translate', 'companion-auto-update'); ?></a>
25
- </td>
26
- </tr>
27
-
28
- </table>
29
-
30
- <h2 class="title"><?php _e('Like our plugin?', 'companion-auto-update');?></h2>
31
- <?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'); ?>
32
-
33
- <p class="cau_support">
34
- <a href="https://www.paypal.me/dakel/5/" target="_blank" class="button button-primary donate-button">
35
- <span class="dashicons dashicons-heart"></span>
36
- <?php _e('Donate to help development', 'companion-auto-update'); ?>
37
- </a>
38
- <a href="https://wordpress.org/support/plugin/companion-auto-update/reviews/#new-post" target="_blank" class="button rate-button">
39
- <span class="dashicons dashicons-star-filled"></span>
40
- <?php _e('Rate us (5 stars?)', 'companion-auto-update'); ?>
41
- </a>
42
- </p>
43
-
44
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
backend/style.css DELETED
@@ -1,175 +0,0 @@
1
- /* Default Stylings */
2
- .message.warning {
3
- border-left-color: orange;
4
- }
5
- p.warning strong {
6
- color: orange;
7
- }
8
- .cau_support_buttons {
9
- display: inline-block;
10
- }
11
-
12
- /* Table Styling */
13
- table.autoupdate th.head-plugin {
14
- min-width: 250px;
15
- }
16
- table.autoupdate th.head-status {
17
- min-width: 150px;
18
- }
19
- table.autoupdate th.check-column {
20
- position: relative;
21
- min-width: 55px;
22
- }
23
- table.autoupdate tr.inactive {
24
- background: #FEF7F1;
25
- }
26
- table.autoupdate tr.active .check-column {
27
- border-left: 3px solid transparent;
28
- }
29
- table.autoupdate tr.inactive .check-column {
30
- border-left: 3px solid #D54E21;
31
- }
32
- table.autoupdate tr.inactive td.column-status p {
33
- color: #BF3D3C;
34
- }
35
- table.autoupdate tr.active td.column-status p {
36
- color: #000;
37
- }
38
-
39
- /* Update Log */
40
- table.autoupdatelog strong {
41
- color: #000;
42
- }
43
- table.autoupdatelog .dashicons {
44
- color: #00A0D2;
45
- }
46
-
47
- /* Custom checkboxes */
48
- #the-list input[type="checkbox"]:not(:checked), #the-list input[type="checkbox"]:checked {
49
- width: 45px;
50
- height: 45px;
51
- position: absolute;
52
- top: 0;
53
- bottom: 0;
54
- z-index: 100;
55
- display: block;
56
- opacity: 0;
57
- }
58
- #the-list input[type="checkbox"]:not(:checked) + label, #the-list input[type="checkbox"]:checked + label {
59
- position: absolute;
60
- top: 15px;
61
- left: 12px;
62
- cursor: pointer;
63
- }
64
- #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 {
65
- content: '';
66
- position: absolute;
67
- }
68
- #the-list input[type="checkbox"]:not(:checked) + label:before, #the-list input[type="checkbox"]:checked + label:before {
69
- left: 0;
70
- top: -3px;
71
- width: 30px;
72
- height: 16px;
73
- background: transparent;
74
- border: 2px solid #9178B7;
75
- border-radius: 15px;
76
- transition: background-color .2s;
77
- }
78
- #the-list input[type="checkbox"]:not(:checked) + label:after, #the-list input[type="checkbox"]:checked + label:after {
79
- width: 8px;
80
- height: 8px;
81
- transition: all .2s;
82
- border-radius: 500px;
83
- background: transparent;
84
- border: 2px solid #9178B7;
85
- top: 1px;
86
- left: 5px;
87
- }
88
- #the-list input[type="checkbox"]:not(:checked) + label:before {
89
- background: #9178B7;
90
- border: 2px solid #9178B7;
91
- }
92
- #the-list input[type="checkbox"]:not(:checked) + label:after {
93
- background: #9178B7;
94
- border-color: #FFF;
95
- left: 18px;
96
- }
97
- .cau_schedule_input {
98
- display: inline-block;
99
- vertical-align: middle;
100
- width: 40px;
101
- }
102
- .cau_schedule_input input {
103
- max-width: 100%;
104
- text-align: center;
105
- }
106
- .cau_schedule_input_div {
107
- display: inline-block;
108
- vertical-align: middle;
109
- padding: 0 6px;
110
- font-weight: bold;
111
- }
112
- .cau_shedule_notation {
113
- display: inline-block;
114
- vertical-align: middle;
115
- width: 125px;
116
- padding-left: 5px;
117
- }
118
- .cau_support .dashicons {
119
- position: relative;
120
- bottom: -6px;
121
- font-size: 1.3em;
122
- }
123
- .cau_content_wrap .button {
124
- box-shadow: none!important;
125
- text-shadow: none!important;
126
- height: auto;
127
- }
128
- .cau_content_wrap .button-primary {
129
- background-color: #9178B7;
130
- border-color: #6B5887;
131
- color: #FFF;
132
- }
133
- .cau_content_wrap .button-primary:hover {
134
- background-color: #796597;
135
- border-color: #5B4C72;
136
- color: #FFF;
137
- }
138
- .cau_content_wrap .button-primary:active {
139
- background-color: #796597;
140
- border-color: #5B4C72;
141
- }
142
- .cau_support .donate-button {
143
- padding: 10px 15px;
144
- height: auto;
145
- }
146
- .cau_support .rate-button {
147
- padding: 10px 20px;
148
- height: auto;
149
- color: #735F91!important;
150
- }
151
- .cau_support_buttons .donate-button {
152
- background-color: #9178B7;
153
- color: #FFF;
154
- border: 0px!important;
155
- }
156
- .cau_support_buttons .donate-button:hover {
157
- background-color: #735F91;
158
- color: #FFF;
159
- }
160
- .cau_support_buttons .donate-button:active {
161
- background-color: #735F91;
162
- color: #FFF;
163
- }
164
-
165
- @media screen and (max-width: 1000px) {
166
- .cau_support_buttons, .cau_hide_on_mobile, table.autoupdate thead {
167
- display: none!important;
168
- }
169
- .cau_schedule_input {
170
- width: 50px;
171
- }
172
- .cau_support .dashicons {
173
- bottom: 0px;
174
- }
175
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cau_emails.php DELETED
@@ -1,200 +0,0 @@
1
- <?php
2
-
3
- // Check if emails should be send or not
4
- function cau_check_updates_mail() {
5
-
6
- global $wpdb;
7
- $table_name = $wpdb->prefix . "auto_updates";
8
- $cau_configs = $wpdb->get_results( "SELECT * FROM $table_name" );
9
-
10
- if( $cau_configs[5]->onoroff == 'on' ) {
11
- cau_list_theme_updates(); // Check for theme updates
12
- cau_list_plugin_updates(); // Check for plugin updates
13
- }
14
-
15
- if( $cau_configs[6]->onoroff == 'on' ) if( $cau_configs[0]->onoroff == 'on' ) cau_plugin_updated(); // Check for updated plugins
16
- }
17
-
18
- // Ge the emailadresses it should be send to
19
- function cau_set_email() {
20
-
21
- global $wpdb;
22
- $table_name = $wpdb->prefix . "auto_updates";
23
- $cau_configs = $wpdb->get_results( "SELECT * FROM $table_name" );
24
- $emailArray = array();
25
-
26
- if( $cau_configs[4]->onoroff == '' ) {
27
- array_push( $emailArray, get_option('admin_email') );
28
- } else {
29
- $emailAdresses = $cau_configs[4]->onoroff;
30
- $list = explode( ", ", $emailAdresses );
31
- foreach ( $list as $key ) {
32
- array_push( $emailArray, $list );
33
- }
34
- }
35
-
36
- return $emailArray;
37
-
38
- }
39
-
40
- // Set the content for the emails about pending updates
41
- function cau_pending_message( $single, $plural ) {
42
-
43
- return sprintf( esc_html__(
44
- 'There are one or more %1$s updates available on your WordPress site at: %2$s, but you have disabled auto-updating for %3$s. Login to your dashboard to manually update your %3$s.', 'companion-auto-update'
45
- ), $single, get_site_url(), $plural);
46
-
47
- }
48
-
49
- // Set the content for the emails about recent updates
50
- function cau_updated_message( $type, $updatedList ) {
51
-
52
- return sprintf( esc_html__(
53
- 'We have updated one or more %1$s on your WordPress site at %2$s, be sure to check if everything still works properly. The following %1$s have been updated: %3$s', 'companion-auto-update'
54
- ), $type, get_site_url(), $updatedList );
55
-
56
- }
57
-
58
- // Checks if theme updates are available
59
- function cau_list_theme_updates() {
60
-
61
- global $wpdb;
62
- $table_name = $wpdb->prefix . "auto_updates";
63
-
64
- $configs = $wpdb->get_results( "SELECT * FROM $table_name WHERE name = 'themes'");
65
- foreach ( $configs as $config ) {
66
-
67
- if( $config->onoroff != 'on' ) {
68
-
69
- require_once ABSPATH . '/wp-admin/includes/update.php';
70
- $themes = get_theme_updates();
71
-
72
- if ( !empty( $themes ) ) {
73
-
74
- $subject = '[' . get_bloginfo( 'name' ) . '] ' . __('Theme update available.', 'companion-auto-update');
75
- $type = __('theme', 'companion-auto-update');
76
- $type_plural = __('themes', 'companion-auto-update');
77
- $message = cau_pending_message( $type, $type_plural );
78
-
79
- foreach ( cau_set_email() as $key => $value) {
80
- foreach ($value as $k => $v) {
81
- wp_mail( $v, $subject, $message, $headers );
82
- }
83
- break;
84
- }
85
- }
86
-
87
- }
88
-
89
- }
90
-
91
- }
92
-
93
- // Checks if plugin updates are available
94
- function cau_list_plugin_updates() {
95
-
96
- global $wpdb;
97
- $table_name = $wpdb->prefix . "auto_updates";
98
-
99
- $configs = $wpdb->get_results( "SELECT * FROM $table_name WHERE name = 'plugins'");
100
- foreach ( $configs as $config ) {
101
-
102
- if( $config->onoroff != 'on' ) {
103
-
104
- require_once(ABSPATH . 'wp-admin/includes/plugin-install.php');
105
- $plugins = get_plugin_updates();
106
-
107
- if ( !empty( $plugins ) ) {
108
-
109
- $subject = '[' . get_bloginfo( 'name' ) . '] ' . __('Plugin update available.', 'companion-auto-update');
110
- $type = __('plugin', 'companion-auto-update');
111
- $type_plural = __('plugins', 'companion-auto-update');
112
- $message = cau_pending_message( $type, $type_plural );
113
-
114
- foreach ( cau_set_email() as $key => $value) {
115
- foreach ($value as $k => $v) {
116
- wp_mail( $v, $subject, $message, $headers );
117
- }
118
- break;
119
- }
120
- }
121
-
122
- }
123
-
124
- }
125
- }
126
-
127
- // Alerts when plugin has been updated
128
- function cau_plugin_updated() {
129
-
130
- // Create arrays
131
- $pluginNames = array();
132
- $pluginDates = array();
133
-
134
- // Where to look for plugins
135
- $plugdir = plugin_dir_path( __DIR__ );
136
- $allPlugins = get_plugins();
137
-
138
- // Loop trough all plugins
139
- foreach ( $allPlugins as $key => $value) {
140
-
141
- // Get plugin data
142
- $fullPath = $plugdir.'/'.$key;
143
- $getFile = $path_parts = pathinfo( $fullPath );
144
- $pluginData = get_plugin_data( $fullPath );
145
-
146
- // Get last update date
147
- $fileDate = date ( 'YmdHi', filemtime( $fullPath ) );
148
- $mailSched = wp_get_schedule( 'cau_set_schedule_mail' );
149
-
150
- if( $mailSched == 'hourly' ) {
151
- $lastday = date( 'YmdHi', strtotime( '-1 hour' ) );
152
- } elseif( $mailSched == 'twicedaily' ) {
153
- $lastday = date( 'YmdHi', strtotime( '-12 hours' ) );
154
- } elseif( $mailSched == 'daily' ) {
155
- $lastday = date( 'YmdHi', strtotime( '-1 day' ) );
156
- }
157
-
158
- if( $fileDate >= $lastday ) {
159
-
160
- // Get plugin name
161
- foreach ( $pluginData as $dataKey => $dataValue ) {
162
- if( $dataKey == 'Name') {
163
- array_push( $pluginNames , $dataValue );
164
- }
165
- }
166
-
167
- array_push( $pluginDates, $fileDate );
168
- }
169
-
170
- }
171
-
172
- $totalNum = 0;
173
- $updatedList = '';
174
-
175
- foreach ( $pluginDates as $key => $value ) {
176
-
177
- $updatedList .= "- ".$pluginNames[$key]."\n";
178
- $totalNum++;
179
-
180
- }
181
-
182
- // If plugins have been updated in the last day, send email
183
- if( $totalNum > 0 ) {
184
-
185
- $subject = '[' . get_bloginfo( 'name' ) . '] ' . __('One or more plugins have been updated.', 'companion-auto-update');
186
- $type = __('plugins', 'companion-auto-update');
187
- $message = cau_updated_message( $type, "\n".$updatedList );
188
-
189
- foreach ( cau_set_email() as $key => $value) {
190
- foreach ($value as $k => $v) {
191
- wp_mail( $v, $subject, $message, $headers );
192
- }
193
- break;
194
- }
195
-
196
- }
197
-
198
- }
199
-
200
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cau_functions.php DELETED
@@ -1,195 +0,0 @@
1
- <?php
2
-
3
- function cau_menloc() {
4
-
5
- return 'tools.php';
6
-
7
- }
8
-
9
- function active_tab( $page ) {
10
-
11
- if( !isset( $_GET['tab'] ) ) {
12
- $cur_page = '';
13
- } else {
14
- $cur_page = $_GET['tab'];
15
- }
16
-
17
- if( $page == $cur_page ) {
18
- echo 'nav-tab-active';
19
- }
20
-
21
- }
22
-
23
- function donotupdatelist() {
24
-
25
- global $wpdb;
26
- $table_name = $wpdb->prefix . "auto_updates";
27
- $config = $wpdb->get_results( "SELECT * FROM $table_name WHERE name = 'notUpdateList'");
28
-
29
- $list = $config[0]->onoroff;
30
- $list = explode( ", ", $list );
31
- $returnList = array();
32
-
33
- foreach ( $list as $key ) array_push( $returnList, $key );
34
-
35
- return $returnList;
36
-
37
- }
38
-
39
- function cau_fetch_log( $limit, $format = 'simple' ) {
40
-
41
- // Create arrays
42
- $pluginNames = array();
43
- $pluginDates = array();
44
- $pluginDatesF = array();
45
- $type = array();
46
-
47
- // Where to look for plugins
48
- $plugdir = plugin_dir_path( __DIR__ );
49
- $allPlugins = get_plugins();
50
-
51
- // Loop trough all plugins
52
- foreach ( $allPlugins as $key => $value) {
53
-
54
- // Get plugin data
55
- $fullPath = $plugdir.'/'.$key;
56
- $getFile = $path_parts = pathinfo( $fullPath );
57
- $pluginData = get_plugin_data( $fullPath );
58
-
59
- // Get plugin name
60
- foreach ( $pluginData as $dataKey => $dataValue ) {
61
- if( $dataKey == 'Name') {
62
- array_push( $pluginNames , $dataValue );
63
- }
64
- }
65
-
66
- // Get last update date
67
- $dateFormat = get_option( 'date_format' );
68
- $fileDate = date ( 'YmdHi', filemtime( $fullPath ) );
69
- if( $format == 'table' ) {
70
- $fileDateF = date_i18n ( $dateFormat, filemtime( $fullPath ) );
71
- $fileDateF .= ' &dash; '.date ( 'H:i', filemtime( $fullPath ) );
72
- } else {
73
- $fileDateF = date_i18n ( $dateFormat, filemtime( $fullPath ) );
74
- }
75
- array_push( $pluginDates, $fileDate );
76
- array_push( $pluginDatesF, $fileDateF );
77
- array_push( $type, 'Plugin' );
78
-
79
- }
80
-
81
- // Where to look for themes
82
- $themedir = get_theme_root();
83
- $allThemes = wp_get_themes();
84
-
85
- // Loop trough all themes
86
- foreach ( $allThemes as $key => $value) {
87
-
88
- // Get theme data
89
- $fullPath = $themedir.'/'.$key;
90
- $getFile = $path_parts = pathinfo( $fullPath );
91
-
92
- // Get theme name
93
- array_push( $pluginNames , $path_parts['filename'] );
94
-
95
- // Get last update date
96
- $dateFormat = get_option( 'date_format' );
97
- $fileDate = date ( 'YmdHi', filemtime( $fullPath ) );
98
-
99
- if( $format == 'table' ) {
100
- $fileDateF = date_i18n ( $dateFormat, filemtime( $fullPath ) );
101
- $fileDateF .= ' &dash; '.date ( 'H:i', filemtime( $fullPath ) );
102
- } else {
103
- $fileDateF = date_i18n ( $dateFormat, filemtime( $fullPath ) );
104
- }
105
-
106
- array_push( $pluginDates, $fileDate );
107
- array_push( $pluginDatesF, $fileDateF );
108
- array_push( $type, 'Theme' );
109
-
110
- }
111
-
112
- // Sort array by date
113
- arsort( $pluginDates );
114
-
115
- if( $limit == 'all' ) {
116
- $limit = 999;
117
- }
118
-
119
- $listClasses = 'wp-list-table widefat autoupdate autoupdatelog';
120
-
121
- if( $format == 'table' ) {
122
- $listClasses .= ' autoupdatelog striped';
123
- } else {
124
- $listClasses .= ' autoupdatewidget';
125
- }
126
-
127
- echo '<table class="'.$listClasses.'">';
128
-
129
- // Show the last updated plugins
130
- if( $format == 'table' ) {
131
-
132
- echo '<thead>
133
- <tr>
134
- <th><strong>'.__( 'Name', 'companion-auto-update' ).'</strong></th>
135
- <th><strong>'.__( 'Type', 'companion-auto-update' ).'</strong></th>
136
- <th><strong>'.__( 'Last updated on', 'companion-auto-update' ).'</strong></th>
137
- </tr>
138
- </thead>';
139
-
140
- }
141
-
142
- echo '<tbody id="the-list">';
143
-
144
- $loopings = 0;
145
-
146
- foreach ( $pluginDates as $key => $value ) {
147
-
148
- if( $loopings < $limit ) {
149
-
150
- echo '<tr>';
151
-
152
- echo '<td class="column-updatetitle"><p><strong>'. $pluginNames[$key] .'</strong></p></td>';
153
-
154
- if( $format == 'table' ) {
155
-
156
- if( $type[$key] == 'Plugin' ) {
157
- $thisType = __( 'Plugin', 'companion-auto-update' );
158
- } else if( $type[$key] == 'Theme' ) {
159
- $thisType = __( 'Theme', 'companion-auto-update' );
160
- }
161
-
162
- echo '<td class="cau_hide_on_mobile column-description"><p>'. $thisType .'</p></td>';
163
-
164
- }
165
-
166
- echo '<td class="column-date" style="min-width: 100px;"><p>'. $pluginDatesF[$key] .'</p></td>';
167
-
168
- echo '</tr>';
169
-
170
- $loopings++;
171
-
172
- }
173
-
174
- }
175
-
176
- echo "</tbody></table>";
177
-
178
- }
179
-
180
- // Only update plugin which are enabled
181
- function cau_dont_update( $update, $item ) {
182
-
183
- $plugins = donotupdatelist();
184
-
185
- if ( in_array( $item->slug, $plugins ) ) {
186
- // Use the normal API response to decide whether to update or not
187
- return $update;
188
- } else {
189
- // Always update plugins
190
- return true;
191
- }
192
-
193
- }
194
-
195
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
companion-auto-update-check-updates.php DELETED
@@ -1,6 +0,0 @@
1
- <?php
2
-
3
- // Deprecated file as of version 3.0. Will be removed in a future update.
4
- require_once( 'cau_emails.php' ); // Fallback
5
-
6
- ?>
 
 
 
 
 
 
companion-auto-update.php CHANGED
@@ -1,222 +1,28 @@
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.0.9
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
- // Install db
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
29
- }
30
- add_action('cau_set_schedule_mail', 'cau_check_updates_mail');
31
-
32
- function cau_database_creation() {
33
-
34
- global $wpdb;
35
- global $cau_db_version;
36
-
37
- $cau_db_version = '1.4.4';
38
-
39
- // Create db table
40
- $table_name = $wpdb->prefix . "auto_updates";
41
-
42
- $sql = "CREATE TABLE $table_name (
43
- id INT(9) NOT NULL AUTO_INCREMENT,
44
- name VARCHAR(255) NOT NULL,
45
- onoroff VARCHAR(99999) NOT NULL,
46
- UNIQUE KEY id (id)
47
- )";
48
-
49
- require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
50
- dbDelta( $sql );
51
-
52
- // Database version
53
- add_option( "cau_db_version", "$cau_db_version" );
54
-
55
- // Insert data
56
- cau_install_data();
57
-
58
- // Updating..
59
- $installed_ver = get_option( "cau_db_version" );
60
- if ( $installed_ver != $cau_db_version ) update_option( "cau_db_version", $cau_db_version );
61
-
62
- }
63
-
64
- // Check if database table exists before creating
65
- function cau_check_if_exists( $whattocheck ) {
66
-
67
- global $wpdb;
68
- $table_name = $wpdb->prefix . "auto_updates";
69
-
70
- $rows = $wpdb->get_col( "SELECT COUNT(*) as num_rows FROM $table_name WHERE name = '$whattocheck'" );
71
- $check = $rows[0];
72
-
73
- if( $check > 0) {
74
- return true;
75
- } else {
76
- return false;
77
- }
78
-
79
- }
80
-
81
- // Inset Data
82
- function cau_install_data() {
83
-
84
- global $wpdb;
85
- $table_name = $wpdb->prefix . "auto_updates";
86
- $toemail = get_option('admin_email');
87
-
88
- // Update configs
89
- if( !cau_check_if_exists( 'plugins' ) ) $wpdb->insert( $table_name, array( 'name' => 'plugins', 'onoroff' => 'on' ) );
90
- if( !cau_check_if_exists( 'themes' ) ) $wpdb->insert( $table_name, array( 'name' => 'themes', 'onoroff' => 'on' ) );
91
- if( !cau_check_if_exists( 'minor' ) ) $wpdb->insert( $table_name, array( 'name' => 'minor', 'onoroff' => 'on' ) );
92
- if( !cau_check_if_exists( 'major' ) ) $wpdb->insert( $table_name, array( 'name' => 'major', 'onoroff' => 'on' ) );
93
-
94
- // Email configs
95
- if( !cau_check_if_exists( 'email' ) ) $wpdb->insert( $table_name, array( 'name' => 'email', 'onoroff' => '' ) );
96
- if( !cau_check_if_exists( 'send' ) ) $wpdb->insert( $table_name, array( 'name' => 'send', 'onoroff' => '' ) );
97
- if( !cau_check_if_exists( 'sendupdate' ) ) $wpdb->insert( $table_name, array( 'name' => 'sendupdate', 'onoroff' => '' ) );
98
-
99
- // Advanced
100
- if( !cau_check_if_exists( 'notUpdateList' ) ) $wpdb->insert( $table_name, array( 'name' => 'notUpdateList', 'onoroff' => '' ) );
101
- if( !cau_check_if_exists( 'translations' ) ) $wpdb->insert( $table_name, array( 'name' => 'translations', 'onoroff' => 'on' ) );
102
- if( !cau_check_if_exists( 'wpemails' ) ) $wpdb->insert( $table_name, array( 'name' => 'wpemails', 'onoroff' => 'on' ) );
103
-
104
- }
105
- register_activation_hook( __FILE__, 'cau_install' );
106
-
107
- // Clear everything
108
- function cau_remove() {
109
- global $wpdb;
110
- $table_name = $wpdb->prefix . "auto_updates";
111
- $wpdb->query( "DROP TABLE IF EXISTS $table_name" );
112
- wp_clear_scheduled_hook('cau_set_schedule_mail');
113
- }
114
- register_deactivation_hook( __FILE__, 'cau_remove' );
115
-
116
- // Update
117
- function cau_update_db_check() {
118
- global $cau_db_version;
119
- if ( get_site_option( 'cau_db_version' ) != $cau_db_version ) {
120
- cau_database_creation();
121
- }
122
- }
123
- add_action( 'plugins_loaded', 'cau_update_db_check' );
124
-
125
- // Load custom functions
126
- require_once( 'cau_functions.php' );
127
-
128
- // Add plugin to menu
129
- function register_cau_menu_page() {
130
- add_submenu_page( cau_menloc() , __('Auto Updater', 'companion-auto-update'), __('Auto Updater', 'companion-auto-update'), 'manage_options', 'cau-settings', 'cau_frontend' );
131
- }
132
- add_action( 'admin_menu', 'register_cau_menu_page' );
133
-
134
- // Settings page
135
- function cau_frontend() { ?>
136
-
137
- <div class='wrap cau_content_wrap'>
138
-
139
- <h1 class="wp-heading-inline"><?php _e('Auto Updater', 'companion-auto-update'); ?></h1>
140
-
141
- <div class='cau_support_buttons'>
142
- <a href="https://www.paypal.me/dakel/1/" target="_blank" class="donate-button page-title-action"><?php _e('Donate to help development', 'companion-auto-update'); ?></a>
143
- </div>
144
-
145
- <hr class="wp-header-end">
146
-
147
- <h2 class="nav-tab-wrapper wp-clearfix">
148
- <a href="<?php echo cau_menloc(); ?>?page=cau-settings" class="nav-tab <?php active_tab(''); ?>"><?php _e('Dashboard', 'companion-auto-update'); ?></a>
149
- <a href="<?php echo cau_menloc(); ?>?page=cau-settings&amp;tab=pluginlist" class="nav-tab <?php active_tab('pluginlist'); ?>"><?php _e('Filter plugins', 'companion-auto-update'); ?></a>
150
- <a href="<?php echo cau_menloc(); ?>?page=cau-settings&amp;tab=schedule" class="nav-tab <?php active_tab('schedule'); ?>"><?php _e('Scheduling', 'companion-auto-update'); ?></a>
151
- <a href="<?php echo cau_menloc(); ?>?page=cau-settings&amp;tab=log" class="nav-tab <?php active_tab('log'); ?>"><?php _e('Update log', 'companion-auto-update'); ?></a>
152
- <a href="<?php echo cau_menloc(); ?>?page=cau-settings&amp;tab=support" class="nav-tab <?php active_tab('support'); ?>"><?php _e('Support & Feedback', 'companion-auto-update'); ?></a>
153
- </h2>
154
-
155
- <?php
156
-
157
- if( !isset( $_GET['tab'] ) ) {
158
-
159
- require_once( 'admin/dashboard.php' );
160
-
161
- } else {
162
-
163
- require_once( 'admin/'.$_GET['tab'].'.php' );
164
-
165
- } ?>
166
-
167
- </div>
168
-
169
- <?php }
170
-
171
- // Add a widget to the dashboard.
172
- function cau_add_widget() {
173
- if ( current_user_can( 'manage_options' ) ) wp_add_dashboard_widget( 'cau-update-log', __('Update log', 'companion-auto-update'), 'cau_widget' );
174
- }
175
- add_action( 'wp_dashboard_setup', 'cau_add_widget' );
176
-
177
- function cau_widget() {
178
-
179
- 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>';
180
- 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>';
181
- cau_fetch_log( '7' );
182
- echo '<p>
183
- <a href="'.get_admin_url().''.cau_menloc().'?page=cau-settings&tab=log">'.__('View full changelog', 'companion-auto-update').'</a>
184
- <span class="cau_divide">|</span>
185
- <a href="'.get_admin_url().''.cau_menloc().'?page=cau-settings">'.__('Configure auto updating', 'companion-auto-update').'</a>
186
- </p>';
187
-
188
- }
189
-
190
- // Load admin styles
191
- function load_cau_sytyles( $hook ) {
192
 
193
- if( $hook != 'tools_page_cau-settings' && $hook != 'index_page_cau-settings' ) return;
194
- wp_enqueue_style( 'cau_admin_styles', plugins_url( 'backend/style.css' , __FILE__ ) );
195
-
196
- }
197
- add_action( 'admin_enqueue_scripts', 'load_cau_sytyles' );
198
-
199
- // Send e-mails
200
- require_once( 'cau_emails.php' );
201
-
202
- // Add settings link on plugin page
203
- function cau_settings_link( $links ) {
204
-
205
- $settings_link = '<a href="'.get_admin_url().''.cau_menloc().'?page=cau-settings">'.__('Settings', 'companion-auto-update' ).'</a>';
206
- $settings_link2 = '<a href="https://translate.wordpress.org/projects/wp-plugins/companion-auto-update">'.__('Translate', 'companion-auto-update' ).'</a>';
207
- $settings_link3 = '<a href="https://www.paypal.me/dakel/1/">'.__('Donate', 'companion-auto-update' ).'</a>';
208
- $settings_link4 = '<a href="http://codeermeneer.nl/cau_poll/">'.__('Feedback', 'companion-auto-update' ).'</a>';
209
 
210
- array_unshift( $links, $settings_link2 );
211
- array_unshift( $links, $settings_link3 );
212
- array_unshift( $links, $settings_link4 );
213
- array_unshift( $links, $settings_link );
214
-
215
- return $links;
216
-
217
  }
218
- $plugin = plugin_basename(__FILE__);
219
- add_filter( "plugin_action_links_$plugin", "cau_settings_link" );
220
 
221
  // Auto Update Class
222
  class CAU_auto_update {
@@ -230,61 +36,22 @@ class CAU_auto_update {
230
 
231
  public function CAU_auto_update_filters() {
232
 
233
- global $wpdb;
234
- $table_name = $wpdb->prefix . "auto_updates";
235
-
236
  // Enable for major updates
237
- $configs = $wpdb->get_results( "SELECT * FROM $table_name WHERE name = 'major'");
238
- foreach ( $configs as $config ) {
239
-
240
- if( $config->onoroff == 'on' ) add_filter( 'allow_major_auto_core_updates', '__return_true', 1 ); // Turn on
241
- if( $config->onoroff != 'on' ) add_filter( 'allow_major_auto_core_updates', '__return_false', 1 ); // Turn off
242
-
243
- }
244
 
245
  // Enable for minor updates
246
- $configs = $wpdb->get_results( "SELECT * FROM $table_name WHERE name = 'minor'");
247
- foreach ( $configs as $config ) {
248
-
249
- if( $config->onoroff == 'on' ) add_filter( 'allow_minor_auto_core_updates', '__return_true', 1 ); // Turn on
250
- if( $config->onoroff != 'on' ) add_filter( 'allow_minor_auto_core_updates', '__return_false', 1 ); // Turn off
251
-
252
- }
253
 
254
  // Enable for plugins
255
- $configs = $wpdb->get_results( "SELECT * FROM $table_name WHERE name = 'plugins'");
256
- foreach ( $configs as $config ) {
257
-
258
- if( $config->onoroff == 'on' ) add_filter( 'auto_update_plugin', 'cau_dont_update', 10, 2 ); // Turn on
259
- if( $config->onoroff != 'on' ) add_filter( 'auto_update_plugin', '__return_false', 1 ); // Turn off
260
-
261
- }
262
 
263
  // Enable for themes
264
- $configs = $wpdb->get_results( "SELECT * FROM $table_name WHERE name = 'themes'");
265
- foreach ( $configs as $config ) {
266
- if( $config->onoroff == 'on' ) add_filter( 'auto_update_theme', '__return_true', 1 ); // Turn on
267
- if( $config->onoroff != 'on' ) add_filter( 'auto_update_theme', '__return_false', 1 ); // Turn off
268
- }
269
-
270
- // Enable for translation files
271
- $configs = $wpdb->get_results( "SELECT * FROM $table_name WHERE name = 'translations'");
272
- foreach ( $configs as $config ) {
273
- if( $config->onoroff == 'on' ) add_filter( 'auto_update_translation', '__return_true' ); // Turn on
274
- if( $config->onoroff != 'on' ) add_filter( 'auto_update_translation', '__return_false' ); // Turn off
275
- }
276
-
277
- // WP Email Config
278
- $configs = $wpdb->get_results( "SELECT * FROM $table_name WHERE name = 'wpemail'");
279
- foreach ( $configs as $config ) {
280
- if( $config->onoroff == 'on' ) add_filter( 'auto_core_update_send_email', '__return_true' );
281
- if( $config->onoroff != 'on' ) add_filter( 'auto_core_update_send_email', '__return_false' );
282
- }
283
-
284
 
285
  }
286
 
287
  }
 
288
  new CAU_auto_update();
289
 
290
  ?>
1
  <?php
2
  /*
3
  * Plugin Name: Companion Auto Update
4
+ * Plugin URI: https://qreative-web.com
5
  * Description: This plugin auto updates all plugins, all themes and the wordpress core.
6
+ * Version: 1.1
7
+ * Author: Qreative-Web
8
+ * Author URI: https://qreative-web.com
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
  function cau_load_translations() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
 
21
+ // Load translations
22
+ load_plugin_textdomain( 'companion-auto-update', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
 
 
 
 
 
 
 
 
24
  }
25
+ add_action( 'init', 'cau_load_translations' );
 
26
 
27
  // Auto Update Class
28
  class CAU_auto_update {
36
 
37
  public function CAU_auto_update_filters() {
38
 
 
 
 
39
  // Enable for major updates
40
+ add_filter( 'allow_major_auto_core_updates', '__return_true', 1 );
 
 
 
 
 
 
41
 
42
  // Enable for minor updates
43
+ add_filter( 'allow_minor_auto_core_updates', '__return_true', 1 );
 
 
 
 
 
 
44
 
45
  // Enable for plugins
46
+ add_filter( 'auto_update_plugin', '__return_true', 1 );
 
 
 
 
 
 
47
 
48
  // Enable for themes
49
+ add_filter( 'auto_update_theme', '__return_true', 1 );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
 
51
  }
52
 
53
  }
54
+
55
  new CAU_auto_update();
56
 
57
  ?>
languages/companion-auto-update-nl.mo ADDED
Binary file
languages/companion-auto-update-nl.pot ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 10:17+0200\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-05-24 10:18+0200\n"
13
+ "Language-Team: \n"
14
+ "X-Generator: Poedit 1.8.7\n"
15
+ "Last-Translator: \n"
16
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
17
+ "Language: nl\n"
18
+
19
+ #. Plugin Name of the plugin/theme
20
+ msgid "Companion Auto Update"
21
+ msgstr ""
22
+
23
+ #. Plugin URI of the plugin/theme
24
+ #. Author URI of the plugin/theme
25
+ msgid "https://qreative-web.com"
26
+ msgstr ""
27
+
28
+ #. Description of the plugin/theme
29
+ msgid ""
30
+ "This plugin auto updates all plugins, all themes and the wordpress core."
31
+ msgstr "Deze plugin update alle plugins, themas en de wordpress core."
32
+
33
+ #. Author of the plugin/theme
34
+ msgid "Qreative-Web"
35
+ msgstr ""
languages/companion-auto-update-nl_NL.mo ADDED
Binary file
languages/companion-auto-update-nl_NL.pot ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 10:17+0200\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-05-24 10:18+0200\n"
13
+ "Language-Team: \n"
14
+ "X-Generator: Poedit 1.8.7\n"
15
+ "Last-Translator: \n"
16
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
17
+ "Language: nl\n"
18
+
19
+ #. Plugin Name of the plugin/theme
20
+ msgid "Companion Auto Update"
21
+ msgstr ""
22
+
23
+ #. Plugin URI of the plugin/theme
24
+ #. Author URI of the plugin/theme
25
+ msgid "https://qreative-web.com"
26
+ msgstr ""
27
+
28
+ #. Description of the plugin/theme
29
+ msgid ""
30
+ "This plugin auto updates all plugins, all themes and the wordpress core."
31
+ msgstr "Deze plugin update alle plugins, themas en de wordpress core."
32
+
33
+ #. Author of the plugin/theme
34
+ msgid "Qreative-Web"
35
+ msgstr ""
languages/companion-auto-update-nl_NL_formal.mo ADDED
Binary file
languages/companion-auto-update-nl_NL_formal.pot ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 10:17+0200\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-05-24 10:18+0200\n"
13
+ "Language-Team: \n"
14
+ "X-Generator: Poedit 1.8.7\n"
15
+ "Last-Translator: \n"
16
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
17
+ "Language: nl\n"
18
+
19
+ #. Plugin Name of the plugin/theme
20
+ msgid "Companion Auto Update"
21
+ msgstr ""
22
+
23
+ #. Plugin URI of the plugin/theme
24
+ #. Author URI of the plugin/theme
25
+ msgid "https://qreative-web.com"
26
+ msgstr ""
27
+
28
+ #. Description of the plugin/theme
29
+ msgid ""
30
+ "This plugin auto updates all plugins, all themes and the wordpress core."
31
+ msgstr "Deze plugin update alle plugins, themas en de wordpress core."
32
+
33
+ #. Author of the plugin/theme
34
+ msgid "Qreative-Web"
35
+ msgstr ""
languages/companion-auto-update.pot CHANGED
@@ -13,34 +13,6 @@ msgstr ""
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 ""
@@ -59,4 +31,4 @@ msgstr ""
59
 
60
  #. Author of the plugin/theme
61
  msgid "Qreative-Web"
62
- msgstr ""
13
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
  "Language-Team: LANGUAGE <LL@li.org>\n"
15
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  #. Plugin Name of the plugin/theme
17
  msgid "Companion Auto Update"
18
  msgstr ""
31
 
32
  #. Author of the plugin/theme
33
  msgid "Qreative-Web"
34
+ msgstr ""
readme.txt CHANGED
@@ -1,180 +1,59 @@
1
- === Companion Auto Update ===
2
- Contributors: Papin, qweb
3
- Donate link: https://www.paypal.me/dakel/2
4
- Tags: auto, automatic, background, update, updates, updating, automatic updates, automatic background updates, easy update, wordpress update, theme update, plugin update, up-to-date, security, update latest version, update core, update wp, update wp core, major updates, minor updates, update to new version, update core, update plugin, update plugins, update plugins automatically, update theme, plugin, theme, advance, control, mail, notifations, enable
5
  Requires at least: 3.5.0
6
  Tested up to: 4.9
7
- Stable tag: 3.0.9
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
- This plugin automatically updates all plugins, all themes and the wordpress core in the background.
12
 
13
  == Description ==
14
 
15
- = Keep your website safe! =
16
- 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.
17
- This plugin enables background auto-updating for all plugins, all themes and the wordpress core (both major and minor updates).
18
- 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.
19
 
20
- = Available settings =
21
- 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.
22
-
23
- = Know what's happening =
24
- 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.
25
- But if you don't want to recieve emails about this you can still log in and view the changelog to see what happened.
26
-
27
- = Advanced Controls =
28
- You can control auto-updating per plugin via the plugin filter.
29
- For example: If you have Woocommerce installed but you do not wan't to have it auto-updated you can now disable auto-updating for Woocommerce only, so your other plugins will continue to be updated.
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
  = Manual install =
37
- 1. Download Companion Auto Update.
38
- 1. Upload the 'Companion Auto Update' directory to your '/wp-content/plugins/' directory.
39
  1. Activate Companion Auto Update from your Plugins page.
40
 
41
  = Via WordPress =
42
- 1. Search for 'Companion Auto Update'.
43
  1. Click install.
44
  1. Activate.
45
 
46
  = Settings =
47
- Settings can be found trough Tools > Auto Updater
48
 
49
  == Frequently Asked Questions ==
50
 
51
  = Where can I find the settings? =
52
 
53
- You can find the settings under Tools > Auto updating
54
-
55
- = How often does this plugin check for updates? =
56
-
57
- 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.
58
-
59
- = Can I change how often it checks and/or updates? =
60
-
61
- Yes you can. Go to the dashboard > Scheduling
62
-
63
- = Can I disable auto updating for certain plugins? =
64
-
65
- Yes. You can control auto-updating per plugin via the plugin filter.
66
 
67
- = I'm using cPanel and auto-updating doens't work =
68
 
69
- If you launched your website a few years ago using cPanel it could be the case that auto-updating is broken. We've contacted cPanel and they said to remove the "AUTOMATIC_UPDATER_DISABLED" line from your wp-config file.
 
70
 
71
  == Screenshots ==
72
 
73
- 1. Full control over what to update and when to recieve notifications
74
- 2. Disable auto-updating for certain plugins
75
- 3. Advanced scheduling options for updating and notifcations
76
- 4. Keep track of updates with the update log
77
 
78
  == Changelog ==
79
 
80
- = 3.0.9 (April 17, 2018) =
81
- * Fix: Successful update emails to multiple adresses. We took our time to really test this one but it works now! Promise!
82
- * Update available emails might still be broken.
83
- * Improvement: Email notifications no long show updates done in the last 2 days but instead changed depending on the interval of the emails.
84
-
85
- = 3.0.8 (March 22, 2018) =
86
- * Fix: Error "Notice: Only variables should be passed by reference"
87
-
88
- = 3.0.7 (March 15, 2018) =
89
- * We've recieved a bunch of feedback since the last few updates and we've listened!
90
- * If the schedule is NOT daily - hide the hours object. show it only when daily is selected.
91
- * 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".
92
- * 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.
93
-
94
- = 3.0.6 (March 14, 2018) =
95
- * Fix: Support & Feedback tab not working
96
-
97
- = 3.0.5 (March 14, 2018) =
98
- * Fix: Time schedule scheduling an hour before set time
99
- * New: Support & Feedback page
100
-
101
- = 3.0.4 (March 12, 2018) =
102
- * Fix: Schedule Time not able to set! [Read support topic here](https://wordpress.org/support/topic/schedule-time-not-able-to-set/)
103
-
104
- = 3.0.3 (February 28, 2018) =
105
- * Added update time to changelog
106
- * Minor tweaks to mobile design
107
-
108
- = 3.0.2 (February 10, 2018) =
109
- * Security improvements
110
-
111
- = 3.0 (February 10, 2018) =
112
- * New: Set the update time, many requested this feature so here it is :)
113
- * New: Update log
114
- * Fixed issue where multiple emailaddresses wouldn't work.
115
-
116
- = 2.9.6 (July 11, 2017) =
117
- * Added buttons to help development of this plugin.
118
-
119
- = 2.9.5 (June 22, 2017) =
120
- * Fixed issue where multiple emailaddresses wouldn't work.
121
-
122
- = 2.9.4 (May 31, 2017) =
123
- * Security improvements
124
-
125
- = 2.9.3 (April 15, 2017) =
126
- * Change how often notifications are sent (defaults to daily)
127
-
128
- = 2.9.2 (March 18, 2017) =
129
- * New: Set how often the auto updater should run (defaults to twice daily)
130
-
131
- = 2.9.1 (February 25, 2017) =
132
- * Added a little bit of styling to the plugin filter to make it easier to understand.
133
-
134
- = 2.9 (February 24, 2017) =
135
- * Advanced Controls: You can control auto-updating per plugin via the plugin filter.
136
-
137
- = 2.8.1 =
138
- * Fixed few typos
139
-
140
- = 2.8 =
141
- * Enable/disable updates for translation files (Enabled by default).
142
- * Core Emails: By default wordpress sends an email when a core update happend, you can now disable this.
143
- * Several under-the-hood perfomance improvements and a few minor bug fixes.
144
-
145
- = 2.7.7 =
146
- * New: Added site name to e-mail subject. Example: [Qreative-Web] One ore more plugins have been updated.
147
-
148
- = 2.7.5 =
149
- * Fixed: Notice: Undefined variable: charset_collate
150
-
151
- = 2.7.4 =
152
- * Fixed: Double e-mail notifications [Read support topic here](https://wordpress.org/support/topic/double-e-mail-notifications/)
153
-
154
- = 2.7.3 =
155
- * Fixed: Notifications sending when nothing was updated
156
-
157
- = 2.7.2 =
158
- * Fixed: Notifications settings not always updating
159
-
160
- = 2.7.0 =
161
- * Better updating: How ironic, this plugin did not handle it's own updates so well (required re-activation etc.) this has been fixed.
162
- * Fixed bug: WordPress updates could not be disabled, this should work now.
163
- * Update Notifications: You can now get an email notification when an plugin has been updated (right now this only works with plugins, themes coming up).
164
- * Minor perfomance improvements.
165
-
166
- = 2.5.0 =
167
- * New: If you have disabled one or multiple auto-updates, we can email you when an update is available.
168
-
169
- = 2.0.3 =
170
- * Fully migrated translations to translate.wordpress.org
171
-
172
- = 2.0.2 =
173
- * Fixed issue where setting would show up multiple times when re-activating multiple times
174
- * Added settings link to plugin list
175
-
176
- = 2.0 =
177
- * You can now select what to update and what not (plugins, themes, major and minor core updates)
178
 
179
- = 1.0 =
180
  * Initital release
1
+ === Companion Revision Manager ===
2
+ Contributors: Papin
3
+ Donate link: https://www.paypal.me/dakel/1
4
+ Tags: revision, manager, control, post, page, companion
5
  Requires at least: 3.5.0
6
  Tested up to: 4.9
7
+ Stable tag: 1.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
+ Lightweight plugin that allows full control over post revisions.
12
 
13
  == Description ==
14
 
15
+ = Speed up your website =
16
+ Having a lot of revisions stored may affect the speed of your website, deleting and/or disabling them can speed up your site.
17
+ With Companion Revision Manager you can take back control over revisions! Clean up your database by deleting all revisions, you can even see how many revisions there are currently stored. Keep your database clean by disabling revisions by checking one little box.
 
18
 
19
+ = But what are revisions? =
20
+ The WordPress revisions system stores a record of each saved draft or published update. The revision system allows you to see what changes were made in each revision [...]
21
+ [Read more here](https://codex.wordpress.org/Revisions)
 
 
 
 
 
 
 
 
 
 
22
 
23
  == Installation ==
24
 
25
  = Manual install =
26
+ 1. Download Companion Revision Manager.
27
+ 1. Upload the 'Companion Revision Manager' directory to your '/wp-content/plugins/' directory.
28
  1. Activate Companion Auto Update from your Plugins page.
29
 
30
  = Via WordPress =
31
+ 1. Search for 'Companion Revision Manager'.
32
  1. Click install.
33
  1. Activate.
34
 
35
  = Settings =
36
+ Settings can be found trough Tools > Revision Manager
37
 
38
  == Frequently Asked Questions ==
39
 
40
  = Where can I find the settings? =
41
 
42
+ You can find the settings under Tools > Revision Manager
 
 
 
 
 
 
 
 
 
 
 
 
43
 
44
+ = What are revisions? =
45
 
46
+ The WordPress revisions system stores a record of each saved draft or published update. The revision system allows you to see what changes were made in each revision [...]
47
+ [Read more here](https://codex.wordpress.org/Revisions)
48
 
49
  == Screenshots ==
50
 
51
+ 1. Setting page
 
 
 
52
 
53
  == Changelog ==
54
 
55
+ = 1.1 (08/12/2017) =
56
+ * New: Disable post revisions
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
 
58
+ = 1.0 (08/8/2017) =
59
  * Initital release