PluginProbe
HurryTimer – An Scarcity and Urgency Countdown Timer for WordPress & WooCommerce / 2.6.2
HurryTimer – An Scarcity and Urgency Countdown Timer for WordPress & WooCommerce v2.6.2
2.15.0 trunk 1.0.0 1.0.1 1.1.0 1.1.1 1.1.2 1.1.3 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.1.2 2.1.3 2.1.5 2.1.6 2.1.7 2.1.8 2.10.0 All 62 releases
← All changes | includes/Utils/Form.php +15 -5 2.0.02.6.2 View file →
@@ -4,17 +4,25 @@
4 4
5 5 class Form
6 6 {
7 7
8 - static function toggle($name, $value, $id)
8 + static function toggle($name, $value, $id, $small = false, $attrs = '')
9 9 {
10 10 ?>
11 + <input type="hidden"
12 + name="<?php echo $name ?>"
13 + value="no"
14 + >
15 +
11 16 <input type="checkbox"
12 17 name="<?php echo $name ?>"
13 18 id="<?php echo $id ?>"
14 - class="js-hurrytimer-input-toggle"
15 - value="yes"
16 - <?php checked($value, 'yes') ?>
19 + class="hurryt-input-toggle <?php echo $small ? 'is-small' : '' ?>"
20 + value="yes"
21 + <?php echo $attrs ?>
22 + <?php
23 + echo filter_var($value, FILTER_VALIDATE_BOOLEAN) ? 'checked' :'' ;
24 + ?>
17 25 />
18 26 <?php
19 27 }
20 28
@@ -30,10 +38,12 @@
30 38 <span class="hurrytimer-color-preview"></span>
31 39 <input
32 40 type="text"
33 41 name="<?php echo $name ?>"
42 + placeholder="Select color"
43 + autocomplete="off"
34 44 class="hurrytimer-color-input"
35 45 value="<?php echo $value ?>" />
36 -<!-- <span class="dashicons dashicons-no-alt hurrytimer-color-clear"></span>-->
46 + <span class="dashicons dashicons-no-alt hurrytimer-color-clear"></span>
37 47 <?php
38 48 }
39 49 }