Skip to content

Commit

Permalink
Made code better readable
Browse files Browse the repository at this point in the history
  • Loading branch information
hi-hai authored Mar 15, 2024
1 parent aae3b96 commit 3b0c9f8
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions tpl/cdn/auto_setup.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,11 @@
$dom = parse_url(home_url(), PHP_URL_HOST);

if ($cdn_setup_done_ts) {
$curr_status = '<span class="litespeed-success dashicons dashicons-yes"></span> '. __('Done', 'litespeed-cache');
// wp_date requires WP v5.3+
$completed = function_exists('wp_date')
? ' <span class="litespeed-desc litespeed-left10">'
. sprintf(__('Completed at %s', 'litespeed-cache'), wp_date(get_option('date_format') . ' ' . get_option('time_format'), $cdn_setup_done_ts))
. '</span>'
: '';
$curr_status = '<span class="litespeed-success dashicons dashicons-yes"></span> '
. __('Done', 'litespeed-cache')
. $completed;
if (function_exists('wp_date')) {
$curr_status .= ' <span class="litespeed-desc litespeed-left10">'. sprintf(__('Completed at %s', 'litespeed-cache'), wp_date(get_option('date_format') . ' ' . get_option('time_format'), $cdn_setup_done_ts)). '</span>';
}
$disabled = 'disabled';
} else if (!$has_setup_token) {
$disabled = 'disabled';
Expand Down

0 comments on commit 3b0c9f8

Please sign in to comment.