| 1 |
<?php |
| 2 |
|
| 3 |
/* |
| 4 |
Class Name: SALES_COUNTDOWN_TIMER_Admin |
| 5 |
Author: Andy Ha (support@villatheme.com) |
| 6 |
Author URI: https://villatheme.com |
| 7 |
Copyright 2018 villatheme.com. All rights reserved. |
| 8 |
*/ |
| 9 |
if ( ! defined( 'ABSPATH' ) ) { |
| 10 |
exit; |
| 11 |
} |
| 12 |
|
| 13 |
class SALES_COUNTDOWN_TIMER_Admin_Admin { |
| 14 |
protected $settings; |
| 15 |
|
| 16 |
function __construct() { |
| 17 |
$this->settings = new SALES_COUNTDOWN_TIMER_Data(); |
| 18 |
add_action( 'init', array( $this, 'init' ) ); |
| 19 |
add_action( 'admin_menu', array( $this, 'admin_menu' ) ); |
| 20 |
add_action( 'admin_enqueue_scripts', array( $this, 'admin_enqueue_scripts' ), 99 ); |
| 21 |
add_action( 'wp_ajax_woo_sctr_save_settings', array( $this, 'save_settings' ) ); |
| 22 |
add_filter( |
| 23 |
'plugin_action_links_sales-countdown-timer/sales-countdown-timer.php', array( |
| 24 |
$this, |
| 25 |
'settings_link' |
| 26 |
) |
| 27 |
); |
| 28 |
|
| 29 |
add_action( 'elementor/preview/enqueue_styles', [ $this, 'custom_elementor_preview_styles' ] ); |
| 30 |
} |
| 31 |
|
| 32 |
public function admin_menu() { |
| 33 |
add_menu_page( esc_html__( 'Sales Countdown Timer', 'sales-countdown-timer' ), esc_html__( 'Countdown Timer', 'sales-countdown-timer' ), 'manage_options', 'sales-countdown-timer', array( |
| 34 |
$this, |
| 35 |
'settings' |
| 36 |
), 'dashicons-clock', 2 ); |
| 37 |
|
| 38 |
if ( is_plugin_active( 'woocommerce/woocommerce.php' ) ) { |
| 39 |
add_submenu_page( |
| 40 |
'sales-countdown-timer', |
| 41 |
esc_html__( 'Checkout Countdown', 'sales-countdown-timer' ), |
| 42 |
esc_html__( 'Checkout Countdown', 'sales-countdown-timer' ), |
| 43 |
'manage_options', |
| 44 |
'sales-countdown-timer-checkout', |
| 45 |
array( $this, 'settings_checkout_countdown' ) |
| 46 |
); |
| 47 |
} |
| 48 |
} |
| 49 |
|
| 50 |
public function custom_elementor_preview_styles() { |
| 51 |
wp_enqueue_style( 'woo-sctr-shortcode-style', SALES_COUNTDOWN_TIMER_CSS . 'shortcode-style.css', array( 'jquery' ), SALES_COUNTDOWN_TIMER_VERSION, false ); |
| 52 |
$elm_css = $this->settings->get_countdown_inline_style(); |
| 53 |
wp_add_inline_style( 'woo-sctr-shortcode-style', $elm_css ); |
| 54 |
} |
| 55 |
|
| 56 |
public function settings_checkout_countdown() { |
| 57 |
?> |
| 58 |
<div class="wrap"> |
| 59 |
<h2 class=""><?php esc_html_e( 'Checkout Countdown Timer For WooCommerce', 'sales-countdown-timer' ) ?></h2> |
| 60 |
<div class="vi-ui raised"> |
| 61 |
<form action="" class="vi-ui form" method="post"> |
| 62 |
<div class="vi-ui vi-ui-main top tabular attached menu"> |
| 63 |
<a class="item active" data-tab="general"><?php esc_html_e( 'General Settings', 'sales-countdown-timer' ) ?></a> |
| 64 |
<a class="item" data-tab="display_on_page"><?php esc_html_e( 'Display checkout countdown', 'sales-countdown-timer' ) ?></a> |
| 65 |
<a class="item" data-tab="design_on_cp"><?php esc_html_e( 'Design on checkout page', 'sales-countdown-timer' ) ?></a> |
| 66 |
<a class="item" data-tab="design_on_op"><?php esc_html_e( 'Design on other page', 'sales-countdown-timer' ) ?></a> |
| 67 |
<a class="item" data-tab="report"><?php esc_html_e( 'Report', 'sales-countdown-timer' ) ?></a> |
| 68 |
<a class="item" data-tab="video_preview"><?php esc_html_e( 'Video Preview', 'sales-countdown-timer' ) ?></a> |
| 69 |
</div> |
| 70 |
|
| 71 |
<div class="vi-ui bottom attached tab segment active" data-tab="general"> |
| 72 |
<div class="vi-ui yellow message"><?php esc_html_e( 'Note*: Changes in these settings will not be applied to carts which are already in a checkout countdown.', |
| 73 |
'sales-countdown-timer' ) ?></div> |
| 74 |
<table class="form-table"> |
| 75 |
<tbody> |
| 76 |
<tr> |
| 77 |
<th> |
| 78 |
<label for="woo-stcr-checkout-countdown-enable"><?php esc_html_e( 'Enable', |
| 79 |
'sales-countdown-timer' ) ?></label> |
| 80 |
</th> |
| 81 |
<td> |
| 82 |
<a class="vi-ui button yellow" href="https://villatheme.com/extensions/sales-countdown-timer" target="_blank"> |
| 83 |
<?php esc_html_e( 'Unlock This Feature', 'sales-countdown-timer' ); ?> |
| 84 |
</a> |
| 85 |
</td> |
| 86 |
</tr> |
| 87 |
<tr> |
| 88 |
<th> |
| 89 |
<label for="woo-stcr-checkout-countdown-reset"><?php esc_html_e( 'Reset Countdown', |
| 90 |
'sales-countdown-timer' ); ?></label> |
| 91 |
</th> |
| 92 |
<td> |
| 93 |
<a class="vi-ui button yellow" href="https://villatheme.com/extensions/sales-countdown-timer" target="_blank"> |
| 94 |
<?php esc_html_e( 'Unlock This Feature', 'sales-countdown-timer' ); ?> |
| 95 |
</a> |
| 96 |
<p class="description"><?php esc_html_e( 'Reset checkout countdown for a cart after this time if customer does not place order during checkout countdown', |
| 97 |
'sales-countdown-timer' ); ?></p> |
| 98 |
</td> |
| 99 |
</tr> |
| 100 |
<tr class="top"> |
| 101 |
<th> |
| 102 |
<label for="woo-stcr-checkout-countdown-time-minute"><?php esc_html_e( 'Countdown time', |
| 103 |
'sales-countdown-timer' ) ?></label> |
| 104 |
</th> |
| 105 |
<td> |
| 106 |
<a class="vi-ui button yellow" href="https://villatheme.com/extensions/sales-countdown-timer" target="_blank"> |
| 107 |
<?php esc_html_e( 'Unlock This Feature', 'sales-countdown-timer' ); ?> |
| 108 |
</a> |
| 109 |
<p class="description"><?php esc_html_e( 'The maximum valid time that this offer bellow are applied. When time hits zero, offer will be gone', |
| 110 |
'sales-countdown-timer' ); ?></p> |
| 111 |
</td> |
| 112 |
</tr> |
| 113 |
<tr> |
| 114 |
<th> |
| 115 |
<label for="woo-stcr-checkout-countdown-start"><?php esc_html_e( 'Starting condition', |
| 116 |
'sales-countdown-timer' ) ?></label> |
| 117 |
</th> |
| 118 |
<td> |
| 119 |
<div class="equal width fields"> |
| 120 |
<div class="field"> |
| 121 |
<div class="vi-ui labeled right action input"> |
| 122 |
<div class="vi-ui basic label"> |
| 123 |
<?php esc_html_e( 'Action', 'sales-countdown-timer' ) ?> |
| 124 |
</div> |
| 125 |
<a class="vi-ui button yellow" href="https://villatheme.com/extensions/sales-countdown-timer" |
| 126 |
target="_blank"> |
| 127 |
<?php esc_html_e( 'Unlock This Feature', 'sales-countdown-timer' ); ?> |
| 128 |
</a> |
| 129 |
</div> |
| 130 |
<p class="description"><?php esc_html_e( 'Start checking if a cart is qualified to get offer when:', |
| 131 |
'sales-countdown-timer' ); ?></p> |
| 132 |
</div> |
| 133 |
<div class="field"> |
| 134 |
<div class="vi-ui labeled right action input"> |
| 135 |
<div class="vi-ui basic label"> |
| 136 |
<?php /* translators: %s: currency symbol */ |
| 137 |
printf( esc_html__( 'Min cart total(%s)', 'sales-countdown-timer' ), |
| 138 |
esc_html( get_woocommerce_currency_symbol() ) ) ?> |
| 139 |
</div> |
| 140 |
<a class="vi-ui button yellow" href="https://villatheme.com/extensions/sales-countdown-timer" |
| 141 |
target="_blank"> |
| 142 |
<?php esc_html_e( 'Unlock This Feature', 'sales-countdown-timer' ); ?> |
| 143 |
</a> |
| 144 |
</div> |
| 145 |
<p class="description"><?php esc_html_e( 'Minimum cart total to get offer', |
| 146 |
'sales-countdown-timer' ); ?></p> |
| 147 |
</div> |
| 148 |
</div> |
| 149 |
</td> |
| 150 |
</tr> |
| 151 |
|
| 152 |
<tr> |
| 153 |
<th> |
| 154 |
<label for="woo-stcr-checkout-countdown-discount"><?php esc_html_e( 'Checkout countdown offer', |
| 155 |
'sales-countdown-timer' ) ?></label> |
| 156 |
</th> |
| 157 |
<td> |
| 158 |
<div class="equal width fields"> |
| 159 |
<div class="field"> |
| 160 |
<div class="vi-ui labeled right action input"> |
| 161 |
<div class="vi-ui basic label"> |
| 162 |
<?php esc_html_e( 'Free Shipping', 'sales-countdown-timer' ) ?> |
| 163 |
</div> |
| 164 |
<a class="vi-ui button yellow" href="https://villatheme.com/extensions/sales-countdown-timer" |
| 165 |
target="_blank"> |
| 166 |
<?php esc_html_e( 'Unlock This Feature', 'sales-countdown-timer' ); ?> |
| 167 |
</a> |
| 168 |
</div> |
| 169 |
</div> |
| 170 |
<div class="field"> |
| 171 |
<div class="vi-ui right action labeled input"> |
| 172 |
<div class="vi-ui basic label"> |
| 173 |
<?php esc_html_e( 'Discount amount', 'sales-countdown-timer' ) ?> |
| 174 |
</div> |
| 175 |
<a class="vi-ui button yellow" href="https://villatheme.com/extensions/sales-countdown-timer" |
| 176 |
target="_blank"> |
| 177 |
<?php esc_html_e( 'Unlock This Feature', 'sales-countdown-timer' ); ?> |
| 178 |
</a> |
| 179 |
</div> |
| 180 |
</div> |
| 181 |
</div> |
| 182 |
<p class="description"><?php esc_html_e( 'Customers will get this offer before checkout countdown time hits zero', |
| 183 |
'sales-countdown-timer' ); ?></p> |
| 184 |
</td> |
| 185 |
</tr> |
| 186 |
<tr> |
| 187 |
<td colspan="2"> |
| 188 |
<div class="vi-ui blue message"> |
| 189 |
<div class="header"><?php esc_html_e( 'Below options are used if you want to change offer when the countdown hits specific values', |
| 190 |
'sales-countdown-timer' ) ?></div> |
| 191 |
<ul class="list"> |
| 192 |
<li><?php esc_html_e( 'None: The current discount is applied until the countdown hits zero', |
| 193 |
'sales-countdown-timer' ) ?></li> |
| 194 |
<li><?php esc_html_e( 'Auto change: Decrease the current discount by a specific percentage every X minute(s) or second(s)', |
| 195 |
'sales-countdown-timer' ) ?></li> |
| 196 |
<li><?php esc_html_e( 'Custom: Create your own levels that you want to change the offer, message can be customized for each level', |
| 197 |
'sales-countdown-timer' ) ?></li> |
| 198 |
</ul> |
| 199 |
</div> |
| 200 |
</td> |
| 201 |
</tr> |
| 202 |
<tr> |
| 203 |
<th> |
| 204 |
<label for="woo-stcr-checkout-countdown-change"><?php esc_html_e( 'Level discount', |
| 205 |
'sales-countdown-timer' ) ?></label> |
| 206 |
</th> |
| 207 |
<td> |
| 208 |
<a class="vi-ui button yellow" href="https://villatheme.com/extensions/sales-countdown-timer" target="_blank"> |
| 209 |
<?php esc_html_e( 'Unlock This Feature', 'sales-countdown-timer' ); ?> |
| 210 |
</a> |
| 211 |
<p class="description"> |
| 212 |
<?php esc_html_e( 'Auto change after time and decrease discount amount of Custom change with multi level.', |
| 213 |
'sales-countdown-timer' ) ?> |
| 214 |
</p> |
| 215 |
</td> |
| 216 |
</tr> |
| 217 |
<tr> |
| 218 |
<th> |
| 219 |
<label for="woo-stcr-checkout-countdown-change"><?php esc_html_e( 'Change discount every', |
| 220 |
'sales-countdown-timer' ) ?></label> |
| 221 |
</th> |
| 222 |
<td> |
| 223 |
<a class="vi-ui button yellow" href="https://villatheme.com/extensions/sales-countdown-timer" target="_blank"> |
| 224 |
<?php esc_html_e( 'Unlock This Feature', 'sales-countdown-timer' ); ?> |
| 225 |
</a> |
| 226 |
<p class="description"> |
| 227 |
<?php esc_html_e( 'Set Auto change after time (second or minute)', |
| 228 |
'sales-countdown-timer' ) ?> |
| 229 |
</p> |
| 230 |
</td> |
| 231 |
</tr> |
| 232 |
<tr> |
| 233 |
<th> |
| 234 |
<label for="woo-stcr-checkout-countdown-change"><?php esc_html_e( 'Decrease discount amount', |
| 235 |
'sales-countdown-timer' ) ?></label> |
| 236 |
</th> |
| 237 |
<td> |
| 238 |
<a class="vi-ui button yellow" href="https://villatheme.com/extensions/sales-countdown-timer" target="_blank"> |
| 239 |
<?php esc_html_e( 'Unlock This Feature', 'sales-countdown-timer' ); ?> |
| 240 |
</a> |
| 241 |
<p class="description"> |
| 242 |
<?php esc_html_e( 'Set Auto change Decrease discount amount (Percentage)', |
| 243 |
'sales-countdown-timer' ) ?> |
| 244 |
</p> |
| 245 |
</td> |
| 246 |
</tr> |
| 247 |
<tr> |
| 248 |
<th> |
| 249 |
<label for="woo-stcr-checkout-countdown-change"><?php esc_html_e( 'Custom level', |
| 250 |
'sales-countdown-timer' ) ?></label> |
| 251 |
</th> |
| 252 |
<td> |
| 253 |
<a class="vi-ui button yellow" href="https://villatheme.com/extensions/sales-countdown-timer" target="_blank"> |
| 254 |
<?php esc_html_e( 'Unlock This Feature', 'sales-countdown-timer' ); ?> |
| 255 |
</a> |
| 256 |
<p class="description"> |
| 257 |
<?php esc_html_e( 'Custom level table with multi-level. Each level has settings for time, amount, message...', |
| 258 |
'sales-countdown-timer' ) ?> |
| 259 |
</p> |
| 260 |
</td> |
| 261 |
</tr> |
| 262 |
</tbody> |
| 263 |
</table> |
| 264 |
</div> |
| 265 |
<div class="vi-ui bottom attached tab segment" data-tab="display_on_page"> |
| 266 |
<table class="form-table"> |
| 267 |
<tbody> |
| 268 |
<tr> |
| 269 |
<th> |
| 270 |
<label for="woo-stcr-checkout-countdown-display-on-page"><?php esc_html_e( 'Display countdown timer on', |
| 271 |
'sales-countdown-timer' ) ?></label> |
| 272 |
</th> |
| 273 |
<td> |
| 274 |
<div class="field"> |
| 275 |
<div class="field"> |
| 276 |
<a class="vi-ui button yellow" href="https://villatheme.com/extensions/sales-countdown-timer" |
| 277 |
target="_blank"> |
| 278 |
<?php esc_html_e( 'Unlock This Feature', 'sales-countdown-timer' ); ?> |
| 279 |
</a> |
| 280 |
<p class="description"> |
| 281 |
<?php esc_html_e( 'Select pages to show checkout countdown. Leave blank to show checkout countdown on all pages.', |
| 282 |
'sales-countdown-timer' ) ?> |
| 283 |
</p> |
| 284 |
</div> |
| 285 |
|
| 286 |
</div> |
| 287 |
|
| 288 |
</td> |
| 289 |
</tr> |
| 290 |
</tbody> |
| 291 |
</table> |
| 292 |
<div class="vi-ui segment"> |
| 293 |
<table class="form-table"> |
| 294 |
<tbody> |
| 295 |
<tr> |
| 296 |
<th> |
| 297 |
<label for="woo-stcr-checkout-button-title"><?php esc_html_e( 'Title of Checkout button', |
| 298 |
'sales-countdown-timer' ) ?></label> |
| 299 |
</th> |
| 300 |
<td> |
| 301 |
<a class="vi-ui button yellow" href="https://villatheme.com/extensions/sales-countdown-timer" |
| 302 |
target="_blank"> |
| 303 |
<?php esc_html_e( 'Unlock This Feature', 'sales-countdown-timer' ); ?> |
| 304 |
</a> |
| 305 |
</td> |
| 306 |
</tr> |
| 307 |
<tr> |
| 308 |
<th> |
| 309 |
<label for="woo-stcr-checkout-button-link-target"><?php esc_html_e( 'Open in new tab when clicking Checkout button', |
| 310 |
'sales-countdown-timer' ) ?></label> |
| 311 |
</th> |
| 312 |
<td> |
| 313 |
<a class="vi-ui button yellow" href="https://villatheme.com/extensions/sales-countdown-timer" |
| 314 |
target="_blank"> |
| 315 |
<?php esc_html_e( 'Unlock This Feature', 'sales-countdown-timer' ); ?> |
| 316 |
</a> |
| 317 |
</td> |
| 318 |
</tr> |
| 319 |
<tr> |
| 320 |
<th> |
| 321 |
<label for="woo-stcr-checkout-button-fontsize"><?php esc_html_e( 'Fontsize of Checkout button', |
| 322 |
'sales-countdown-timer' ) ?></label> |
| 323 |
</th> |
| 324 |
<td> |
| 325 |
<a class="vi-ui button yellow" href="https://villatheme.com/extensions/sales-countdown-timer" |
| 326 |
target="_blank"> |
| 327 |
<?php esc_html_e( 'Unlock This Feature', 'sales-countdown-timer' ); ?> |
| 328 |
</a> |
| 329 |
</td> |
| 330 |
</tr> |
| 331 |
<tr> |
| 332 |
<th> |
| 333 |
<label for="woo-stcr-checkout-button-color"><?php esc_html_e( 'Text color of Checkout button', |
| 334 |
'sales-countdown-timer' ) ?></label> |
| 335 |
</th> |
| 336 |
<td> |
| 337 |
<a class="vi-ui button yellow" href="https://villatheme.com/extensions/sales-countdown-timer" |
| 338 |
target="_blank"> |
| 339 |
<?php esc_html_e( 'Unlock This Feature', 'sales-countdown-timer' ); ?> |
| 340 |
</a> |
| 341 |
</td> |
| 342 |
</tr> |
| 343 |
<tr> |
| 344 |
<th> |
| 345 |
<label for="woo-stcr-checkout-button-background"><?php esc_html_e( 'Background color of Checkout button', |
| 346 |
'sales-countdown-timer' ) ?></label> |
| 347 |
</th> |
| 348 |
<td> |
| 349 |
<a class="vi-ui button yellow" href="https://villatheme.com/extensions/sales-countdown-timer" |
| 350 |
target="_blank"> |
| 351 |
<?php esc_html_e( 'Unlock This Feature', 'sales-countdown-timer' ); ?> |
| 352 |
</a> |
| 353 |
</td> |
| 354 |
</tr> |
| 355 |
</tbody> |
| 356 |
</table> |
| 357 |
</div> |
| 358 |
<div class="vi-ui segment"> |
| 359 |
<table class="form-table"> |
| 360 |
<tbody> |
| 361 |
<tr> |
| 362 |
<th> |
| 363 |
<label for="woo-stcr-shop-button-title"><?php esc_html_e( 'Title of Shop button', |
| 364 |
'sales-countdown-timer' ) ?></label> |
| 365 |
</th> |
| 366 |
<td> |
| 367 |
<a class="vi-ui button yellow" href="https://villatheme.com/extensions/sales-countdown-timer" |
| 368 |
target="_blank"> |
| 369 |
<?php esc_html_e( 'Unlock This Feature', 'sales-countdown-timer' ); ?> |
| 370 |
</a> |
| 371 |
</td> |
| 372 |
</tr> |
| 373 |
<tr> |
| 374 |
<th> |
| 375 |
<label for="woo-stcr-shop-button-link-target"><?php esc_html_e( 'Open in new tab when clicking Shop button', |
| 376 |
'sales-countdown-timer' ) ?></label> |
| 377 |
</th> |
| 378 |
<td> |
| 379 |
<a class="vi-ui button yellow" href="https://villatheme.com/extensions/sales-countdown-timer" |
| 380 |
target="_blank"> |
| 381 |
<?php esc_html_e( 'Unlock This Feature', 'sales-countdown-timer' ); ?> |
| 382 |
</a> |
| 383 |
</td> |
| 384 |
</tr> |
| 385 |
<tr> |
| 386 |
<th> |
| 387 |
<label for="woo-stcr-shop-button-fontsize"><?php esc_html_e( 'Fontsize of Shop button', |
| 388 |
'sales-countdown-timer' ) ?></label> |
| 389 |
</th> |
| 390 |
<td> |
| 391 |
<a class="vi-ui button yellow" href="https://villatheme.com/extensions/sales-countdown-timer" |
| 392 |
target="_blank"> |
| 393 |
<?php esc_html_e( 'Unlock This Feature', 'sales-countdown-timer' ); ?> |
| 394 |
</a> |
| 395 |
</td> |
| 396 |
</tr> |
| 397 |
<tr> |
| 398 |
<th> |
| 399 |
<label for="woo-stcr-shop-button-color"><?php esc_html_e( 'Text color of Shop button', |
| 400 |
'sales-countdown-timer' ) ?></label> |
| 401 |
</th> |
| 402 |
<td> |
| 403 |
<a class="vi-ui button yellow" href="https://villatheme.com/extensions/sales-countdown-timer" |
| 404 |
target="_blank"> |
| 405 |
<?php esc_html_e( 'Unlock This Feature', 'sales-countdown-timer' ); ?> |
| 406 |
</a> |
| 407 |
</td> |
| 408 |
</tr> |
| 409 |
<tr> |
| 410 |
<th> |
| 411 |
<label for="woo-stcr-shop-button-background"><?php esc_html_e( 'Background color of Shop button', |
| 412 |
'sales-countdown-timer' ) ?></label> |
| 413 |
</th> |
| 414 |
<td> |
| 415 |
<a class="vi-ui button yellow" href="https://villatheme.com/extensions/sales-countdown-timer" |
| 416 |
target="_blank"> |
| 417 |
<?php esc_html_e( 'Unlock This Feature', 'sales-countdown-timer' ); ?> |
| 418 |
</a> |
| 419 |
</td> |
| 420 |
</tr> |
| 421 |
</tbody> |
| 422 |
</table> |
| 423 |
</div> |
| 424 |
</div> |
| 425 |
<div class="vi-ui bottom attached tab segment" data-tab="design_on_cp"> |
| 426 |
<table class="form-table"> |
| 427 |
<tbody> |
| 428 |
<tr> |
| 429 |
<th> |
| 430 |
<label for="woo-stcr-checkout-countdown-message-checkout-page"><?php esc_html_e( 'Checkout countdown message', |
| 431 |
'sales-countdown-timer' ) ?></label> |
| 432 |
</th> |
| 433 |
<td> |
| 434 |
<a class="vi-ui button yellow" href="https://villatheme.com/extensions/sales-countdown-timer" target="_blank"> |
| 435 |
<?php esc_html_e( 'Unlock This Feature', 'sales-countdown-timer' ); ?> |
| 436 |
</a> |
| 437 |
</td> |
| 438 |
</tr> |
| 439 |
<tr> |
| 440 |
<th> |
| 441 |
<label for="woo-stcr-checkout-countdown-message-checkout-page-missing"><?php esc_html_e( 'Message if missing offer', |
| 442 |
'sales-countdown-timer' ) ?></label> |
| 443 |
</th> |
| 444 |
<td> |
| 445 |
<a class="vi-ui button yellow" href="https://villatheme.com/extensions/sales-countdown-timer" target="_blank"> |
| 446 |
<?php esc_html_e( 'Unlock This Feature', 'sales-countdown-timer' ); ?> |
| 447 |
</a> |
| 448 |
<p class="description"> |
| 449 |
<?php esc_html_e( 'This message only shows during checkout countdown when a cart is updated so that the current cart is smaller than the minimum required value.', |
| 450 |
'sales-countdown-timer' ) ?> |
| 451 |
</p> |
| 452 |
</td> |
| 453 |
</tr> |
| 454 |
<tr> |
| 455 |
<th> |
| 456 |
<label for=""><?php esc_html_e( 'Shortcode available', |
| 457 |
'sales-countdown-timer' ); ?></label> |
| 458 |
</th> |
| 459 |
<td> |
| 460 |
<p class="description">{countdown_timer} |
| 461 |
- <?php esc_html_e( 'The countdown timer that you set up on \'Sales Countdown Timer\' page', |
| 462 |
'sales-countdown-timer' ) ?></p> |
| 463 |
<p class="description">{checkout_button} |
| 464 |
- <?php esc_html_e( 'The checkout button', 'sales-countdown-timer' ) ?></p> |
| 465 |
<p class="description">{shop_button} |
| 466 |
- <?php esc_html_e( 'The button go to store', 'sales-countdown-timer' ) ?></p> |
| 467 |
<p class="description">{discount_percentage} |
| 468 |
- <?php esc_html_e( 'The discount in percentage. Not apply to \'Message if missing offer\'', |
| 469 |
'sales-countdown-timer' ) ?></p> |
| 470 |
<p class="description">{discount_fixed} |
| 471 |
- <?php esc_html_e( 'The discount amount in currency. Not apply to \'Message if missing offer\'', |
| 472 |
'sales-countdown-timer' ) ?></p> |
| 473 |
<p class="description">{missing_amount} |
| 474 |
- <?php esc_html_e( 'The missing amount to get offer. Not apply to \'Checkout countdown message\'', |
| 475 |
'sales-countdown-timer' ) ?></p> |
| 476 |
<p class="description">{minimum_cart_total} |
| 477 |
- <?php esc_html_e( 'The minimum cart total required to get offer', |
| 478 |
'sales-countdown-timer' ) ?></p> |
| 479 |
<p class="description">{original_cart_total} |
| 480 |
- <?php esc_html_e( 'The current cart total without applying discount ', |
| 481 |
'sales-countdown-timer' ) ?></p> |
| 482 |
</td> |
| 483 |
</tr> |
| 484 |
<tr> |
| 485 |
<th> |
| 486 |
<label for="woo-stcr-checkout-countdown-position-on-checkout-page"><?php esc_html_e( 'Position', |
| 487 |
'sales-countdown-timer' ) ?></label> |
| 488 |
</th> |
| 489 |
<td> |
| 490 |
<a class="vi-ui button yellow" href="https://villatheme.com/extensions/sales-countdown-timer" target="_blank"> |
| 491 |
<?php esc_html_e( 'Unlock This Feature', 'sales-countdown-timer' ); ?> |
| 492 |
</a> |
| 493 |
</td> |
| 494 |
</tr> |
| 495 |
<tr> |
| 496 |
<th> |
| 497 |
<label for="woo-stcr-checkout-countdown-id-on-checkout-page"><?php esc_html_e( 'Select Countdown timer', |
| 498 |
'sales-countdown-timer' ) ?></label> |
| 499 |
</th> |
| 500 |
<td> |
| 501 |
<a class="vi-ui button yellow" href="https://villatheme.com/extensions/sales-countdown-timer" target="_blank"> |
| 502 |
<?php esc_html_e( 'Unlock This Feature', 'sales-countdown-timer' ); ?> |
| 503 |
</a> |
| 504 |
</td> |
| 505 |
</tr> |
| 506 |
<tr> |
| 507 |
<th> |
| 508 |
<label for="woo-stcr-checkout-countdown-id-on-checkout-page"><?php esc_html_e( 'Action after finish countdown', |
| 509 |
'sales-countdown-timer' ) ?></label> |
| 510 |
</th> |
| 511 |
<td> |
| 512 |
<a class="vi-ui button yellow" href="https://villatheme.com/extensions/sales-countdown-timer" target="_blank"> |
| 513 |
<?php esc_html_e( 'Unlock This Feature', 'sales-countdown-timer' ); ?> |
| 514 |
</a> |
| 515 |
<p class="description"> |
| 516 |
<?php esc_html_e( 'Refresh page or Refresh order review', |
| 517 |
'sales-countdown-timer' ) ?> |
| 518 |
</p> |
| 519 |
</td> |
| 520 |
</tr> |
| 521 |
</tbody> |
| 522 |
</table> |
| 523 |
</div> |
| 524 |
<div class="vi-ui bottom attached tab segment" data-tab="design_on_op"> |
| 525 |
<table class="form-table"> |
| 526 |
<tbody> |
| 527 |
<tr> |
| 528 |
<th> |
| 529 |
<label for="woo-stcr-checkout-countdown-message-other-page"><?php esc_html_e( 'Checkout countdown message', |
| 530 |
'sales-countdown-timer' ) ?></label> |
| 531 |
</th> |
| 532 |
<td> |
| 533 |
<a class="vi-ui button yellow" href="https://villatheme.com/extensions/sales-countdown-timer" target="_blank"> |
| 534 |
<?php esc_html_e( 'Unlock This Feature', 'sales-countdown-timer' ); ?> |
| 535 |
</a> |
| 536 |
</td> |
| 537 |
</tr> |
| 538 |
<tr> |
| 539 |
<th> |
| 540 |
<label for="woo-stcr-checkout-countdown-message-other-page-missing"><?php esc_html_e( 'Message if missing offer', |
| 541 |
'sales-countdown-timer' ) ?></label> |
| 542 |
</th> |
| 543 |
<td> |
| 544 |
<a class="vi-ui button yellow" href="https://villatheme.com/extensions/sales-countdown-timer" target="_blank"> |
| 545 |
<?php esc_html_e( 'Unlock This Feature', 'sales-countdown-timer' ); ?> |
| 546 |
</a> |
| 547 |
<p class="description"> |
| 548 |
<?php esc_html_e( 'This message only shows during checkout countdown when a cart is updated so that the current cart is smaller than the minimum required value.', |
| 549 |
'sales-countdown-timer' ) ?> |
| 550 |
</p> |
| 551 |
</td> |
| 552 |
</tr> |
| 553 |
<tr> |
| 554 |
<th> |
| 555 |
<label for=""><?php esc_html_e( 'Shortcode available', |
| 556 |
'sales-countdown-timer' ); ?></label> |
| 557 |
</th> |
| 558 |
<td> |
| 559 |
<p class="description">{countdown_timer} |
| 560 |
- <?php esc_html_e( 'The countdown timer that you set up on \'Sales Countdown Timer\' page', |
| 561 |
'sales-countdown-timer' ) ?></p> |
| 562 |
<p class="description">{checkout_button} |
| 563 |
- <?php esc_html_e( 'The checkout button', 'sales-countdown-timer' ) ?></p> |
| 564 |
<p class="description">{shop_button} |
| 565 |
- <?php esc_html_e( 'The button go to store', 'sales-countdown-timer' ) ?></p> |
| 566 |
<p class="description">{discount_percentage} |
| 567 |
- <?php esc_html_e( 'The discount in percentage. Not apply to \'Message if missing offer\'', |
| 568 |
'sales-countdown-timer' ) ?></p> |
| 569 |
<p class="description">{discount_fixed} |
| 570 |
- <?php esc_html_e( 'The discount amount in currency. Not apply to \'Message if missing offer\'', |
| 571 |
'sales-countdown-timer' ) ?></p> |
| 572 |
<p class="description">{missing_amount} |
| 573 |
- <?php esc_html_e( 'The missing amount to get offer. Not apply to \'Checkout countdown message\'', |
| 574 |
'sales-countdown-timer' ) ?></p> |
| 575 |
<p class="description">{minimum_cart_total} |
| 576 |
- <?php esc_html_e( 'The minimum cart total required to get offer', |
| 577 |
'sales-countdown-timer' ) ?></p> |
| 578 |
<p class="description">{original_cart_total} |
| 579 |
- <?php esc_html_e( 'The current cart total without applying discount ', |
| 580 |
'sales-countdown-timer' ) ?></p> |
| 581 |
</td> |
| 582 |
</tr> |
| 583 |
<tr> |
| 584 |
<th> |
| 585 |
<label for="woo-stcr-checkout-countdown-position-on-other-page"><?php esc_html_e( 'Position', |
| 586 |
'sales-countdown-timer' ) ?></label> |
| 587 |
</th> |
| 588 |
<td> |
| 589 |
<a class="vi-ui button yellow" href="https://villatheme.com/extensions/sales-countdown-timer" target="_blank"> |
| 590 |
<?php esc_html_e( 'Unlock This Feature', 'sales-countdown-timer' ); ?> |
| 591 |
</a> |
| 592 |
</td> |
| 593 |
</tr> |
| 594 |
<tr> |
| 595 |
<th> |
| 596 |
<label for="woo-stcr-checkout-countdown-id-on-other-page"><?php esc_html_e( 'Select Countdown timer', |
| 597 |
'sales-countdown-timer' ) ?></label> |
| 598 |
</th> |
| 599 |
<td> |
| 600 |
<a class="vi-ui button yellow" href="https://villatheme.com/extensions/sales-countdown-timer" target="_blank"> |
| 601 |
<?php esc_html_e( 'Unlock This Feature', 'sales-countdown-timer' ); ?> |
| 602 |
</a> |
| 603 |
</td> |
| 604 |
</tr> |
| 605 |
</tbody> |
| 606 |
</table> |
| 607 |
</div> |
| 608 |
<div class="vi-ui bottom attached tab segment" data-tab="report"> |
| 609 |
<table class="form-table"> |
| 610 |
<tbody> |
| 611 |
<tr> |
| 612 |
<th> |
| 613 |
<label for="woo-stcr-checkout-save-logs"> |
| 614 |
<?php esc_html_e( 'Save Logs', 'sales-countdown-timer' ) ?></label> |
| 615 |
</th> |
| 616 |
<td> |
| 617 |
<a class="vi-ui button yellow" href="https://villatheme.com/extensions/sales-countdown-timer" target="_blank"> |
| 618 |
<?php esc_html_e( 'Unlock This Feature', 'sales-countdown-timer' ); ?> |
| 619 |
</a> |
| 620 |
</td> |
| 621 |
</tr> |
| 622 |
<tr> |
| 623 |
<th> |
| 624 |
<label for="woo-stcr-checkout-history-time"> |
| 625 |
<?php esc_html_e( 'History time', 'sales-countdown-timer' ) ?></label> |
| 626 |
</th> |
| 627 |
<td> |
| 628 |
<a class="vi-ui button yellow" href="https://villatheme.com/extensions/sales-countdown-timer" target="_blank"> |
| 629 |
<?php esc_html_e( 'Unlock This Feature', 'sales-countdown-timer' ); ?> |
| 630 |
</a> |
| 631 |
</td> |
| 632 |
</tr> |
| 633 |
</tbody> |
| 634 |
</table> |
| 635 |
</div> |
| 636 |
<div class="vi-ui bottom attached tab segment" data-tab="video_preview"> |
| 637 |
<iframe width="560" height="315" src="https://www.youtube.com/embed/KVomxQCXMbA" frameborder="0" |
| 638 |
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" |
| 639 |
allowfullscreen></iframe> |
| 640 |
</div> |
| 641 |
<div class="vi-ui segment"> |
| 642 |
<table class="form-table"> |
| 643 |
<tbody> |
| 644 |
<tr> |
| 645 |
<th> |
| 646 |
<label for="woo-stcr-checkout-test-mode-enable"><?php esc_html_e( 'Test mode', |
| 647 |
'sales-countdown-timer' ) ?></label> |
| 648 |
</th> |
| 649 |
<td> |
| 650 |
<a class="vi-ui button yellow" href="https://villatheme.com/extensions/sales-countdown-timer" target="_blank"> |
| 651 |
<?php esc_html_e( 'Unlock This Feature', 'sales-countdown-timer' ); ?> |
| 652 |
</a> |
| 653 |
<p class="description"><?php esc_html_e( 'The checkout countdown will be applied only to Administrators for testing purpose', |
| 654 |
'sales-countdown-timer' ) ?></p> |
| 655 |
</td> |
| 656 |
</tr> |
| 657 |
<tr> |
| 658 |
<th> |
| 659 |
<label for=""><?php esc_html_e( 'Reset checkout countdown', |
| 660 |
'sales-countdown-timer' ) ?></label> |
| 661 |
</th> |
| 662 |
<td> |
| 663 |
<a class="vi-ui button yellow" href="https://villatheme.com/extensions/sales-countdown-timer" target="_blank"> |
| 664 |
<?php esc_html_e( 'Unlock This Feature', 'sales-countdown-timer' ); ?> |
| 665 |
</a> |
| 666 |
<p class="description"><?php esc_html_e( 'Reset current checkout discount applied to your account when Test mode is enabled', |
| 667 |
'sales-countdown-timer' ) ?></p> |
| 668 |
</td> |
| 669 |
</tr> |
| 670 |
</tbody> |
| 671 |
</table> |
| 672 |
</div> |
| 673 |
<p> |
| 674 |
<button type="button" class="vi-ui button primary woo-ctr-settings-checkout-page-btnsave" |
| 675 |
name="woo_ctr_settings_checkout_page_btnsave"> |
| 676 |
<?php esc_html_e( 'Save', 'sales-countdown-timer' ) ?> |
| 677 |
</button> |
| 678 |
</p> |
| 679 |
</form> |
| 680 |
</div> |
| 681 |
</div> |
| 682 |
<?php |
| 683 |
} |
| 684 |
|
| 685 |
public function settings() { |
| 686 |
$id = $this->settings->get_id(); |
| 687 |
$div_class = is_rtl() ? 'woo-sctr-wrap woo-sctr-wrap-rtl' : 'woo-sctr-wrap'; |
| 688 |
?> |
| 689 |
<div class="<?php echo esc_attr( $div_class ); ?>"> |
| 690 |
<h2 class=""><?php esc_html_e( 'Sales Countdown Timer', 'sales-countdown-timer' ) ?></h2> |
| 691 |
<form class="vi-ui form" method="post"> |
| 692 |
<?php |
| 693 |
wp_nonce_field( 'woo_ctr_settings_page_save', 'woo_ctr_nonce_field' ); |
| 694 |
if ( get_transient( '_sales_countdown_timer_demo_product_init' ) ) { |
| 695 |
$sale_products = get_transient( 'wc_products_onsale' ); |
| 696 |
$default_countdown = count( $id ) ? $id[0] : 'salescountdowntimer'; |
| 697 |
$now = current_time( 'timestamp', true ); |
| 698 |
$product_url = ''; |
| 699 |
if ( false === $sale_products ) { |
| 700 |
$products_args = array( |
| 701 |
'post_type' => 'product', |
| 702 |
'status' => 'publish', |
| 703 |
'posts_per_page' => - 1, |
| 704 |
'meta_query' => array(// phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_query |
| 705 |
'relation' => 'AND', |
| 706 |
array( |
| 707 |
'key' => '_sale_price', |
| 708 |
'value' => '', |
| 709 |
'compare' => '!=', |
| 710 |
), |
| 711 |
array( |
| 712 |
'key' => '_sale_price_dates_to', |
| 713 |
'value' => $now, |
| 714 |
'compare' => '>', |
| 715 |
) |
| 716 |
), |
| 717 |
); |
| 718 |
$the_query = new WP_Query( $products_args ); |
| 719 |
if ( $the_query->have_posts() ) { |
| 720 |
while ( $the_query->have_posts() ) { |
| 721 |
$the_query->the_post(); |
| 722 |
$product_id = get_the_ID(); |
| 723 |
update_post_meta( $product_id, '_woo_ctr_select_countdown_timer', $default_countdown ); |
| 724 |
if ( ! $product_url ) { |
| 725 |
$product_url = get_permalink( $product_id ); |
| 726 |
} |
| 727 |
} |
| 728 |
} |
| 729 |
wp_reset_postdata(); |
| 730 |
} elseif ( is_array( $sale_products ) && count( $sale_products ) ) { |
| 731 |
foreach ( $sale_products as $product_id ) { |
| 732 |
update_post_meta( $product_id, '_woo_ctr_select_countdown_timer', $default_countdown ); |
| 733 |
if ( ! $product_url ) { |
| 734 |
$product_url = get_permalink( $product_id ); |
| 735 |
} |
| 736 |
} |
| 737 |
} |
| 738 |
if ( $product_url ) { |
| 739 |
echo esc_html__( 'See your very first sales countdown timer ', 'sales-countdown-timer' ) . '<a href="' . esc_url( $product_url ) . '" target="_blank">' . esc_html__( 'here.', 'sales-countdown-timer' ) . '</a>'; |
| 740 |
delete_transient( '_sales_countdown_timer_demo_product_init' ); |
| 741 |
} |
| 742 |
} |
| 743 |
if ( is_array( $id ) && count( $id ) ) { |
| 744 |
?> |
| 745 |
<?php |
| 746 |
for ( $i = 0; $i < sizeof( $id ); $i ++ ) { |
| 747 |
switch ( $this->settings->get_time_separator()[ $i ] ) { |
| 748 |
case 'dot': |
| 749 |
$time_separator = '.'; |
| 750 |
break; |
| 751 |
case 'comma': |
| 752 |
$time_separator = ','; |
| 753 |
break; |
| 754 |
case 'colon': |
| 755 |
$time_separator = ':'; |
| 756 |
break; |
| 757 |
default: |
| 758 |
$time_separator = ''; |
| 759 |
} |
| 760 |
?> |
| 761 |
<div class="woo-sctr-accordion-wrap woo-sctr-accordion-wrap-<?php echo esc_attr( $i ); ?> vi-ui segment" |
| 762 |
data-accordion_id="<?php echo esc_attr( $i ); ?>"> |
| 763 |
<div class="woo-sctr-accordion"> |
| 764 |
<div class="vi-ui toggle checkbox"> |
| 765 |
<input type="hidden" name="woo_ctr_active[]" |
| 766 |
class="woo-sctr-active" |
| 767 |
value="<?php echo esc_attr( $this->settings->get_active()[ $i ] ); ?>"> |
| 768 |
<input type="checkbox" |
| 769 |
class="woo-sctr-active" <?php echo $this->settings->get_active()[ $i ] ? 'checked' : ''; ?>><label> |
| 770 |
</div> |
| 771 |
<span class="woo-sctr-accordion-name"><?php echo esc_html( $this->settings->get_names()[ $i ] ); ?></span> |
| 772 |
|
| 773 |
<span class="woo-sctr-short-description"> |
| 774 |
<span class="woo-sctr-short-description-from"><?php echo esc_html__( 'From: ', 'sales-countdown-timer' ) ?> |
| 775 |
<span class="woo-sctr-short-description-from-date"><?php echo esc_html( $this->settings->get_sale_from_date()[ $i ] ) ?></span> |
| 776 |
<span class="woo-sctr-short-description-from-time"><?php echo esc_html( $this->settings->get_sale_from_time()[ $i ] ); ?></span> |
| 777 |
</span> |
| 778 |
<span class="woo-sctr-short-description-to"><?php echo esc_html__( 'To: ', 'sales-countdown-timer' ) ?> |
| 779 |
<span class="woo-sctr-short-description-to-date"><?php echo esc_html( $this->settings->get_sale_to_date()[ $i ] ) ?></span> |
| 780 |
<span class="woo-sctr-short-description-to-time"><?php echo esc_html( $this->settings->get_sale_to_time()[ $i ] ); ?></span> |
| 781 |
</span> |
| 782 |
</span> |
| 783 |
<div class="woo-sctr-shortcode-text"> |
| 784 |
<span><?php echo esc_html__( 'Shortcode: ', 'sales-countdown-timer' ) ?></span><span><?php echo '[sales_countdown_timer id="' . esc_html( $id[ $i ] ) . '"]'; ?></span> |
| 785 |
</div> |
| 786 |
<span class="woo-sctr-button-edit"> |
| 787 |
<span class="woo-sctr-short-description-copy-shortcode vi-ui button"><?php esc_html_e( 'Copy shortcode', 'sales-countdown-timer' ); ?></span> |
| 788 |
<span class="woo-sctr-button-edit-duplicate vi-ui positive button"><?php esc_html_e( 'Duplicate', 'sales-countdown-timer' ) ?></span> |
| 789 |
<span class="woo-sctr-button-edit-remove vi-ui negative button"><?php esc_html_e( 'Remove', 'sales-countdown-timer' ) ?></span> |
| 790 |
</span> |
| 791 |
</div> |
| 792 |
<div class="woo-sctr-panel vi-ui styled fluid accordion" id="woo-sctr-panel-accordion"> |
| 793 |
<div class="title <?php if ( $this->settings->get_active()[ $i ] ) { |
| 794 |
echo 'active'; |
| 795 |
} ?>"> |
| 796 |
<i class="dropdown icon"></i> |
| 797 |
<?php esc_html_e( 'General settings', 'sales-countdown-timer' ) ?> |
| 798 |
</div> |
| 799 |
<div class="content <?php if ( $this->settings->get_active()[ $i ] ) { |
| 800 |
echo 'active'; |
| 801 |
} ?>"> |
| 802 |
|
| 803 |
<div class="field"> |
| 804 |
<label><?php esc_html_e( 'Name', 'sales-countdown-timer' ) ?></label> |
| 805 |
<input type="hidden" name="woo_ctr_id[]" class="woo-sctr-id" |
| 806 |
value="<?php echo esc_attr( $id[ $i ] ); ?>"> |
| 807 |
<input type="text" name="woo_ctr_name[]" class="woo-sctr-name" |
| 808 |
value="<?php echo esc_attr( $this->settings->get_names()[ $i ] ); ?>"> |
| 809 |
</div> |
| 810 |
|
| 811 |
<h4 class="vi-ui dividing header"> |
| 812 |
<label><?php esc_html_e( 'Schedule time for shortcode usage', 'sales-countdown-timer' ) ?></label> |
| 813 |
</h4> |
| 814 |
<div class="field" |
| 815 |
data-tooltip="<?php esc_html_e( 'These values are used for shortcode only. To schedule sale for product please go to admin product.', 'sales-countdown-timer' ) ?>"> |
| 816 |
<div class="two fields"> |
| 817 |
<div class="field"> |
| 818 |
<label><?php esc_html_e( 'From', 'sales-countdown-timer' ) ?></label> |
| 819 |
<div class="two fields"> |
| 820 |
<div class="field"> |
| 821 |
<input type="date" |
| 822 |
name="woo_ctr_sale_from_date[]" |
| 823 |
class="woo-sctr-sale-from-date woo-sctr-sale-date <?php if ( $this->settings->get_time_type()[ $i ] == 'loop' ) { |
| 824 |
echo 'woo-sctr-hide-date'; |
| 825 |
} ?>" |
| 826 |
value="<?php echo $this->settings->get_sale_from_date()[ $i ] ? esc_attr( $this->settings->get_sale_from_date()[ $i ] ) : '' ?>"> |
| 827 |
</div> |
| 828 |
<div class="field"> |
| 829 |
<input type="time" |
| 830 |
name="woo_ctr_sale_from_time[]" |
| 831 |
class="woo-sctr-sale-from-time" |
| 832 |
value="<?php echo $this->settings->get_sale_from_time()[ $i ] ? esc_attr( $this->settings->get_sale_from_time()[ $i ] ) : '' ?>"> |
| 833 |
</div> |
| 834 |
</div> |
| 835 |
</div> |
| 836 |
<div class="field"> |
| 837 |
<label><?php esc_html_e( 'To', 'sales-countdown-timer' ) ?></label> |
| 838 |
<div class="two fields"> |
| 839 |
<div class="field"> |
| 840 |
<input type="date" name="woo_ctr_sale_to_date[]" |
| 841 |
class="woo-sctr-sale-to-date woo-sctr-sale-date <?php if ( $this->settings->get_time_type()[ $i ] == 'loop' ) { |
| 842 |
echo 'woo-sctr-hide-date'; |
| 843 |
} ?>" |
| 844 |
value="<?php echo $this->settings->get_sale_to_date()[ $i ] ? esc_attr( $this->settings->get_sale_to_date()[ $i ] ) : '' ?>"> |
| 845 |
</div> |
| 846 |
<div class="field"> |
| 847 |
<input type="time" name="woo_ctr_sale_to_time[]" |
| 848 |
class="woo-sctr-sale-to-time" |
| 849 |
value="<?php echo $this->settings->get_sale_to_time()[ $i ] ? esc_attr( $this->settings->get_sale_to_time()[ $i ] ) : '' ?>"> |
| 850 |
</div> |
| 851 |
</div> |
| 852 |
</div> |
| 853 |
</div> |
| 854 |
<div class="equal width fields"> |
| 855 |
<div class="field"> |
| 856 |
<div class="vi-ui labeled right action input"> |
| 857 |
<div class="vi-ui basic label"><?php esc_html_e( 'Countdown evergreen', 'sales-countdown-timer' ); ?></div> |
| 858 |
<a class="vi-ui button yellow" href="https://villatheme.com/extensions/sales-countdown-timer" target="_blank"> |
| 859 |
<?php esc_html_e( 'Unlock This Feature', 'sales-countdown-timer' ); ?> |
| 860 |
</a> |
| 861 |
</div> |
| 862 |
</div> |
| 863 |
<div class="field"> |
| 864 |
<div class="vi-ui labeled right action input"> |
| 865 |
<div class="vi-ui basic label"><?php esc_html_e( 'Restart countdown after', 'sales-countdown-timer' ); ?></div> |
| 866 |
<a class="vi-ui button yellow" href="https://villatheme.com/extensions/sales-countdown-timer" target="_blank"> |
| 867 |
<?php esc_html_e( 'Unlock This Feature', 'sales-countdown-timer' ); ?> |
| 868 |
</a> |
| 869 |
</div> |
| 870 |
</div> |
| 871 |
</div> |
| 872 |
</div> |
| 873 |
</div> |
| 874 |
<div class="title"> |
| 875 |
<i class="dropdown icon"></i> |
| 876 |
<?php esc_html_e( 'Design', 'sales-countdown-timer' ) ?> |
| 877 |
</div> |
| 878 |
<div class=" content"> |
| 879 |
<?php |
| 880 |
$message = $this->settings->get_message()[ $i ]; |
| 881 |
$text = explode( '{countdown_timer}', $message ); |
| 882 |
if ( count( $text ) < 2 ) { |
| 883 |
$text_before = $text_after = ''; |
| 884 |
} else { |
| 885 |
$text_before = $text[0]; |
| 886 |
$text_after = $text[1]; |
| 887 |
} |
| 888 |
?> |
| 889 |
<div class="field"> |
| 890 |
<label><?php esc_html_e( 'Message', 'sales-countdown-timer' ) ?></label> |
| 891 |
|
| 892 |
<input type="text" name="woo_ctr_message[]" |
| 893 |
class="woo-sctr-message" |
| 894 |
value="<?php echo esc_attr( $this->settings->get_message()[ $i ] ); ?>"> |
| 895 |
</div> |
| 896 |
<div class="field"> |
| 897 |
<p>{countdown_timer} |
| 898 |
- <?php esc_html_e( 'The countdown timer that you set on tab design', 'sales-countdown-timer' ) ?></p> |
| 899 |
<p class="woo-sctr-warning-message-countdown-timer <?php if ( count( $text ) >= 2 ) { |
| 900 |
esc_attr_e( 'woo-sctr-hidden-class' ); |
| 901 |
} ?>"><?php esc_html_e( 'The countdown timer will not show if message does not include {countdown_timer}', 'sales-countdown-timer' ) ?></p> |
| 902 |
</div> |
| 903 |
<div class="field"> |
| 904 |
<label><?php esc_html_e( 'Shortcode upcoming message', 'sales-countdown-timer' ) ?></label> |
| 905 |
<a class="vi-ui button yellow" href="https://villatheme.com/extensions/sales-countdown-timer" target="_blank"> |
| 906 |
<?php esc_html_e( 'Unlock This Feature', 'sales-countdown-timer' ); ?> |
| 907 |
</a> |
| 908 |
</div> |
| 909 |
<div class="field"> |
| 910 |
<label><?php esc_html_e( 'Shortcode time elapsed message', 'sales-countdown-timer' ) ?></label> |
| 911 |
<a class="vi-ui button yellow" href="https://villatheme.com/extensions/sales-countdown-timer" target="_blank"> |
| 912 |
<?php esc_html_e( 'Unlock This Feature', 'sales-countdown-timer' ); ?> |
| 913 |
</a> |
| 914 |
</div> |
| 915 |
<div class="field"> |
| 916 |
<label><?php esc_html_e( 'Reduce the size of countdown timer on:', 'sales-countdown-timer' ) ?></label> |
| 917 |
<div class="equal width fields"> |
| 918 |
<div class="inline field"> |
| 919 |
<label><?php esc_html_e( 'Product list', 'sales-countdown-timer' ) ?></label> |
| 920 |
<a class="vi-ui button yellow" href="https://villatheme.com/extensions/sales-countdown-timer" target="_blank"> |
| 921 |
<?php esc_html_e( 'Unlock This Feature', 'sales-countdown-timer' ); ?> |
| 922 |
</a> |
| 923 |
</div> |
| 924 |
<div class="inline field"> |
| 925 |
<label><?php esc_html_e( 'Mobile', 'sales-countdown-timer' ) ?></label> |
| 926 |
<a class="vi-ui button yellow" href="https://villatheme.com/extensions/sales-countdown-timer" target="_blank"> |
| 927 |
<?php esc_html_e( 'Unlock This Feature', 'sales-countdown-timer' ); ?> |
| 928 |
</a> |
| 929 |
</div> |
| 930 |
<div class="inline field"> |
| 931 |
<label><?php esc_html_e( 'Sticky', 'sales-countdown-timer' ) ?></label> |
| 932 |
<a class="vi-ui button yellow" href="https://villatheme.com/extensions/sales-countdown-timer" target="_blank"> |
| 933 |
<?php esc_html_e( 'Unlock This Feature', 'sales-countdown-timer' ); ?> |
| 934 |
</a> |
| 935 |
</div> |
| 936 |
</div> |
| 937 |
</div> |
| 938 |
<div class="equal width fields"> |
| 939 |
<div class="field"> |
| 940 |
<label><?php esc_html_e( 'Message position', 'sales-countdown-timer' ) ?></label> |
| 941 |
<a class="vi-ui button yellow" href="https://villatheme.com/extensions/sales-countdown-timer" target="_blank"> |
| 942 |
<?php esc_html_e( 'Unlock This Feature', 'sales-countdown-timer' ); ?> |
| 943 |
</a> |
| 944 |
</div> |
| 945 |
<div class="field"> |
| 946 |
<label><?php esc_html_e( 'Time units', 'sales-countdown-timer' ) ?></label> |
| 947 |
<a class="vi-ui button yellow" href="https://villatheme.com/extensions/sales-countdown-timer" target="_blank"> |
| 948 |
<?php esc_html_e( 'Unlock This Feature', 'sales-countdown-timer' ); ?> |
| 949 |
</a> |
| 950 |
</div> |
| 951 |
</div> |
| 952 |
|
| 953 |
<div class="equal width fields"> |
| 954 |
<div class="field"> |
| 955 |
<label><?php esc_html_e( 'Time separator', 'sales-countdown-timer' ) ?></label> |
| 956 |
<select name="woo_ctr_time_separator[]" |
| 957 |
class="woo-sctr-time-separator vi-ui dropdown"> |
| 958 |
<option value="blank" <?php selected( $this->settings->get_time_separator() [ $i ], 'blank' ); ?>><?php esc_html_e( 'Blank', 'sales-countdown-timer' ) ?></option> |
| 959 |
<option value="colon" <?php selected( $this->settings->get_time_separator() [ $i ], 'colon' ); ?>><?php esc_html_e( 'Colon(:)', 'sales-countdown-timer' ) ?></option> |
| 960 |
<option value="comma" <?php selected( $this->settings->get_time_separator()[ $i ], 'comma' ); ?>><?php esc_html_e( 'Comma(,)', 'sales-countdown-timer' ) ?></option> |
| 961 |
<option value="dot" <?php selected( $this->settings->get_time_separator()[ $i ], 'dot' ); ?>><?php esc_html_e( 'Dot(.)', 'sales-countdown-timer' ) ?></option> |
| 962 |
</select> |
| 963 |
</div> |
| 964 |
<div class="field"> |
| 965 |
<label><?php esc_html_e( 'Datetime format style', 'sales-countdown-timer' ) ?></label> |
| 966 |
<select name="woo_ctr_count_style[]" |
| 967 |
class="woo-sctr-count-style vi-ui dropdown"> |
| 968 |
<option value="1" <?php selected( $this->settings->get_count_style()[ $i ], 1 ); ?>><?php esc_html_e( '01 days 02 hrs 03 mins 04 secs', 'sales-countdown-timer' ) ?></option> |
| 969 |
<option value="2" <?php selected( $this->settings->get_count_style()[ $i ], 2 ); ?>><?php esc_html_e( '01 days 02 hours 03 minutes 04 seconds', 'sales-countdown-timer' ) ?></option> |
| 970 |
<option value="3" <?php selected( $this->settings->get_count_style()[ $i ], 3 ); ?>><?php esc_html_e( '01:02:03:04', 'sales-countdown-timer' ) ?></option> |
| 971 |
<option value="4" <?php selected( $this->settings->get_count_style()[ $i ], 4 ); ?>><?php esc_html_e( '01d:02h:03m:04s', 'sales-countdown-timer' ) ?></option> |
| 972 |
<option disabled><?php esc_html_e( 'Custom (Premium)', 'sales-countdown-timer' ) ?></option> |
| 973 |
</select> |
| 974 |
</div> |
| 975 |
</div> |
| 976 |
<?php |
| 977 |
$datetime_unit_position = isset( $this->settings->get_datetime_unit_position() [ $i ] ) ? $this->settings->get_datetime_unit_position() [ $i ] : 'bottom'; |
| 978 |
$animation_style = isset( $this->settings->get_animation_style()[ $i ] ) ? $this->settings->get_animation_style()[ $i ] : 'default'; |
| 979 |
?> |
| 980 |
<div class="equal width fields"> |
| 981 |
<div class="field"> |
| 982 |
<label><?php esc_html_e( 'Datetime unit position', 'sales-countdown-timer' ) ?></label> |
| 983 |
<select name="woo_ctr_datetime_unit_position[]" |
| 984 |
class="woo-sctr-datetime-unit-position vi-ui dropdown"> |
| 985 |
<option value="top" <?php selected( $datetime_unit_position, 'top' ); ?>><?php esc_html_e( 'Top', 'sales-countdown-timer' ) ?></option> |
| 986 |
<option value="bottom" <?php selected( $datetime_unit_position, 'bottom' ); ?>><?php esc_html_e( 'Bottom', 'sales-countdown-timer' ) ?></option> |
| 987 |
</select> |
| 988 |
</div> |
| 989 |
<div class="field"> |
| 990 |
<label><?php esc_html_e( 'Animation style', 'sales-countdown-timer' ) ?></label> |
| 991 |
<select name="woo_ctr_animation_style[]" |
| 992 |
class="woo-sctr-animation-style vi-ui dropdown"> |
| 993 |
<option value="default" <?php selected( $animation_style, 'default' ); ?>><?php esc_html_e( 'Default', 'sales-countdown-timer' ) ?></option> |
| 994 |
<option value="slide" <?php selected( $animation_style, 'slide' ); ?>><?php esc_html_e( 'Slide', 'sales-countdown-timer' ) ?></option> |
| 995 |
<option disabled><?php esc_html_e( '3D Flip (Premium)', 'sales-countdown-timer' ) ?></option> |
| 996 |
</select> |
| 997 |
</div> |
| 998 |
</div> |
| 999 |
<?php |
| 1000 |
switch ( $this->settings->get_count_style()[ $i ] ) { |
| 1001 |
case '1': |
| 1002 |
$date = esc_html__( 'days', 'sales-countdown-timer' ); |
| 1003 |
$hour = esc_html__( 'hrs', 'sales-countdown-timer' ); |
| 1004 |
$minute = esc_html__( 'mins', 'sales-countdown-timer' ); |
| 1005 |
$second = esc_html__( 'secs', 'sales-countdown-timer' ); |
| 1006 |
break; |
| 1007 |
case '2': |
| 1008 |
$date = esc_html__( 'days', 'sales-countdown-timer' ); |
| 1009 |
$hour = esc_html__( 'hours', 'sales-countdown-timer' ); |
| 1010 |
$minute = esc_html__( 'minutes', 'sales-countdown-timer' ); |
| 1011 |
$second = esc_html__( 'seconds', 'sales-countdown-timer' ); |
| 1012 |
break; |
| 1013 |
case '3': |
| 1014 |
$date = ''; |
| 1015 |
$hour = ''; |
| 1016 |
$minute = ''; |
| 1017 |
$second = ''; |
| 1018 |
break; |
| 1019 |
default: |
| 1020 |
$date = esc_html__( 'd', 'sales-countdown-timer' ); |
| 1021 |
$hour = esc_html__( 'h', 'sales-countdown-timer' ); |
| 1022 |
$minute = esc_html__( 'm', 'sales-countdown-timer' ); |
| 1023 |
$second = esc_html__( 's', 'sales-countdown-timer' ); |
| 1024 |
} |
| 1025 |
|
| 1026 |
?> |
| 1027 |
<div class="field"> |
| 1028 |
<h4 class="vi-ui dividing header"> |
| 1029 |
<label><?php esc_html_e( 'Display type', 'sales-countdown-timer' ) ?></label> |
| 1030 |
</h4> |
| 1031 |
<input type="hidden" |
| 1032 |
name="woo_ctr_display_type[]" |
| 1033 |
class="woo-sctr-display-type" |
| 1034 |
value="<?php echo esc_attr( $this->settings->get_display_type()[ $i ] ); ?>"> |
| 1035 |
|
| 1036 |
<div class="two fields"> |
| 1037 |
|
| 1038 |
<div class="field"> |
| 1039 |
<div class="vi-ui segment"> |
| 1040 |
<div class="fields"> |
| 1041 |
<div class="three wide field"> |
| 1042 |
<div class="vi-ui toggle checkbox"> |
| 1043 |
|
| 1044 |
<input type="radio" |
| 1045 |
name="woo_ctr_display_type_<?php echo esc_attr( $i ); ?>" |
| 1046 |
class="woo-sctr-display-type-checkbox" |
| 1047 |
value="1" <?php checked( $this->settings->get_display_type()[ $i ], '1' ) ?>><label></label> |
| 1048 |
</div> |
| 1049 |
</div> |
| 1050 |
<div class="thirteen wide field"> |
| 1051 |
<div class="woo-sctr-shortcode-wrap-wrap"> |
| 1052 |
<div class="woo-sctr-shortcode-wrap"> |
| 1053 |
|
| 1054 |
<div class="woo-sctr-shortcode-countdown-wrap woo-sctr-shortcode-countdown-style-1"> |
| 1055 |
<div class="woo-sctr-shortcode-countdown"> |
| 1056 |
<div class="woo-sctr-shortcode-countdown-1"> |
| 1057 |
<span class="woo-sctr-shortcode-countdown-text-before"><?php echo esc_html( $text_before ); ?></span> |
| 1058 |
<div class="woo-sctr-shortcode-countdown-2"> |
| 1059 |
<span class="woo-sctr-shortcode-countdown-unit-wrap"> |
| 1060 |
<span class="woo-sctr-shortcode-countdown-date woo-sctr-shortcode-countdown-unit"> |
| 1061 |
<span class="woo-sctr-shortcode-countdown-date-text woo-sctr-shortcode-countdown-text woo-sctr-datetime-unit-position-top" <?php echo $datetime_unit_position == 'top' ? '' : 'style="display:none;"'; ?>><?php echo esc_html( $date ); ?></span> |
| 1062 |
<span class="woo-sctr-shortcode-countdown-date-value woo-sctr-shortcode-countdown-value"><?php esc_html_e( '01', 'sales-countdown-timer' ); ?></span> |
| 1063 |
<span class="woo-sctr-shortcode-countdown-date-text woo-sctr-shortcode-countdown-text woo-sctr-datetime-unit-position-bottom" <?php echo $datetime_unit_position == 'bottom' ? '' : 'style="display:none;"'; ?>><?php echo esc_html( $date ); ?></span> |
| 1064 |
</span> |
| 1065 |
</span> |
| 1066 |
<span class="woo-sctr-shortcode-countdown-time-separator"><?php echo esc_html( $time_separator ); ?></span> |
| 1067 |
<span class="woo-sctr-shortcode-countdown-unit-wrap"> |
| 1068 |
<span class="woo-sctr-shortcode-countdown-hour woo-sctr-shortcode-countdown-unit"> |
| 1069 |
<span class="woo-sctr-shortcode-countdown-hour-text woo-sctr-shortcode-countdown-text woo-sctr-datetime-unit-position-top" <?php echo $datetime_unit_position == 'top' ? '' : 'style="display:none;"'; ?>><?php echo esc_html( $hour ); ?></span> |
| 1070 |
<span class="woo-sctr-shortcode-countdown-hour-value woo-sctr-shortcode-countdown-value"><?php esc_html_e( '02', 'sales-countdown-timer' ); ?></span> |
| 1071 |
<span class="woo-sctr-shortcode-countdown-hour-text woo-sctr-shortcode-countdown-text woo-sctr-datetime-unit-position-bottom" <?php echo $datetime_unit_position == 'bottom' ? '' : 'style="display:none;"'; ?>><?php echo esc_html( $hour ); ?></span> |
| 1072 |
</span> |
| 1073 |
</span> |
| 1074 |
<span class="woo-sctr-shortcode-countdown-time-separator"><?php echo esc_html( $time_separator ); ?></span> |
| 1075 |
<span class="woo-sctr-shortcode-countdown-unit-wrap"> |
| 1076 |
<span class="woo-sctr-shortcode-countdown-minute woo-sctr-shortcode-countdown-unit"> |
| 1077 |
<span class="woo-sctr-shortcode-countdown-minute-text woo-sctr-shortcode-countdown-text woo-sctr-datetime-unit-position-top" <?php echo $datetime_unit_position == 'top' ? '' : 'style="display:none;"'; ?>><?php echo esc_html( $minute ); ?></span> |
| 1078 |
<span class="woo-sctr-shortcode-countdown-minute-value woo-sctr-shortcode-countdown-value"><?php esc_html_e( '03', 'sales-countdown-timer' ); ?></span> |
| 1079 |
<span class="woo-sctr-shortcode-countdown-minute-text woo-sctr-shortcode-countdown-text woo-sctr-datetime-unit-position-bottom" <?php echo $datetime_unit_position == 'bottom' ? '' : 'style="display:none;"'; ?>><?php echo esc_html( $minute ); ?></span> |
| 1080 |
</span> |
| 1081 |
</span> |
| 1082 |
<span class="woo-sctr-shortcode-countdown-time-separator"><?php echo esc_html( $time_separator ); ?></span> |
| 1083 |
<span class="woo-sctr-shortcode-countdown-unit-wrap"> |
| 1084 |
<span class="woo-sctr-shortcode-countdown-second woo-sctr-shortcode-countdown-unit"> |
| 1085 |
<span class="woo-sctr-shortcode-countdown-second-text woo-sctr-shortcode-countdown-text woo-sctr-datetime-unit-position-top" <?php echo $datetime_unit_position == 'top' ? '' : 'style="display:none;"'; ?>><?php echo esc_html( $second ); ?></span> |
| 1086 |
<span class="woo-sctr-shortcode-countdown-second-value woo-sctr-shortcode-countdown-value"><?php esc_html_e( '04', 'sales-countdown-timer' ); ?></span> |
| 1087 |
<span class="woo-sctr-shortcode-countdown-second-text woo-sctr-shortcode-countdown-text woo-sctr-datetime-unit-position-bottom" <?php echo $datetime_unit_position == 'bottom' ? '' : 'style="display:none;"'; ?>><?php echo esc_html( $second ); ?></span> |
| 1088 |
</span> |
| 1089 |
</span> |
| 1090 |
</div> |
| 1091 |
<span class="woo-sctr-shortcode-countdown-text-after"><?php echo wp_kses_post( $text_after ); ?></span> |
| 1092 |
|
| 1093 |
</div> |
| 1094 |
</div> |
| 1095 |
</div> |
| 1096 |
</div> |
| 1097 |
</div> |
| 1098 |
</div> |
| 1099 |
</div> |
| 1100 |
</div> |
| 1101 |
</div> |
| 1102 |
<div class="field"> |
| 1103 |
<div class="vi-ui segment"> |
| 1104 |
<div class="fields"> |
| 1105 |
<div class="three wide field"> |
| 1106 |
<div class="vi-ui toggle checkbox"> |
| 1107 |
|
| 1108 |
<input type="radio" |
| 1109 |
name="woo_ctr_display_type_<?php echo esc_attr( $i ); ?>" |
| 1110 |
class="woo-sctr-display-type-checkbox" |
| 1111 |
value="2" <?php checked( $this->settings->get_display_type()[ $i ], '2' ) ?>><label></label> |
| 1112 |
</div> |
| 1113 |
</div> |
| 1114 |
<div class="thirteen wide field"> |
| 1115 |
<div class="woo-sctr-shortcode-wrap-wrap"> |
| 1116 |
<div class="woo-sctr-shortcode-wrap"> |
| 1117 |
|
| 1118 |
<div class="woo-sctr-shortcode-countdown-wrap woo-sctr-shortcode-countdown-style-2"> |
| 1119 |
<div class="woo-sctr-shortcode-countdown"> |
| 1120 |
<div class="woo-sctr-shortcode-countdown-1"> |
| 1121 |
<span class="woo-sctr-shortcode-countdown-text-before"><?php echo wp_kses_post( $text_before ); ?></span> |
| 1122 |
<div class="woo-sctr-shortcode-countdown-2"> |
| 1123 |
<span class="woo-sctr-shortcode-countdown-unit-wrap"> |
| 1124 |
<span class="woo-sctr-shortcode-countdown-date woo-sctr-shortcode-countdown-unit"> |
| 1125 |
<span class="woo-sctr-shortcode-countdown-date-text woo-sctr-shortcode-countdown-text woo-sctr-datetime-unit-position-top" <?php echo $datetime_unit_position == 'top' ? '' : 'style="display:none;"'; ?>><?php echo esc_html( $date ); ?></span> |
| 1126 |
<span class="woo-sctr-shortcode-countdown-date-value woo-sctr-shortcode-countdown-value"><?php esc_html_e( '01', 'sales-countdown-timer' ); ?></span> |
| 1127 |
<span class="woo-sctr-shortcode-countdown-date-text woo-sctr-shortcode-countdown-text woo-sctr-datetime-unit-position-bottom" <?php echo $datetime_unit_position == 'bottom' ? '' : 'style="display:none;"'; ?>><?php echo esc_html( $date ); ?></span> |
| 1128 |
</span> |
| 1129 |
</span> |
| 1130 |
<span class="woo-sctr-shortcode-countdown-time-separator"><?php echo esc_attr( $time_separator ); ?></span> |
| 1131 |
<span class="woo-sctr-shortcode-countdown-unit-wrap"> |
| 1132 |
<span class="woo-sctr-shortcode-countdown-hour woo-sctr-shortcode-countdown-unit"> |
| 1133 |
<span class="woo-sctr-shortcode-countdown-hour-text woo-sctr-shortcode-countdown-text woo-sctr-datetime-unit-position-top" <?php echo $datetime_unit_position == 'top' ? '' : 'style="display:none;"'; ?>><?php echo esc_html( $hour ); ?></span> |
| 1134 |
<span class="woo-sctr-shortcode-countdown-hour-value woo-sctr-shortcode-countdown-value"><?php esc_html_e( '02', 'sales-countdown-timer' ); ?></span> |
| 1135 |
<span class="woo-sctr-shortcode-countdown-hour-text woo-sctr-shortcode-countdown-text woo-sctr-datetime-unit-position-bottom" <?php echo $datetime_unit_position == 'bottom' ? '' : 'style="display:none;"'; ?>><?php echo esc_html( $hour ); ?></span> |
| 1136 |
</span> |
| 1137 |
</span> |
| 1138 |
<span class="woo-sctr-shortcode-countdown-time-separator"><?php echo esc_attr( $time_separator ); ?></span> |
| 1139 |
<span class="woo-sctr-shortcode-countdown-unit-wrap"> |
| 1140 |
<span class="woo-sctr-shortcode-countdown-minute woo-sctr-shortcode-countdown-unit"> |
| 1141 |
<span class="woo-sctr-shortcode-countdown-minute-text woo-sctr-shortcode-countdown-text woo-sctr-datetime-unit-position-top" <?php echo $datetime_unit_position == 'top' ? '' : 'style="display:none;"'; ?>><?php echo esc_html( $minute ); ?></span> |
| 1142 |
<span class="woo-sctr-shortcode-countdown-minute-value woo-sctr-shortcode-countdown-value"><?php esc_html_e( '03', 'sales-countdown-timer' ); ?></span> |
| 1143 |
<span class="woo-sctr-shortcode-countdown-minute-text woo-sctr-shortcode-countdown-text woo-sctr-datetime-unit-position-bottom" <?php echo $datetime_unit_position == 'bottom' ? '' : 'style="display:none;"'; ?>><?php echo esc_html( $minute ); ?></span> |
| 1144 |
</span> |
| 1145 |
</span> |
| 1146 |
<span class="woo-sctr-shortcode-countdown-time-separator"><?php echo esc_attr( $time_separator ); ?></span> |
| 1147 |
<span class="woo-sctr-shortcode-countdown-unit-wrap"> |
| 1148 |
<span class="woo-sctr-shortcode-countdown-second woo-sctr-shortcode-countdown-unit"> |
| 1149 |
<span class="woo-sctr-shortcode-countdown-second-text woo-sctr-shortcode-countdown-text woo-sctr-datetime-unit-position-top" <?php echo $datetime_unit_position == 'top' ? '' : 'style="display:none;"'; ?>><?php echo esc_html( $second ); ?></span> |
| 1150 |
<span class="woo-sctr-shortcode-countdown-second-value woo-sctr-shortcode-countdown-value"><?php esc_html_e( '04', 'sales-countdown-timer' ); ?></span> |
| 1151 |
<span class="woo-sctr-shortcode-countdown-second-text woo-sctr-shortcode-countdown-text woo-sctr-datetime-unit-position-bottom" <?php echo $datetime_unit_position == 'bottom' ? '' : 'style="display:none;"'; ?>><?php echo esc_html( $second ); ?></span> |
| 1152 |
</span> |
| 1153 |
</span> |
| 1154 |
</div> |
| 1155 |
<span class="woo-sctr-shortcode-countdown-text-after"><?php echo wp_kses_post( $text_after ); ?></span> |
| 1156 |
</div> |
| 1157 |
</div> |
| 1158 |
</div> |
| 1159 |
</div> |
| 1160 |
</div> |
| 1161 |
</div> |
| 1162 |
</div> |
| 1163 |
</div> |
| 1164 |
</div> |
| 1165 |
</div> |
| 1166 |
|
| 1167 |
<div class="field"> |
| 1168 |
|
| 1169 |
<div class="vi-ui segment"> |
| 1170 |
<div class="fields"> |
| 1171 |
<div class="three wide field"> |
| 1172 |
<div class="vi-ui toggle checkbox"> |
| 1173 |
|
| 1174 |
<input type="radio" |
| 1175 |
name="woo_ctr_display_type_<?php echo esc_attr( $i ); ?>" |
| 1176 |
class="woo-sctr-display-type-checkbox" |
| 1177 |
value="3" <?php checked( $this->settings->get_display_type()[ $i ], '3' ) ?>><label></label> |
| 1178 |
</div> |
| 1179 |
</div> |
| 1180 |
<div class="ten wide field"> |
| 1181 |
<div class="woo-sctr-shortcode-wrap-wrap woo-sctr-shortcode-wrap-wrap-inline"> |
| 1182 |
|
| 1183 |
<span class="woo-sctr-shortcode-countdown-text-before"><?php echo wp_kses_post( $text_before ); ?></span> |
| 1184 |
<span class="woo-sctr-shortcode-countdown-1"> |
| 1185 |
<span class="woo-sctr-shortcode-countdown-unit-wrap"> |
| 1186 |
<span class="woo-sctr-shortcode-countdown-date woo-sctr-shortcode-countdown-unit"> |
| 1187 |
<span class="woo-sctr-shortcode-countdown-date-value woo-sctr-shortcode-countdown-value"><?php esc_html_e( '01', 'sales-countdown-timer' ); ?></span> |
| 1188 |
<span class="woo-sctr-shortcode-countdown-date-text woo-sctr-shortcode-countdown-text"><?php echo esc_attr( $date ); ?></span> |
| 1189 |
</span> |
| 1190 |
</span> |
| 1191 |
<span class="woo-sctr-shortcode-countdown-time-separator"><?php echo esc_attr( $time_separator ); ?></span> |
| 1192 |
<span class="woo-sctr-shortcode-countdown-unit-wrap"> |
| 1193 |
<span class="woo-sctr-shortcode-countdown-hour woo-sctr-shortcode-countdown-unit"> |
| 1194 |
<span class="woo-sctr-shortcode-countdown-hour-value woo-sctr-shortcode-countdown-value"><?php esc_html_e( '02', 'sales-countdown-timer' ); ?></span> |
| 1195 |
<span class="woo-sctr-shortcode-countdown-hour-text woo-sctr-shortcode-countdown-text"><?php echo esc_attr( $hour ); ?></span> |
| 1196 |
</span> |
| 1197 |
</span> |
| 1198 |
<span class="woo-sctr-shortcode-countdown-time-separator"><?php echo esc_attr( $time_separator ); ?></span> |
| 1199 |
<span class="woo-sctr-shortcode-countdown-unit-wrap"> |
| 1200 |
<span class="woo-sctr-shortcode-countdown-minute woo-sctr-shortcode-countdown-unit"> |
| 1201 |
<span class="woo-sctr-shortcode-countdown-minute-value woo-sctr-shortcode-countdown-value"><?php esc_html_e( '03', 'sales-countdown-timer' ); ?></span> |
| 1202 |
<span class="woo-sctr-shortcode-countdown-minute-text woo-sctr-shortcode-countdown-text"><?php echo esc_attr( $minute ); ?></span> |
| 1203 |
</span> |
| 1204 |
</span> |
| 1205 |
<span class="woo-sctr-shortcode-countdown-time-separator"><?php echo esc_attr( $time_separator ); ?></span> |
| 1206 |
<span class="woo-sctr-shortcode-countdown-unit-wrap"> |
| 1207 |
<span class="woo-sctr-shortcode-countdown-second woo-sctr-shortcode-countdown-unit"> |
| 1208 |
<span class="woo-sctr-shortcode-countdown-second-value woo-sctr-shortcode-countdown-value"><?php esc_html_e( '04', 'sales-countdown-timer' ); ?></span> |
| 1209 |
<span class="woo-sctr-shortcode-countdown-second-text woo-sctr-shortcode-countdown-text"><?php echo esc_attr( $second ); ?></span> |
| 1210 |
</span> |
| 1211 |
</span> |
| 1212 |
</span> |
| 1213 |
<span class="woo-sctr-shortcode-countdown-text-after"><?php echo wp_kses_post( $text_after ); ?></span> |
| 1214 |
</div> |
| 1215 |
</div> |
| 1216 |
<div class="three wide field"> |
| 1217 |
</div> |
| 1218 |
</div> |
| 1219 |
<p><?php esc_html_e( '(*)Countdown timer items Border radius, Height, Width... are not applied to this type.', 'sales-countdown-timer' ) ?></p> |
| 1220 |
</div> |
| 1221 |
</div> |
| 1222 |
<div class="field"> |
| 1223 |
|
| 1224 |
<div class="vi-ui segment"> |
| 1225 |
<div class="fields"> |
| 1226 |
<div class="three wide field"> |
| 1227 |
<div class="vi-ui toggle checkbox"> |
| 1228 |
|
| 1229 |
<input type="radio" |
| 1230 |
name="woo_ctr_display_type_<?php echo esc_attr( $i ); ?>" |
| 1231 |
class="woo-sctr-display-type-checkbox" |
| 1232 |
value="4" <?php checked( $this->settings->get_display_type()[ $i ], '4' ) ?>><label></label> |
| 1233 |
</div> |
| 1234 |
</div> |
| 1235 |
<div class="ten wide field"> |
| 1236 |
<div class="woo-sctr-shortcode-wrap-wrap"> |
| 1237 |
<div class="woo-sctr-shortcode-wrap"> |
| 1238 |
|
| 1239 |
<div class="woo-sctr-shortcode-countdown-wrap woo-sctr-shortcode-countdown-style-4"> |
| 1240 |
<div class="woo-sctr-shortcode-countdown"> |
| 1241 |
<div class="woo-sctr-shortcode-countdown-1"> |
| 1242 |
<span class="woo-sctr-shortcode-countdown-text-before"><?php echo wp_kses_post( $text_before ); ?></span> |
| 1243 |
<div class="woo-sctr-shortcode-countdown-2"> |
| 1244 |
<span class="woo-sctr-shortcode-countdown-unit-wrap"> |
| 1245 |
<span class="woo-sctr-shortcode-countdown-date woo-sctr-shortcode-countdown-unit"> |
| 1246 |
<span class="woo-sctr-shortcode-countdown-date-text woo-sctr-shortcode-countdown-text woo-sctr-datetime-unit-position-top" <?php echo $datetime_unit_position == 'top' ? '' : 'style="display:none;"'; ?>><?php echo esc_html( $date ); ?></span> |
| 1247 |
<div class="woo-sctr-progress-circle"> |
| 1248 |
<span class="woo-sctr-shortcode-countdown-date-value woo-sctr-shortcode-countdown-value"><?php esc_html_e( '10', 'sales-countdown-timer' ); ?></span> |
| 1249 |
<div class="woo-sctr-left-half-clipper"> |
| 1250 |
<div class="woo-sctr-first50-bar"></div> |
| 1251 |
<div class="woo-sctr-value-bar"></div> |
| 1252 |
</div> |
| 1253 |
</div> |
| 1254 |
<span class="woo-sctr-shortcode-countdown-date-text woo-sctr-shortcode-countdown-text woo-sctr-datetime-unit-position-bottom" <?php echo $datetime_unit_position == 'bottom' ? '' : 'style="display:none;"'; ?>><?php echo esc_html( $date ); ?></span> |
| 1255 |
</span> |
| 1256 |
</span> |
| 1257 |
<span class="woo-sctr-shortcode-countdown-time-separator"><?php echo esc_attr( $time_separator ); ?></span> |
| 1258 |
<span class="woo-sctr-shortcode-countdown-unit-wrap"> |
| 1259 |
<span class="woo-sctr-shortcode-countdown-hour woo-sctr-shortcode-countdown-unit"> |
| 1260 |
<span class="woo-sctr-shortcode-countdown-hour-text woo-sctr-shortcode-countdown-text woo-sctr-datetime-unit-position-top" <?php echo $datetime_unit_position == 'top' ? '' : 'style="display:none;"'; ?>><?php echo esc_html( $hour ); ?></span> |
| 1261 |
<div class="woo-sctr-progress-circle"> |
| 1262 |
<span class="woo-sctr-shortcode-countdown-hour-value woo-sctr-shortcode-countdown-value"><?php esc_html_e( '02', 'sales-countdown-timer' ); ?></span> |
| 1263 |
<div class="woo-sctr-left-half-clipper"> |
| 1264 |
<div class="woo-sctr-first50-bar"></div> |
| 1265 |
<div class="woo-sctr-value-bar"></div> |
| 1266 |
</div> |
| 1267 |
</div> |
| 1268 |
<span class="woo-sctr-shortcode-countdown-hour-text woo-sctr-shortcode-countdown-text woo-sctr-datetime-unit-position-bottom" <?php echo $datetime_unit_position == 'bottom' ? '' : 'style="display:none;"'; ?>><?php echo esc_html( $hour ); ?></span> |
| 1269 |
</span> |
| 1270 |
</span> |
| 1271 |
<span class="woo-sctr-shortcode-countdown-time-separator"><?php echo esc_attr( $time_separator ); ?></span> |
| 1272 |
<span class="woo-sctr-shortcode-countdown-unit-wrap"> |
| 1273 |
<span class="woo-sctr-shortcode-countdown-minute woo-sctr-shortcode-countdown-unit"> |
| 1274 |
<span class="woo-sctr-shortcode-countdown-minute-text woo-sctr-shortcode-countdown-text woo-sctr-datetime-unit-position-top" <?php echo $datetime_unit_position == 'top' ? '' : 'style="display:none;"'; ?>><?php echo esc_html( $minute ); ?></span> |
| 1275 |
<div class="woo-sctr-progress-circle"> |
| 1276 |
<span class="woo-sctr-shortcode-countdown-minute-value woo-sctr-shortcode-countdown-value"><?php esc_html_e( '30', 'sales-countdown-timer' ); ?></span> |
| 1277 |
<div class="woo-sctr-left-half-clipper"> |
| 1278 |
<div class="woo-sctr-first50-bar"></div> |
| 1279 |
<div class="woo-sctr-value-bar"></div> |
| 1280 |
</div> |
| 1281 |
</div> |
| 1282 |
<span class="woo-sctr-shortcode-countdown-minute-text woo-sctr-shortcode-countdown-text woo-sctr-datetime-unit-position-bottom" <?php echo $datetime_unit_position == 'bottom' ? '' : 'style="display:none;"'; ?>><?php echo esc_html( $minute ); ?></span> |
| 1283 |
</span> |
| 1284 |
</span> |
| 1285 |
<span class="woo-sctr-shortcode-countdown-time-separator"><?php echo esc_attr( $time_separator ); ?></span> |
| 1286 |
<span class="woo-sctr-shortcode-countdown-unit-wrap"> |
| 1287 |
<span class="woo-sctr-shortcode-countdown-second woo-sctr-shortcode-countdown-unit"> |
| 1288 |
<span class="woo-sctr-shortcode-countdown-second-text woo-sctr-shortcode-countdown-text woo-sctr-datetime-unit-position-top" <?php echo $datetime_unit_position == 'top' ? '' : 'style="display:none;"'; ?>><?php echo esc_html( $second ); ?></span> |
| 1289 |
<div class="woo-sctr-progress-circle woo-sctr-over50"> |
| 1290 |
<span class="woo-sctr-shortcode-countdown-second-value woo-sctr-shortcode-countdown-value"><?php esc_html_e( '40', 'sales-countdown-timer' ); ?></span> |
| 1291 |
<div class="woo-sctr-left-half-clipper"> |
| 1292 |
<div class="woo-sctr-first50-bar"></div> |
| 1293 |
<div class="woo-sctr-value-bar"></div> |
| 1294 |
</div> |
| 1295 |
</div> |
| 1296 |
<span class="woo-sctr-shortcode-countdown-second-text woo-sctr-shortcode-countdown-text woo-sctr-datetime-unit-position-bottom" <?php echo $datetime_unit_position == 'bottom' ? '' : 'style="display:none;"'; ?>><?php echo esc_html( $second ); ?></span> |
| 1297 |
</span> |
| 1298 |
</span> |
| 1299 |
</div> |
| 1300 |
<span class="woo-sctr-shortcode-countdown-text-after"><?php echo wp_kses_post( $text_after ); ?></span> |
| 1301 |
</div> |
| 1302 |
</div> |
| 1303 |
</div> |
| 1304 |
</div> |
| 1305 |
</div> |
| 1306 |
</div> |
| 1307 |
<div class="three wide field"> |
| 1308 |
</div> |
| 1309 |
</div> |
| 1310 |
<div class="vi-ui toggle checkbox"> |
| 1311 |
<?php |
| 1312 |
$smooth_animation = isset( $this->settings->get_circle_smooth_animation()[ $i ] ) ? $this->settings->get_circle_smooth_animation()[ $i ] : ''; |
| 1313 |
?> |
| 1314 |
<input type="hidden" name="woo_ctr_circle_smooth_animation[]" |
| 1315 |
class="woo-sctr-circle-smooth-animation" |
| 1316 |
value="<?php echo esc_attr( $smooth_animation ); ?>"> |
| 1317 |
<input type="checkbox" |
| 1318 |
class="woo-sctr-circle-smooth-animation-check" |
| 1319 |
value="1" <?php checked( $smooth_animation, '1' ) ?>><label><?php esc_html_e( 'Use smooth animation for circle', 'sales-countdown-timer' ) ?></label> |
| 1320 |
</div> |
| 1321 |
<p><?php esc_html_e( '(*)Countdown timer items Border radius, Height, Width... are not applied to this type.', 'sales-countdown-timer' ) ?></p> |
| 1322 |
</div> |
| 1323 |
</div> |
| 1324 |
</div> |
| 1325 |
|
| 1326 |
<div class="equal width fields"> |
| 1327 |
<div class="field"> |
| 1328 |
<label><?php esc_html_e( 'Shortcode position', 'sales-countdown-timer' ) ?></label> |
| 1329 |
<a class="vi-ui button yellow" href="https://villatheme.com/extensions/sales-countdown-timer" target="_blank"> |
| 1330 |
<?php esc_html_e( 'Unlock This Feature', 'sales-countdown-timer' ); ?> |
| 1331 |
</a> |
| 1332 |
<p class="description"><?php esc_html_e( 'Display shortcode as static top banner or sticky top/bottom', 'sales-countdown-timer' ); ?> |
| 1333 |
</p> |
| 1334 |
</div> |
| 1335 |
<div class="field"> |
| 1336 |
<label><?php esc_html_e( 'Shortcode background image', 'sales-countdown-timer' ) ?></label> |
| 1337 |
<a class="vi-ui button yellow" href="https://villatheme.com/extensions/sales-countdown-timer" target="_blank"> |
| 1338 |
<?php esc_html_e( 'Unlock This Feature', 'sales-countdown-timer' ); ?> |
| 1339 |
</a> |
| 1340 |
</div> |
| 1341 |
</div> |
| 1342 |
<div class="field"> |
| 1343 |
<h4 class="vi-ui dividing header"> |
| 1344 |
<label><?php esc_html_e( 'Countdown timer', 'sales-countdown-timer' ) ?></label> |
| 1345 |
</h4> |
| 1346 |
<div class="three fields"> |
| 1347 |
<div class="field"> |
| 1348 |
<label><?php esc_html_e( 'Color', 'sales-countdown-timer' ) ?></label> |
| 1349 |
<input type="text" |
| 1350 |
class="color-picker woo-sctr-countdown-timer-color" |
| 1351 |
name="woo_ctr_countdown_timer_color[]" |
| 1352 |
value="<?php echo esc_attr( $this->settings->get_countdown_timer_color()[ $i ] ) ?>" |
| 1353 |
style="background:<?php echo esc_attr( $this->settings->get_countdown_timer_color()[ $i ] ) ?>"> |
| 1354 |
</div> |
| 1355 |
<div class="field"> |
| 1356 |
<label><?php esc_html_e( 'Background', 'sales-countdown-timer' ) ?></label> |
| 1357 |
<input type="text" |
| 1358 |
class="color-picker woo-sctr-countdown-timer-bg-color" |
| 1359 |
name="woo_ctr_countdown_timer_bg_color[]" |
| 1360 |
value="<?php echo esc_attr( $this->settings->get_countdown_timer_bg_color()[ $i ] ) ?>" |
| 1361 |
style="background:<?php echo esc_attr( $this->settings->get_countdown_timer_bg_color()[ $i ] ) ?>"> |
| 1362 |
</div> |
| 1363 |
<div class="field"> |
| 1364 |
<label><?php esc_html_e( 'Border color', 'sales-countdown-timer' ) ?></label> |
| 1365 |
<input type="text" |
| 1366 |
class="color-picker woo-sctr-countdown-timer-border-color" |
| 1367 |
name="woo_ctr_countdown_timer_border_color[]" |
| 1368 |
value="<?php echo esc_attr( $this->settings->get_countdown_timer_border_color()[ $i ] ) ?>" |
| 1369 |
style="background:<?php echo esc_attr( $this->settings->get_countdown_timer_border_color()[ $i ] ) ?>"> |
| 1370 |
</div> |
| 1371 |
|
| 1372 |
<div class="field"> |
| 1373 |
<label><?php esc_html_e( 'Padding(px)', 'sales-countdown-timer' ) ?></label> |
| 1374 |
<input type="number" |
| 1375 |
class="woo-sctr-countdown-timer-padding" |
| 1376 |
name="woo_ctr_countdown_timer_padding[]" |
| 1377 |
min="0" |
| 1378 |
value="<?php echo esc_attr( $this->settings->get_countdown_timer_padding()[ $i ] ) ?>"> |
| 1379 |
</div> |
| 1380 |
<div class="field"> |
| 1381 |
<label><?php esc_html_e( 'Border radius', 'sales-countdown-timer' ) ?></label> |
| 1382 |
<input type="number" |
| 1383 |
class="woo-sctr-countdown-timer-border-radius" |
| 1384 |
name="woo_ctr_countdown_timer_border_radius[]" |
| 1385 |
min="0" |
| 1386 |
value="<?php echo esc_attr( $this->settings->get_countdown_timer_border_radius()[ $i ] ) ?>"> |
| 1387 |
</div> |
| 1388 |
|
| 1389 |
</div> |
| 1390 |
</div> |
| 1391 |
<div class="field"> |
| 1392 |
<h4 class="vi-ui dividing header"> |
| 1393 |
<label><?php esc_html_e( 'Countdown timer items', 'sales-countdown-timer' ) ?></label> |
| 1394 |
</h4> |
| 1395 |
<div class="field"> |
| 1396 |
<label><?php esc_html_e( 'Hide zero items', 'sales-countdown-timer' ) ?></label> |
| 1397 |
<div class="vi-ui toggle checkbox"> |
| 1398 |
<input type="hidden" name="woo_ctr_countdown_timer_hide_zero[]" |
| 1399 |
class="woo-sctr-countdown-timer-hide-zero" |
| 1400 |
value="<?php echo esc_attr( $this->settings->get_countdown_timer_hide_zero()[ $i ] ); ?>"> |
| 1401 |
<input type="checkbox" |
| 1402 |
class="woo-sctr-countdown-timer-hide-zero-check" <?php echo $this->settings->get_countdown_timer_hide_zero()[ $i ] ? 'checked' : ''; ?>><label></label> |
| 1403 |
</div> |
| 1404 |
</div> |
| 1405 |
<div class="four fields"> |
| 1406 |
<div class="field"> |
| 1407 |
<label><?php esc_html_e( 'Border color', 'sales-countdown-timer' ) ?></label> |
| 1408 |
<input type="text" |
| 1409 |
class="color-picker woo-sctr-countdown-timer-item-border-color" |
| 1410 |
name="woo_ctr_countdown_timer_item_border_color[]" |
| 1411 |
value="<?php echo esc_attr( $this->settings->get_countdown_timer_item_border_color()[ $i ] ) ?>" |
| 1412 |
style="background:<?php echo esc_attr( $this->settings->get_countdown_timer_item_border_color()[ $i ] ) ?>"> |
| 1413 |
</div> |
| 1414 |
<div class="field"> |
| 1415 |
<label><?php esc_html_e( 'Border radius(px)', 'sales-countdown-timer' ) ?></label> |
| 1416 |
<input type="number" |
| 1417 |
class="woo-sctr-countdown-timer-item-border-radius" |
| 1418 |
name="woo_ctr_countdown_timer_item_border_radius[]" |
| 1419 |
min="0" |
| 1420 |
value="<?php echo esc_attr( $this->settings->get_countdown_timer_item_border_radius()[ $i ] ) ?>"> |
| 1421 |
</div> |
| 1422 |
<div class="field"> |
| 1423 |
<label><?php esc_html_e( 'Height(px)', 'sales-countdown-timer' ) ?></label> |
| 1424 |
<input type="number" |
| 1425 |
class="woo-sctr-countdown-timer-item-height" |
| 1426 |
name="woo_ctr_countdown_timer_item_height[]" |
| 1427 |
min="0" |
| 1428 |
value="<?php echo esc_attr( $this->settings->get_countdown_timer_item_height()[ $i ] ) ?>"> |
| 1429 |
</div> |
| 1430 |
<div class="field"> |
| 1431 |
<label><?php esc_html_e( 'Width(px)', 'sales-countdown-timer' ) ?></label> |
| 1432 |
<input type="number" |
| 1433 |
class="woo-sctr-countdown-timer-item-width" |
| 1434 |
name="woo_ctr_countdown_timer_item_width[]" |
| 1435 |
min="0" |
| 1436 |
value="<?php echo esc_attr( $this->settings->get_countdown_timer_item_width()[ $i ] ) ?>"> |
| 1437 |
</div> |
| 1438 |
|
| 1439 |
|
| 1440 |
</div> |
| 1441 |
</div> |
| 1442 |
|
| 1443 |
<div class="field"> |
| 1444 |
<h4 class="vi-ui dividing header"> |
| 1445 |
<label><?php esc_html_e( 'Datetime value', 'sales-countdown-timer' ) ?></label> |
| 1446 |
</h4> |
| 1447 |
<div class="equal width fields"> |
| 1448 |
<div class="field"> |
| 1449 |
<label><?php esc_html_e( 'Color', 'sales-countdown-timer' ) ?></label> |
| 1450 |
<input type="text" |
| 1451 |
class="color-picker woo-sctr-datetime-value-color" |
| 1452 |
name="woo_ctr_datetime_value_color[]" |
| 1453 |
value="<?php echo esc_attr( $this->settings->get_datetime_value_color()[ $i ] ) ?>" |
| 1454 |
style="background:<?php echo esc_attr( $this->settings->get_datetime_value_color()[ $i ] ) ?>"> |
| 1455 |
</div> |
| 1456 |
<div class="field"> |
| 1457 |
<label><?php esc_html_e( 'Background', 'sales-countdown-timer' ) ?></label> |
| 1458 |
<input type="text" |
| 1459 |
class="color-picker woo-sctr-datetime-value-bg-color" |
| 1460 |
name="woo_ctr_datetime_value_bg_color[]" |
| 1461 |
value="<?php echo esc_attr( $this->settings->get_datetime_value_bg_color()[ $i ] ) ?>" |
| 1462 |
style="background:<?php echo esc_attr( $this->settings->get_datetime_value_bg_color()[ $i ] ) ?>"> |
| 1463 |
</div> |
| 1464 |
<div class="field"> |
| 1465 |
<label><?php esc_html_e( 'Font size(px)', 'sales-countdown-timer' ) ?></label> |
| 1466 |
<input type="number" |
| 1467 |
class="woo-sctr-datetime-value-font-size" |
| 1468 |
name="woo_ctr_datetime_value_font_size[]" |
| 1469 |
min="0" |
| 1470 |
value="<?php echo esc_attr( $this->settings->get_datetime_value_font_size()[ $i ] ) ?>"> |
| 1471 |
</div> |
| 1472 |
</div> |
| 1473 |
</div> |
| 1474 |
<div class="field"> |
| 1475 |
<h4 class="vi-ui dividing header"> |
| 1476 |
<label><?php esc_html_e( 'Datetime unit', 'sales-countdown-timer' ) ?></label> |
| 1477 |
</h4> |
| 1478 |
<div class=" equal width fields"> |
| 1479 |
<div class="field"> |
| 1480 |
<label><?php esc_html_e( 'Color', 'sales-countdown-timer' ) ?></label> |
| 1481 |
<input type="text" |
| 1482 |
class="color-picker woo-sctr-datetime-unit-color" |
| 1483 |
name="woo_ctr_datetime_unit_color[]" |
| 1484 |
value="<?php echo esc_attr( $this->settings->get_datetime_unit_color()[ $i ] ) ?>" |
| 1485 |
style="background:<?php echo esc_attr( $this->settings->get_datetime_unit_color()[ $i ] ) ?>"> |
| 1486 |
</div> |
| 1487 |
<div class="field"> |
| 1488 |
<label><?php esc_html_e( 'Background', 'sales-countdown-timer' ) ?></label> |
| 1489 |
<input type="text" |
| 1490 |
class="color-picker woo-sctr-datetime-unit-bg-color" |
| 1491 |
name="woo_ctr_datetime_unit_bg_color[]" |
| 1492 |
value="<?php echo esc_attr( $this->settings->get_datetime_unit_bg_color()[ $i ] ) ?>" |
| 1493 |
style="background:<?php echo esc_attr( $this->settings->get_datetime_unit_bg_color()[ $i ] ) ?>"> |
| 1494 |
</div> |
| 1495 |
<div class="field"> |
| 1496 |
<label><?php esc_html_e( 'Font size(px)', 'sales-countdown-timer' ) ?></label> |
| 1497 |
<input type="number" |
| 1498 |
class="woo-sctr-datetime-unit-font-size" |
| 1499 |
name="woo_ctr_datetime_unit_font_size[]" |
| 1500 |
min="0" |
| 1501 |
value="<?php echo esc_attr( $this->settings->get_datetime_unit_font_size()[ $i ] ) ?>"> |
| 1502 |
</div> |
| 1503 |
</div> |
| 1504 |
</div> |
| 1505 |
|
| 1506 |
</div> |
| 1507 |
<div class="title"> |
| 1508 |
<i class="dropdown icon"></i> |
| 1509 |
<?php esc_html_e( 'WooCommerce Product', 'sales-countdown-timer' ) ?> |
| 1510 |
</div> |
| 1511 |
<div class="content"> |
| 1512 |
<div class="field"> |
| 1513 |
<div class="field"> |
| 1514 |
<label><?php esc_html_e( 'Use default date', 'sales-countdown-timer' ) ?></label> |
| 1515 |
<a class="vi-ui button yellow" href="https://villatheme.com/extensions/sales-countdown-timer" target="_blank"> |
| 1516 |
<?php esc_html_e( 'Unlock This Feature', 'sales-countdown-timer' ); ?> |
| 1517 |
</a> |
| 1518 |
<p class="description"><?php esc_html_e( 'This option uses the WooCommerce “Sale Price Dates” setting to set the timer. It also disables all custom product settings and scheduling features provided by the plugin.', 'sales-countdown-timer' ) ?></p> |
| 1519 |
</div> |
| 1520 |
<div class="equal width fields"> |
| 1521 |
<div class="field"> |
| 1522 |
<label><?php esc_html_e( 'Make countdown timer sticky when scroll', 'sales-countdown-timer' ) ?></label> |
| 1523 |
<div class="vi-ui toggle checkbox"> |
| 1524 |
<input type="hidden" name="woo_ctr_stick_to_top[]" |
| 1525 |
class="woo-sctr-stick-to-top" |
| 1526 |
value="<?php echo isset( $this->settings->get_stick_to_top()[ $i ] ) ? esc_attr( $this->settings->get_stick_to_top()[ $i ] ) : ''; ?>"> |
| 1527 |
<input type="checkbox" |
| 1528 |
class="woo-sctr-stick-to-top-check" <?php echo ( isset( $this->settings->get_stick_to_top()[ $i ] ) && $this->settings->get_stick_to_top()[ $i ] ) ? 'checked' : ''; ?>><label></label> |
| 1529 |
</div> |
| 1530 |
</div> |
| 1531 |
<div class="field"> |
| 1532 |
<label><?php esc_html_e( 'Position on single product page', 'sales-countdown-timer' ) ?></label> |
| 1533 |
<div class="vi-ui input" |
| 1534 |
data-tooltip="<?php esc_attr_e( 'Position of countdown timer of main product on single product page(Can not set position for variations)', 'sales-countdown-timer' ) ?>"> |
| 1535 |
<select name="woo_ctr_position[]" |
| 1536 |
class="woo-sctr-position vi-ui fluid dropdown"> |
| 1537 |
<option value="before_price" <?php selected( $this->settings->get_position()[ $i ], 'before_price' ); ?>><?php esc_html_e( 'Before price', 'sales-countdown-timer' ) ?></option> |
| 1538 |
<option value="after_price" <?php selected( $this->settings->get_position()[ $i ], 'after_price' ); ?>><?php esc_html_e( 'After price', 'sales-countdown-timer' ) ?></option> |
| 1539 |
<option value="before_saleflash" <?php selected( $this->settings->get_position()[ $i ], 'before_saleflash' ); ?>><?php esc_html_e( 'Before sale flash', 'sales-countdown-timer' ) ?></option> |
| 1540 |
<option value="after_saleflash" <?php selected( $this->settings->get_position()[ $i ], 'after_saleflash' ); ?>><?php esc_html_e( 'After sale flash', 'sales-countdown-timer' ) ?></option> |
| 1541 |
<option value="before_cart" <?php selected( $this->settings->get_position()[ $i ], 'before_cart' ); ?>><?php esc_html_e( 'Before cart', 'sales-countdown-timer' ) ?></option> |
| 1542 |
<option value="after_cart" <?php selected( $this->settings->get_position()[ $i ], 'after_cart' ); ?>><?php esc_html_e( 'After cart', 'sales-countdown-timer' ) ?></option> |
| 1543 |
<option value="product_image" <?php selected( $this->settings->get_position()[ $i ], 'product_image' ); ?>><?php esc_html_e( 'Product image', 'sales-countdown-timer' ) ?></option> |
| 1544 |
</select> |
| 1545 |
</div> |
| 1546 |
</div> |
| 1547 |
<div class="field"> |
| 1548 |
<label><?php esc_html_e( 'Position on archive page', 'sales-countdown-timer' ) ?></label> |
| 1549 |
<div class="vi-ui input" |
| 1550 |
data-tooltip="<?php esc_attr_e( 'Position of countdown timer on shop page, category page and related products', 'sales-countdown-timer' ) ?>"> |
| 1551 |
<select name="woo_ctr_archive_page_position[]" |
| 1552 |
class="woo-sctr-archive-page-position vi-ui fluid dropdown"> |
| 1553 |
<option value="before_price" <?php selected( $this->settings->get_archive_page_position()[ $i ], 'before_price' ); ?>><?php esc_html_e( 'Before price', 'sales-countdown-timer' ) ?></option> |
| 1554 |
<option value="after_price" <?php selected( $this->settings->get_archive_page_position()[ $i ], 'after_price' ); ?>><?php esc_html_e( 'After price', 'sales-countdown-timer' ) ?></option> |
| 1555 |
<option value="before_saleflash" <?php selected( $this->settings->get_archive_page_position()[ $i ], 'before_saleflash' ); ?>><?php esc_html_e( 'Before sale flash', 'sales-countdown-timer' ) ?></option> |
| 1556 |
<option value="after_saleflash" <?php selected( $this->settings->get_archive_page_position()[ $i ], 'after_saleflash' ); ?>><?php esc_html_e( 'After sale flash', 'sales-countdown-timer' ) ?></option> |
| 1557 |
<option value="before_cart" <?php selected( $this->settings->get_archive_page_position()[ $i ], 'before_cart' ); ?>><?php esc_html_e( 'Before cart', 'sales-countdown-timer' ) ?></option> |
| 1558 |
<option value="after_cart" <?php selected( $this->settings->get_archive_page_position()[ $i ], 'after_cart' ); ?>><?php esc_html_e( 'After cart', 'sales-countdown-timer' ) ?></option> |
| 1559 |
<option value="product_image" <?php selected( $this->settings->get_archive_page_position()[ $i ], 'product_image' ); ?>><?php esc_html_e( 'Product image', 'sales-countdown-timer' ) ?></option> |
| 1560 |
</select> |
| 1561 |
</div> |
| 1562 |
</div> |
| 1563 |
</div> |
| 1564 |
<div class="equal width fields"> |
| 1565 |
<div class="field"> |
| 1566 |
<label><?php esc_html_e( 'Show on shop page', 'sales-countdown-timer' ) ?></label> |
| 1567 |
<div class="vi-ui toggle checkbox"> |
| 1568 |
<input type="hidden" name="woo_ctr_shop_page[]" |
| 1569 |
class="woo-sctr-shop-page" |
| 1570 |
value="<?php echo esc_attr( $this->settings->get_shop_page()[ $i ] ); ?>"> |
| 1571 |
<input type="checkbox" |
| 1572 |
class="woo-sctr-shop-page-check" <?php echo $this->settings->get_shop_page()[ $i ] ? 'checked' : ''; ?>><label></label> |
| 1573 |
</div> |
| 1574 |
</div> |
| 1575 |
<div class="field"> |
| 1576 |
<label><?php esc_html_e( 'Show on category page', 'sales-countdown-timer' ) ?></label> |
| 1577 |
<div class="vi-ui toggle checkbox"> |
| 1578 |
<input type="hidden" name="woo_ctr_category_page[]" |
| 1579 |
class="woo-sctr-category-page" |
| 1580 |
value="<?php echo esc_attr( $this->settings->get_category_page()[ $i ] ); ?>"> |
| 1581 |
<input type="checkbox" |
| 1582 |
class="woo-sctr-category-page-check" <?php echo $this->settings->get_category_page()[ $i ] ? 'checked' : ''; ?>><label></label> |
| 1583 |
</div> |
| 1584 |
</div> |
| 1585 |
<div class="field"> |
| 1586 |
<label><?php esc_html_e( 'Reduce size of countdown timer on shop/category page and on mobile(single product) by', 'sales-countdown-timer' ) ?></label> |
| 1587 |
<div class="inline field"> |
| 1588 |
<input type="number" name="woo_ctr_size_on_archive_page[]" min="30" |
| 1589 |
max="100" |
| 1590 |
class="woo-sctr-related-products" |
| 1591 |
value="<?php echo isset( $this->settings->get_size_on_archive_page()[ $i ] ) ? esc_attr( $this->settings->get_size_on_archive_page()[ $i ] ) : '75'; ?>">% |
| 1592 |
</div> |
| 1593 |
</div> |
| 1594 |
|
| 1595 |
</div> |
| 1596 |
</div> |
| 1597 |
<div class="field"> |
| 1598 |
<h4 class="vi-ui dividing header"><?php esc_html_e( 'Upcoming sale', 'sales-countdown-timer' ) ?></h4> |
| 1599 |
<div class="fields"> |
| 1600 |
<div class="three wide field"> |
| 1601 |
<label><?php esc_html_e( 'Enable', 'sales-countdown-timer' ) ?></label> |
| 1602 |
<div class="vi-ui toggle checkbox"> |
| 1603 |
<input type="hidden" name="woo_ctr_upcoming[]" |
| 1604 |
class="woo-sctr-upcoming" |
| 1605 |
value="<?php echo esc_attr( $this->settings->get_upcoming()[ $i ] ); ?>"> |
| 1606 |
<input type="checkbox" |
| 1607 |
class="woo-sctr-upcoming-check" <?php echo $this->settings->get_upcoming()[ $i ] ? 'checked' : ''; ?>><label></label> |
| 1608 |
</div> |
| 1609 |
</div> |
| 1610 |
<div class="thirteen wide field"> |
| 1611 |
<label><?php esc_html_e( 'Upcoming sale message', 'sales-countdown-timer' ) ?></label> |
| 1612 |
|
| 1613 |
<input type="text" name="woo_ctr_upcoming_message[]" |
| 1614 |
class="woo-sctr-upcoming-message" |
| 1615 |
value="<?php echo esc_attr( $this->settings->get_upcoming_message()[ $i ] ); ?>"> |
| 1616 |
<p>{countdown_timer} |
| 1617 |
- <?php esc_html_e( 'The countdown timer that you set on tab design', 'sales-countdown-timer' ) ?></p> |
| 1618 |
</div> |
| 1619 |
</div> |
| 1620 |
|
| 1621 |
</div> |
| 1622 |
<div class="field"> |
| 1623 |
<h4 class="vi-ui dividing header"><?php esc_html_e( 'Progress bar', 'sales-countdown-timer' ) ?></h4> |
| 1624 |
<div class="field"> |
| 1625 |
<label><?php esc_html_e( 'Progress bar message', 'sales-countdown-timer' ) ?></label> |
| 1626 |
<div class="vi-ui input"> |
| 1627 |
<input type="text" name="woo_ctr_progress_bar_message[]" |
| 1628 |
class="woo-sctr-progress-bar-message" |
| 1629 |
value="<?php echo esc_attr( $this->settings->get_progress_bar_message()[ $i ] ) ?>"> |
| 1630 |
</div> |
| 1631 |
|
| 1632 |
</div> |
| 1633 |
<div class="field"> |
| 1634 |
<p>{quantity_left} - <?php esc_html_e( 'Number of products left' ) ?></p> |
| 1635 |
<p>{quantity_sold} - <?php esc_html_e( 'Number of products sold' ) ?></p> |
| 1636 |
<p>{percentage_left} |
| 1637 |
- <?php esc_html_e( 'Percentage of products left' ) ?></p> |
| 1638 |
<p>{percentage_sold} |
| 1639 |
- <?php esc_html_e( 'Percentage of products sold' ) ?></p> |
| 1640 |
<p>{goal} |
| 1641 |
- <?php esc_html_e( 'The goal that you set on single product' ) ?></p> |
| 1642 |
</div> |
| 1643 |
<div class="equal width fields"> |
| 1644 |
<div class="field"> |
| 1645 |
<label><?php esc_html_e( 'Progress bar type', 'sales-countdown-timer' ) ?></label> |
| 1646 |
<div class="vi-ui input" |
| 1647 |
data-tooltip="<?php esc_attr_e( 'If select increase, the progress bar fill will increase each time the product is bought and vice versa', 'sales-countdown-timer' ) ?>"> |
| 1648 |
<select name="woo_ctr_progress_bar_type[]" |
| 1649 |
class="woo-sctr-progress-bar-type vi-ui fluid dropdown"> |
| 1650 |
<option value="increase" <?php selected( $this->settings->get_progress_bar_type()[ $i ], 'increase' ); ?> |
| 1651 |
data-tooltip="asdasd"><?php esc_html_e( 'Increase', 'sales-countdown-timer' ) ?></option> |
| 1652 |
<option value="decrease" <?php selected( $this->settings->get_progress_bar_type()[ $i ], 'decrease' ); ?>><?php esc_html_e( 'Decrease', 'sales-countdown-timer' ) ?></option> |
| 1653 |
</select> |
| 1654 |
</div> |
| 1655 |
</div> |
| 1656 |
<div class="field"> |
| 1657 |
<label><?php esc_html_e( 'Order status', 'sales-countdown-timer' ) ?></label> |
| 1658 |
<input type="hidden" name="woo_ctr_progress_bar_order_status[]" |
| 1659 |
value="<?php $this->settings->get_progress_bar_order_status()[ $i ] ?>" |
| 1660 |
class="woo-sctr-progress-bar-order-status-hidden"> |
| 1661 |
<div class="vi-ui input" |
| 1662 |
data-tooltip="<?php esc_attr_e( 'When new order created, update the progress bar when order status are(leave blank to apply for all order status):', 'sales-countdown-timer' ) ?>"> |
| 1663 |
<select multiple |
| 1664 |
class="woo-sctr-progress-bar-order-status vi-ui fluid dropdown"> |
| 1665 |
<option value="wc-completed" <?php if ( in_array( 'wc-completed', explode( ',', $this->settings->get_progress_bar_order_status()[ $i ] ) ) ) { |
| 1666 |
echo 'selected'; |
| 1667 |
} ?>><?php esc_html_e( 'Completed', 'sales-countdown-timer' ) ?></option> |
| 1668 |
<option value="wc-on-hold" <?php if ( in_array( 'wc-on-hold', explode( ',', $this->settings->get_progress_bar_order_status()[ $i ] ) ) ) { |
| 1669 |
echo 'selected'; |
| 1670 |
} ?>><?php esc_html_e( 'On-hold', 'sales-countdown-timer' ) ?></option> |
| 1671 |
<option value="wc-pending" <?php if ( in_array( 'wc-pending', explode( ',', $this->settings->get_progress_bar_order_status()[ $i ] ) ) ) { |
| 1672 |
echo 'selected'; |
| 1673 |
} ?>><?php esc_html_e( 'Pending', 'sales-countdown-timer' ) ?></option> |
| 1674 |
<option value="wc-processing" <?php if ( in_array( 'wc-processing', explode( ',', $this->settings->get_progress_bar_order_status()[ $i ] ) ) ) { |
| 1675 |
echo 'selected'; |
| 1676 |
} ?>><?php esc_html_e( 'Processing', 'sales-countdown-timer' ) ?></option> |
| 1677 |
<option value="wc-failed" <?php if ( in_array( 'wc-failed', explode( ',', $this->settings->get_progress_bar_order_status()[ $i ] ) ) ) { |
| 1678 |
echo 'selected'; |
| 1679 |
} ?>><?php esc_html_e( 'Failed', 'sales-countdown-timer' ) ?></option> |
| 1680 |
<option value="wc-refunded" <?php if ( in_array( 'wc-refunded', explode( ',', $this->settings->get_progress_bar_order_status()[ $i ] ) ) ) { |
| 1681 |
echo 'selected'; |
| 1682 |
} ?>><?php esc_html_e( 'Refunded', 'sales-countdown-timer' ) ?></option> |
| 1683 |
<option value="wc-cancelled" <?php if ( in_array( 'wc-cancelled', explode( ',', $this->settings->get_progress_bar_order_status()[ $i ] ) ) ) { |
| 1684 |
echo 'selected'; |
| 1685 |
} ?>><?php esc_html_e( 'Cancelled', 'sales-countdown-timer' ) ?></option> |
| 1686 |
</select> |
| 1687 |
</div> |
| 1688 |
</div> |
| 1689 |
</div> |
| 1690 |
<div class="equal width fields"> |
| 1691 |
<div class="field"> |
| 1692 |
<label><?php esc_html_e( 'Progress position on shop page', 'sales-countdown-timer' ) ?></label> |
| 1693 |
<a class="vi-ui button yellow" href="https://villatheme.com/extensions/sales-countdown-timer" target="_blank"> |
| 1694 |
<?php esc_html_e( 'Unlock This Feature', 'sales-countdown-timer' ); ?> |
| 1695 |
</a> |
| 1696 |
</div> |
| 1697 |
<div class="field"> |
| 1698 |
<label><?php esc_html_e( 'Progress position on single product page', 'sales-countdown-timer' ) ?></label> |
| 1699 |
<a class="vi-ui button yellow" href="https://villatheme.com/extensions/sales-countdown-timer" target="_blank"> |
| 1700 |
<?php esc_html_e( 'Unlock This Feature', 'sales-countdown-timer' ); ?> |
| 1701 |
</a> |
| 1702 |
</div> |
| 1703 |
<div class="field"> |
| 1704 |
<label><?php esc_html_e( 'Progress bar preview', 'sales-countdown-timer' ) ?></label> |
| 1705 |
<a class="vi-ui button yellow" href="https://villatheme.com/extensions/sales-countdown-timer" target="_blank"> |
| 1706 |
<?php esc_html_e( 'Unlock This Feature', 'sales-countdown-timer' ); ?> |
| 1707 |
</a> |
| 1708 |
</div> |
| 1709 |
</div> |
| 1710 |
<div class="equal width fields"> |
| 1711 |
<div class="field"> |
| 1712 |
<label><?php esc_html_e( 'Position', 'sales-countdown-timer' ) ?></label> |
| 1713 |
<select name="woo_ctr_progress_bar_position[]" |
| 1714 |
class="woo-sctr-progress-bar-position vi-ui dropdown"> |
| 1715 |
<option value="above_countdown" <?php selected( $this->settings->get_progress_bar_position()[ $i ], 'above_countdown' ); ?>><?php esc_html_e( 'Above Countdown', 'sales-countdown-timer' ) ?></option> |
| 1716 |
<option value="below_countdown" <?php selected( $this->settings->get_progress_bar_position()[ $i ], 'below_countdown' ); ?>><?php esc_html_e( 'Below Countdown', 'sales-countdown-timer' ) ?></option> |
| 1717 |
</select> |
| 1718 |
</div> |
| 1719 |
<div class="field"> |
| 1720 |
<label><?php esc_html_e( 'Width(px)', 'sales-countdown-timer' ) ?></label> |
| 1721 |
<input type="number" min="0" |
| 1722 |
name="woo_ctr_progress_bar_width[]" |
| 1723 |
class="woo-sctr-progress-bar-width" |
| 1724 |
value="<?php echo esc_attr( $this->settings->get_progress_bar_width()[ $i ] ); ?>"> |
| 1725 |
</div> |
| 1726 |
<div class="field"> |
| 1727 |
<label><?php esc_html_e( 'Height(px)', 'sales-countdown-timer' ) ?></label> |
| 1728 |
<input type="number" min="0" |
| 1729 |
name="woo_ctr_progress_bar_height[]" |
| 1730 |
class="woo-sctr-progress-bar-height" |
| 1731 |
value="<?php echo esc_attr( $this->settings->get_progress_bar_height()[ $i ] ); ?>"> |
| 1732 |
</div> |
| 1733 |
</div> |
| 1734 |
<div class="three fields"> |
| 1735 |
<div class="field"> |
| 1736 |
<label><?php esc_html_e( 'Background', 'sales-countdown-timer' ) ?></label> |
| 1737 |
<input type="text" |
| 1738 |
class="color-picker woo-sctr-progress-bar-color" |
| 1739 |
name="woo_ctr_progress_bar_bg_color[]" |
| 1740 |
value="<?php echo esc_attr( $this->settings->get_progress_bar_bg_color()[ $i ] ) ?>" |
| 1741 |
style="background:<?php echo esc_attr( $this->settings->get_progress_bar_bg_color()[ $i ] ) ?>"> |
| 1742 |
</div> |
| 1743 |
<div class="field"> |
| 1744 |
<label><?php esc_html_e( 'Color', 'sales-countdown-timer' ) ?></label> |
| 1745 |
<input type="text" |
| 1746 |
class="color-picker woo-sctr-progress-bar-color" |
| 1747 |
name="woo_ctr_progress_bar_color[]" |
| 1748 |
value="<?php echo esc_attr( $this->settings->get_progress_bar_color()[ $i ] ) ?>" |
| 1749 |
style="background:<?php echo esc_attr( $this->settings->get_progress_bar_color()[ $i ] ) ?>"> |
| 1750 |
</div> |
| 1751 |
<div class="field"> |
| 1752 |
<label><?php esc_html_e( 'Border radius(px)', 'sales-countdown-timer' ) ?></label> |
| 1753 |
<input type="number" min="0" |
| 1754 |
name="woo_ctr_progress_bar_border_radius[]" |
| 1755 |
class="woo-sctr-progress-bar-border-radius" |
| 1756 |
value="<?php echo esc_attr( $this->settings->get_progress_bar_border_radius()[ $i ] ); ?>"> |
| 1757 |
</div> |
| 1758 |
</div> |
| 1759 |
<div class="equal width fields"> |
| 1760 |
<div class="field"> |
| 1761 |
<label><?php esc_html_e( 'Message color', 'sales-countdown-timer' ) ?></label> |
| 1762 |
<a class="vi-ui button yellow" href="https://villatheme.com/extensions/sales-countdown-timer" target="_blank"> |
| 1763 |
<?php esc_html_e( 'Unlock This Feature', 'sales-countdown-timer' ); ?> |
| 1764 |
</a> |
| 1765 |
</div> |
| 1766 |
<div class="field"> |
| 1767 |
<label><?php esc_html_e( 'Font size', 'sales-countdown-timer' ) ?></label> |
| 1768 |
<a class="vi-ui button yellow" href="https://villatheme.com/extensions/sales-countdown-timer" target="_blank"> |
| 1769 |
<?php esc_html_e( 'Unlock This Feature', 'sales-countdown-timer' ); ?> |
| 1770 |
</a> |
| 1771 |
</div> |
| 1772 |
</div> |
| 1773 |
<div class="equal width fields"> |
| 1774 |
<div class="field"> |
| 1775 |
<label><?php esc_html_e( 'Border style', 'sales-countdown-timer' ) ?></label> |
| 1776 |
<a class="vi-ui button yellow" href="https://villatheme.com/extensions/sales-countdown-timer" target="_blank"> |
| 1777 |
<?php esc_html_e( 'Unlock This Feature', 'sales-countdown-timer' ); ?> |
| 1778 |
</a> |
| 1779 |
</div> |
| 1780 |
<div class="field"> |
| 1781 |
<label><?php esc_html_e( 'Border width', 'sales-countdown-timer' ) ?></label> |
| 1782 |
<a class="vi-ui button yellow" href="https://villatheme.com/extensions/sales-countdown-timer" target="_blank"> |
| 1783 |
<?php esc_html_e( 'Unlock This Feature', 'sales-countdown-timer' ); ?> |
| 1784 |
</a> |
| 1785 |
</div> |
| 1786 |
<div class="field"> |
| 1787 |
<label><?php esc_html_e( 'Border color', 'sales-countdown-timer' ) ?></label> |
| 1788 |
<a class="vi-ui button yellow" href="https://villatheme.com/extensions/sales-countdown-timer" target="_blank"> |
| 1789 |
<?php esc_html_e( 'Unlock This Feature', 'sales-countdown-timer' ); ?> |
| 1790 |
</a> |
| 1791 |
</div> |
| 1792 |
</div> |
| 1793 |
</div> |
| 1794 |
</div> |
| 1795 |
</div> |
| 1796 |
</div> |
| 1797 |
|
| 1798 |
<?php |
| 1799 |
} |
| 1800 |
?> |
| 1801 |
<?php |
| 1802 |
} |
| 1803 |
?> |
| 1804 |
<!-- <p><input type="submit" name="submit" class="vi-ui primary button"--> |
| 1805 |
<!-- value="--> |
| 1806 |
<?php //esc_html_e( 'Save', 'sales-countdown-timer' ); ?><!--"></p>--> |
| 1807 |
|
| 1808 |
<p class="woo-sctr-button-save-container"> |
| 1809 |
<span class="woo-sctr-save vi-ui primary button"><?php esc_html_e( 'Save', 'sales-countdown-timer' ); ?></span> |
| 1810 |
</p> |
| 1811 |
</form> |
| 1812 |
</div> |
| 1813 |
<div class="woo-sctr-save-sucessful-popup"> |
| 1814 |
<?php esc_html_e( 'Settings saved', 'sales-countdown-timer' ); ?> |
| 1815 |
</div> |
| 1816 |
<?php |
| 1817 |
do_action( 'villatheme_support_sales-countdown-timer' ); |
| 1818 |
} |
| 1819 |
|
| 1820 |
public function save_settings() { |
| 1821 |
$response = array( |
| 1822 |
'status' => 'failed', |
| 1823 |
'message' => '', |
| 1824 |
); |
| 1825 |
if ( isset( $_POST['woo_ctr_nonce_field'] ) && wp_verify_nonce( $_POST['woo_ctr_nonce_field'], 'woo_ctr_settings_page_save' ) ) { |
| 1826 |
$args = array( |
| 1827 |
'id' => isset( $_POST['woo_ctr_id'] ) ? array_map( 'sanitize_text_field', $_POST['woo_ctr_id'] ) : array(), |
| 1828 |
'names' => isset( $_POST['woo_ctr_name'] ) ? array_map( 'sanitize_text_field', $_POST['woo_ctr_name'] ) : array(), |
| 1829 |
'message' => isset( $_POST['woo_ctr_message'] ) ? array_map( 'sanitize_text_field', $_POST['woo_ctr_message'] ) : array(), |
| 1830 |
'active' => isset( $_POST['woo_ctr_active'] ) ? array_map( 'sanitize_text_field', $_POST['woo_ctr_active'] ) : array(), |
| 1831 |
'enable_single_product' => isset( $_POST['woo_ctr_enable_single_product'] ) ? array_map( 'sanitize_text_field', $_POST['woo_ctr_enable_single_product'] ) : array(), |
| 1832 |
'time_type' => 'fixed', |
| 1833 |
'count_style' => isset( $_POST['woo_ctr_count_style'] ) ? array_map( 'sanitize_text_field', $_POST['woo_ctr_count_style'] ) : array(), |
| 1834 |
'sale_from_date' => isset( $_POST['woo_ctr_sale_from_date'] ) ? array_map( 'sanitize_text_field', $_POST['woo_ctr_sale_from_date'] ) : array(), |
| 1835 |
'sale_to_date' => isset( $_POST['woo_ctr_sale_to_date'] ) ? array_map( 'sanitize_text_field', $_POST['woo_ctr_sale_to_date'] ) : array(), |
| 1836 |
'sale_from_time' => isset( $_POST['woo_ctr_sale_from_time'] ) ? array_map( 'sanitize_text_field', $_POST['woo_ctr_sale_from_time'] ) : array(), |
| 1837 |
'sale_to_time' => isset( $_POST['woo_ctr_sale_to_time'] ) ? array_map( 'sanitize_text_field', $_POST['woo_ctr_sale_to_time'] ) : array(), |
| 1838 |
'upcoming' => isset( $_POST['woo_ctr_upcoming'] ) ? array_map( 'sanitize_text_field', $_POST['woo_ctr_upcoming'] ) : array(), |
| 1839 |
'upcoming_message' => isset( $_POST['woo_ctr_upcoming_message'] ) ? array_map( 'sanitize_text_field', $_POST['woo_ctr_upcoming_message'] ) : array(), |
| 1840 |
'style' => isset( $_POST['woo_ctr_style'] ) ? array_map( 'sanitize_text_field', $_POST['woo_ctr_style'] ) : array(), |
| 1841 |
'position' => isset( $_POST['woo_ctr_position'] ) ? array_map( 'sanitize_text_field', $_POST['woo_ctr_position'] ) : array(), |
| 1842 |
'progress_bar' => isset( $_POST['woo_ctr_progress_bar'] ) ? array_map( 'sanitize_text_field', $_POST['woo_ctr_progress_bar'] ) : array(), |
| 1843 |
'progress_bar_position' => isset( $_POST['woo_ctr_progress_bar_position'] ) ? array_map( 'sanitize_text_field', $_POST['woo_ctr_progress_bar_position'] ) : array(), |
| 1844 |
'progress_bar_message' => isset( $_POST['woo_ctr_progress_bar_message'] ) ? array_map( 'sanitize_text_field', $_POST['woo_ctr_progress_bar_message'] ) : array(), |
| 1845 |
'progress_bar_order_status' => isset( $_POST['woo_ctr_progress_bar_order_status'] ) ? array_map( 'sanitize_text_field', $_POST['woo_ctr_progress_bar_order_status'] ) : array(), |
| 1846 |
'progress_bar_type' => isset( $_POST['woo_ctr_progress_bar_type'] ) ? array_map( 'sanitize_text_field', $_POST['woo_ctr_progress_bar_type'] ) : array(), |
| 1847 |
'progress_bar_width' => isset( $_POST['woo_ctr_progress_bar_width'] ) ? array_map( 'sanitize_text_field', $_POST['woo_ctr_progress_bar_width'] ) : array(), |
| 1848 |
'progress_bar_height' => isset( $_POST['woo_ctr_progress_bar_height'] ) ? array_map( 'sanitize_text_field', $_POST['woo_ctr_progress_bar_height'] ) : array(), |
| 1849 |
'progress_bar_bg_color' => isset( $_POST['woo_ctr_progress_bar_bg_color'] ) ? array_map( 'sanitize_text_field', $_POST['woo_ctr_progress_bar_bg_color'] ) : array(), |
| 1850 |
'progress_bar_color' => isset( $_POST['woo_ctr_progress_bar_color'] ) ? array_map( 'sanitize_text_field', $_POST['woo_ctr_progress_bar_color'] ) : array(), |
| 1851 |
'progress_bar_border_radius' => isset( $_POST['woo_ctr_progress_bar_border_radius'] ) ? array_map( 'sanitize_text_field', $_POST['woo_ctr_progress_bar_border_radius'] ) : array(), |
| 1852 |
'progress_bar_style' => isset( $_POST['woo_ctr_progress_bar_style'] ) ? array_map( 'sanitize_text_field', $_POST['woo_ctr_progress_bar_style'] ) : array(), |
| 1853 |
'countdown_timer_hide_zero' => isset( $_POST['woo_ctr_countdown_timer_hide_zero'] ) ? array_map( 'sanitize_text_field', $_POST['woo_ctr_countdown_timer_hide_zero'] ) : array(), |
| 1854 |
'countdown_timer_color' => isset( $_POST['woo_ctr_countdown_timer_color'] ) ? array_map( 'sanitize_text_field', $_POST['woo_ctr_countdown_timer_color'] ) : array(), |
| 1855 |
'countdown_timer_bg_color' => isset( $_POST['woo_ctr_countdown_timer_bg_color'] ) ? array_map( 'sanitize_text_field', $_POST['woo_ctr_countdown_timer_bg_color'] ) : array(), |
| 1856 |
'countdown_timer_border_radius' => isset( $_POST['woo_ctr_countdown_timer_border_radius'] ) ? array_map( 'sanitize_text_field', $_POST['woo_ctr_countdown_timer_border_radius'] ) : array(), |
| 1857 |
'countdown_timer_border_color' => isset( $_POST['woo_ctr_countdown_timer_border_color'] ) ? array_map( 'sanitize_text_field', $_POST['woo_ctr_countdown_timer_border_color'] ) : array(), |
| 1858 |
'countdown_timer_item_border_radius' => isset( $_POST['woo_ctr_countdown_timer_item_border_radius'] ) ? array_map( 'sanitize_text_field', $_POST['woo_ctr_countdown_timer_item_border_radius'] ) : array(), |
| 1859 |
'countdown_timer_item_border_color' => isset( $_POST['woo_ctr_countdown_timer_item_border_color'] ) ? array_map( 'sanitize_text_field', $_POST['woo_ctr_countdown_timer_item_border_color'] ) : array(), |
| 1860 |
'countdown_timer_item_height' => isset( $_POST['woo_ctr_countdown_timer_item_height'] ) ? array_map( 'sanitize_text_field', $_POST['woo_ctr_countdown_timer_item_height'] ) : array(), |
| 1861 |
'countdown_timer_item_width' => isset( $_POST['woo_ctr_countdown_timer_item_width'] ) ? array_map( 'sanitize_text_field', $_POST['woo_ctr_countdown_timer_item_width'] ) : array(), |
| 1862 |
'countdown_timer_padding' => isset( $_POST['woo_ctr_countdown_timer_padding'] ) ? array_map( 'sanitize_text_field', $_POST['woo_ctr_countdown_timer_padding'] ) : array(), |
| 1863 |
'datetime_unit_color' => isset( $_POST['woo_ctr_datetime_unit_color'] ) ? array_map( 'sanitize_text_field', $_POST['woo_ctr_datetime_unit_color'] ) : array(), |
| 1864 |
'datetime_unit_bg_color' => isset( $_POST['woo_ctr_datetime_unit_bg_color'] ) ? array_map( 'sanitize_text_field', $_POST['woo_ctr_datetime_unit_bg_color'] ) : array(), |
| 1865 |
'datetime_unit_font_size' => isset( $_POST['woo_ctr_datetime_unit_font_size'] ) ? array_map( 'sanitize_text_field', $_POST['woo_ctr_datetime_unit_font_size'] ) : array(), |
| 1866 |
'datetime_value_color' => isset( $_POST['woo_ctr_datetime_value_color'] ) ? array_map( 'sanitize_text_field', $_POST['woo_ctr_datetime_value_color'] ) : array(), |
| 1867 |
'datetime_value_bg_color' => isset( $_POST['woo_ctr_datetime_value_bg_color'] ) ? array_map( 'sanitize_text_field', $_POST['woo_ctr_datetime_value_bg_color'] ) : array(), |
| 1868 |
'datetime_value_font_size' => isset( $_POST['woo_ctr_datetime_value_font_size'] ) ? array_map( 'sanitize_text_field', $_POST['woo_ctr_datetime_value_font_size'] ) : array(), |
| 1869 |
'time_separator' => isset( $_POST['woo_ctr_time_separator'] ) ? array_map( 'sanitize_text_field', $_POST['woo_ctr_time_separator'] ) : array(), |
| 1870 |
'display_type' => isset( $_POST['woo_ctr_display_type'] ) ? array_map( 'sanitize_text_field', $_POST['woo_ctr_display_type'] ) : array(), |
| 1871 |
'shop_page' => isset( $_POST['woo_ctr_shop_page'] ) ? array_map( 'sanitize_text_field', $_POST['woo_ctr_shop_page'] ) : array(), |
| 1872 |
'category_page' => isset( $_POST['woo_ctr_category_page'] ) ? array_map( 'sanitize_text_field', $_POST['woo_ctr_category_page'] ) : array(), |
| 1873 |
'archive_page_position' => isset( $_POST['woo_ctr_archive_page_position'] ) ? array_map( 'sanitize_text_field', $_POST['woo_ctr_archive_page_position'] ) : array(), |
| 1874 |
'size_on_archive_page' => isset( $_POST['woo_ctr_size_on_archive_page'] ) ? array_map( 'sanitize_text_field', $_POST['woo_ctr_size_on_archive_page'] ) : array(), |
| 1875 |
'datetime_unit_position' => isset( $_POST['woo_ctr_datetime_unit_position'] ) ? array_map( 'sanitize_text_field', $_POST['woo_ctr_datetime_unit_position'] ) : array(), |
| 1876 |
'animation_style' => isset( $_POST['woo_ctr_animation_style'] ) ? array_map( 'sanitize_text_field', $_POST['woo_ctr_animation_style'] ) : array(), |
| 1877 |
'circle_smooth_animation' => isset( $_POST['woo_ctr_circle_smooth_animation'] ) ? array_map( 'sanitize_text_field', $_POST['woo_ctr_circle_smooth_animation'] ) : array(), |
| 1878 |
'stick_to_top' => isset( $_POST['woo_ctr_stick_to_top'] ) ? array_map( 'sanitize_text_field', $_POST['woo_ctr_stick_to_top'] ) : array(), |
| 1879 |
); |
| 1880 |
|
| 1881 |
if ( ! count( $args['names'] ) ) { |
| 1882 |
$response['message'] = esc_html__( 'Can not remove all Countdown timer settings.', 'sales-countdown-timer' ); |
| 1883 |
wp_send_json( $response ); |
| 1884 |
die; |
| 1885 |
} else { |
| 1886 |
if ( count( $args['names'] ) != count( array_unique( $args['names'] ) ) ) { |
| 1887 |
$response['message'] = esc_html__( 'Names are unique.', 'sales-countdown-timer' ); |
| 1888 |
wp_send_json( $response ); |
| 1889 |
die; |
| 1890 |
} |
| 1891 |
foreach ( $args['names'] as $key => $name ) { |
| 1892 |
if ( ! $name ) { |
| 1893 |
$response['message'] = esc_html__( 'Names can not be empty.', 'sales-countdown-timer' ); |
| 1894 |
wp_send_json( $response ); |
| 1895 |
die; |
| 1896 |
} |
| 1897 |
} |
| 1898 |
} |
| 1899 |
update_option( 'sales_countdown_timer_params', $args ); |
| 1900 |
$response['status'] = 'successful'; |
| 1901 |
$response['message'] = esc_html__( 'Data saved.', 'sales-countdown-timer' ); |
| 1902 |
wp_send_json( $response ); |
| 1903 |
die; |
| 1904 |
} |
| 1905 |
} |
| 1906 |
|
| 1907 |
/** |
| 1908 |
* Init Script in Admin |
| 1909 |
*/ |
| 1910 |
public function admin_enqueue_scripts() { |
| 1911 |
$suffix = WP_DEBUG ? '' : '.min'; |
| 1912 |
if ( isset( $_REQUEST['_woo_ctr_admin_nonce'] ) && ! wp_verify_nonce( wc_clean( wp_unslash( $_REQUEST['_woo_ctr_admin_nonce'] ) ), 'woo_ctr_admin_nonce' ) ) { |
| 1913 |
return; |
| 1914 |
} |
| 1915 |
$page = isset( $_REQUEST['page'] ) ? sanitize_text_field( $_REQUEST['page'] ) : ''; |
| 1916 |
if ( $page === 'sales-countdown-timer-checkout' ) { |
| 1917 |
global $wp_scripts; |
| 1918 |
$scripts = $wp_scripts->registered; |
| 1919 |
// print_r($scripts); |
| 1920 |
foreach ( $scripts as $k => $script ) { |
| 1921 |
preg_match( '/^\/wp-/i', $script->src, $result ); |
| 1922 |
if ( count( array_filter( $result ) ) ) { |
| 1923 |
preg_match( '/^(\/wp-content\/plugins|\/wp-content\/themes)/i', $script->src, $result1 ); |
| 1924 |
if ( count( array_filter( $result1 ) ) ) { |
| 1925 |
wp_dequeue_script( $script->handle ); |
| 1926 |
} |
| 1927 |
} else { |
| 1928 |
if ( $script->handle != 'query-monitor' ) { |
| 1929 |
wp_dequeue_script( $script->handle ); |
| 1930 |
} |
| 1931 |
} |
| 1932 |
} |
| 1933 |
wp_enqueue_style( 'sales-countdown-timer-semantic-button', SALES_COUNTDOWN_TIMER_CSS . 'button.min.css', [], SALES_COUNTDOWN_TIMER_VERSION ); |
| 1934 |
wp_enqueue_style( 'sales-countdown-timer-semantic-form', SALES_COUNTDOWN_TIMER_CSS . 'form.min.css', [], SALES_COUNTDOWN_TIMER_VERSION ); |
| 1935 |
wp_enqueue_style( 'sales-countdown-timer-semantic-menu', SALES_COUNTDOWN_TIMER_CSS . 'menu.min.css', [], SALES_COUNTDOWN_TIMER_VERSION ); |
| 1936 |
wp_enqueue_style( 'sales-countdown-timer-semantic-message', SALES_COUNTDOWN_TIMER_CSS . 'message.min.css', [], SALES_COUNTDOWN_TIMER_VERSION ); |
| 1937 |
wp_enqueue_style( 'sales-countdown-timer-semantic-label', SALES_COUNTDOWN_TIMER_CSS . 'label.min.css', [], SALES_COUNTDOWN_TIMER_VERSION ); |
| 1938 |
wp_enqueue_style( 'sales-countdown-timer-semantic-input', SALES_COUNTDOWN_TIMER_CSS . 'input.min.css', [], SALES_COUNTDOWN_TIMER_VERSION ); |
| 1939 |
wp_enqueue_style( 'sales-countdown-timer-semantic-transition', SALES_COUNTDOWN_TIMER_CSS . 'transition.min.css', [], SALES_COUNTDOWN_TIMER_VERSION ); |
| 1940 |
wp_enqueue_style( 'sales-countdown-timer-semantic-segment', SALES_COUNTDOWN_TIMER_CSS . 'segment.min.css', [], SALES_COUNTDOWN_TIMER_VERSION ); |
| 1941 |
wp_enqueue_style( 'sales-countdown-timer-semantic-popup', SALES_COUNTDOWN_TIMER_CSS . 'popup.min.css', [], SALES_COUNTDOWN_TIMER_VERSION ); |
| 1942 |
wp_enqueue_style( 'sales-countdown-timer-semantic-tab', SALES_COUNTDOWN_TIMER_CSS . 'tab.css', [], SALES_COUNTDOWN_TIMER_VERSION ); |
| 1943 |
wp_enqueue_style( 'sales-countdown-timer-semantic-header', SALES_COUNTDOWN_TIMER_CSS . 'header.min.css', [], SALES_COUNTDOWN_TIMER_VERSION ); |
| 1944 |
|
| 1945 |
wp_enqueue_style( 'sales-countdown-timer-admin-css', SALES_COUNTDOWN_TIMER_CSS . 'admin-checkout' . $suffix . '.css', [], SALES_COUNTDOWN_TIMER_VERSION ); |
| 1946 |
|
| 1947 |
wp_enqueue_script( 'jquery-ui-sortable' ); |
| 1948 |
wp_enqueue_script( 'sales-countdown-timer-semantic-address', SALES_COUNTDOWN_TIMER_JS . 'address.min.js', array( 'jquery' ), SALES_COUNTDOWN_TIMER_VERSION, false ); |
| 1949 |
wp_enqueue_script( 'sales-countdown-timer-semantic-form', SALES_COUNTDOWN_TIMER_JS . 'form.js', array( 'jquery' ), SALES_COUNTDOWN_TIMER_VERSION, false ); |
| 1950 |
wp_enqueue_script( 'sales-countdown-timer-semantic-tab', SALES_COUNTDOWN_TIMER_JS . 'tab.js', array( 'jquery' ), SALES_COUNTDOWN_TIMER_VERSION, false ); |
| 1951 |
wp_enqueue_script( 'sales-countdown-timer-semantic-transition', SALES_COUNTDOWN_TIMER_JS . 'transition.min.js', array( 'jquery' ), SALES_COUNTDOWN_TIMER_VERSION, false ); |
| 1952 |
wp_enqueue_script( 'sales-countdown-timer-admin-js', SALES_COUNTDOWN_TIMER_JS . 'admin-checkout' . $suffix . '.js', array( 'jquery' ), SALES_COUNTDOWN_TIMER_VERSION, false ); |
| 1953 |
} elseif ( $page == 'sales-countdown-timer' ) { |
| 1954 |
global $wp_scripts; |
| 1955 |
if ( isset( $wp_scripts->registered['jquery-ui-accordion'] ) ) { |
| 1956 |
unset( $wp_scripts->registered['jquery-ui-accordion'] ); |
| 1957 |
wp_dequeue_script( 'jquery-ui-accordion' ); |
| 1958 |
} |
| 1959 |
if ( isset( $wp_scripts->registered['accordion'] ) ) { |
| 1960 |
unset( $wp_scripts->registered['accordion'] ); |
| 1961 |
wp_dequeue_script( 'accordion' ); |
| 1962 |
} |
| 1963 |
$scripts = $wp_scripts->registered; |
| 1964 |
foreach ( $scripts as $k => $script ) { |
| 1965 |
preg_match( '/^\/wp-/i', $script->src, $result ); |
| 1966 |
if ( count( array_filter( $result ) ) ) { |
| 1967 |
preg_match( '/^(\/wp-content\/plugins|\/wp-content\/themes)/i', $script->src, $result1 ); |
| 1968 |
if ( count( array_filter( $result1 ) ) ) { |
| 1969 |
wp_dequeue_script( $script->handle ); |
| 1970 |
} |
| 1971 |
} else { |
| 1972 |
if ( $script->handle != 'query-monitor' ) { |
| 1973 |
wp_dequeue_script( $script->handle ); |
| 1974 |
} |
| 1975 |
} |
| 1976 |
} |
| 1977 |
|
| 1978 |
/*Stylesheet*/ |
| 1979 |
wp_enqueue_style( 'sales-countdown-timer-semantic-button', SALES_COUNTDOWN_TIMER_CSS . 'button.min.css', [], SALES_COUNTDOWN_TIMER_VERSION ); |
| 1980 |
wp_enqueue_style( 'sales-countdown-timer-semantic-checkbox', SALES_COUNTDOWN_TIMER_CSS . 'checkbox.min.css', [], SALES_COUNTDOWN_TIMER_VERSION ); |
| 1981 |
wp_enqueue_style( 'sales-countdown-timer-semantic-dropdown', SALES_COUNTDOWN_TIMER_CSS . 'dropdown.min.css', [], SALES_COUNTDOWN_TIMER_VERSION ); |
| 1982 |
wp_enqueue_style( 'sales-countdown-timer-semantic-form', SALES_COUNTDOWN_TIMER_CSS . 'form.min.css', [], SALES_COUNTDOWN_TIMER_VERSION ); |
| 1983 |
wp_enqueue_style( 'sales-countdown-timer-semantic-icon', SALES_COUNTDOWN_TIMER_CSS . 'icon.min.css', [], SALES_COUNTDOWN_TIMER_VERSION ); |
| 1984 |
wp_enqueue_style( 'sales-countdown-timer-semantic-menu', SALES_COUNTDOWN_TIMER_CSS . 'menu.min.css', [], SALES_COUNTDOWN_TIMER_VERSION ); |
| 1985 |
wp_enqueue_style( 'sales-countdown-timer-semantic-segment', SALES_COUNTDOWN_TIMER_CSS . 'segment.min.css', [], SALES_COUNTDOWN_TIMER_VERSION ); |
| 1986 |
wp_enqueue_style( 'sales-countdown-timer-semantic-label', SALES_COUNTDOWN_TIMER_CSS . 'label.min.css', [], SALES_COUNTDOWN_TIMER_VERSION ); |
| 1987 |
wp_enqueue_style( 'sales-countdown-timer-semantic-transition', SALES_COUNTDOWN_TIMER_CSS . 'transition.min.css', [], SALES_COUNTDOWN_TIMER_VERSION ); |
| 1988 |
wp_enqueue_style( 'sales-countdown-timer-semantic-accordion', SALES_COUNTDOWN_TIMER_CSS . 'accordion.min.css', [], SALES_COUNTDOWN_TIMER_VERSION ); |
| 1989 |
wp_enqueue_style( 'sales-countdown-timer-semantic-input', SALES_COUNTDOWN_TIMER_CSS . 'input.min.css', [], SALES_COUNTDOWN_TIMER_VERSION ); |
| 1990 |
wp_enqueue_style( 'sales-countdown-timer-semantic-header', SALES_COUNTDOWN_TIMER_CSS . 'header.min.css', [], SALES_COUNTDOWN_TIMER_VERSION ); |
| 1991 |
wp_enqueue_style( 'sales-countdown-timer-semantic-popup', SALES_COUNTDOWN_TIMER_CSS . 'popup.min.css', [], SALES_COUNTDOWN_TIMER_VERSION ); |
| 1992 |
|
| 1993 |
wp_enqueue_style( 'sales-countdown-timer-admin', SALES_COUNTDOWN_TIMER_CSS . 'sales-countdown-timer-admin' . $suffix . '.css', array(), SALES_COUNTDOWN_TIMER_VERSION ); |
| 1994 |
|
| 1995 |
wp_enqueue_script( 'sales-countdown-timer-semantic-checkbox', SALES_COUNTDOWN_TIMER_JS . 'checkbox.js', array( 'jquery' ), SALES_COUNTDOWN_TIMER_VERSION, false ); |
| 1996 |
wp_enqueue_script( 'sales-countdown-timer-semantic-dropdown', SALES_COUNTDOWN_TIMER_JS . 'dropdown.js', array( 'jquery' ), SALES_COUNTDOWN_TIMER_VERSION, false ); |
| 1997 |
wp_enqueue_script( 'sales-countdown-timer-semantic-form', SALES_COUNTDOWN_TIMER_JS . 'form.js', array( 'jquery' ), SALES_COUNTDOWN_TIMER_VERSION, false ); |
| 1998 |
wp_enqueue_script( 'sales-countdown-timer-semantic-tab', SALES_COUNTDOWN_TIMER_JS . 'tab.js', array( 'jquery' ), SALES_COUNTDOWN_TIMER_VERSION, false ); |
| 1999 |
wp_enqueue_script( 'sales-countdown-timer-semantic-transition', SALES_COUNTDOWN_TIMER_JS . 'transition.min.js', array( 'jquery' ), SALES_COUNTDOWN_TIMER_VERSION, false ); |
| 2000 |
wp_enqueue_script( 'sales-countdown-timer-semantic-accordion', SALES_COUNTDOWN_TIMER_JS . 'accordion.min.js', array( 'jquery' ), SALES_COUNTDOWN_TIMER_VERSION, false ); |
| 2001 |
|
| 2002 |
wp_enqueue_script( 'sales-countdown-timer-admin', SALES_COUNTDOWN_TIMER_JS . 'sales-countdown-timer-admin' . $suffix . '.js', array( 'jquery' ), SALES_COUNTDOWN_TIMER_VERSION, false ); |
| 2003 |
/*Color picker*/ |
| 2004 |
wp_enqueue_script( |
| 2005 |
'iris', admin_url( 'js/iris.min.js' ), array( |
| 2006 |
'jquery-ui-draggable', |
| 2007 |
'jquery-ui-slider', |
| 2008 |
'jquery-touch-punch' |
| 2009 |
), SALES_COUNTDOWN_TIMER_VERSION, 1 |
| 2010 |
); |
| 2011 |
$id = $this->settings->get_id(); |
| 2012 |
if ( is_array( $id ) && count( $id ) ) { |
| 2013 |
$css = ''; |
| 2014 |
|
| 2015 |
for ( $i = 0; $i < count( $id ); $i ++ ) { |
| 2016 |
if ( $this->settings->get_datetime_value_bg_color()[ $i ] ) { |
| 2017 |
$css .= '.woo-sctr-accordion-wrap[data-accordion_id="' . $i . '"] .woo-sctr-shortcode-countdown-style-4 .woo-sctr-shortcode-countdown-1 .woo-sctr-progress-circle:after{' . esc_attr__( 'background:' ) . $this->settings->get_datetime_value_bg_color()[ $i ] . ';}'; |
| 2018 |
} |
| 2019 |
if ( $this->settings->get_countdown_timer_item_border_color()[ $i ] ) { |
| 2020 |
$css .= '.woo-sctr-accordion-wrap-' . $i . ' .woo-sctr-shortcode-countdown-style-4 .woo-sctr-shortcode-countdown-1 .woo-sctr-progress-circle .woo-sctr-value-bar{' . esc_attr__( 'border-color: ' ) . $this->settings->get_countdown_timer_item_border_color()[ $i ] . ';}'; |
| 2021 |
$css .= '.woo-sctr-accordion-wrap-' . $i . ' .woo-sctr-shortcode-countdown-style-4 .woo-sctr-shortcode-countdown-1 .woo-sctr-progress-circle .woo-sctr-first50-bar{' . esc_attr__( 'background-color: ' ) . $this->settings->get_countdown_timer_item_border_color()[ $i ] . ';}'; |
| 2022 |
} |
| 2023 |
if ( $this->settings->get_datetime_value_font_size()[ $i ] ) { |
| 2024 |
$css .= '.woo-sctr-accordion-wrap-' . $i . ' .woo-sctr-shortcode-countdown-style-4 .woo-sctr-shortcode-countdown-1 .woo-sctr-progress-circle{' . esc_attr__( 'font-size:' ) . $this->settings->get_datetime_value_font_size()[ $i ] . 'px;}'; |
| 2025 |
} |
| 2026 |
|
| 2027 |
$css .= '.woo-sctr-accordion-wrap-' . $i . ' .woo-sctr-shortcode-wrap-wrap:not(.woo-sctr-shortcode-wrap-wrap-inline) .woo-sctr-shortcode-countdown-1{'; |
| 2028 |
if ( $this->settings->get_countdown_timer_color()[ $i ] ) { |
| 2029 |
$css .= esc_attr__( 'color:' ) . $this->settings->get_countdown_timer_color()[ $i ] . ';'; |
| 2030 |
} |
| 2031 |
if ( $this->settings->get_countdown_timer_bg_color()[ $i ] ) { |
| 2032 |
$css .= esc_html__( 'background:' ) . $this->settings->get_countdown_timer_bg_color()[ $i ] . ';'; |
| 2033 |
} |
| 2034 |
if ( $this->settings->get_countdown_timer_padding()[ $i ] ) { |
| 2035 |
$css .= esc_html__( 'padding:' ) . $this->settings->get_countdown_timer_padding()[ $i ] . 'px;'; |
| 2036 |
} |
| 2037 |
if ( $this->settings->get_countdown_timer_border_radius()[ $i ] ) { |
| 2038 |
$css .= esc_html__( 'border-radius:' ) . $this->settings->get_countdown_timer_border_radius()[ $i ] . 'px;'; |
| 2039 |
} |
| 2040 |
if ( $this->settings->get_countdown_timer_border_color()[ $i ] ) { |
| 2041 |
$css .= esc_html__( 'border: 1px solid ' ) . $this->settings->get_countdown_timer_border_color()[ $i ] . ';'; |
| 2042 |
} |
| 2043 |
$css .= '}'; |
| 2044 |
|
| 2045 |
$css .= '.woo-sctr-accordion-wrap-' . $i . ' .woo-sctr-shortcode-wrap-wrap.woo-sctr-shortcode-wrap-wrap-inline{'; |
| 2046 |
if ( $this->settings->get_countdown_timer_color()[ $i ] ) { |
| 2047 |
$css .= esc_attr__( 'color:' ) . $this->settings->get_countdown_timer_color()[ $i ] . ';'; |
| 2048 |
} |
| 2049 |
if ( $this->settings->get_countdown_timer_bg_color()[ $i ] ) { |
| 2050 |
$css .= esc_html__( 'background:' ) . $this->settings->get_countdown_timer_bg_color()[ $i ] . ';'; |
| 2051 |
} |
| 2052 |
if ( $this->settings->get_countdown_timer_padding()[ $i ] ) { |
| 2053 |
$css .= esc_html__( 'padding:' ) . $this->settings->get_countdown_timer_padding()[ $i ] . 'px;'; |
| 2054 |
} |
| 2055 |
if ( $this->settings->get_countdown_timer_border_radius()[ $i ] ) { |
| 2056 |
$css .= esc_html__( 'border-radius:' ) . $this->settings->get_countdown_timer_border_radius()[ $i ] . 'px;'; |
| 2057 |
} |
| 2058 |
if ( $this->settings->get_countdown_timer_border_color()[ $i ] ) { |
| 2059 |
$css .= esc_html__( 'border: 1px solid ' ) . $this->settings->get_countdown_timer_border_color()[ $i ] . ';'; |
| 2060 |
} |
| 2061 |
$css .= '}'; |
| 2062 |
|
| 2063 |
$css .= '.woo-sctr-accordion-wrap-' . $i . ' .woo-sctr-shortcode-wrap-wrap .woo-sctr-shortcode-countdown-1 .woo-sctr-shortcode-countdown-value{'; |
| 2064 |
if ( $this->settings->get_datetime_value_color()[ $i ] ) { |
| 2065 |
$css .= esc_attr__( 'color:' ) . $this->settings->get_datetime_value_color()[ $i ] . ';'; |
| 2066 |
} |
| 2067 |
if ( $this->settings->get_datetime_value_bg_color()[ $i ] ) { |
| 2068 |
$css .= esc_attr__( 'background:' ) . $this->settings->get_datetime_value_bg_color()[ $i ] . ';'; |
| 2069 |
} |
| 2070 |
if ( $this->settings->get_datetime_value_font_size()[ $i ] ) { |
| 2071 |
$css .= esc_attr__( 'font-size:' ) . $this->settings->get_datetime_value_font_size()[ $i ] . 'px;'; |
| 2072 |
} |
| 2073 |
$css .= '}'; |
| 2074 |
$css .= '.woo-sctr-accordion-wrap-' . $i . ' .woo-sctr-shortcode-wrap-wrap .woo-sctr-shortcode-countdown-1 .woo-sctr-shortcode-countdown-text{'; |
| 2075 |
if ( $this->settings->get_datetime_unit_color()[ $i ] ) { |
| 2076 |
$css .= esc_attr__( 'color:' ) . $this->settings->get_datetime_unit_color()[ $i ] . ';'; |
| 2077 |
} |
| 2078 |
if ( $this->settings->get_datetime_unit_bg_color()[ $i ] ) { |
| 2079 |
$css .= esc_attr__( 'background:' ) . $this->settings->get_datetime_unit_bg_color()[ $i ] . ';'; |
| 2080 |
} |
| 2081 |
if ( $this->settings->get_datetime_unit_font_size()[ $i ] ) { |
| 2082 |
$css .= esc_attr__( 'font-size:' ) . $this->settings->get_datetime_unit_font_size()[ $i ] . 'px;'; |
| 2083 |
} |
| 2084 |
$css .= '}'; |
| 2085 |
|
| 2086 |
$css1 = ''; |
| 2087 |
if ( $this->settings->get_countdown_timer_item_height()[ $i ] ) { |
| 2088 |
$css1 .= esc_html__( 'height:' ) . $this->settings->get_countdown_timer_item_height()[ $i ] . 'px;'; |
| 2089 |
} |
| 2090 |
if ( $this->settings->get_countdown_timer_item_width()[ $i ] ) { |
| 2091 |
$css1 .= esc_html__( 'width:' ) . $this->settings->get_countdown_timer_item_width()[ $i ] . 'px;'; |
| 2092 |
} |
| 2093 |
if ( $this->settings->get_countdown_timer_item_border_radius()[ $i ] ) { |
| 2094 |
$css1 .= esc_html__( 'border-radius:' ) . $this->settings->get_countdown_timer_item_border_radius()[ $i ] . 'px;'; |
| 2095 |
} |
| 2096 |
if ( $this->settings->get_countdown_timer_item_border_color()[ $i ] ) { |
| 2097 |
$css1 .= esc_html__( 'border:1px solid ' ) . $this->settings->get_countdown_timer_item_border_color()[ $i ] . ';'; |
| 2098 |
} |
| 2099 |
if ( $css1 ) { |
| 2100 |
$css .= '.woo-sctr-accordion-wrap-' . $i . ' .woo-sctr-shortcode-countdown-wrap.woo-sctr-shortcode-countdown-style-1 .woo-sctr-shortcode-countdown-unit,.woo-sctr-accordion-wrap-' . $i . ' .woo-sctr-shortcode-countdown-wrap.woo-sctr-shortcode-countdown-style-2 .woo-sctr-shortcode-countdown-value{' . $css1 . '}'; |
| 2101 |
} |
| 2102 |
|
| 2103 |
} |
| 2104 |
|
| 2105 |
|
| 2106 |
wp_add_inline_style( 'sales-countdown-timer-admin', $css ); |
| 2107 |
} |
| 2108 |
} |
| 2109 |
} |
| 2110 |
|
| 2111 |
/** |
| 2112 |
* Link to Settings |
| 2113 |
* |
| 2114 |
* @param $links |
| 2115 |
* |
| 2116 |
* @return mixed |
| 2117 |
*/ |
| 2118 |
public function settings_link( $links ) { |
| 2119 |
$settings_link = '<a href="admin.php?page=sales-countdown-timer" title="' . esc_html__( 'Settings', 'sales-countdown-timer' ) . '">' . esc_html__( 'Settings', 'sales-countdown-timer' ) . '</a>'; |
| 2120 |
array_unshift( $links, $settings_link ); |
| 2121 |
|
| 2122 |
return $links; |
| 2123 |
} |
| 2124 |
|
| 2125 |
/** |
| 2126 |
* load Language translate |
| 2127 |
*/ |
| 2128 |
public function load_plugin_textdomain() { |
| 2129 |
$locale = apply_filters( 'plugin_locale', get_locale(), 'sales-countdown-timer' ); |
| 2130 |
// Global + Frontend Locale |
| 2131 |
load_textdomain( 'sales-countdown-timer', SALES_COUNTDOWN_TIMER_LANGUAGES . "sales-countdown-timer-$locale.mo" ); |
| 2132 |
load_plugin_textdomain( 'sales-countdown-timer', false, SALES_COUNTDOWN_TIMER_LANGUAGES ); |
| 2133 |
} |
| 2134 |
|
| 2135 |
public function init() { |
| 2136 |
load_plugin_textdomain( 'sales-countdown-timer' ); |
| 2137 |
$this->load_plugin_textdomain(); |
| 2138 |
if ( class_exists( 'VillaTheme_Support' ) ) { |
| 2139 |
new VillaTheme_Support( |
| 2140 |
array( |
| 2141 |
'support' => 'https://wordpress.org/support/plugin/sales-countdown-timer/', |
| 2142 |
'docs' => 'https://docs.villatheme.com/?item=sales-countdown-timer', |
| 2143 |
'review' => 'https://wordpress.org/support/plugin/sales-countdown-timer/reviews/?rate=5#rate-response', |
| 2144 |
'pro_url' => 'https://villatheme.com/extensions/sales-countdown-timer', |
| 2145 |
'css' => SALES_COUNTDOWN_TIMER_CSS, |
| 2146 |
'image' => SALES_COUNTDOWN_TIMER_IMAGES, |
| 2147 |
'slug' => 'sales-countdown-timer', |
| 2148 |
'menu_slug' => 'sales-countdown-timer', |
| 2149 |
'survey_url' => 'https://script.google.com/macros/s/AKfycbzyJ8_bX_gpf3AWbaDg51QcGmOKYqpxIvTnfNq21dxjkbRHjoNH0QpaBAClxeYgeXeeFA/exec', |
| 2150 |
'version' => SALES_COUNTDOWN_TIMER_VERSION |
| 2151 |
) |
| 2152 |
); |
| 2153 |
} |
| 2154 |
} |
| 2155 |
} |
| 2156 |
|
| 2157 |
?> |