Countdown Timer – Widget Countdown - Version 2.1.0

Version Description

  • Added new option for mobile devices.

=

Download this release

Release Info

Developer wpdevart
Plugin Icon 128x128 Countdown Timer – Widget Countdown
Version 2.1.0
Comparing to
See all releases

Code changes from version 2.0.9 to 2.1.0

includes/admin_menu.php CHANGED
@@ -160,11 +160,11 @@ class wpdevart_countdown_admin_menu{
160
  Countdown expire time <span title="Type the Countdown expire time." class="desription_class">?</span>
161
  </td>
162
  <td style="vertical-align: top !important;">
163
- <span style="display:inline-block; margin-right:3px; width:55px;">
164
  <input type="text" placeholder="Day" id="countdownday" size="3" value="0"/>
165
  <small style="display:block">Day</small>
166
  </span>
167
- <span style="display:inline-block; width:55px;">
168
  <input type="text" placeholder="Hour" id="countdownhour" size="3" value="1"/>
169
  <small>Hour</small>
170
  </span>
@@ -174,7 +174,18 @@ class wpdevart_countdown_admin_menu{
174
  </span>
175
  <input type="hidden" value='<?php echo mktime (date("H"), date("i"), date("s"),date("n"), date("j"),date("Y")); ?>' id="countdown_start_date" name="countdown_start_date" />
176
  </td>
177
- </tr>
 
 
 
 
 
 
 
 
 
 
 
178
  <tr>
179
  <td>
180
  <span style="color:red">After Countdown expire</span> <span title="Select the action you prefere after Countdown time expire." class="desription_class">?</span>
@@ -394,6 +405,9 @@ class wpdevart_countdown_admin_menu{
394
  if(jQuery('#countdown_experet_type').length)
395
  variables=variables+'countdown_end_type="'+jQuery('#countdown_experet_type').val()+'" ';
396
 
 
 
 
397
  if(jQuery('#countdown_experet_date').length)
398
  variables=variables+'end_date="'+jQuery('#countdown_experet_date').val()+'" ';
399
 
160
  Countdown expire time <span title="Type the Countdown expire time." class="desription_class">?</span>
161
  </td>
162
  <td style="vertical-align: top !important;">
163
+ <span style="display:inline-block; margin-right:3px; width:70px; float:left;">
164
  <input type="text" placeholder="Day" id="countdownday" size="3" value="0"/>
165
  <small style="display:block">Day</small>
166
  </span>
167
+ <span style="display:inline-block; width:72px; float:left;">
168
  <input type="text" placeholder="Hour" id="countdownhour" size="3" value="1"/>
169
  <small>Hour</small>
170
  </span>
174
  </span>
175
  <input type="hidden" value='<?php echo mktime (date("H"), date("i"), date("s"),date("n"), date("j"),date("Y")); ?>' id="countdown_start_date" name="countdown_start_date" />
176
  </td>
177
+ </tr>
178
+ <tr>
179
+ <td>
180
+ <span>Show/Hide countdown on mobile devices</span> <span title="This option allow to show or hide countdown on mobile devices." class="desription_class">?</span>
181
+ </td>
182
+ <td>
183
+ <select id="countdown_hide_on_mobile" >
184
+ <option selected="selected" value="show">Show</option>
185
+ <option value="hide">Hide</option>
186
+ </select>
187
+ </td>
188
+ </tr>
189
  <tr>
190
  <td>
191
  <span style="color:red">After Countdown expire</span> <span title="Select the action you prefere after Countdown time expire." class="desription_class">?</span>
405
  if(jQuery('#countdown_experet_type').length)
406
  variables=variables+'countdown_end_type="'+jQuery('#countdown_experet_type').val()+'" ';
407
 
408
+ if(jQuery('#countdown_hide_on_mobile').length)
409
+ variables=variables+'hide_on_mobile="'+jQuery('#countdown_hide_on_mobile').val()+'" ';
410
+
411
  if(jQuery('#countdown_experet_date').length)
412
  variables=variables+'end_date="'+jQuery('#countdown_experet_date').val()+'" ';
413
 
includes/front_end.php CHANGED
@@ -55,6 +55,7 @@ class wpdevart_countdown_front_end{
55
  "text_for_second" => "Seconds",
56
  "start_time" => mktime (date("H"), date("i"), date("s"),date("n"), date("j"),date("Y")),
57
  "countdown_end_type" => "time",
 
58
  "end_date" => date('d-m-Y 23:59'),
59
  "end_time" => "0,9,9",
60
  "action_end_time" => "hide",
@@ -63,7 +64,9 @@ class wpdevart_countdown_front_end{
63
  "bottom_distance" => "11",
64
  "content" =>$content
65
  ), $atts);
66
-
 
 
67
 
68
 
69
  if(isset($curent_value['countdown_end_type']) && $curent_value['countdown_end_type']=='date'){
55
  "text_for_second" => "Seconds",
56
  "start_time" => mktime (date("H"), date("i"), date("s"),date("n"), date("j"),date("Y")),
57
  "countdown_end_type" => "time",
58
+ "hide_on_mobile" => "show",
59
  "end_date" => date('d-m-Y 23:59'),
60
  "end_time" => "0,9,9",
61
  "action_end_time" => "hide",
64
  "bottom_distance" => "11",
65
  "content" =>$content
66
  ), $atts);
67
+ if($curent_value["hide_on_mobile"]=="hidee" && wp_is_mobile()){
68
+ return "";
69
+ }
70
 
71
 
72
  if(isset($curent_value['countdown_end_type']) && $curent_value['countdown_end_type']=='date'){
includes/gutenberg/block.js CHANGED
@@ -65,7 +65,12 @@
65
  type: 'string',
66
  value: "",
67
  default: ""
68
- },
 
 
 
 
 
69
  countdownstart_on:{
70
  type: 'string',
71
  value: "hide",
@@ -174,7 +179,7 @@
174
  var aditional_css_countdown_experet_date={};
175
  var font_familis={"Arial,Helvetica Neue,Helvetica,sans-serif":"Arial *","Arial Black,Arial Bold,Arial,sans-serif":"Arial Black *","Arial Narrow,Arial,Helvetica Neue,Helvetica,sans-serif":"Arial Narrow *","Courier,Verdana,sans-serif":"Courier *","Georgia,Times New Roman,Times,serif":"Georgia *","Times New Roman,Times,Georgia,serif":"Times New Roman *","Trebuchet MS,Lucida Grande,Lucida Sans Unicode,Lucida Sans,Arial,sans-serif":"Trebuchet MS *","Verdana,sans-serif":"Verdana *","American Typewriter,Georgia,serif":"American Typewriter","Andale Mono,Consolas,Monaco,Courier,Courier New,Verdana,sans-serif":"Andale Mono","Baskerville,Times New Roman,Times,serif":"Baskerville","Bookman Old Style,Georgia,Times New Roman,Times,serif":"Bookman Old Style","Calibri,Helvetica Neue,Helvetica,Arial,Verdana,sans-serif":"Calibri","Cambria,Georgia,Times New Roman,Times,serif":"Cambria","Candara,Verdana,sans-serif":"Candara","Century Gothic,Apple Gothic,Verdana,sans-serif":"Century Gothic","Century Schoolbook,Georgia,Times New Roman,Times,serif":"Century Schoolbook","Consolas,Andale Mono,Monaco,Courier,Courier New,Verdana,sans-serif":"Consolas","Constantia,Georgia,Times New Roman,Times,serif":"Constantia","Corbel,Lucida Grande,Lucida Sans Unicode,Arial,sans-serif":"Corbel","Franklin Gothic Medium,Arial,sans-serif":"Franklin Gothic Medium","Garamond,Hoefler Text,Times New Roman,Times,serif":"Garamond","Gill Sans MT,Gill Sans,Calibri,Trebuchet MS,sans-serif":"Gill Sans MT","Helvetica Neue,Helvetica,Arial,sans-serif":"Helvetica Neue","Hoefler Text,Garamond,Times New Roman,Times,sans-serif":"Hoefler Text","Lucida Bright,Cambria,Georgia,Times New Roman,Times,serif":"Lucida Bright","Lucida Grande,Lucida Sans,Lucida Sans Unicode,sans-serif":"Lucida Grande","monospace":"monospace","Palatino Linotype,Palatino,Georgia,Times New Roman,Times,serif":"Palatino Linotype","Tahoma,Geneva,Verdana,sans-serif":"Tahoma","Rockwell, Arial Black, Arial Bold, Arial, sans-serif":"Rockwell"};
176
  var animation_efects={"none":"none","random":"random","bounce":"bounce","flash":"flash","pulse":"pulse","rubberBand":"rubberBand","shake":"shake","swing":"swing","tada":"tada","wobble":"wobble","bounceIn":"bounceIn","bounceInDown":"bounceInDown","bounceInLeft":"bounceInLeft","bounceInRight":"bounceInRight","bounceInUp":"bounceInUp","fadeIn":"fadeIn","fadeInDown":"fadeInDown","fadeInDownBig":"fadeInDownBig","fadeInLeft":"fadeInLeft","fadeInLeftBig":"fadeInLeftBig","fadeInRight":"fadeInRight","fadeInRightBig":"fadeInRightBig","fadeInUp":"fadeInUp","fadeInUpBig":"fadeInUpBig","flip":"flip","flipInX":"flipInX","flipInY":"flipInY","lightSpeedIn":"lightSpeedIn","rotateIn":"rotateIn","rotateInDownLeft":"rotateInDownLeft","rotateInDownRight":"rotateInDownRight","rotateInUpLeft":"rotateInUpLeft","rotateInUpRight":"rotateInUpRight","rollIn":"rollIn","zoomIn":"zoomIn","zoomInDown":"zoomInDown","zoomInLeft":"zoomInLeft","zoomInRight":"zoomInRight","zoomInUp":"zoomInUp"};
177
-
178
  if(props.attributes.countdown_experet_type=="time"){
179
  aditional_css_countdown_experet_date["display"]="none";
180
  }else{
@@ -188,6 +193,7 @@
188
  wpda_countdown_fields.push(wpda_countdown_lb_select_open_hide_params("countdown_experet_type",{"time":"Time","date":"Date"},["countdownday","countdown_experet_date"],"Countdown date picker type","Select the Countdown date picker type."));
189
  wpda_countdown_fields.push(wpda_countdown_lb_days_hourse_minutes("countdownday","countdownhour","countdownminute","Countdown expire time","Type the Countdown expire time.",false,aditional_css_for_countdownday));
190
  wpda_countdown_fields.push(wpda_countdown_lb_calendar_input("countdown_experet_date","Countdown expire date","Type the Countdown expire date.",false,aditional_css_countdown_experet_date));
 
191
  wpda_countdown_fields.push(wpda_countdown_lb_simple_select("countdownstart_on",{"hide":"Hide countdown","show_text":"Show text"},"After Countdown expire","Select the action you prefere after Countdown time expire.",false,{color:'red'}));
192
  wpda_countdown_fields.push(wpda_countdown_lb_simple_textarea("expeiret_text","Message after countdown expire","Type the message that will appear after countdown time expire."));
193
  wpda_countdown_fields.push(wpda_countdown_lb_simple_select("countdown_in_content_position",{"left":"Left","center":"Center","right":"Right"},"Countdown timer position","Select the Countdown Timer position."));
@@ -416,6 +422,9 @@
416
  shortcode_atributes = shortcode_atributes + ' countdown_end_type="' + props.attributes.countdown_experet_type + '"';
417
  shortcode_atributes = shortcode_atributes + ' end_date="' + end_date + '"';
418
  shortcode_atributes = shortcode_atributes + ' start_time="' + start_time + '"';
 
 
 
419
  shortcode_atributes = shortcode_atributes + ' end_time="' + props.attributes.countdownday + ',' + props.attributes.countdownhour + ',' + props.attributes.countdownminute +'"';
420
  shortcode_atributes = shortcode_atributes + ' action_end_time="' + props.attributes.countdownstart_on + '"';
421
  shortcode_atributes = shortcode_atributes + ' content_position="' + props.attributes.countdown_in_content_position + '"';
65
  type: 'string',
66
  value: "",
67
  default: ""
68
+ },
69
+ countdown_hide_on_mobile:{
70
+ type: 'string',
71
+ value: "",
72
+ default: "showw"
73
+ },
74
  countdownstart_on:{
75
  type: 'string',
76
  value: "hide",
179
  var aditional_css_countdown_experet_date={};
180
  var font_familis={"Arial,Helvetica Neue,Helvetica,sans-serif":"Arial *","Arial Black,Arial Bold,Arial,sans-serif":"Arial Black *","Arial Narrow,Arial,Helvetica Neue,Helvetica,sans-serif":"Arial Narrow *","Courier,Verdana,sans-serif":"Courier *","Georgia,Times New Roman,Times,serif":"Georgia *","Times New Roman,Times,Georgia,serif":"Times New Roman *","Trebuchet MS,Lucida Grande,Lucida Sans Unicode,Lucida Sans,Arial,sans-serif":"Trebuchet MS *","Verdana,sans-serif":"Verdana *","American Typewriter,Georgia,serif":"American Typewriter","Andale Mono,Consolas,Monaco,Courier,Courier New,Verdana,sans-serif":"Andale Mono","Baskerville,Times New Roman,Times,serif":"Baskerville","Bookman Old Style,Georgia,Times New Roman,Times,serif":"Bookman Old Style","Calibri,Helvetica Neue,Helvetica,Arial,Verdana,sans-serif":"Calibri","Cambria,Georgia,Times New Roman,Times,serif":"Cambria","Candara,Verdana,sans-serif":"Candara","Century Gothic,Apple Gothic,Verdana,sans-serif":"Century Gothic","Century Schoolbook,Georgia,Times New Roman,Times,serif":"Century Schoolbook","Consolas,Andale Mono,Monaco,Courier,Courier New,Verdana,sans-serif":"Consolas","Constantia,Georgia,Times New Roman,Times,serif":"Constantia","Corbel,Lucida Grande,Lucida Sans Unicode,Arial,sans-serif":"Corbel","Franklin Gothic Medium,Arial,sans-serif":"Franklin Gothic Medium","Garamond,Hoefler Text,Times New Roman,Times,serif":"Garamond","Gill Sans MT,Gill Sans,Calibri,Trebuchet MS,sans-serif":"Gill Sans MT","Helvetica Neue,Helvetica,Arial,sans-serif":"Helvetica Neue","Hoefler Text,Garamond,Times New Roman,Times,sans-serif":"Hoefler Text","Lucida Bright,Cambria,Georgia,Times New Roman,Times,serif":"Lucida Bright","Lucida Grande,Lucida Sans,Lucida Sans Unicode,sans-serif":"Lucida Grande","monospace":"monospace","Palatino Linotype,Palatino,Georgia,Times New Roman,Times,serif":"Palatino Linotype","Tahoma,Geneva,Verdana,sans-serif":"Tahoma","Rockwell, Arial Black, Arial Bold, Arial, sans-serif":"Rockwell"};
181
  var animation_efects={"none":"none","random":"random","bounce":"bounce","flash":"flash","pulse":"pulse","rubberBand":"rubberBand","shake":"shake","swing":"swing","tada":"tada","wobble":"wobble","bounceIn":"bounceIn","bounceInDown":"bounceInDown","bounceInLeft":"bounceInLeft","bounceInRight":"bounceInRight","bounceInUp":"bounceInUp","fadeIn":"fadeIn","fadeInDown":"fadeInDown","fadeInDownBig":"fadeInDownBig","fadeInLeft":"fadeInLeft","fadeInLeftBig":"fadeInLeftBig","fadeInRight":"fadeInRight","fadeInRightBig":"fadeInRightBig","fadeInUp":"fadeInUp","fadeInUpBig":"fadeInUpBig","flip":"flip","flipInX":"flipInX","flipInY":"flipInY","lightSpeedIn":"lightSpeedIn","rotateIn":"rotateIn","rotateInDownLeft":"rotateInDownLeft","rotateInDownRight":"rotateInDownRight","rotateInUpLeft":"rotateInUpLeft","rotateInUpRight":"rotateInUpRight","rollIn":"rollIn","zoomIn":"zoomIn","zoomInDown":"zoomInDown","zoomInLeft":"zoomInLeft","zoomInRight":"zoomInRight","zoomInUp":"zoomInUp"};
182
+ var hide_on_mobile_divace={"show":"Show","hide":"Hide"};
183
  if(props.attributes.countdown_experet_type=="time"){
184
  aditional_css_countdown_experet_date["display"]="none";
185
  }else{
193
  wpda_countdown_fields.push(wpda_countdown_lb_select_open_hide_params("countdown_experet_type",{"time":"Time","date":"Date"},["countdownday","countdown_experet_date"],"Countdown date picker type","Select the Countdown date picker type."));
194
  wpda_countdown_fields.push(wpda_countdown_lb_days_hourse_minutes("countdownday","countdownhour","countdownminute","Countdown expire time","Type the Countdown expire time.",false,aditional_css_for_countdownday));
195
  wpda_countdown_fields.push(wpda_countdown_lb_calendar_input("countdown_experet_date","Countdown expire date","Type the Countdown expire date.",false,aditional_css_countdown_experet_date));
196
+ wpda_countdown_fields.push(wpda_countdown_lb_simple_select("countdown_hide_on_mobile",hide_on_mobile_divace,"Show/Hide countdown on mobile devices","This option allow to show or hide countdown on mobile devices."));
197
  wpda_countdown_fields.push(wpda_countdown_lb_simple_select("countdownstart_on",{"hide":"Hide countdown","show_text":"Show text"},"After Countdown expire","Select the action you prefere after Countdown time expire.",false,{color:'red'}));
198
  wpda_countdown_fields.push(wpda_countdown_lb_simple_textarea("expeiret_text","Message after countdown expire","Type the message that will appear after countdown time expire."));
199
  wpda_countdown_fields.push(wpda_countdown_lb_simple_select("countdown_in_content_position",{"left":"Left","center":"Center","right":"Right"},"Countdown timer position","Select the Countdown Timer position."));
422
  shortcode_atributes = shortcode_atributes + ' countdown_end_type="' + props.attributes.countdown_experet_type + '"';
423
  shortcode_atributes = shortcode_atributes + ' end_date="' + end_date + '"';
424
  shortcode_atributes = shortcode_atributes + ' start_time="' + start_time + '"';
425
+ if(props.attributes.countdown_hide_on_mobile!=='showw') {
426
+ shortcode_atributes = shortcode_atributes + ' hide_on_mobile="' + props.attributes.countdown_hide_on_mobile + '"';
427
+ }
428
  shortcode_atributes = shortcode_atributes + ' end_time="' + props.attributes.countdownday + ',' + props.attributes.countdownhour + ',' + props.attributes.countdownminute +'"';
429
  shortcode_atributes = shortcode_atributes + ' action_end_time="' + props.attributes.countdownstart_on + '"';
430
  shortcode_atributes = shortcode_atributes + ' content_position="' + props.attributes.countdown_in_content_position + '"';
includes/gutenberg/style.css CHANGED
@@ -129,6 +129,8 @@
129
  }
130
  .wpda_simple_input_td fieldset{
131
  display: inline-block;
 
 
132
  }
133
  .wpda_simple_input_td .components-datetime__time .components-datetime__time-wrapper .components-datetime__time-field input[type=number] {
134
  width: 30px;
@@ -151,4 +153,9 @@
151
  text-align: center;
152
  height: 31px;
153
  vertical-align: middle;
 
 
 
 
 
154
  }
129
  }
130
  .wpda_simple_input_td fieldset{
131
  display: inline-block;
132
+ padding: 0px;
133
+ border: 0px
134
  }
135
  .wpda_simple_input_td .components-datetime__time .components-datetime__time-wrapper .components-datetime__time-field input[type=number] {
136
  width: 30px;
153
  text-align: center;
154
  height: 31px;
155
  vertical-align: middle;
156
+ }
157
+ .wpda_simple_input_time_small{
158
+ font-size: 12px;
159
+ position: relative;
160
+ left: 12px;
161
  }
includes/widget.php CHANGED
@@ -39,6 +39,7 @@ class wpdevart_countdown extends WP_Widget {
39
  $instance['text_for_hour'] = $new_instance['text_for_hour'];
40
  $instance['text_for_minut'] = $new_instance['text_for_minut'];
41
  $instance['text_for_second'] = $new_instance['text_for_second'];
 
42
  $instance['end_time_type'] = $new_instance['end_time_type'];
43
  $instance['end_time_date'] = $new_instance['end_time_date'];
44
  $instance['end_time'] = $new_instance['end_time'];
@@ -62,6 +63,7 @@ class wpdevart_countdown extends WP_Widget {
62
  'text_for_minut' => 'Minutes',
63
  'text_for_second' => 'Seconds',
64
  'start_time' => mktime (date("H"), date("i"), date("s"),date("n"), date("j"),date("Y")),
 
65
  'end_time_type' => 'time',
66
  'end_time' => '0,9,9',
67
  'end_time_date' => date('d-m-Y 23:59'),
@@ -134,6 +136,14 @@ class wpdevart_countdown extends WP_Widget {
134
  font-weight: bold;
135
  color: rgba(10, 154, 62, 1);
136
  }</style>
 
 
 
 
 
 
 
 
137
  <p class="experet_type">
138
  <label for="<?php echo $this->get_field_id('end_time_type'); ?>">Countdown date picker type :</label>
139
  <br>
@@ -150,15 +160,15 @@ class wpdevart_countdown extends WP_Widget {
150
  <p class="flb_field experet_type_time">
151
  <label>Countdown expire time :</label>
152
  <br>
153
- <span style="display:inline-block; margin-right:3px; width:55px;">
154
  <input onChange="insert_in_input();" type="text" placeholder="Day" class="countdownday" size="3" value="<?php echo $day_of_end ?>"/><small style="display:block">Day</small>
155
  </span>
156
 
157
- <span style="display:inline-block; width:55px;">
158
  <input onChange="insert_in_input();" type="text" placeholder="Hour" class="countdownhour" size="3" value="<?php echo $hour_of_end ?>"/><small>Hour</small>
159
  </span>
160
 
161
- <span style="display:inline-block; width:55px;">
162
  <input onChange="insert_in_input();" type="text" placeholder="Minute" class="countdownminute" size="3" value="<?php echo $minute_of_end ?>"/><small>Minute</small>
163
  </span>
164
  <script>function insert_in_input(){
@@ -315,7 +325,9 @@ class wpdevart_countdown extends WP_Widget {
315
  private function wpdevart_generete_front_end($parametrs){
316
  self::$id_for_content++;
317
  $output_html='';
318
-
 
 
319
  if(isset($parametrs['end_time_type']) && $parametrs['end_time_type']=='date'){
320
  $end_date=explode(' ',$parametrs['end_time_date']);
321
  $end_date_only_date=explode('-',$end_date[0]);
@@ -382,4 +394,3 @@ class wpdevart_countdown extends WP_Widget {
382
  return $output_html;
383
  }
384
  }
385
- add_action('widgets_init', create_function('', 'return register_widget("wpdevart_countdown");'));
39
  $instance['text_for_hour'] = $new_instance['text_for_hour'];
40
  $instance['text_for_minut'] = $new_instance['text_for_minut'];
41
  $instance['text_for_second'] = $new_instance['text_for_second'];
42
+ $instance['hide_on_mobile'] = $new_instance['hide_on_mobile'];
43
  $instance['end_time_type'] = $new_instance['end_time_type'];
44
  $instance['end_time_date'] = $new_instance['end_time_date'];
45
  $instance['end_time'] = $new_instance['end_time'];
63
  'text_for_minut' => 'Minutes',
64
  'text_for_second' => 'Seconds',
65
  'start_time' => mktime (date("H"), date("i"), date("s"),date("n"), date("j"),date("Y")),
66
+ 'hide_on_mobile' => 'show',
67
  'end_time_type' => 'time',
68
  'end_time' => '0,9,9',
69
  'end_time_date' => date('d-m-Y 23:59'),
136
  font-weight: bold;
137
  color: rgba(10, 154, 62, 1);
138
  }</style>
139
+ <p class="experet_type">
140
+ <label for="<?php echo $this->get_field_id('end_time_type'); ?>">Show/Hide countdown on mobile devices</label>
141
+ <br>
142
+ <select class="show_hide_experet_type" id="<?php echo $this->get_field_id('end_time_type'); ?>" name="<?php echo $this->get_field_name('hide_on_mobile'); ?>">
143
+ <option <?php selected('show',$instance['hide_on_mobile']) ?> value="show">Show</option>
144
+ <option <?php selected('hide',$instance['hide_on_mobile']) ?> value="hide">Hide</option>
145
+ </select>
146
+ </p>
147
  <p class="experet_type">
148
  <label for="<?php echo $this->get_field_id('end_time_type'); ?>">Countdown date picker type :</label>
149
  <br>
160
  <p class="flb_field experet_type_time">
161
  <label>Countdown expire time :</label>
162
  <br>
163
+ <span style="display:inline-block; margin-right:3px; width:70px; float: left;">
164
  <input onChange="insert_in_input();" type="text" placeholder="Day" class="countdownday" size="3" value="<?php echo $day_of_end ?>"/><small style="display:block">Day</small>
165
  </span>
166
 
167
+ <span style="display:inline-block; width:72px; float: left;">
168
  <input onChange="insert_in_input();" type="text" placeholder="Hour" class="countdownhour" size="3" value="<?php echo $hour_of_end ?>"/><small>Hour</small>
169
  </span>
170
 
171
+ <span style="display:inline-block; width:70px;">
172
  <input onChange="insert_in_input();" type="text" placeholder="Minute" class="countdownminute" size="3" value="<?php echo $minute_of_end ?>"/><small>Minute</small>
173
  </span>
174
  <script>function insert_in_input(){
325
  private function wpdevart_generete_front_end($parametrs){
326
  self::$id_for_content++;
327
  $output_html='';
328
+ if($parametrs['hide_on_mobile']=="hidee" && wp_is_mobile()){
329
+ return "";
330
+ }
331
  if(isset($parametrs['end_time_type']) && $parametrs['end_time_type']=='date'){
332
  $end_date=explode(' ',$parametrs['end_time_date']);
333
  $end_date_only_date=explode('-',$end_date[0]);
394
  return $output_html;
395
  }
396
  }
 
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: wpdevart
3
  Donate link: http://wpdevart.com/wordpress-countdown-plugin
4
  Tags: countdown, countdown widget, countdown timer, countdown system, countdown generator
5
  Requires at least: 3.3.0
6
- Tested up to: 5.2.4
7
- Stable tag: 2.0.9
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -478,6 +478,10 @@ Yes dear users, you need to pay only one time for pro version, it's lifetime pla
478
 
479
  * Change featured plugin information.
480
 
 
 
 
 
481
  == Step by step guide ==
482
 
483
  ### Options
3
  Donate link: http://wpdevart.com/wordpress-countdown-plugin
4
  Tags: countdown, countdown widget, countdown timer, countdown system, countdown generator
5
  Requires at least: 3.3.0
6
+ Tested up to: 5.3
7
+ Stable tag: 2.1.0
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
478
 
479
  * Change featured plugin information.
480
 
481
+ = 2.1.0 =
482
+
483
+ * Added new option for mobile devices.
484
+
485
  == Step by step guide ==
486
 
487
  ### Options
wpdevart-countdown.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Countdown Wpdevart
4
  Plugin URI: http://wpdevart.com/wordpress-countdown-plugin/
5
  Description: Countdown plugin is an nice tool to create and insert countdown timers into your posts/pages and widgets .
6
- Version: 2.0.9
7
  Author: wpdevart
8
  Author URI: http://wpdevart.com
9
  License: GPL3 http://www.gnu.org/licenses/gpl-3.0.html
@@ -76,12 +76,17 @@ class wpdevart_countdown_main{
76
  wp_register_style('wpda_countdown_gutenberg_css',$this->wpdevart_countdown_plugin_url.'includes/gutenberg/style.css');
77
 
78
  }
79
-
 
 
 
 
80
  /*###################### Call base filters function ##################*/
81
 
82
  public function call_base_filters(){
83
  add_action( 'init', array($this,'registr_requeried_scripts') );
84
  add_action( 'admin_head', array($this,'include_requeried_scripts') );
 
85
  //for_upgrade
86
  add_filter( 'plugin_action_links_' . plugin_basename(__FILE__), array($this,'plugin_activate_sublink') );
87
  }
3
  Plugin Name: Countdown Wpdevart
4
  Plugin URI: http://wpdevart.com/wordpress-countdown-plugin/
5
  Description: Countdown plugin is an nice tool to create and insert countdown timers into your posts/pages and widgets .
6
+ Version: 2.1.0
7
  Author: wpdevart
8
  Author URI: http://wpdevart.com
9
  License: GPL3 http://www.gnu.org/licenses/gpl-3.0.html
76
  wp_register_style('wpda_countdown_gutenberg_css',$this->wpdevart_countdown_plugin_url.'includes/gutenberg/style.css');
77
 
78
  }
79
+ /*###################### registr widget ##################*/
80
+
81
+ public function register_widget(){
82
+ return register_widget("wpdevart_countdown");
83
+ }
84
  /*###################### Call base filters function ##################*/
85
 
86
  public function call_base_filters(){
87
  add_action( 'init', array($this,'registr_requeried_scripts') );
88
  add_action( 'admin_head', array($this,'include_requeried_scripts') );
89
+ add_action('widgets_init', array($this, 'register_widget'));
90
  //for_upgrade
91
  add_filter( 'plugin_action_links_' . plugin_basename(__FILE__), array($this,'plugin_activate_sublink') );
92
  }