WPFront Scroll Top - Version 2.0.7

Version Description

  • XSS fix. Thanks to 'Vlad Visse'.
Download this release

Release Info

Developer syammohanm
Plugin Icon 128x128 WPFront Scroll Top
Version 2.0.7
Comparing to
See all releases

Code changes from version 2.0.6 to 2.0.7

classes/class-wpfront-scroll-top-options.php CHANGED
@@ -58,7 +58,7 @@ class WPFront_Scroll_Top_Options extends WPFront_Options_Base_ST {
58
  $this->addOption('hide_iframe', 'bit', FALSE)->label(__('Hide on iframes', 'wpfront-scroll-top'));
59
 
60
  $this->addOption('button_action', 'string', 'top', array($this, 'validate_button_action'))->label(__('Button Action', 'wpfront-scroll-top'));
61
- $this->addOption('button_action_page_url', 'string', '')->label(__('Page URL', 'wpfront-scroll-top'));
62
  $this->addOption('button_action_element_selector', 'string', '')->label(__('Element CSS Selector', 'wpfront-scroll-top'));
63
  $this->addOption('button_action_container_selector', 'string', 'html, body', array($this, 'button_action_container_selector'))->label(__('Scroll Container CSS Selector', 'wpfront-scroll-top'));
64
  $this->addOption('button_action_element_offset', 'int', 0)->label(__('Offset', 'wpfront-scroll-top'));
@@ -70,11 +70,11 @@ class WPFront_Scroll_Top_Options extends WPFront_Options_Base_ST {
70
  $this->addOption('text_button_text', 'string', '')->label(__('Text', 'wpfront-scroll-top'));
71
  $this->addOption('text_button_text_color', 'string', '#ffffff', array($this, 'validate_color'))->label(__('Text Color', 'wpfront-scroll-top'));
72
  $this->addOption('text_button_background_color', 'string', '#000000', array($this, 'validate_color'))->label(__('Background Color', 'wpfront-scroll-top'));
73
- $this->addOption('text_button_hover_color', 'string', '', array($this, 'validate_color'))->label(__('Mouse Over Color', 'wpfront-scroll-top'));
74
  $this->addOption('text_button_css', 'string', '')->label(__('Custom CSS', 'wpfront-scroll-top'));
75
 
76
  $this->addOption('fa_button_class', 'string', '')->label(__('Icon Class', 'wpfront-scroll-top'));
77
- $this->addOption('fa_button_URL', 'string', '')->label(__('Font Awesome URL', 'wpfront-scroll-top'));
78
  $this->addOption('fa_button_exclude_URL', 'bit', FALSE)->label(__('Do not include URL', 'wpfront-scroll-top'));
79
  $this->addOption('fa_button_text_color', 'string', '#000000', array($this, 'validate_color'))->label(__('Icon Color', 'wpfront-scroll-top'));
80
  $this->addOption('fa_button_css', 'string', '')->label(__('Custom CSS', 'wpfront-scroll-top'));
@@ -84,7 +84,7 @@ class WPFront_Scroll_Top_Options extends WPFront_Options_Base_ST {
84
  $this->addOption('exclude_pages', 'string', '');
85
 
86
  $this->addOption('image', 'string', '1.png');
87
- $this->addOption('custom_url', 'string', '');
88
 
89
  $this->addOption('attach_on_shutdown', 'bit', false)->label(__('Attach on Shutdown', 'wpfront-scroll-top'));
90
  }
@@ -164,12 +164,11 @@ class WPFront_Scroll_Top_Options extends WPFront_Options_Base_ST {
164
  }
165
 
166
  protected function validate_color($arg) {
167
- if (strlen($arg) != 7)
168
- return '#ffffff';
169
 
170
- if (strpos($arg, '#') != 0)
171
  return '#ffffff';
172
-
173
  return $arg;
174
  }
175
 
@@ -192,4 +191,16 @@ class WPFront_Scroll_Top_Options extends WPFront_Options_Base_ST {
192
  return $args;
193
  }
194
 
 
 
 
 
 
 
 
 
 
 
 
 
195
  }
58
  $this->addOption('hide_iframe', 'bit', FALSE)->label(__('Hide on iframes', 'wpfront-scroll-top'));
59
 
60
  $this->addOption('button_action', 'string', 'top', array($this, 'validate_button_action'))->label(__('Button Action', 'wpfront-scroll-top'));
61
+ $this->addOption('button_action_page_url', 'string', '', array($this, 'validate_page_url'))->label(__('Page URL', 'wpfront-scroll-top'));
62
  $this->addOption('button_action_element_selector', 'string', '')->label(__('Element CSS Selector', 'wpfront-scroll-top'));
63
  $this->addOption('button_action_container_selector', 'string', 'html, body', array($this, 'button_action_container_selector'))->label(__('Scroll Container CSS Selector', 'wpfront-scroll-top'));
64
  $this->addOption('button_action_element_offset', 'int', 0)->label(__('Offset', 'wpfront-scroll-top'));
70
  $this->addOption('text_button_text', 'string', '')->label(__('Text', 'wpfront-scroll-top'));
71
  $this->addOption('text_button_text_color', 'string', '#ffffff', array($this, 'validate_color'))->label(__('Text Color', 'wpfront-scroll-top'));
72
  $this->addOption('text_button_background_color', 'string', '#000000', array($this, 'validate_color'))->label(__('Background Color', 'wpfront-scroll-top'));
73
+ $this->addOption('text_button_hover_color', 'string', '#000000', array($this, 'validate_color'))->label(__('Mouse Over Color', 'wpfront-scroll-top'));
74
  $this->addOption('text_button_css', 'string', '')->label(__('Custom CSS', 'wpfront-scroll-top'));
75
 
76
  $this->addOption('fa_button_class', 'string', '')->label(__('Icon Class', 'wpfront-scroll-top'));
77
+ $this->addOption('fa_button_URL', 'string', '', array($this, 'validate_font_awesome_url'))->label(__('Font Awesome URL', 'wpfront-scroll-top'));
78
  $this->addOption('fa_button_exclude_URL', 'bit', FALSE)->label(__('Do not include URL', 'wpfront-scroll-top'));
79
  $this->addOption('fa_button_text_color', 'string', '#000000', array($this, 'validate_color'))->label(__('Icon Color', 'wpfront-scroll-top'));
80
  $this->addOption('fa_button_css', 'string', '')->label(__('Custom CSS', 'wpfront-scroll-top'));
84
  $this->addOption('exclude_pages', 'string', '');
85
 
86
  $this->addOption('image', 'string', '1.png');
87
+ $this->addOption('custom_url', 'string', '', array($this, 'validate_custom_url'));
88
 
89
  $this->addOption('attach_on_shutdown', 'bit', false)->label(__('Attach on Shutdown', 'wpfront-scroll-top'));
90
  }
164
  }
165
 
166
  protected function validate_color($arg) {
167
+ $arg = sanitize_hex_color($arg);
 
168
 
169
+ if (empty($arg)) {
170
  return '#ffffff';
171
+ }
172
  return $arg;
173
  }
174
 
191
  return $args;
192
  }
193
 
194
+ protected function validate_page_url($arg) {
195
+ return esc_url_raw($arg);
196
+ }
197
+
198
+ protected function validate_font_awesome_url($arg) {
199
+ return esc_url_raw($arg);
200
+ }
201
+
202
+ protected function validate_custom_url($arg) {
203
+ return esc_url_raw($arg);
204
+ }
205
+
206
  }
classes/class-wpfront-scroll-top.php CHANGED
@@ -37,7 +37,7 @@ require_once(dirname(__DIR__) . '/templates/options-template.php');
37
  class WPFront_Scroll_Top {
38
 
39
  //Constants
40
- const VERSION = '2.0.6.07225';
41
  const OPTIONS_GROUP_NAME = 'wpfront-scroll-top-options-group';
42
  const OPTION_NAME = 'wpfront-scroll-top-options';
43
  const PLUGIN_SLUG = 'wpfront-scroll-top';
@@ -163,7 +163,7 @@ class WPFront_Scroll_Top {
163
  $url = trim($this->options->fa_button_URL());
164
  $ver = FALSE;
165
  if (empty($url)) {
166
- $url = '//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css';
167
  $ver = '4.7.0';
168
  }
169
  wp_enqueue_style('font-awesome', $url, array(), $ver);
37
  class WPFront_Scroll_Top {
38
 
39
  //Constants
40
+ const VERSION = '2.0.7.08086';
41
  const OPTIONS_GROUP_NAME = 'wpfront-scroll-top-options-group';
42
  const OPTION_NAME = 'wpfront-scroll-top-options';
43
  const PLUGIN_SLUG = 'wpfront-scroll-top';
163
  $url = trim($this->options->fa_button_URL());
164
  $ver = FALSE;
165
  if (empty($url)) {
166
+ $url = 'https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css';
167
  $ver = '4.7.0';
168
  }
169
  wp_enqueue_style('font-awesome', $url, array(), $ver);
readme.txt CHANGED
@@ -3,9 +3,9 @@ Contributors: syammohanm
3
  Donate link: http://wpfront.com/donate/
4
  Tags: scroll to top, back to top, scroll top, scroll up, wordpress scroll top
5
  Requires at least: 5.0
6
- Tested up to: 5.8
7
  Requires PHP: 5.3
8
- Stable tag: 2.0.6
9
  License: GPLv3
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
 
@@ -53,6 +53,9 @@ Visit [WPFront Scroll Top FAQ](http://wpfront.com/scroll-top-plugin-faq/) page f
53
 
54
  == Changelog ==
55
 
 
 
 
56
  = 2.0.6 =
57
  * XSS fix. Thanks to 'Asif Nawaz Minhas'.
58
 
@@ -145,6 +148,9 @@ Visit [WPFront Scroll Top FAQ](http://wpfront.com/scroll-top-plugin-faq/) page f
145
 
146
  == Upgrade Notice ==
147
 
 
 
 
148
  = 2.0.6 =
149
  * XSS fix.
150
 
3
  Donate link: http://wpfront.com/donate/
4
  Tags: scroll to top, back to top, scroll top, scroll up, wordpress scroll top
5
  Requires at least: 5.0
6
+ Tested up to: 6.1
7
  Requires PHP: 5.3
8
+ Stable tag: 2.0.7
9
  License: GPLv3
10
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
11
 
53
 
54
  == Changelog ==
55
 
56
+ = 2.0.7 =
57
+ * XSS fix. Thanks to 'Vlad Visse'.
58
+
59
  = 2.0.6 =
60
  * XSS fix. Thanks to 'Asif Nawaz Minhas'.
61
 
148
 
149
  == Upgrade Notice ==
150
 
151
+ = 2.0.7 =
152
+ * XSS fix.
153
+
154
  = 2.0.6 =
155
  * XSS fix.
156
 
templates/options-template.php CHANGED
@@ -132,7 +132,7 @@ class WPFront_Scroll_Top_Options_View {
132
  <?php echo $this->options->scroll_offset_label(); ?>
133
  </th>
134
  <td>
135
- <input class="pixels" name="<?php echo $this->options->scroll_offset_name(); ?>" value="<?php echo $this->options->scroll_offset(); ?>" />px
136
  <span class="description"><?php echo __('[Number of pixels to be scrolled before the button appears.]', 'wpfront-scroll-top'); ?></span>
137
  </td>
138
  </tr>
@@ -146,9 +146,9 @@ class WPFront_Scroll_Top_Options_View {
146
  <?php echo __('Button Size', 'wpfront-scroll-top'); ?>
147
  </th>
148
  <td>
149
- <input class="pixels" name="<?php echo $this->options->button_width_name(); ?>" value="<?php echo $this->options->button_width(); ?>" />px
150
  X
151
- <input class="pixels" name="<?php echo $this->options->button_height_name(); ?>" value="<?php echo $this->options->button_height(); ?>" />px
152
  <span class="description"><?php echo __('[Set 0px to auto fit.]', 'wpfront-scroll-top'); ?></span>
153
  </td>
154
  </tr>
@@ -162,7 +162,7 @@ class WPFront_Scroll_Top_Options_View {
162
  <?php echo $this->options->button_opacity_label(); ?>
163
  </th>
164
  <td>
165
- <input class="seconds" name="<?php echo $this->options->button_opacity_name(); ?>" value="<?php echo $this->options->button_opacity(); ?>" />%
166
  </td>
167
  </tr>
168
  <?php
@@ -175,7 +175,7 @@ class WPFront_Scroll_Top_Options_View {
175
  <?php echo $this->options->button_fade_duration_label(); ?>
176
  </th>
177
  <td>
178
- <input class="seconds" name="<?php echo $this->options->button_fade_duration_name(); ?>" value="<?php echo $this->options->button_fade_duration(); ?>" />ms
179
  <span class="description"><?php echo __('[Button fade duration in milliseconds.]', 'wpfront-scroll-top'); ?></span>
180
  </td>
181
  </tr>
@@ -189,7 +189,7 @@ class WPFront_Scroll_Top_Options_View {
189
  <?php echo $this->options->scroll_duration_label(); ?>
190
  </th>
191
  <td>
192
- <input class="seconds" name="<?php echo $this->options->scroll_duration_name(); ?>" value="<?php echo $this->options->scroll_duration(); ?>" />ms
193
  <span class="description"><?php echo __('[Window scroll duration in milliseconds.]', 'wpfront-scroll-top'); ?></span>
194
  </td>
195
  </tr>
@@ -216,7 +216,7 @@ class WPFront_Scroll_Top_Options_View {
216
  <?php echo $this->options->auto_hide_after_label(); ?>
217
  </th>
218
  <td>
219
- <input class="seconds" name="<?php echo $this->options->auto_hide_after_name(); ?>" value="<?php echo $this->options->auto_hide_after(); ?>" />sec
220
  <span class="description"><?php echo __('[Button will be auto hidden after this duration in seconds, if enabled.]', 'wpfront-scroll-top'); ?></span>
221
  </td>
222
  </tr>
@@ -244,7 +244,7 @@ class WPFront_Scroll_Top_Options_View {
244
  <?php echo $this->options->small_device_width_label(); ?>
245
  </th>
246
  <td>
247
- <input class="pixels" name="<?php echo $this->options->small_device_width_name(); ?>" value="<?php echo $this->options->small_device_width(); ?>" />px
248
  <span class="description"><?php echo __('[Button will be hidden on devices with lesser or equal width.]', 'wpfront-scroll-top'); ?></span>
249
  </td>
250
  </tr>
@@ -272,7 +272,7 @@ class WPFront_Scroll_Top_Options_View {
272
  <?php echo $this->options->small_window_width_label(); ?>
273
  </th>
274
  <td>
275
- <input class="pixels" name="<?php echo $this->options->small_window_width_name(); ?>" value="<?php echo $this->options->small_window_width(); ?>" />px
276
  <span class="description"><?php echo __('[Button will be hidden on browser window with lesser or equal width.]', 'wpfront-scroll-top'); ?></span>
277
  </td>
278
  </tr>
@@ -355,17 +355,17 @@ class WPFront_Scroll_Top_Options_View {
355
  <div>
356
  <span><input class="alignment-holder" type="radio"/></span>
357
  <span class="sub-label"><?php echo $this->options->button_action_element_selector_label() . ':&nbsp;'; ?></span>
358
- <span><input name="<?php echo $this->options->button_action_element_selector_name(); ?>" value="<?php echo $this->options->button_action_element_selector(); ?>" /> <span class="description"><?php echo __('[CSS selector of the element, you are trying to scroll to. Ex: #myDivID, .myDivClass]', 'wpfront-scroll-top'); ?></span></span>
359
  </div>
360
  <div>
361
  <span><input class="alignment-holder" type="radio"/></span>
362
  <span class="sub-label"><?php echo $this->options->button_action_container_selector_label() . ':&nbsp;'; ?></span>
363
- <span><input name="<?php echo $this->options->button_action_container_selector_name(); ?>" value="<?php echo $this->options->button_action_container_selector(); ?>" /> <span class="description"><?php echo __('[CSS selector of the element, which has the scroll bar. "html, body" works in almost all cases.]', 'wpfront-scroll-top'); ?></span></span>
364
  </div>
365
  <div>
366
  <span><input class="alignment-holder" type="radio"/></span>
367
  <span class="sub-label"><?php echo $this->options->button_action_element_offset_label() . ':&nbsp;'; ?></span>
368
- <span><input class="pixels" name="<?php echo $this->options->button_action_element_offset_name(); ?>" value="<?php echo $this->options->button_action_element_offset(); ?>" />px <span class="description"><?php echo __('[Negative value allowed. Use this filed to precisely set scroll position. Useful when you have overlapping elements.]', 'wpfront-scroll-top'); ?></span></span>
369
  </div>
370
  <div>
371
  <span><input class="alignment-holder" type="radio"/></span>
@@ -378,7 +378,7 @@ class WPFront_Scroll_Top_Options_View {
378
  <div>
379
  <span><input class="alignment-holder" type="radio"/></span>
380
  <span class="sub-label"><?php echo $this->options->button_action_page_url_label() . ':&nbsp;'; ?></span>
381
- <span class="url"><input class="url" name="<?php echo $this->options->button_action_page_url_name(); ?>" value="<?php echo $this->options->button_action_page_url(); ?>" /></span>
382
  </div>
383
  </div>
384
  </div>
@@ -425,7 +425,7 @@ class WPFront_Scroll_Top_Options_View {
425
  <?php echo $this->options->marginX_label(); ?>
426
  </th>
427
  <td>
428
- <input class="pixels" name="<?php echo $this->options->marginX_name(); ?>" value="<?php echo $this->options->marginX(); ?>" />px
429
  <span class="description"><?php echo __('[Negative value allowed.]', 'wpfront-scroll-top'); ?></span>
430
  </td>
431
  </tr>
@@ -440,7 +440,7 @@ class WPFront_Scroll_Top_Options_View {
440
  <?php echo $this->options->marginY_label(); ?>
441
  </th>
442
  <td>
443
- <input class="pixels" name="<?php echo $this->options->marginY_name(); ?>" value="<?php echo $this->options->marginY(); ?>" />px
444
  <span class="description"><?php echo __('[Negative value allowed.]', 'wpfront-scroll-top'); ?></span>
445
  </td>
446
  </tr>
@@ -475,7 +475,7 @@ class WPFront_Scroll_Top_Options_View {
475
  <span><?php echo __('Include in following pages', 'wpfront-scroll-top'); ?></span>&#160;<span class="description"><?php echo __('[Use the textbox below to specify the post IDs as a comma separated list.]', 'wpfront-scroll-top'); ?></span>
476
  </label>
477
  <br />
478
- <input class="post-id-list" name="<?php echo $this->options->include_pages_name(); ?>" value="<?php echo $this->options->include_pages(); ?>" />
479
  <div class="pages-selection">
480
  <?php
481
  $objects = $this->controller->get_filter_objects();
@@ -496,7 +496,7 @@ class WPFront_Scroll_Top_Options_View {
496
  <span><?php echo __('Exclude in following pages', 'wpfront-scroll-top'); ?></span>&#160;<span class="description"><?php echo __('[Use the textbox below to specify the post IDs as a comma separated list.]', 'wpfront-scroll-top'); ?></span>
497
  </label>
498
  <br />
499
- <input class="post-id-list" name="<?php echo $this->options->exclude_pages_name(); ?>" value="<?php echo $this->options->exclude_pages(); ?>" />
500
  <div class="pages-selection">
501
  <?php
502
  $objects = $this->controller->get_filter_objects();
@@ -539,7 +539,7 @@ class WPFront_Scroll_Top_Options_View {
539
  <?php echo $this->options->text_button_text_label(); ?>
540
  </th>
541
  <td>
542
- <input name="<?php echo $this->options->text_button_text_name(); ?>" value="<?php echo $this->options->text_button_text(); ?>" />
543
  </td>
544
  </tr>
545
  <?php
@@ -554,7 +554,7 @@ class WPFront_Scroll_Top_Options_View {
554
  <td>
555
  <div class="color-selector-div">
556
  <div class="color-selector" id="color-selector[text_button_text_color]" color="<?php echo $this->options->text_button_text_color(); ?>"></div>&#160;
557
- <input type="text" class="color-selector-input" name="<?php echo $this->options->text_button_text_color_name(); ?>" value="<?php echo $this->options->text_button_text_color(); ?>" />
558
  </div>
559
  </td>
560
  </tr>
@@ -570,7 +570,7 @@ class WPFront_Scroll_Top_Options_View {
570
  <td>
571
  <div class="color-selector-div">
572
  <div class="color-selector" id="color-selector[text_button_background_color]" color="<?php echo $this->options->text_button_background_color(); ?>"></div>&#160;
573
- <input type="text" class="color-selector-input" name="<?php echo $this->options->text_button_background_color_name(); ?>" value="<?php echo $this->options->text_button_background_color(); ?>" />
574
  </div>
575
  </td>
576
  </tr>
@@ -586,7 +586,7 @@ class WPFront_Scroll_Top_Options_View {
586
  <td>
587
  <div class="color-selector-div">
588
  <div class="color-selector" id="color-selector[text_button_hover_color]" color="<?php echo $this->options->text_button_hover_color(); ?>"></div>&#160;
589
- <input type="text" class="color-selector-input" name="<?php echo $this->options->text_button_hover_color_name(); ?>" value="<?php echo $this->options->text_button_hover_color(); ?>" />
590
  </div>
591
  </td>
592
  </tr>
@@ -630,7 +630,7 @@ class WPFront_Scroll_Top_Options_View {
630
  <?php echo $this->options->fa_button_class_label(); ?>
631
  </th>
632
  <td>
633
- <input class="regular-text" name="<?php echo $this->options->fa_button_class_name(); ?>" value="<?php echo $this->options->fa_button_class(); ?>" />
634
  <span class="description"><?php echo '[' . __('ex:', 'wpfront-scroll-top') . ' fa fa-arrow-circle-up fa-5x]'; ?></span>
635
  </td>
636
  </tr>
@@ -644,7 +644,7 @@ class WPFront_Scroll_Top_Options_View {
644
  <?php echo $this->options->fa_button_URL_label(); ?>
645
  </th>
646
  <td>
647
- <input class="url" name="<?php echo $this->options->fa_button_URL_name(); ?>" value="<?php echo $this->options->fa_button_URL(); ?>" />
648
  <br />
649
  <span class="description"><?php echo '[Leave blank to use BootstrapCDN URL by MaxCDN. Otherwise specify the URL you want to use.]'; ?></span>
650
  </td>
@@ -675,7 +675,7 @@ class WPFront_Scroll_Top_Options_View {
675
  <td>
676
  <div class="color-selector-div">
677
  <div class="color-selector" id="color-selector[fa_button_text_color]" color="<?php echo $this->options->fa_button_text_color(); ?>"></div>&#160;
678
- <input type="text" class="color-selector-input" name="<?php echo $this->options->fa_button_text_color_name(); ?>" value="<?php echo $this->options->fa_button_text_color(); ?>" />
679
  </div>
680
  </td>
681
  </tr>
132
  <?php echo $this->options->scroll_offset_label(); ?>
133
  </th>
134
  <td>
135
+ <input class="pixels" name="<?php echo $this->options->scroll_offset_name(); ?>" value="<?php echo esc_attr($this->options->scroll_offset()); ?>" />px
136
  <span class="description"><?php echo __('[Number of pixels to be scrolled before the button appears.]', 'wpfront-scroll-top'); ?></span>
137
  </td>
138
  </tr>
146
  <?php echo __('Button Size', 'wpfront-scroll-top'); ?>
147
  </th>
148
  <td>
149
+ <input class="pixels" name="<?php echo $this->options->button_width_name(); ?>" value="<?php echo esc_attr($this->options->button_width()); ?>" />px
150
  X
151
+ <input class="pixels" name="<?php echo $this->options->button_height_name(); ?>" value="<?php echo esc_attr($this->options->button_height()); ?>" />px
152
  <span class="description"><?php echo __('[Set 0px to auto fit.]', 'wpfront-scroll-top'); ?></span>
153
  </td>
154
  </tr>
162
  <?php echo $this->options->button_opacity_label(); ?>
163
  </th>
164
  <td>
165
+ <input class="seconds" name="<?php echo $this->options->button_opacity_name(); ?>" value="<?php echo esc_attr($this->options->button_opacity()); ?>" />%
166
  </td>
167
  </tr>
168
  <?php
175
  <?php echo $this->options->button_fade_duration_label(); ?>
176
  </th>
177
  <td>
178
+ <input class="seconds" name="<?php echo $this->options->button_fade_duration_name(); ?>" value="<?php echo esc_attr($this->options->button_fade_duration()); ?>" />ms
179
  <span class="description"><?php echo __('[Button fade duration in milliseconds.]', 'wpfront-scroll-top'); ?></span>
180
  </td>
181
  </tr>
189
  <?php echo $this->options->scroll_duration_label(); ?>
190
  </th>
191
  <td>
192
+ <input class="seconds" name="<?php echo $this->options->scroll_duration_name(); ?>" value="<?php echo esc_attr($this->options->scroll_duration()); ?>" />ms
193
  <span class="description"><?php echo __('[Window scroll duration in milliseconds.]', 'wpfront-scroll-top'); ?></span>
194
  </td>
195
  </tr>
216
  <?php echo $this->options->auto_hide_after_label(); ?>
217
  </th>
218
  <td>
219
+ <input class="seconds" name="<?php echo $this->options->auto_hide_after_name(); ?>" value="<?php echo esc_attr($this->options->auto_hide_after()); ?>" />sec
220
  <span class="description"><?php echo __('[Button will be auto hidden after this duration in seconds, if enabled.]', 'wpfront-scroll-top'); ?></span>
221
  </td>
222
  </tr>
244
  <?php echo $this->options->small_device_width_label(); ?>
245
  </th>
246
  <td>
247
+ <input class="pixels" name="<?php echo $this->options->small_device_width_name(); ?>" value="<?php echo esc_attr($this->options->small_device_width()); ?>" />px
248
  <span class="description"><?php echo __('[Button will be hidden on devices with lesser or equal width.]', 'wpfront-scroll-top'); ?></span>
249
  </td>
250
  </tr>
272
  <?php echo $this->options->small_window_width_label(); ?>
273
  </th>
274
  <td>
275
+ <input class="pixels" name="<?php echo $this->options->small_window_width_name(); ?>" value="<?php echo esc_attr($this->options->small_window_width()); ?>" />px
276
  <span class="description"><?php echo __('[Button will be hidden on browser window with lesser or equal width.]', 'wpfront-scroll-top'); ?></span>
277
  </td>
278
  </tr>
355
  <div>
356
  <span><input class="alignment-holder" type="radio"/></span>
357
  <span class="sub-label"><?php echo $this->options->button_action_element_selector_label() . ':&nbsp;'; ?></span>
358
+ <span><input name="<?php echo $this->options->button_action_element_selector_name(); ?>" value="<?php echo esc_attr($this->options->button_action_element_selector()); ?>" /> <span class="description"><?php echo __('[CSS selector of the element, you are trying to scroll to. Ex: #myDivID, .myDivClass]', 'wpfront-scroll-top'); ?></span></span>
359
  </div>
360
  <div>
361
  <span><input class="alignment-holder" type="radio"/></span>
362
  <span class="sub-label"><?php echo $this->options->button_action_container_selector_label() . ':&nbsp;'; ?></span>
363
+ <span><input name="<?php echo $this->options->button_action_container_selector_name(); ?>" value="<?php echo esc_attr($this->options->button_action_container_selector()); ?>" /> <span class="description"><?php echo __('[CSS selector of the element, which has the scroll bar. "html, body" works in almost all cases.]', 'wpfront-scroll-top'); ?></span></span>
364
  </div>
365
  <div>
366
  <span><input class="alignment-holder" type="radio"/></span>
367
  <span class="sub-label"><?php echo $this->options->button_action_element_offset_label() . ':&nbsp;'; ?></span>
368
+ <span><input class="pixels" name="<?php echo $this->options->button_action_element_offset_name(); ?>" value="<?php echo esc_attr($this->options->button_action_element_offset()); ?>" />px <span class="description"><?php echo __('[Negative value allowed. Use this filed to precisely set scroll position. Useful when you have overlapping elements.]', 'wpfront-scroll-top'); ?></span></span>
369
  </div>
370
  <div>
371
  <span><input class="alignment-holder" type="radio"/></span>
378
  <div>
379
  <span><input class="alignment-holder" type="radio"/></span>
380
  <span class="sub-label"><?php echo $this->options->button_action_page_url_label() . ':&nbsp;'; ?></span>
381
+ <span class="url"><input class="url" name="<?php echo $this->options->button_action_page_url_name(); ?>" value="<?php echo esc_attr($this->options->button_action_page_url()); ?>" /></span>
382
  </div>
383
  </div>
384
  </div>
425
  <?php echo $this->options->marginX_label(); ?>
426
  </th>
427
  <td>
428
+ <input class="pixels" name="<?php echo $this->options->marginX_name(); ?>" value="<?php echo esc_attr($this->options->marginX()); ?>" />px
429
  <span class="description"><?php echo __('[Negative value allowed.]', 'wpfront-scroll-top'); ?></span>
430
  </td>
431
  </tr>
440
  <?php echo $this->options->marginY_label(); ?>
441
  </th>
442
  <td>
443
+ <input class="pixels" name="<?php echo $this->options->marginY_name(); ?>" value="<?php echo esc_attr($this->options->marginY()); ?>" />px
444
  <span class="description"><?php echo __('[Negative value allowed.]', 'wpfront-scroll-top'); ?></span>
445
  </td>
446
  </tr>
475
  <span><?php echo __('Include in following pages', 'wpfront-scroll-top'); ?></span>&#160;<span class="description"><?php echo __('[Use the textbox below to specify the post IDs as a comma separated list.]', 'wpfront-scroll-top'); ?></span>
476
  </label>
477
  <br />
478
+ <input class="post-id-list" name="<?php echo $this->options->include_pages_name(); ?>" value="<?php echo esc_attr($this->options->include_pages()); ?>" />
479
  <div class="pages-selection">
480
  <?php
481
  $objects = $this->controller->get_filter_objects();
496
  <span><?php echo __('Exclude in following pages', 'wpfront-scroll-top'); ?></span>&#160;<span class="description"><?php echo __('[Use the textbox below to specify the post IDs as a comma separated list.]', 'wpfront-scroll-top'); ?></span>
497
  </label>
498
  <br />
499
+ <input class="post-id-list" name="<?php echo $this->options->exclude_pages_name(); ?>" value="<?php echo esc_attr($this->options->exclude_pages()); ?>" />
500
  <div class="pages-selection">
501
  <?php
502
  $objects = $this->controller->get_filter_objects();
539
  <?php echo $this->options->text_button_text_label(); ?>
540
  </th>
541
  <td>
542
+ <input name="<?php echo $this->options->text_button_text_name(); ?>" value="<?php echo esc_attr($this->options->text_button_text()); ?>" />
543
  </td>
544
  </tr>
545
  <?php
554
  <td>
555
  <div class="color-selector-div">
556
  <div class="color-selector" id="color-selector[text_button_text_color]" color="<?php echo $this->options->text_button_text_color(); ?>"></div>&#160;
557
+ <input type="text" class="color-selector-input" name="<?php echo $this->options->text_button_text_color_name(); ?>" value="<?php echo esc_attr($this->options->text_button_text_color()); ?>" />
558
  </div>
559
  </td>
560
  </tr>
570
  <td>
571
  <div class="color-selector-div">
572
  <div class="color-selector" id="color-selector[text_button_background_color]" color="<?php echo $this->options->text_button_background_color(); ?>"></div>&#160;
573
+ <input type="text" class="color-selector-input" name="<?php echo $this->options->text_button_background_color_name(); ?>" value="<?php echo esc_attr($this->options->text_button_background_color()); ?>" />
574
  </div>
575
  </td>
576
  </tr>
586
  <td>
587
  <div class="color-selector-div">
588
  <div class="color-selector" id="color-selector[text_button_hover_color]" color="<?php echo $this->options->text_button_hover_color(); ?>"></div>&#160;
589
+ <input type="text" class="color-selector-input" name="<?php echo $this->options->text_button_hover_color_name(); ?>" value="<?php echo esc_attr($this->options->text_button_hover_color()); ?>" />
590
  </div>
591
  </td>
592
  </tr>
630
  <?php echo $this->options->fa_button_class_label(); ?>
631
  </th>
632
  <td>
633
+ <input class="regular-text" name="<?php echo $this->options->fa_button_class_name(); ?>" value="<?php echo esc_attr($this->options->fa_button_class()); ?>" />
634
  <span class="description"><?php echo '[' . __('ex:', 'wpfront-scroll-top') . ' fa fa-arrow-circle-up fa-5x]'; ?></span>
635
  </td>
636
  </tr>
644
  <?php echo $this->options->fa_button_URL_label(); ?>
645
  </th>
646
  <td>
647
+ <input class="url" name="<?php echo $this->options->fa_button_URL_name(); ?>" value="<?php echo esc_attr($this->options->fa_button_URL()); ?>" />
648
  <br />
649
  <span class="description"><?php echo '[Leave blank to use BootstrapCDN URL by MaxCDN. Otherwise specify the URL you want to use.]'; ?></span>
650
  </td>
675
  <td>
676
  <div class="color-selector-div">
677
  <div class="color-selector" id="color-selector[fa_button_text_color]" color="<?php echo $this->options->fa_button_text_color(); ?>"></div>&#160;
678
+ <input type="text" class="color-selector-input" name="<?php echo $this->options->fa_button_text_color_name(); ?>" value="<?php echo esc_attr($this->options->fa_button_text_color()); ?>" />
679
  </div>
680
  </td>
681
  </tr>
templates/scroll-top-template.php CHANGED
@@ -92,7 +92,7 @@ class WPFront_Scroll_Top_Template {
92
  ?>
93
  <div id="wpfront-scroll-top-container">
94
  <?php
95
- $html = sprintf('<div class="text-holder">%s</div>', $this->options->text_button_text());
96
  $html = $this->controller->apply_button_action_html($html);
97
  echo $html;
98
  ?>
@@ -119,7 +119,7 @@ class WPFront_Scroll_Top_Template {
119
  ?>
120
  <div id="wpfront-scroll-top-container">
121
  <?php
122
- $html = sprintf('<i class="%s"></i>', $this->options->fa_button_class());
123
  $html = $this->controller->apply_button_action_html($html);
124
  echo $html;
125
  ?>
92
  ?>
93
  <div id="wpfront-scroll-top-container">
94
  <?php
95
+ $html = sprintf('<div class="text-holder">%s</div>', esc_html($this->options->text_button_text()));
96
  $html = $this->controller->apply_button_action_html($html);
97
  echo $html;
98
  ?>
119
  ?>
120
  <div id="wpfront-scroll-top-container">
121
  <?php
122
+ $html = sprintf('<i class="%s"></i>', esc_attr($this->options->fa_button_class()));
123
  $html = $this->controller->apply_button_action_html($html);
124
  echo $html;
125
  ?>
wpfront-scroll-top.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: WPFront Scroll Top
4
  * Plugin URI: http://wpfront.com/scroll-top-plugin/
5
  * Description: Allows the visitor to easily scroll back to the top of the page.
6
- * Version: 2.0.6.07225
7
  * Requires at least: 5.0
8
  * Requires PHP: 5.3
9
  * Author: Syam Mohan
3
  * Plugin Name: WPFront Scroll Top
4
  * Plugin URI: http://wpfront.com/scroll-top-plugin/
5
  * Description: Allows the visitor to easily scroll back to the top of the page.
6
+ * Version: 2.0.7.08086
7
  * Requires at least: 5.0
8
  * Requires PHP: 5.3
9
  * Author: Syam Mohan