get_option('retention-enabled', 'false'); $retention_period = $options->get_option('retention-period', '2'); $admin_page_url = $options->admin_page_url(); $revisions_retention_enabled = $options->get_option('revisions-retention-enabled', 'false'); $revisions_retention_count = $options->get_option('revisions-retention-count', '2'); ?>
get_option('last-optimized', 'Never');
if ('Never' !== $lastopt) {
// check if last optimized value is integer.
if (is_numeric($lastopt)) {
$lastopt = date_i18n(get_option('date_format') . ' ' . get_option('time_format'), $lastopt + ( get_option('gmt_offset') * HOUR_IN_SECONDS ));
}
// translators: %s is the last scheduled optimization date.
printf(esc_html__('Last scheduled optimization was at %s', 'wp-optimize'), '' . esc_html($lastopt) . '');
} else {
echo esc_html__('There was no scheduled optimization', 'wp-optimize');
}
?>
get_scheduled_optimizations();
if (!empty($scheduled_optimizations)) {
foreach ($scheduled_optimizations as $optimization) {
if (isset($optimization['status']) && 1 == $optimization['status']) {
$scheduled_optimizations_enabled = true;
break;
}
}
}
} else {
$scheduled_optimizations_enabled = $options->get_option('schedule', 'false') == 'true';
}
if ($scheduled_optimizations_enabled) {
printf(
// translators: 1: Opening strong tag, 2: Opening color span tag, 3: Closing color span tag, 4: Closing strong tag
esc_html__('%1$sScheduled cleaning %2$senabled%3$s%4$s', 'wp-optimize'),
'',
'',
'',
''
);
echo ' ';
$timestamp = apply_filters('wpo_cron_next_event', wp_next_scheduled('wpo_cron_event2'));
if ($timestamp) {
$timestamp = $timestamp + 60 * 60 * get_option('gmt_offset');
$wp_optimize->cron_activate();
$date = new DateTime("@".$timestamp);
esc_html_e('Next schedule:', 'wp-optimize');
echo ' ';
echo '';
echo esc_html(gmdate(get_option('date_format') . ' ' . get_option('time_format'), $timestamp));
echo '';
echo ' - '.esc_html__('Refresh', 'wp-optimize').'';
}
} else {
printf(
// translators: 1: Opening strong tag, 2: Closing strong tag
esc_html__('%1$sScheduled cleaning disabled%2$s', 'wp-optimize'),
'',
''
);
}
echo '
';
if ('true' == $retention_enabled) {
echo '';
// translators: %s is number of weeks
printf(esc_html__('Keeping last %s weeks data', 'wp-optimize'), esc_html($retention_period));
echo '';
} else {
echo ''.esc_html__('Not keeping recent data', 'wp-optimize').'';
}
echo '
';
if ('true' == $revisions_retention_enabled) {
echo '';
// translators: %s is number of revisions
printf(esc_html__('Keeping last %s revisions', 'wp-optimize'), esc_html($revisions_retention_count));
echo '';
} else {
echo ''.esc_html__('Not keeping any revisions', 'wp-optimize').'';
}
?>
get_option('total-cleaned'); $total_cleaned_num = floatval($total_cleaned); if ($total_cleaned_num > 0) { printf( // translators: 1: Opening h5 tag, 2: Formatted size in colored span, 3: Closing h5 tag esc_html__('%1$sTotal clean up overall: %2$s%3$s', 'wp-optimize'), '