prefix . "auto_updates"; $schedules = wp_get_schedules(); $interval_names = cau_wp_get_schedules(); // Update the database if( isset( $_GET['run'] ) && $_GET['run'] == 'db_update' ) { cau_manual_update(); echo '

'.__( 'Database update completed' ).'

'; } if( isset( $_GET['run'] ) && $_GET['run'] == 'db_info_update' ) { cau_savePluginInformation(); echo '

'.__( 'Database information update completed' ).'

'; } if( isset( $_GET['ignore_report'] ) ) { $report_to_ignore = sanitize_text_field( $_GET['ignore_report'] ); $allowedValues = array( 'seo', 'cron' ); if( !in_array( $report_to_ignore, $allowedValues ) ) { wp_die( 'Trying to cheat eh?' ); } else { $table_name = $wpdb->prefix . "auto_updates"; $wpdb->query( $wpdb->prepare( "UPDATE {$table_name} SET onoroff = %s WHERE name = 'ignore_$report_to_ignore'", 'yes' ) ); $__ignored = __( 'This report will now be ignored', 'companion-auto-update' ); echo "

$__ignored

"; } } ?>
array( 'name' => __( 'Events', 'companion-auto-update' ), 'fields' => array( 'plugins' => __( 'Plugins', 'companion-auto-update' ), 'themes' => __( 'Themes', 'companion-auto-update' ), 'minor' => __( 'Core (Minor)', 'companion-auto-update' ), 'major' => __( 'Core (Major)', 'companion-auto-update' ), 'send' => __( 'Update available', 'companion-auto-update' ), 'sendupdate' => __( 'Successful update', 'companion-auto-update' ), 'wpemails' => __( 'Core notifications', 'companion-auto-update' ), 'update_delay' => __( 'Log updater', 'companion-auto-update' ), ), 'values' => array( 'plugins' => 'wp_update_plugins', 'themes' => 'wp_update_themes', 'minor' => 'wp_version_check', 'major' => 'wp_version_check', 'send' => 'cau_set_schedule_mail', 'sendupdate' => 'cau_set_schedule_mail', 'wpemails' => 'cau_set_schedule_mail', 'update_delay' => 'cau_log_updater', ), 'explain' => array( 'plugins' => __('Auto update plugins?', 'companion-auto-update'), 'themes' => __('Auto update themes?', 'companion-auto-update'), 'minor' => __('Auto update minor core updates?', 'companion-auto-update'), 'major' => __('Auto update major core updates?', 'companion-auto-update'), 'send' => __( 'Will notify you of available updates.', 'companion-auto-update' ), 'sendupdate' => __( 'Will notify you after successful updates.', 'companion-auto-update' ), 'wpemails' => __( 'The default WordPress notifications.', 'companion-auto-update' ), 'update_delay' => __( 'Will keep track of the update log and make sure updates are delayed when needed.', 'companion-auto-update' ), ) ), ); $__sta = __( 'Status', 'companion-auto-update' ); $__int = __( 'Interval', 'companion-auto-update' ); $__nxt = __( 'Next', 'companion-auto-update' ); foreach( $events as $event => $info ) { echo ""; foreach ( $info['fields'] as $key => $value ) { $is_on = ( cau_get_db_value( $key ) == 'on' && wp_get_schedule( $info['values'][$key] ) ) ? true : false; $__status = $is_on ? 'enabled' : 'warning'; $__icon = $is_on ? 'yes-alt' : 'marker'; $__text = $is_on ? __( 'Enabled', 'companion-auto-update' ) : __( 'Disabled', 'companion-auto-update' ); $__interval = $is_on ? $interval_names[wp_get_schedule( $info['values'][$key] )] : '‐'; $__next = $is_on ? date_i18n( $dateFormat, wp_next_scheduled( $info['values'][$key] ) ) : '‐'; $__exp = !empty( $info['explain'][$key] ) ? '
'.$info['explain'][$key].'' : ''; $__nxt = __( 'Next', 'companion-auto-update' ); echo ""; } echo "
{$info['name']} {$__sta} {$__int} {$__nxt}
$value$__exp $__text $__interval $__nxt: $__next
"; } ?> $__text"; } else { $__text = __( 'Disabled', 'companion-auto-update' ); echo ""; } ?> > >
$__text
DISABLE_WP_CRON true
wp_version_check
VCS '>
> >
WordPress
PHP (Required: 5.1.0 or up)
Database (Latest: )
(GMT ) -
$value ) { if( is_plugin_active( $key ) ) { echo ''; } } ?>
'.$key.' '.$value.' '.__( 'How to fix this', 'companion-auto-update' ).'
prefix}update_log"; $put_on_hold = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$updateLog} WHERE put_on_hold <> '%s'", '0' ) ); foreach ( $put_on_hold as $plugin ) { $__name = $plugin->slug; $__poh = $plugin->put_on_hold; $__udd = ( cau_get_db_value( 'update_delay_days' ) != '' ) ? cau_get_db_value( 'update_delay_days' ) : '2'; $__date = date_i18n( $dateFormat, strtotime( "+".$__udd." days", $__poh ) ); echo ""; } echo empty( $put_on_hold ) ? "" : ""; ?>
{$__name} {$__date}
".__( 'No plugins have been put on hold.', 'companion-auto-update' )."
$string ) { if( strpos( file_get_contents( $conFile ), $string ) !== false) { $contents = file_get_contents( $conFile ); $contents = str_replace( $string, $revLine, $contents ); file_put_contents( $conFile, $contents ); $melding = __( "We've fixed the error for you", 'companion-auto-update' ).' :)'; $meldingS = 'updated'; } } echo "

$melding

"; }