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 '
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 "
{$info['name']} |
{$__sta} |
{$__int} |
{$__nxt} |
";
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 "
|
$value$__exp |
$__text |
$__interval |
$__nxt: $__next |
";
}
echo "
";
}
?>
|
|
|
|
|
|
|
|
|
|
$__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 ) - |
|
|
‐ |
get_results( "SELECT * FROM $table_name" );
array_push( $cau_configs, "WordPress: ".get_bloginfo( 'version' ) );
array_push( $cau_configs, "PHP: ".phpversion() );
array_push( $cau_configs, "DB: ".get_option( "cau_db_version" ).' / '.cau_db_version() );
echo "";
?>
|
‐ |
|
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 "
{$__name} |
{$__date} |
";
}
echo empty( $put_on_hold ) ? "".__( '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 "