|
29 | 29 |
|
30 | 30 |
|
31 | 31 | <?php |
32 | | - $temp_disabled_time = $this->conf( Base::DEBUG_TMP_DISABLE ); |
33 | | - $temp_disabled = Debug2::is_temporary_disable(); |
| 32 | +$temp_disabled_time = $this->conf( Base::DEBUG_TMP_DISABLE ); |
| 33 | +$temp_disabled = Debug2::is_tmp_disable(); |
| 34 | +if ( !$temp_disabled ) { |
34 | 35 | ?> |
35 | | -<a href="<?php echo wp_kses_post( Utility::build_url(Router::ACTION_DISABLE_TEMP, false, false, '_ori') ); ?>" class="button button-success"> |
36 | | - <?php |
37 | | - if ( !$temp_disabled ) { |
38 | | - esc_html_e( 'Disable all optimizations for 24H', 'litespeed-cache' ); |
39 | | - } else { |
40 | | - esc_html_e( 'Enable LSC now', 'litespeed-cache' ); |
41 | | - } |
42 | | - ?> |
43 | | -</a> |
| 36 | + <a href="<?php echo wp_kses_post( Utility::build_url(Router::ACTION_TMP_DISABLE, false, false, '_ori') ); ?>" class="button litespeed-btn-danger"> |
| 37 | + <?php esc_html_e( 'Disable All Features for 24 Hours', 'litespeed-cache' ); ?> |
| 38 | + </a> |
44 | 39 | <?php |
45 | | - if ( $temp_disabled ) : |
46 | | - $date = wp_date( get_option('date_format') . ' ' . get_option( 'time_format' ), $temp_disabled_time ); |
| 40 | +} else { |
| 41 | + $date = wp_date( get_option('date_format') . ' ' . get_option( 'time_format' ), $temp_disabled_time ); |
47 | 42 | ?> |
| 43 | + <a href="<?php echo wp_kses_post( Utility::build_url(Router::ACTION_TMP_DISABLE, false, false, '_ori') ); ?>" class="button litespeed-btn-warning"> |
| 44 | + <?php esc_html_e( 'Remove `Disable All Feature` Flag Now', 'litespeed-cache' ); ?> |
| 45 | + </a> |
48 | 46 | <div class="litespeed-callout notice notice-warning inline"> |
49 | | - <h4><?php esc_html_e( 'NOTICE:', 'litespeed-cache' ); ?></h4> |
50 | | - <p><?php echo wp_kses_post( sprintf ( __( 'LiteSpeed Cache is temporary disabled until: %s.', 'litespeed-cache' ), '<strong>' . $date . '</strong>' ) ); ?></p> |
| 47 | + <h4><?php esc_html_e( 'NOTICE', 'litespeed-cache' ); ?></h4> |
| 48 | + <p><?php echo wp_kses_post( sprintf ( __( 'LiteSpeed Cache is temporarily disabled until: %s.', 'litespeed-cache' ), '<strong>' . $date . '</strong>' ) ); ?></p> |
51 | 49 | </div> |
52 | | -<?php endif; ?> |
| 50 | +<?php |
| 51 | +} |
| 52 | +?> |
53 | 53 |
|
54 | 54 | <h3 class="litespeed-title-short"> |
55 | 55 | <?php esc_html_e( 'Debug Settings', 'litespeed-cache' ); ?> |
|
0 commit comments