WPFront Scroll Top - Version 1.6

Version Description

  • Font Awesome icons support.
  • New image icons.
  • Setting for moving menu under 'Settings'.
  • Performance improvement.
  • UI improvement.
  • PHP 7 compatibility fixes.
Download this release

Release Info

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

Code changes from version 1.5 to 1.6

classes/base/class-wpfront-base-menu.php CHANGED
@@ -46,204 +46,34 @@ if (!class_exists('WPFront_Base_Menu')) {
46
  return '1.0';
47
  }
48
 
49
- protected function print_column_headers($tag = 'thead') {
50
- echo '<' . $tag . '><tr>'
51
- . '<th class="check-column"></th>'
52
- . '<th scope="col" id="name" class="manage-column column-name">' . $this->__('Name') . '</th>'
53
- . '<th scope="col" id="version" class="manage-column column-version">' . $this->__('Version') . '</th>'
54
- . '<th scope="col" id="rating" class="manage-column column-rating">' . $this->__('Rating') . '</th>'
55
- . '<th scope="col" id="description" class="manage-column column-description">' . $this->__('Description') . '</th>'
56
- . '</tr></' . $tag . '>';
57
- }
58
-
59
- protected function print_column_footers() {
60
- $this->print_column_headers('tfoot');
61
- }
62
-
63
- protected function wp_star_rating($args) {
64
- if (function_exists('wp_star_rating')) {
65
- echo wp_star_rating($args);
66
- return;
67
- }
68
-
69
- echo '<div class="star-holder" title="' . sprintf($this->__('based on %s rating(s)'), number_format_i18n($args['number'])) . '">'
70
- . '<div class="star star-rating" style="width:' . esc_attr(str_replace(',', '.', $args['rating'])) . 'px"></div>'
71
- . '</div>';
72
- }
73
-
74
- protected function create_plugin_list() {
75
- if (isset($_GET['action'])) {
76
- if ($_GET['action'] == 'activate') {
77
- if (isset($_GET['plugin'])) {
78
- activate_plugin($_GET['plugin'] . '/' . $_GET['plugin'] . '.php');
79
- // echo '<script type="text/javascript">window.location="' . WPFront_Static_ST::self_admin_url('admin.php?page=' . self::MENU_SLUG) . '";</script>';
80
- // wp_die();
81
- // return;
82
- }
83
- }
84
- }
85
-
86
- $plugins_allowedtags = array(
87
- 'a' => array('href' => array(), 'title' => array(), 'target' => array()),
88
- 'abbr' => array('title' => array()), 'acronym' => array('title' => array()),
89
- 'code' => array(), 'pre' => array(), 'em' => array(), 'strong' => array(),
90
- 'ul' => array(), 'ol' => array(), 'li' => array(), 'p' => array(), 'br' => array()
91
- );
92
-
93
- if (!function_exists('plugins_api'))
94
- require_once(ABSPATH . 'wp-admin/includes/plugin-install.php');
95
- add_thickbox();
96
-
97
- $args = array();
98
- $args['page'] = 1;
99
- $args['per_page'] = 30;
100
- $args['author'] = 'syammohanm';
101
-
102
- $api = plugins_api('query_plugins', $args);
103
-
104
- if (is_wp_error($api)) {
105
- wp_die($this->__('Unable to communicate with WordPress.org'));
106
- return;
107
- }
108
- ?>
109
- <style type="text/css">
110
- div.wpfront-container table.plugins {
111
- margin-top: 16px;
112
- margin-bottom: 16px;
113
- }
114
- div.wpfront-container table.plugins th.check-column {
115
- width: 0px;
116
- }
117
- div.wpfront-container div.footer {
118
- text-align: center;
119
- }
120
- </style>
121
- <?php
122
- echo '<div class="wrap wpfront-container">';
123
- echo '<h2>' . $this->__('WPFront Plugins') . '</h2>';
124
- echo '<table class="wp-list-table widefat plugins plugin-install">';
125
- $this->print_column_headers();
126
-
127
- foreach ((array) $api->plugins as $plugin) {
128
- if (is_object($plugin))
129
- $plugin = (array) $plugin;
130
-
131
- $title = wp_kses($plugin['name'], $plugins_allowedtags);
132
- $description = strip_tags($plugin['description']);
133
- if (strlen($description) > 400)
134
- $description = mb_substr($description, 0, 400) . '&#8230;';
135
- //remove any trailing entities
136
- $description = preg_replace('/&[^;\s]{0,6}$/', '', $description);
137
- //strip leading/trailing & multiple consecutive lines
138
- $description = trim($description);
139
- $description = preg_replace("|(\r?\n)+|", "\n", $description);
140
- //\n => <br>
141
- $description = nl2br($description);
142
- $version = wp_kses($plugin['version'], $plugins_allowedtags);
143
-
144
- $name = strip_tags($title . ' ' . $version);
145
- $author = $plugin['author'];
146
- if (!empty($plugin['author']))
147
- $author = ' <cite>' . sprintf($this->__('By %s'), $author) . '.</cite>';
148
-
149
- $author = wp_kses($author, $plugins_allowedtags);
150
-
151
- $action_links = array();
152
- $action_links[] = '<a href="' . WPFront_Static_ST::self_admin_url('plugin-install.php?tab=plugin-information&amp;plugin=' . $plugin['slug'] .
153
- '&amp;TB_iframe=true&amp;width=600&amp;height=550') . '" class="thickbox" title="' .
154
- esc_attr(sprintf($this->__('More information about %s'), $name)) . '">' . $this->__('Details') . '</a>';
155
-
156
- $class = 'inactive';
157
- if (current_user_can('install_plugins') || current_user_can('update_plugins')) {
158
- $status = install_plugin_install_status($plugin);
159
-
160
- switch ($status['status']) {
161
- case 'install':
162
- if ($status['url'])
163
- $action_links[] = '<a class="install-now" href="' . $status['url'] . '" title="' . esc_attr(sprintf($this->__('Install %s'), $name)) . '">' . $this->__('Install Now') . '</a>';
164
- $class = 'active';
165
- break;
166
- case 'update_available':
167
- if ($status['url'])
168
- $action_links[] = '<a href="' . $status['url'] . '" title="' . esc_attr(sprintf($this->__('Update to version %s'), $status['version'])) . '">' . sprintf($this->__('Update Now'), $status['version']) . '</a>';
169
- $class = 'active update';
170
- break;
171
- case 'latest_installed':
172
- case 'newer_installed':
173
- $action_links[] = '<span title="' . esc_attr__($this->__('This plugin is already installed and is up to date')) . ' ">' . $this->__('Installed') . '</span>';
174
- if (is_plugin_active($plugin['slug'] . '/' . $plugin['slug'] . '.php'))
175
- $action_links[] = '<a href="' . WPFront_Static_ST::self_admin_url('admin.php?page=' . $plugin['slug']) . '">' . $this->__('Settings') . '</a>';
176
- else
177
- $action_links[] = '<a href="' . WPFront_Static_ST::self_admin_url('admin.php?page=' . self::MENU_SLUG . '&action=activate&plugin=' . $plugin['slug']) . '">' . $this->__('Activate') . '</a>';
178
- break;
179
- }
180
- }
181
- $action_links = apply_filters('plugin_install_action_links', $action_links, $plugin);
182
- ?>
183
- <tr class="<?php echo $class; ?>">
184
- <th class="check-column"></th>
185
- <td class="name column-name"><strong><?php echo $title; ?></strong>
186
- <div class="action-links"><?php if (!empty($action_links)) echo implode(' | ', $action_links); ?></div>
187
- </td>
188
- <td class="vers column-version"><?php echo $version; ?></td>
189
- <td class="vers column-rating">
190
- <?php $this->wp_star_rating(array('rating' => $plugin['rating'], 'type' => 'percent', 'number' => $plugin['num_ratings'])); ?>
191
- </td>
192
- <td class="desc column-description"><?php echo $description, $author; ?></td>
193
- </tr>
194
- <?php
195
- }
196
-
197
- $this->print_column_footers();
198
- echo '</table>';
199
- echo '<div class="footer"><a href="http://wpfront.com/contact" target="_blank">' . $this->__('Feedback') . '</a> | <a href="http://wpfront.com" target="_blank">wpfront.com</a></div>';
200
- echo '</div>';
201
- }
202
-
203
- public static function plugin_list() {
204
- self::$wpfrontBaseMenu->create_plugin_list();
205
- }
206
-
207
- protected function __($key) {
208
- return self::$wpfrontBase->__($key);
209
- }
210
-
211
  protected function create_admin_menu($menu_data) {
212
- $menu_slug = self::MENU_SLUG;
213
 
214
  global $admin_page_hooks, $submenu;
215
  if (!isset($admin_page_hooks[$menu_slug])) {
216
- add_menu_page($this->__('WPFront'), $this->__('WPFront'), 'manage_options', $menu_slug, null, self::$wpfrontBase->pluginURL() . 'classes/base/images/wpfront_menu.png');
217
- add_submenu_page($menu_slug, $this->__('WPFront Plugins'), $this->__('All Plugins'), 'manage_options', $menu_slug, array('WPFront_Base_Menu', 'plugin_list'));
218
  }
219
 
220
- if (empty($submenu[$menu_slug])) {
221
- return;
222
- }
223
-
224
- //$extra_menu = array_pop($submenu[$menu_slug]);
225
-
226
  foreach ($menu_data as $value) {
227
  $flag = FALSE;
228
 
229
- foreach ($submenu[$menu_slug] as $s) {
230
- if ($s[2] == $value['slug']) {
231
- $flag = TRUE;
232
- break;
 
 
233
  }
234
  }
235
 
236
  if ($flag == TRUE)
237
  continue;
238
-
239
  $page_hook_suffix = add_submenu_page($menu_slug, $value['title'], $value['link'], 'manage_options', $value['slug'], array($value['this'], 'options_page'));
240
 
241
  add_action('admin_print_scripts-' . $page_hook_suffix, array($value['this'], 'enqueue_options_scripts'));
242
  add_action('admin_print_styles-' . $page_hook_suffix, array($value['this'], 'enqueue_options_styles'));
243
  }
244
-
245
- //usort($submenu[$menu_slug], array('WPFront_Base', 'submenu_compare'));
246
- //$submenu[$menu_slug][] = $extra_menu;
247
  }
248
 
249
  public static function admin_menu($menu_data) {
46
  return '1.0';
47
  }
48
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
  protected function create_admin_menu($menu_data) {
50
+ $menu_slug = $menu_data[0]['slug'];
51
 
52
  global $admin_page_hooks, $submenu;
53
  if (!isset($admin_page_hooks[$menu_slug])) {
54
+ add_menu_page(__('WPFront', 'wpfront-scroll-top'), __('WPFront', 'wpfront-scroll-top'), 'manage_options', $menu_slug, null, self::$wpfrontBase->pluginURL() . 'classes/base/images/wpfront_menu.png');
 
55
  }
56
 
 
 
 
 
 
 
57
  foreach ($menu_data as $value) {
58
  $flag = FALSE;
59
 
60
+ if(!empty($submenu[$menu_slug])) {
61
+ foreach ($submenu[$menu_slug] as $s) {
62
+ if ($s[2] == $value['slug']) {
63
+ $flag = TRUE;
64
+ break;
65
+ }
66
  }
67
  }
68
 
69
  if ($flag == TRUE)
70
  continue;
71
+
72
  $page_hook_suffix = add_submenu_page($menu_slug, $value['title'], $value['link'], 'manage_options', $value['slug'], array($value['this'], 'options_page'));
73
 
74
  add_action('admin_print_scripts-' . $page_hook_suffix, array($value['this'], 'enqueue_options_scripts'));
75
  add_action('admin_print_styles-' . $page_hook_suffix, array($value['this'], 'enqueue_options_styles'));
76
  }
 
 
 
77
  }
78
 
79
  public static function admin_menu($menu_data) {
classes/base/class-wpfront-base.php CHANGED
@@ -25,7 +25,7 @@
25
  require_once("class-wpfront-static.php");
26
  require_once("class-wpfront-base-menu.php");
27
 
28
- if (!class_exists('WPFront_Base')) {
29
 
30
  /**
31
  * Plugin framework base class
@@ -33,10 +33,13 @@ if (!class_exists('WPFront_Base')) {
33
  * @author Syam Mohan <syam@wpfront.com>
34
  * @copyright 2013 WPFront.com
35
  */
36
- class WPFront_Base {
37
 
38
  private $plugin_slug;
39
  private $options_page_slug;
 
 
 
40
  protected $pluginURLRoot;
41
  protected $pluginDIRRoot;
42
  private static $menu_data = array();
@@ -102,7 +105,7 @@ if (!class_exists('WPFront_Base')) {
102
 
103
  public function action_links($links, $file) {
104
  if ($file == $this->plugin_slug . '/' . $this->plugin_slug . '.php') {
105
- $settings_link = '<a href="' . get_bloginfo('wpurl') . '/wp-admin/admin.php?page=' . $this->options_page_slug . '">' . $this->__('Settings') . '</a>';
106
  array_unshift($links, $settings_link);
107
  }
108
  return $links;
@@ -127,7 +130,7 @@ if (!class_exists('WPFront_Base')) {
127
  //creates options page
128
  public function options_page() {
129
  if (!current_user_can('manage_options')) {
130
- wp_die($this->__('You do not have sufficient permissions to access this page.'));
131
  return;
132
  }
133
 
@@ -147,7 +150,7 @@ if (!class_exists('WPFront_Base')) {
147
  echo '
148
  <div class="updated">
149
  <p>
150
- <strong>' . $this->__('If you have a caching plugin, clear the cache for the new settings to take effect.') . '</strong>
151
  </p>
152
  </div>
153
  ';
@@ -164,21 +167,22 @@ if (!class_exists('WPFront_Base')) {
164
  }
165
  }
166
 
167
- echo '
168
- <a href="http://wpfront.com/' . $settingsLink . '" target="_blank">' . $this->__('Settings Description') . '</a>
169
- |
170
- <a href="http://wordpress.org/support/view/plugin-reviews/' . $this->plugin_slug . '" target="_blank">' . $this->__('Write Review') . '</a>
171
- |
172
- <a href="http://wpfront.com/donate/" target="_blank">' . $this->__('Buy me a Beer or Coffee') . '</a>
173
- ';
174
  echo '</form>';
175
  echo '</div>';
176
  echo '</div>';
 
 
 
 
 
177
  }
178
-
179
- //returns localized string
180
- public function __($key) {
181
- return __($key, $this->plugin_slug);
 
 
 
182
  }
183
 
184
  //for compatibility
@@ -186,7 +190,7 @@ if (!class_exists('WPFront_Base')) {
186
  if (function_exists('submit_button')) {
187
  submit_button();
188
  } else {
189
- echo '<p class="submit"><input type="submit" name="submit" id="submit" class="button button-primary" value="' . $this->__('Save Changes') . '" /></p>';
190
  }
191
  }
192
 
25
  require_once("class-wpfront-static.php");
26
  require_once("class-wpfront-base-menu.php");
27
 
28
+ if (!class_exists('WPFront_Base_ST')) {
29
 
30
  /**
31
  * Plugin framework base class
33
  * @author Syam Mohan <syam@wpfront.com>
34
  * @copyright 2013 WPFront.com
35
  */
36
+ class WPFront_Base_ST {
37
 
38
  private $plugin_slug;
39
  private $options_page_slug;
40
+ private $settingsLink;
41
+ private $FAQLink;
42
+
43
  protected $pluginURLRoot;
44
  protected $pluginDIRRoot;
45
  private static $menu_data = array();
105
 
106
  public function action_links($links, $file) {
107
  if ($file == $this->plugin_slug . '/' . $this->plugin_slug . '.php') {
108
+ $settings_link = '<a href="' . menu_page_url($this->options_page_slug, FALSE) . '">' . __('Settings', 'wpfront-scroll-top') . '</a>';
109
  array_unshift($links, $settings_link);
110
  }
111
  return $links;
130
  //creates options page
131
  public function options_page() {
132
  if (!current_user_can('manage_options')) {
133
+ wp_die(__('You do not have sufficient permissions to access this page.', 'wpfront-scroll-top'));
134
  return;
135
  }
136
 
150
  echo '
151
  <div class="updated">
152
  <p>
153
+ <strong>' . __('If you have a caching plugin, clear the cache for the new settings to take effect.', 'wpfront-scroll-top') . '</strong>
154
  </p>
155
  </div>
156
  ';
167
  }
168
  }
169
 
 
 
 
 
 
 
 
170
  echo '</form>';
171
  echo '</div>';
172
  echo '</div>';
173
+
174
+ $this->settingsLink = $settingsLink;
175
+ $this->FAQLink = $FAQLink;
176
+
177
+ add_filter('admin_footer_text', array($this, 'admin_footer_text'));
178
  }
179
+
180
+ public function admin_footer_text($text) {
181
+ $settingsLink = sprintf('<a href="%s" target="_blank">%s</a>', 'https://wpfront.com/' . $this->settingsLink, __('Settings Description', 'wpfront-scroll-top'));
182
+ $reviewLink = sprintf('<a href="%s" target="_blank">%s</a>', 'https://wordpress.org/support/plugin/' . $this->plugin_slug . '/reviews/', __('Write a Review', 'wpfront-scroll-top'));
183
+ $donateLink = sprintf('<a href="%s" target="_blank">%s</a>', 'https://wpfront.com/donate/', __('Buy me a Beer or Coffee', 'wpfront-scroll-top'));
184
+
185
+ return sprintf('%s | %s | %s | %s', $settingsLink, $reviewLink, $donateLink, $text);
186
  }
187
 
188
  //for compatibility
190
  if (function_exists('submit_button')) {
191
  submit_button();
192
  } else {
193
+ echo '<p class="submit"><input type="submit" name="submit" id="submit" class="button button-primary" value="' . __('Save Changes', 'wpfront-scroll-top') . '" /></p>';
194
  }
195
  }
196
 
classes/base/class-wpfront-options-base.php CHANGED
@@ -22,7 +22,7 @@
22
  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23
  */
24
 
25
- if (!class_exists('WPFront_Options_Base')) {
26
 
27
  /**
28
  * Options framework base class
@@ -30,7 +30,7 @@ if (!class_exists('WPFront_Options_Base')) {
30
  * @author Syam Mohan <syam@wpfront.com>
31
  * @copyright 2013 WPFront.com
32
  */
33
- class WPFront_Options_Base {
34
 
35
  //variables to hold options data
36
  public $__data = array();
@@ -106,7 +106,7 @@ if (!class_exists('WPFront_Options_Base')) {
106
  }
107
 
108
  //sets the label of the option, for POEDIT compatibility
109
- protected function __($label) {
110
  $this->__data[$this->lastOptionName . '_label']['label'] = $label;
111
  }
112
 
22
  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23
  */
24
 
25
+ if (!class_exists('WPFront_Options_Base_ST')) {
26
 
27
  /**
28
  * Options framework base class
30
  * @author Syam Mohan <syam@wpfront.com>
31
  * @copyright 2013 WPFront.com
32
  */
33
+ class WPFront_Options_Base_ST {
34
 
35
  //variables to hold options data
36
  public $__data = array();
106
  }
107
 
108
  //sets the label of the option, for POEDIT compatibility
109
+ protected function label($label) {
110
  $this->__data[$this->lastOptionName . '_label']['label'] = $label;
111
  }
112
 
classes/class-wpfront-scroll-top-options.php CHANGED
@@ -32,47 +32,95 @@ if (!class_exists('WPFront_Scroll_Top_Options')) {
32
  * @author Syam Mohan <syam@wpfront.com>
33
  * @copyright 2013 WPFront.com
34
  */
35
- class WPFront_Scroll_Top_Options extends WPFront_Options_Base {
36
 
37
  function __construct($optionName, $pluginSlug) {
38
  parent::__construct($optionName, $pluginSlug);
39
 
40
  //add the options required for this plugin
41
- $this->addOption('enabled', 'bit', FALSE)->__('Enabled');
42
- $this->addOption('javascript_async', 'bit', FALSE)->__('JavaScript Async');
43
- $this->addOption('scroll_offset', 'int', 100, array($this, 'validate_zero_positive'))->__('Scroll Offset');
44
  $this->addOption('button_width', 'int', 0, array($this, 'validate_zero_positive'));
45
  $this->addOption('button_height', 'int', 0, array($this, 'validate_zero_positive'));
46
- $this->addOption('button_opacity', 'int', 80, array($this, 'validate_range_0_100'))->__('Button Opacity');
47
- $this->addOption('button_fade_duration', 'int', 200, array($this, 'validate_zero_positive'))->__('Button Fade Duration');
48
- $this->addOption('scroll_duration', 'int', 400, array($this, 'validate_zero_positive'))->__('Scroll Duration');
49
- $this->addOption('auto_hide', 'bit', FALSE)->__('Auto Hide');
50
- $this->addOption('auto_hide_after', 'float', 2, array($this, 'validate_zero_positive'))->__('Auto Hide After');
51
- $this->addOption('hide_small_device', 'bit', FALSE)->__('Hide on Small Devices');
52
- $this->addOption('small_device_width', 'int', 640, array($this, 'validate_zero_positive'))->__('Small Device Max Width');
53
- $this->addOption('hide_small_window', 'bit', FALSE)->__('Hide on Small Window');
54
- $this->addOption('small_window_width', 'int', 640, array($this, 'validate_zero_positive'))->__('Small Window Max Width');
55
- $this->addOption('button_style', 'string', 'image', array($this, 'validate_button_style'))->__('Button Style');
56
- $this->addOption('image_alt', 'string', '')->__('Image ALT');
57
- $this->addOption('hide_wpadmin', 'bit', FALSE)->__('Hide on WP-ADMIN');
58
- $this->addOption('hide_iframe', 'bit', FALSE)->__('Hide on iframes');
59
-
60
- $this->addOption('location', 'int', 1, array($this, 'validate_range_1_4'))->__('Location');
61
- $this->addOption('marginX', 'int', 20)->__('Margin X');
62
- $this->addOption('marginY', 'int', 20)->__('Margin Y');
63
-
64
- $this->addOption('text_button_text', 'string', '')->__('Text');
65
- $this->addOption('text_button_text_color', 'string', '#ffffff', array($this, 'validate_color'))->__('Text Color');
66
- $this->addOption('text_button_background_color', 'string', '#000000', array($this, 'validate_color'))->__('Background Color');
67
- $this->addOption('text_button_css', 'string', '')->__('Custom CSS');
68
-
69
- $this->addOption('display_pages', 'int', '1', array($this, 'validate_display_pages'))->__('Display on Pages');
 
 
 
 
 
 
 
 
70
  $this->addOption('include_pages', 'string', '');
71
  $this->addOption('exclude_pages', 'string', '');
72
 
73
  $this->addOption('image', 'string', '1.png');
74
  $this->addOption('custom_url', 'string', '');
75
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
76
 
77
  protected function validate_range_0_100($arg) {
78
  if ($arg < 0)
@@ -95,7 +143,7 @@ if (!class_exists('WPFront_Scroll_Top_Options')) {
95
  }
96
 
97
  protected function validate_button_style($arg) {
98
- if ($arg == 'text')
99
  return $arg;
100
 
101
  return 'image';
32
  * @author Syam Mohan <syam@wpfront.com>
33
  * @copyright 2013 WPFront.com
34
  */
35
+ class WPFront_Scroll_Top_Options extends WPFront_Options_Base_ST {
36
 
37
  function __construct($optionName, $pluginSlug) {
38
  parent::__construct($optionName, $pluginSlug);
39
 
40
  //add the options required for this plugin
41
+ $this->addOption('enabled', 'bit', FALSE)->label(__('Enabled', 'wpfront-scroll-top'));
42
+ $this->addOption('javascript_async', 'bit', FALSE)->label(__('JavaScript Async', 'wpfront-scroll-top'));
43
+ $this->addOption('scroll_offset', 'int', 100, array($this, 'validate_zero_positive'))->label(__('Scroll Offset', 'wpfront-scroll-top'));
44
  $this->addOption('button_width', 'int', 0, array($this, 'validate_zero_positive'));
45
  $this->addOption('button_height', 'int', 0, array($this, 'validate_zero_positive'));
46
+ $this->addOption('button_opacity', 'int', 80, array($this, 'validate_range_0_100'))->label(__('Button Opacity', 'wpfront-scroll-top'));
47
+ $this->addOption('button_fade_duration', 'int', 200, array($this, 'validate_zero_positive'))->label(__('Button Fade Duration', 'wpfront-scroll-top'));
48
+ $this->addOption('scroll_duration', 'int', 400, array($this, 'validate_zero_positive'))->label(__('Scroll Duration', 'wpfront-scroll-top'));
49
+ $this->addOption('auto_hide', 'bit', FALSE)->label(__('Auto Hide', 'wpfront-scroll-top'));
50
+ $this->addOption('auto_hide_after', 'float', 2, array($this, 'validate_zero_positive'))->label(__('Auto Hide After', 'wpfront-scroll-top'));
51
+ $this->addOption('hide_small_device', 'bit', FALSE)->label(__('Hide on Small Devices', 'wpfront-scroll-top'));
52
+ $this->addOption('small_device_width', 'int', 640, array($this, 'validate_zero_positive'))->label(__('Small Device Max Width', 'wpfront-scroll-top'));
53
+ $this->addOption('hide_small_window', 'bit', FALSE)->label(__('Hide on Small Window', 'wpfront-scroll-top'));
54
+ $this->addOption('small_window_width', 'int', 640, array($this, 'validate_zero_positive'))->label(__('Small Window Max Width', 'wpfront-scroll-top'));
55
+ $this->addOption('button_style', 'string', 'image', array($this, 'validate_button_style'))->label(__('Button Style', 'wpfront-scroll-top'));
56
+ $this->addOption('image_alt', 'string', '')->label(__('Image ALT', 'wpfront-scroll-top'));
57
+ $this->addOption('hide_wpadmin', 'bit', FALSE)->label(__('Hide on WP-ADMIN', 'wpfront-scroll-top'));
58
+ $this->addOption('hide_iframe', 'bit', FALSE)->label(__('Hide on iframes', 'wpfront-scroll-top'));
59
+ $this->addOption('move_admin_menu', 'bit', FALSE)->label(__('Move Admin Menu', 'wpfront-scroll-top'));
60
+
61
+ $this->addOption('location', 'int', 1, array($this, 'validate_range_1_4'))->label(__('Location', 'wpfront-scroll-top'));
62
+ $this->addOption('marginX', 'int', 20)->label(__('Margin X', 'wpfront-scroll-top'));
63
+ $this->addOption('marginY', 'int', 20)->label(__('Margin Y', 'wpfront-scroll-top'));
64
+
65
+ $this->addOption('text_button_text', 'string', '')->label(__('Text', 'wpfront-scroll-top'));
66
+ $this->addOption('text_button_text_color', 'string', '#ffffff', array($this, 'validate_color'))->label(__('Text Color', 'wpfront-scroll-top'));
67
+ $this->addOption('text_button_background_color', 'string', '#000000', array($this, 'validate_color'))->label(__('Background Color', 'wpfront-scroll-top'));
68
+ $this->addOption('text_button_hover_color', 'string', '', array($this, 'validate_color'))->label(__('Mouse Over Color', 'wpfront-scroll-top'));
69
+ $this->addOption('text_button_css', 'string', '')->label(__('Custom CSS', 'wpfront-scroll-top'));
70
+
71
+ $this->addOption('fa_button_class', 'string', '')->label(__('Icon Class', 'wpfront-scroll-top'));
72
+ $this->addOption('fa_button_URL', 'string', '')->label(__('Font Awesome URL', 'wpfront-scroll-top'));
73
+ $this->addOption('fa_button_exclude_URL', 'bit', FALSE)->label(__('Do not include URL', 'wpfront-scroll-top'));
74
+ $this->addOption('fa_button_text_color', 'string', '#000000', array($this, 'validate_color'))->label(__('Icon Color', 'wpfront-scroll-top'));
75
+ $this->addOption('fa_button_css', 'string', '')->label(__('Custom CSS', 'wpfront-scroll-top'));
76
+
77
+ $this->addOption('display_pages', 'int', '1', array($this, 'validate_display_pages'))->label(__('Display on Pages', 'wpfront-scroll-top'));
78
  $this->addOption('include_pages', 'string', '');
79
  $this->addOption('exclude_pages', 'string', '');
80
 
81
  $this->addOption('image', 'string', '1.png');
82
  $this->addOption('custom_url', 'string', '');
83
  }
84
+
85
+ public function text_button_hover_color() {
86
+ $color = parent::text_button_hover_color();
87
+ if(empty($color))
88
+ return $this->text_button_background_color();
89
+
90
+ return $color;
91
+ }
92
+
93
+ public function include_pages() {
94
+ $pages = parent::include_pages();
95
+
96
+ if(strpos($pages, '.') === FALSE)
97
+ return $pages;
98
+
99
+ $pages = explode(',', $pages);
100
+
101
+ for($i = 0; $i < count($pages); $i++) {
102
+ $e = explode('.', $pages[$i]);
103
+ $pages[$i] = $e[1];
104
+ }
105
+
106
+ return implode(',', $pages);
107
+ }
108
+
109
+ public function exclude_pages() {
110
+ $pages = parent::exclude_pages();
111
+
112
+ if(strpos($pages, '.') === FALSE)
113
+ return $pages;
114
+
115
+ $pages = explode(',', $pages);
116
+
117
+ for($i = 0; $i < count($pages); $i++) {
118
+ $e = explode('.', $pages[$i]);
119
+ $pages[$i] = $e[1];
120
+ }
121
+
122
+ return implode(',', $pages);
123
+ }
124
 
125
  protected function validate_range_0_100($arg) {
126
  if ($arg < 0)
143
  }
144
 
145
  protected function validate_button_style($arg) {
146
+ if ($arg == 'text' || $arg == 'font-awesome')
147
  return $arg;
148
 
149
  return 'image';
classes/class-wpfront-scroll-top.php CHANGED
@@ -33,10 +33,10 @@ if (!class_exists('WPFront_Scroll_Top')) {
33
  * @author Syam Mohan <syam@wpfront.com>
34
  * @copyright 2013 WPFront.com
35
  */
36
- class WPFront_Scroll_Top extends WPFront_Base {
37
 
38
  //Constants
39
- const VERSION = '1.5';
40
  const OPTIONS_GROUP_NAME = 'wpfront-scroll-top-options-group';
41
  const OPTION_NAME = 'wpfront-scroll-top-options';
42
  const PLUGIN_SLUG = 'wpfront-scroll-top';
@@ -61,8 +61,6 @@ if (!class_exists('WPFront_Scroll_Top')) {
61
 
62
  add_action('wp_footer', array(&$this, 'write_markup'));
63
  add_action('shutdown', array(&$this, 'shutdown_callback'));
64
-
65
- $this->add_menu($this->__('WPFront Scroll Top'), $this->__('Scroll Top'));
66
  }
67
 
68
  //add scripts
@@ -73,7 +71,7 @@ if (!class_exists('WPFront_Scroll_Top')) {
73
  $jsRoot = $this->pluginURLRoot . 'js/';
74
 
75
  wp_enqueue_script('jquery');
76
- wp_enqueue_script('wpfront-scroll-top', $jsRoot . 'wpfront-scroll-top' . $this->min_file_suffix . '.js', array('jquery'), self::VERSION);
77
 
78
  $this->scriptLoaded = TRUE;
79
  }
@@ -85,7 +83,19 @@ if (!class_exists('WPFront_Scroll_Top')) {
85
 
86
  $cssRoot = $this->pluginURLRoot . 'css/';
87
 
88
- wp_enqueue_style('wpfront-scroll-top', $cssRoot . 'wpfront-scroll-top' . $this->min_file_suffix . '.css', array(), self::VERSION);
 
 
 
 
 
 
 
 
 
 
 
 
89
  }
90
 
91
  public function admin_init() {
@@ -94,6 +104,19 @@ if (!class_exists('WPFront_Scroll_Top')) {
94
  $this->enqueue_styles();
95
  $this->enqueue_scripts();
96
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
97
 
98
  public function enqueue_options_scripts() {
99
  $this->enqueue_scripts();
@@ -121,7 +144,7 @@ if (!class_exists('WPFront_Scroll_Top')) {
121
 
122
  public function script_loader_tag($tag, $handle, $src) {
123
  if($handle === 'wpfront-scroll-top')
124
- return '<script type="text/javascript" src="' . $src . '" async="true"></script>' . "\n";
125
 
126
  return $tag;
127
  }
@@ -214,23 +237,14 @@ if (!class_exists('WPFront_Scroll_Top')) {
214
  case 3:
215
  global $post;
216
  $ID = FALSE;
217
- $type = FALSE;
218
  if (is_home()) {
219
  $ID = 'home';
220
- $type = 1;
221
- } elseif (is_singular()) {
222
- $post_type = get_post_type();
223
- if ($post_type == 'page') {
224
- $ID = $post->ID;
225
- $type = 1;
226
- } elseif ($post_type == 'post') {
227
- $ID = $post->ID;
228
- $type = 2;
229
- }
230
  }
231
  if ($this->options->display_pages() == 2) {
232
  if ($ID !== FALSE && $type !== FALSE) {
233
- if ($this->filter_pages_contains($this->options->include_pages(), $type . '.' . $ID) === FALSE)
234
  return FALSE;
235
  else
236
  return TRUE;
@@ -239,7 +253,7 @@ if (!class_exists('WPFront_Scroll_Top')) {
239
  }
240
  if ($this->options->display_pages() == 3) {
241
  if ($ID !== FALSE && $type !== FALSE) {
242
- if ($this->filter_pages_contains($this->options->exclude_pages(), $type . '.' . $ID) === FALSE)
243
  return TRUE;
244
  else
245
  return FALSE;
@@ -264,21 +278,21 @@ if (!class_exists('WPFront_Scroll_Top')) {
264
  protected function get_filter_objects() {
265
  $objects = array();
266
 
267
- $objects['1.home'] = $this->__('[Page]') . ' ' . $this->__('Home');
268
 
269
  $pages = get_pages();
270
  foreach ($pages as $page) {
271
- $objects['1.' . $page->ID] = $this->__('[Page]') . ' ' . $page->post_title;
272
  }
273
 
274
  $posts = get_posts();
275
  foreach ($posts as $post) {
276
- $objects['2.' . $post->ID] = $this->__('[Post]') . ' ' . $post->post_title;
277
  }
278
 
279
  // $categories = get_categories();
280
  // foreach ($categories as $category) {
281
- // $objects['3.' . $category->cat_ID] = $this->__('[Category]') . ' ' . $category->cat_name;
282
  // }
283
 
284
  return $objects;
33
  * @author Syam Mohan <syam@wpfront.com>
34
  * @copyright 2013 WPFront.com
35
  */
36
+ class WPFront_Scroll_Top extends WPFront_Base_ST {
37
 
38
  //Constants
39
+ const VERSION = '1.6';
40
  const OPTIONS_GROUP_NAME = 'wpfront-scroll-top-options-group';
41
  const OPTION_NAME = 'wpfront-scroll-top-options';
42
  const PLUGIN_SLUG = 'wpfront-scroll-top';
61
 
62
  add_action('wp_footer', array(&$this, 'write_markup'));
63
  add_action('shutdown', array(&$this, 'shutdown_callback'));
 
 
64
  }
65
 
66
  //add scripts
71
  $jsRoot = $this->pluginURLRoot . 'js/';
72
 
73
  wp_enqueue_script('jquery');
74
+ wp_enqueue_script('wpfront-scroll-top', $jsRoot . 'wpfront-scroll-top' . $this->min_file_suffix . '.js', array('jquery'), self::VERSION, TRUE);
75
 
76
  $this->scriptLoaded = TRUE;
77
  }
83
 
84
  $cssRoot = $this->pluginURLRoot . 'css/';
85
 
86
+ wp_enqueue_style('wpfront-scroll-top', $cssRoot . 'wpfront-scroll-top' . $this->min_file_suffix . '.css', array(), self::VERSION);
87
+
88
+ if($this->options->button_style() == 'font-awesome') {
89
+ if(!$this->options->fa_button_exclude_URL() || is_admin()) {
90
+ $url = trim($this->options->fa_button_URL());
91
+ $ver = FALSE;
92
+ if(empty($url)) {
93
+ $url = '//maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css';
94
+ $ver = '4.7.0';
95
+ }
96
+ wp_enqueue_style('font-awesome', $url, array(), $ver);
97
+ }
98
+ }
99
  }
100
 
101
  public function admin_init() {
104
  $this->enqueue_styles();
105
  $this->enqueue_scripts();
106
  }
107
+
108
+ public function admin_menu() {
109
+ if($this->options->move_admin_menu()) {
110
+ $page_hook_suffix = add_options_page(__('WPFront Scroll Top', 'wpfront-scroll-top'), __('Scroll Top', 'wpfront-scroll-top'), 'manage_options', self::PLUGIN_SLUG, array($this, 'options_page'));
111
+
112
+ add_action('admin_print_scripts-' . $page_hook_suffix, array($this, 'enqueue_options_scripts'));
113
+ add_action('admin_print_styles-' . $page_hook_suffix, array($this, 'enqueue_options_styles'));
114
+ }
115
+ else {
116
+ $this->add_menu(__('WPFront Scroll Top', 'wpfront-scroll-top'), __('Scroll Top', 'wpfront-scroll-top'));
117
+ parent::admin_menu();
118
+ }
119
+ }
120
 
121
  public function enqueue_options_scripts() {
122
  $this->enqueue_scripts();
144
 
145
  public function script_loader_tag($tag, $handle, $src) {
146
  if($handle === 'wpfront-scroll-top')
147
+ return '<script type="text/javascript" src="' . $src . '" async defer></script>' . "\n";
148
 
149
  return $tag;
150
  }
237
  case 3:
238
  global $post;
239
  $ID = FALSE;
 
240
  if (is_home()) {
241
  $ID = 'home';
242
+ } else {
243
+ $ID = $post->ID;
 
 
 
 
 
 
 
 
244
  }
245
  if ($this->options->display_pages() == 2) {
246
  if ($ID !== FALSE && $type !== FALSE) {
247
+ if ($this->filter_pages_contains($this->options->include_pages(), $ID) === FALSE)
248
  return FALSE;
249
  else
250
  return TRUE;
253
  }
254
  if ($this->options->display_pages() == 3) {
255
  if ($ID !== FALSE && $type !== FALSE) {
256
+ if ($this->filter_pages_contains($this->options->exclude_pages(), $ID) === FALSE)
257
  return TRUE;
258
  else
259
  return FALSE;
278
  protected function get_filter_objects() {
279
  $objects = array();
280
 
281
+ $objects['home'] = __('[Page]', 'wpfront-scroll-top') . ' ' . __('Home', 'wpfront-scroll-top');
282
 
283
  $pages = get_pages();
284
  foreach ($pages as $page) {
285
+ $objects[$page->ID] = __('[Page]', 'wpfront-scroll-top') . ' ' . $page->post_title;
286
  }
287
 
288
  $posts = get_posts();
289
  foreach ($posts as $post) {
290
+ $objects[$post->ID] = __('[Post]', 'wpfront-scroll-top') . ' ' . $post->post_title;
291
  }
292
 
293
  // $categories = get_categories();
294
  // foreach ($categories as $category) {
295
+ // $objects['3.' . $category->cat_ID] = __('[Category]', 'wpfront-scroll-top') . ' ' . $category->cat_name;
296
  // }
297
 
298
  return $objects;
css/options.css CHANGED
@@ -20,7 +20,8 @@
20
  margin-right: 20px;
21
  margin-bottom: 10px;
22
  min-width: 100px;
23
- min-height: 70px;
 
24
  }
25
 
26
  #wpfront-scroll-top-options div.icons-container div.selected {
@@ -35,7 +36,7 @@
35
  vertical-align: top;
36
  }
37
 
38
- #wpfront-scroll-top-options div input.customImage {
39
  width: 50%;
40
  }
41
 
@@ -73,4 +74,9 @@
73
  overflow: hidden;
74
  }
75
 
 
 
 
 
 
76
 
20
  margin-right: 20px;
21
  margin-bottom: 10px;
22
  min-width: 100px;
23
+ min-height: 80px;
24
+ zoom: 80%;
25
  }
26
 
27
  #wpfront-scroll-top-options div.icons-container div.selected {
36
  vertical-align: top;
37
  }
38
 
39
+ #wpfront-scroll-top-options input.url {
40
  width: 50%;
41
  }
42
 
74
  overflow: hidden;
75
  }
76
 
77
+ #wpfront-scroll-top-options input.post-id-list
78
+ {
79
+ width: 70%;
80
+ }
81
+
82
 
css/options.min.css CHANGED
@@ -1 +1 @@
1
- #icon-wpfront-scroll-top{background:url("../images/settings32x32.png") no-repeat scroll 0 0 rgba(0,0,0,0)}#wpfront-scroll-top-options input.pixels{width:40px}#wpfront-scroll-top-options input.seconds{width:40px}#wpfront-scroll-top-options div.icons-container{display:inline-block;width:80%}#wpfront-scroll-top-options div.icons-container div{float:left;margin-right:20px;margin-bottom:10px;min-width:100px;min-height:70px}#wpfront-scroll-top-options div.icons-container div.selected{background-color:silver}#wpfront-scroll-top-options div.icons-container div:hover{background-color:silver}#wpfront-scroll-top-options div.icons-container div input{vertical-align:top}#wpfront-scroll-top-options div input.customImage{width:50%}#wpfront-scroll-top-options table.form-table .color-selector-div{display:inline-block;width:100px}#wpfront-scroll-top-options table.form-table .color-selector{vertical-align:middle}#wpfront-scroll-top-options table.form-table div.pages-selection{width:70%;height:150px;background-color:#fff;overflow:auto;border:1px solid #dfdfdf;-moz-border-radius:4px;-khtml-border-radius:4px;-webkit-border-radius:4px;border-radius:4px}#wpfront-scroll-top-options table.form-table div.page-div{float:left;width:250px;padding:2px;white-space:nowrap;overflow:hidden}
1
+ #icon-wpfront-scroll-top{background:url("../images/settings32x32.png") no-repeat scroll 0 0 rgba(0,0,0,0)}#wpfront-scroll-top-options input.pixels{width:40px}#wpfront-scroll-top-options input.seconds{width:40px}#wpfront-scroll-top-options div.icons-container{display:inline-block;width:80%}#wpfront-scroll-top-options div.icons-container div{float:left;margin-right:20px;margin-bottom:10px;min-width:100px;min-height:80px;zoom:80%}#wpfront-scroll-top-options div.icons-container div.selected{background-color:silver}#wpfront-scroll-top-options div.icons-container div:hover{background-color:silver}#wpfront-scroll-top-options div.icons-container div input{vertical-align:top}#wpfront-scroll-top-options input.url{width:50%}#wpfront-scroll-top-options table.form-table .color-selector-div{display:inline-block;width:100px}#wpfront-scroll-top-options table.form-table .color-selector{vertical-align:middle}#wpfront-scroll-top-options table.form-table div.pages-selection{width:70%;height:150px;background-color:#fff;overflow:auto;border:1px solid #dfdfdf;-moz-border-radius:4px;-khtml-border-radius:4px;-webkit-border-radius:4px;border-radius:4px}#wpfront-scroll-top-options table.form-table div.page-div{float:left;width:250px;padding:2px;white-space:nowrap;overflow:hidden}#wpfront-scroll-top-options input.post-id-list{width:70%}
css/wpfront-scroll-top.css CHANGED
@@ -3,4 +3,13 @@
3
  position: fixed;
4
  cursor: pointer;
5
  z-index: 9999;
 
 
 
 
 
 
 
 
 
6
  }
3
  position: fixed;
4
  cursor: pointer;
5
  z-index: 9999;
6
+ }
7
+
8
+ #wpfront-scroll-top-container div.text-holder {
9
+ padding: 3px 10px;
10
+ border-radius: 3px;
11
+ -webkit-border-radius: 3px;
12
+ -webkit-box-shadow: 4px 4px 5px 0px rgba(50, 50, 50, 0.5);
13
+ -moz-box-shadow: 4px 4px 5px 0px rgba(50, 50, 50, 0.5);
14
+ box-shadow: 4px 4px 5px 0px rgba(50, 50, 50, 0.5);
15
  }
css/wpfront-scroll-top.min.css CHANGED
@@ -1 +1 @@
1
- #wpfront-scroll-top-container{display:none;position:fixed;cursor:pointer;z-index:9999}
1
+ #wpfront-scroll-top-container{display:none;position:fixed;cursor:pointer;z-index:9999}#wpfront-scroll-top-container div.text-holder{padding:3px 10px;border-radius:3px;-webkit-border-radius:3px;-webkit-box-shadow:4px 4px 5px 0 rgba(50,50,50,0.5);-moz-box-shadow:4px 4px 5px 0 rgba(50,50,50,0.5);box-shadow:4px 4px 5px 0 rgba(50,50,50,0.5)}
images/icons/101.png ADDED
Binary file
images/icons/102.png ADDED
Binary file
images/icons/103.png ADDED
Binary file
images/icons/104.png ADDED
Binary file
images/icons/105.png ADDED
Binary file
images/icons/106.png ADDED
Binary file
images/icons/107.png ADDED
Binary file
images/icons/108.png ADDED
Binary file
images/icons/109.png ADDED
Binary file
images/icons/110.png ADDED
Binary file
images/icons/111.png ADDED
Binary file
images/icons/112.png ADDED
Binary file
images/icons/113.png ADDED
Binary file
images/icons/114.png ADDED
Binary file
images/icons/115.png ADDED
Binary file
images/icons/116.png ADDED
Binary file
images/icons/117.png ADDED
Binary file
images/icons/118.png ADDED
Binary file
images/icons/119.png ADDED
Binary file
languages/wpfront-scroll-top.mo CHANGED
Binary file
languages/wpfront-scroll-top.po CHANGED
@@ -1,8 +1,8 @@
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: WPFront Notification Bar\n"
4
- "POT-Creation-Date: 2016-11-15 11:37+0530\n"
5
- "PO-Revision-Date: 2016-11-15 11:37+0530\n"
6
  "Last-Translator: \n"
7
  "Language-Team: WPFront <contact@wpfront.com>\n"
8
  "Language: en\n"
@@ -16,102 +16,19 @@ msgstr ""
16
  "X-Poedit-KeywordsList: __;_e\n"
17
  "X-Poedit-SearchPath-0: ..\n"
18
 
19
- #: ../classes/base/class-wpfront-base-menu.php:52
20
- msgid "Name"
21
- msgstr "Name"
22
-
23
- #: ../classes/base/class-wpfront-base-menu.php:53
24
- msgid "Version"
25
- msgstr "Version"
26
-
27
  #: ../classes/base/class-wpfront-base-menu.php:54
28
- msgid "Rating"
29
- msgstr "Rating"
30
-
31
- #: ../classes/base/class-wpfront-base-menu.php:55
32
- msgid "Description"
33
- msgstr "Description"
34
-
35
- #: ../classes/base/class-wpfront-base-menu.php:69
36
- #, php-format
37
- msgid "based on %s rating(s)"
38
- msgstr "based on %s rating(s)"
39
-
40
- #: ../classes/base/class-wpfront-base-menu.php:105
41
- msgid "Unable to communicate with WordPress.org"
42
- msgstr "Unable to communicate with WordPress.org"
43
-
44
- #: ../classes/base/class-wpfront-base-menu.php:123
45
- #: ../classes/base/class-wpfront-base-menu.php:217
46
- msgid "WPFront Plugins"
47
- msgstr "WPFront Plugins"
48
-
49
- #: ../classes/base/class-wpfront-base-menu.php:147
50
- #, php-format
51
- msgid "By %s"
52
- msgstr "By %s"
53
-
54
- #: ../classes/base/class-wpfront-base-menu.php:154
55
- #, php-format
56
- msgid "More information about %s"
57
- msgstr "More information about %s"
58
-
59
- #: ../classes/base/class-wpfront-base-menu.php:154
60
- msgid "Details"
61
- msgstr "Details"
62
-
63
- #: ../classes/base/class-wpfront-base-menu.php:163
64
- #, php-format
65
- msgid "Install %s"
66
- msgstr "Install %s"
67
-
68
- #: ../classes/base/class-wpfront-base-menu.php:163
69
- msgid "Install Now"
70
- msgstr "Install Now"
71
-
72
- #: ../classes/base/class-wpfront-base-menu.php:168
73
- #, php-format
74
- msgid "Update to version %s"
75
- msgstr "Update to version %s"
76
-
77
- #: ../classes/base/class-wpfront-base-menu.php:168
78
- msgid "Update Now"
79
- msgstr "Update Now"
80
-
81
- #: ../classes/base/class-wpfront-base-menu.php:173
82
- msgid "This plugin is already installed and is up to date"
83
- msgstr "This plugin is already installed and is up to date"
84
-
85
- #: ../classes/base/class-wpfront-base-menu.php:173
86
- msgid "Installed"
87
- msgstr "Installed"
88
-
89
- #: ../classes/base/class-wpfront-base-menu.php:175
90
- #: ../classes/base/class-wpfront-base.php:105
91
- msgid "Settings"
92
- msgstr "Settings"
93
-
94
- #: ../classes/base/class-wpfront-base-menu.php:177
95
- msgid "Activate"
96
- msgstr "Activate"
97
-
98
- #: ../classes/base/class-wpfront-base-menu.php:199
99
- msgid "Feedback"
100
- msgstr "Feedback"
101
-
102
- #: ../classes/base/class-wpfront-base-menu.php:216
103
  msgid "WPFront"
104
  msgstr "WPFront"
105
 
106
- #: ../classes/base/class-wpfront-base-menu.php:217
107
- msgid "All Plugins"
108
- msgstr "All Plugins"
109
 
110
- #: ../classes/base/class-wpfront-base.php:130
111
  msgid "You do not have sufficient permissions to access this page."
112
  msgstr "You do not have sufficient permissions to access this page."
113
 
114
- #: ../classes/base/class-wpfront-base.php:150
115
  msgid ""
116
  "If you have a caching plugin, clear the cache for the new settings to take "
117
  "effect."
@@ -119,19 +36,19 @@ msgstr ""
119
  "If you have a caching plugin, clear the cache for the new settings to take "
120
  "effect."
121
 
122
- #: ../classes/base/class-wpfront-base.php:168
123
  msgid "Settings Description"
124
  msgstr "Settings Description"
125
 
126
- #: ../classes/base/class-wpfront-base.php:170
127
- msgid "Write Review"
128
- msgstr "Write Review"
129
 
130
- #: ../classes/base/class-wpfront-base.php:172
131
  msgid "Buy me a Beer or Coffee"
132
  msgstr "Buy me a Beer or Coffee"
133
 
134
- #: ../classes/base/class-wpfront-base.php:189
135
  msgid "Save Changes"
136
  msgstr "Save Changes"
137
 
@@ -199,58 +116,85 @@ msgstr "Hide on WP-ADMIN"
199
  msgid "Hide on iframes"
200
  msgstr "Hide on iframes"
201
 
202
- #: ../classes/class-wpfront-scroll-top-options.php:60
203
- #: ../templates/options-template.php:235
 
 
 
 
204
  msgid "Location"
205
  msgstr "Location"
206
 
207
- #: ../classes/class-wpfront-scroll-top-options.php:61
208
  msgid "Margin X"
209
  msgstr "Margin X"
210
 
211
- #: ../classes/class-wpfront-scroll-top-options.php:62
212
  msgid "Margin Y"
213
  msgstr "Margin Y"
214
 
215
- #: ../classes/class-wpfront-scroll-top-options.php:64
216
- #: ../templates/options-template.php:179
217
  msgid "Text"
218
  msgstr "Text"
219
 
220
- #: ../classes/class-wpfront-scroll-top-options.php:65
221
  msgid "Text Color"
222
  msgstr "Text Color"
223
 
224
- #: ../classes/class-wpfront-scroll-top-options.php:66
225
  msgid "Background Color"
226
  msgstr "Background Color"
227
 
228
- #: ../classes/class-wpfront-scroll-top-options.php:67
 
 
 
 
 
229
  msgid "Custom CSS"
230
  msgstr "Custom CSS"
231
 
232
- #: ../classes/class-wpfront-scroll-top-options.php:69
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
233
  msgid "Display on Pages"
234
  msgstr "Display on Pages"
235
 
236
- #: ../classes/class-wpfront-scroll-top.php:65
 
237
  msgid "WPFront Scroll Top"
238
  msgstr "WPFront Scroll Top"
239
 
240
- #: ../classes/class-wpfront-scroll-top.php:65
 
241
  msgid "Scroll Top"
242
  msgstr "Scroll Top"
243
 
244
- #: ../classes/class-wpfront-scroll-top.php:267
245
- #: ../classes/class-wpfront-scroll-top.php:271
246
  msgid "[Page]"
247
  msgstr "[Page]"
248
 
249
- #: ../classes/class-wpfront-scroll-top.php:267
250
  msgid "Home"
251
  msgstr "Home"
252
 
253
- #: ../classes/class-wpfront-scroll-top.php:276
254
  msgid "[Post]"
255
  msgstr "[Post]"
256
 
@@ -280,94 +224,182 @@ msgstr "Button Size"
280
  msgid "[Set 0px to auto fit.]"
281
  msgstr "[Set 0px to auto fit.]"
282
 
283
- #: ../templates/options-template.php:88
284
  msgid "[Button fade duration in milliseconds.]"
285
  msgstr "[Button fade duration in milliseconds.]"
286
 
287
- #: ../templates/options-template.php:97
288
  msgid "[Window scroll duration in milliseconds.]"
289
  msgstr "[Window scroll duration in milliseconds.]"
290
 
291
- #: ../templates/options-template.php:114
292
  msgid ""
293
  "[Button will be auto hidden after this duration in seconds, if enabled.]"
294
  msgstr ""
295
  "[Button will be auto hidden after this duration in seconds, if enabled.]"
296
 
297
- #: ../templates/options-template.php:123
298
  msgid "[Button will be hidden on small devices when the width matches.]"
299
  msgstr "[Button will be hidden on small devices when the width matches.]"
300
 
301
- #: ../templates/options-template.php:132
302
  msgid "[Button will be hidden on devices with lesser or equal width.]"
303
  msgstr "[Button will be hidden on devices with lesser or equal width.]"
304
 
305
- #: ../templates/options-template.php:141
306
  msgid "[Button will be hidden on broswer window when the width matches.]"
307
  msgstr "[Button will be hidden on broswer window when the width matches.]"
308
 
309
- #: ../templates/options-template.php:150
310
  msgid "[Button will be hidden on browser window with lesser or equal width.]"
311
  msgstr "[Button will be hidden on browser window with lesser or equal width.]"
312
 
313
- #: ../templates/options-template.php:159
314
  msgid "[Button will be hidden on 'wp-admin'.]"
315
  msgstr "[Button will be hidden on 'wp-admin'.]"
316
 
317
- #: ../templates/options-template.php:168
318
  msgid "[Button will be hidden on iframes, usually inside popups.]"
319
  msgstr "[Button will be hidden on iframes, usually inside popups.]"
320
 
321
- #: ../templates/options-template.php:177
322
- #: ../templates/options-template.php:326
 
 
 
323
  msgid "Image"
324
  msgstr "Image"
325
 
326
- #: ../templates/options-template.php:193
327
- msgid "Text Button"
328
- msgstr "Text Button"
329
 
330
- #: ../templates/options-template.php:243
331
  msgid "Bottom Right"
332
  msgstr "Bottom Right"
333
 
334
- #: ../templates/options-template.php:244
335
  msgid "Bottom Left"
336
  msgstr "Bottom Left"
337
 
338
- #: ../templates/options-template.php:245
339
  msgid "Top Right"
340
  msgstr "Top Right"
341
 
342
- #: ../templates/options-template.php:246
343
  msgid "Top Left"
344
  msgstr "Top Left"
345
 
346
- #: ../templates/options-template.php:256
347
- #: ../templates/options-template.php:265
348
  msgid "[Negative value allowed.]"
349
  msgstr "[Negative value allowed.]"
350
 
351
- #: ../templates/options-template.php:270
352
  msgid "Filter"
353
  msgstr "Filter"
354
 
355
- #: ../templates/options-template.php:279
356
  msgid "All pages."
357
  msgstr "All pages."
358
 
359
- #: ../templates/options-template.php:284
360
  msgid "Include in following pages"
361
  msgstr "Include in following pages"
362
 
363
- #: ../templates/options-template.php:304
 
 
 
 
 
 
 
364
  msgid "Exclude in following pages"
365
  msgstr "Exclude in following pages"
366
 
367
- #: ../templates/options-template.php:342
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
368
  msgid "Custom URL"
369
  msgstr "Custom URL"
370
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
371
  #~ msgid "Plugin FAQ"
372
  #~ msgstr "Plugin FAQ"
373
 
1
  msgid ""
2
  msgstr ""
3
  "Project-Id-Version: WPFront Notification Bar\n"
4
+ "POT-Creation-Date: 2017-11-18 22:30+0530\n"
5
+ "PO-Revision-Date: 2017-11-18 22:31+0530\n"
6
  "Last-Translator: \n"
7
  "Language-Team: WPFront <contact@wpfront.com>\n"
8
  "Language: en\n"
16
  "X-Poedit-KeywordsList: __;_e\n"
17
  "X-Poedit-SearchPath-0: ..\n"
18
 
 
 
 
 
 
 
 
 
19
  #: ../classes/base/class-wpfront-base-menu.php:54
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  msgid "WPFront"
21
  msgstr "WPFront"
22
 
23
+ #: ../classes/base/class-wpfront-base.php:108
24
+ msgid "Settings"
25
+ msgstr "Settings"
26
 
27
+ #: ../classes/base/class-wpfront-base.php:133
28
  msgid "You do not have sufficient permissions to access this page."
29
  msgstr "You do not have sufficient permissions to access this page."
30
 
31
+ #: ../classes/base/class-wpfront-base.php:153
32
  msgid ""
33
  "If you have a caching plugin, clear the cache for the new settings to take "
34
  "effect."
36
  "If you have a caching plugin, clear the cache for the new settings to take "
37
  "effect."
38
 
39
+ #: ../classes/base/class-wpfront-base.php:181
40
  msgid "Settings Description"
41
  msgstr "Settings Description"
42
 
43
+ #: ../classes/base/class-wpfront-base.php:182
44
+ msgid "Write a Review"
45
+ msgstr "Write a Review"
46
 
47
+ #: ../classes/base/class-wpfront-base.php:183
48
  msgid "Buy me a Beer or Coffee"
49
  msgstr "Buy me a Beer or Coffee"
50
 
51
+ #: ../classes/base/class-wpfront-base.php:193
52
  msgid "Save Changes"
53
  msgstr "Save Changes"
54
 
116
  msgid "Hide on iframes"
117
  msgstr "Hide on iframes"
118
 
119
+ #: ../classes/class-wpfront-scroll-top-options.php:59
120
+ msgid "Move Admin Menu"
121
+ msgstr "Move Admin Menu"
122
+
123
+ #: ../classes/class-wpfront-scroll-top-options.php:61
124
+ #: ../templates/options-template.php:195
125
  msgid "Location"
126
  msgstr "Location"
127
 
128
+ #: ../classes/class-wpfront-scroll-top-options.php:62
129
  msgid "Margin X"
130
  msgstr "Margin X"
131
 
132
+ #: ../classes/class-wpfront-scroll-top-options.php:63
133
  msgid "Margin Y"
134
  msgstr "Margin Y"
135
 
136
+ #: ../classes/class-wpfront-scroll-top-options.php:65
137
+ #: ../templates/options-template.php:187
138
  msgid "Text"
139
  msgstr "Text"
140
 
141
+ #: ../classes/class-wpfront-scroll-top-options.php:66
142
  msgid "Text Color"
143
  msgstr "Text Color"
144
 
145
+ #: ../classes/class-wpfront-scroll-top-options.php:67
146
  msgid "Background Color"
147
  msgstr "Background Color"
148
 
149
+ #: ../classes/class-wpfront-scroll-top-options.php:68
150
+ msgid "Mouse Over Color"
151
+ msgstr "Mouse Over Color"
152
+
153
+ #: ../classes/class-wpfront-scroll-top-options.php:69
154
+ #: ../classes/class-wpfront-scroll-top-options.php:75
155
  msgid "Custom CSS"
156
  msgstr "Custom CSS"
157
 
158
+ #: ../classes/class-wpfront-scroll-top-options.php:71
159
+ msgid "Icon Class"
160
+ msgstr "Icon Class"
161
+
162
+ #: ../classes/class-wpfront-scroll-top-options.php:72
163
+ msgid "Font Awesome URL"
164
+ msgstr "Font Awesome URL"
165
+
166
+ #: ../classes/class-wpfront-scroll-top-options.php:73
167
+ msgid "Do not include URL"
168
+ msgstr "Do not include URL"
169
+
170
+ #: ../classes/class-wpfront-scroll-top-options.php:74
171
+ msgid "Icon Color"
172
+ msgstr "Icon Color"
173
+
174
+ #: ../classes/class-wpfront-scroll-top-options.php:77
175
  msgid "Display on Pages"
176
  msgstr "Display on Pages"
177
 
178
+ #: ../classes/class-wpfront-scroll-top.php:110
179
+ #: ../classes/class-wpfront-scroll-top.php:116
180
  msgid "WPFront Scroll Top"
181
  msgstr "WPFront Scroll Top"
182
 
183
+ #: ../classes/class-wpfront-scroll-top.php:110
184
+ #: ../classes/class-wpfront-scroll-top.php:116
185
  msgid "Scroll Top"
186
  msgstr "Scroll Top"
187
 
188
+ #: ../classes/class-wpfront-scroll-top.php:281
189
+ #: ../classes/class-wpfront-scroll-top.php:285
190
  msgid "[Page]"
191
  msgstr "[Page]"
192
 
193
+ #: ../classes/class-wpfront-scroll-top.php:281
194
  msgid "Home"
195
  msgstr "Home"
196
 
197
+ #: ../classes/class-wpfront-scroll-top.php:290
198
  msgid "[Post]"
199
  msgstr "[Post]"
200
 
224
  msgid "[Set 0px to auto fit.]"
225
  msgstr "[Set 0px to auto fit.]"
226
 
227
+ #: ../templates/options-template.php:87
228
  msgid "[Button fade duration in milliseconds.]"
229
  msgstr "[Button fade duration in milliseconds.]"
230
 
231
+ #: ../templates/options-template.php:96
232
  msgid "[Window scroll duration in milliseconds.]"
233
  msgstr "[Window scroll duration in milliseconds.]"
234
 
235
+ #: ../templates/options-template.php:113
236
  msgid ""
237
  "[Button will be auto hidden after this duration in seconds, if enabled.]"
238
  msgstr ""
239
  "[Button will be auto hidden after this duration in seconds, if enabled.]"
240
 
241
+ #: ../templates/options-template.php:122
242
  msgid "[Button will be hidden on small devices when the width matches.]"
243
  msgstr "[Button will be hidden on small devices when the width matches.]"
244
 
245
+ #: ../templates/options-template.php:131
246
  msgid "[Button will be hidden on devices with lesser or equal width.]"
247
  msgstr "[Button will be hidden on devices with lesser or equal width.]"
248
 
249
+ #: ../templates/options-template.php:140
250
  msgid "[Button will be hidden on broswer window when the width matches.]"
251
  msgstr "[Button will be hidden on broswer window when the width matches.]"
252
 
253
+ #: ../templates/options-template.php:149
254
  msgid "[Button will be hidden on browser window with lesser or equal width.]"
255
  msgstr "[Button will be hidden on browser window with lesser or equal width.]"
256
 
257
+ #: ../templates/options-template.php:158
258
  msgid "[Button will be hidden on 'wp-admin'.]"
259
  msgstr "[Button will be hidden on 'wp-admin'.]"
260
 
261
+ #: ../templates/options-template.php:167
262
  msgid "[Button will be hidden on iframes, usually inside popups.]"
263
  msgstr "[Button will be hidden on iframes, usually inside popups.]"
264
 
265
+ #: ../templates/options-template.php:176
266
+ msgid "[This will place the 'Scroll Top' menu under 'Settings'.]"
267
+ msgstr "[This will place the 'Scroll Top' menu under 'Settings'.]"
268
+
269
+ #: ../templates/options-template.php:185
270
  msgid "Image"
271
  msgstr "Image"
272
 
273
+ #: ../templates/options-template.php:189
274
+ msgid "Font Awesome"
275
+ msgstr "Font Awesome"
276
 
277
+ #: ../templates/options-template.php:203
278
  msgid "Bottom Right"
279
  msgstr "Bottom Right"
280
 
281
+ #: ../templates/options-template.php:204
282
  msgid "Bottom Left"
283
  msgstr "Bottom Left"
284
 
285
+ #: ../templates/options-template.php:205
286
  msgid "Top Right"
287
  msgstr "Top Right"
288
 
289
+ #: ../templates/options-template.php:206
290
  msgid "Top Left"
291
  msgstr "Top Left"
292
 
293
+ #: ../templates/options-template.php:216
294
+ #: ../templates/options-template.php:225
295
  msgid "[Negative value allowed.]"
296
  msgstr "[Negative value allowed.]"
297
 
298
+ #: ../templates/options-template.php:230
299
  msgid "Filter"
300
  msgstr "Filter"
301
 
302
+ #: ../templates/options-template.php:239
303
  msgid "All pages."
304
  msgstr "All pages."
305
 
306
+ #: ../templates/options-template.php:244
307
  msgid "Include in following pages"
308
  msgstr "Include in following pages"
309
 
310
+ #: ../templates/options-template.php:244
311
+ #: ../templates/options-template.php:265
312
+ msgid ""
313
+ "[Use the textbox below to specify the post IDs as a comma separated list.]"
314
+ msgstr ""
315
+ "[Use the textbox below to specify the post IDs as a comma separated list.]"
316
+
317
+ #: ../templates/options-template.php:265
318
  msgid "Exclude in following pages"
319
  msgstr "Exclude in following pages"
320
 
321
+ #: ../templates/options-template.php:288
322
+ msgid "Text Button"
323
+ msgstr "Text Button"
324
+
325
+ #: ../templates/options-template.php:338
326
+ #: ../templates/options-template.php:351
327
+ #: ../templates/options-template.php:391
328
+ msgid "ex:"
329
+ msgstr "ex:"
330
+
331
+ #: ../templates/options-template.php:343
332
+ msgid "Font Awesome Button"
333
+ msgstr "Font Awesome Button"
334
+
335
+ #: ../templates/options-template.php:396
336
+ msgid "Image Button"
337
+ msgstr "Image Button"
338
+
339
+ #: ../templates/options-template.php:413
340
  msgid "Custom URL"
341
  msgstr "Custom URL"
342
 
343
+ #~ msgid "Name"
344
+ #~ msgstr "Name"
345
+
346
+ #~ msgid "Version"
347
+ #~ msgstr "Version"
348
+
349
+ #~ msgid "Rating"
350
+ #~ msgstr "Rating"
351
+
352
+ #~ msgid "Description"
353
+ #~ msgstr "Description"
354
+
355
+ #~ msgid "based on %s rating(s)"
356
+ #~ msgstr "based on %s rating(s)"
357
+
358
+ #~ msgid "Unable to communicate with WordPress.org"
359
+ #~ msgstr "Unable to communicate with WordPress.org"
360
+
361
+ #~ msgid "WPFront Plugins"
362
+ #~ msgstr "WPFront Plugins"
363
+
364
+ #~ msgid "By %s"
365
+ #~ msgstr "By %s"
366
+
367
+ #~ msgid "More information about %s"
368
+ #~ msgstr "More information about %s"
369
+
370
+ #~ msgid "Details"
371
+ #~ msgstr "Details"
372
+
373
+ #~ msgid "Install %s"
374
+ #~ msgstr "Install %s"
375
+
376
+ #~ msgid "Install Now"
377
+ #~ msgstr "Install Now"
378
+
379
+ #~ msgid "Update to version %s"
380
+ #~ msgstr "Update to version %s"
381
+
382
+ #~ msgid "Update Now"
383
+ #~ msgstr "Update Now"
384
+
385
+ #~ msgid "This plugin is already installed and is up to date"
386
+ #~ msgstr "This plugin is already installed and is up to date"
387
+
388
+ #~ msgid "Installed"
389
+ #~ msgstr "Installed"
390
+
391
+ #~ msgid "Activate"
392
+ #~ msgstr "Activate"
393
+
394
+ #~ msgid "Feedback"
395
+ #~ msgstr "Feedback"
396
+
397
+ #~ msgid "All Plugins"
398
+ #~ msgstr "All Plugins"
399
+
400
+ #~ msgid "Write Review"
401
+ #~ msgstr "Write Review"
402
+
403
  #~ msgid "Plugin FAQ"
404
  #~ msgstr "Plugin FAQ"
405
 
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
- === WPFront Scroll Top ===
2
  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: 4.1
6
  Tested up to: 4.9
7
- Stable tag: 1.5
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -16,7 +16,7 @@ WPFront Scroll Top plugin allows the visitor to easily scroll back to the top of
16
  ### Features
17
  * Displays a button when user scrolls down the page.
18
  * Scrolls the page back to top with animation.
19
- * Create text or image button.
20
  * Set any image you want.
21
  * Hide on small devices.
22
  * Hide on iframes.
@@ -28,8 +28,6 @@ http://www.youtube.com/watch?v=DJ55kwTOerE
28
 
29
  Visit [WPFront Scroll Top Settings](http://wpfront.com/scroll-top-plugin-settings/) page for detailed option descriptions.
30
 
31
- Visit [WPFront Scroll Top FAQ](http://wpfront.com/scroll-top-plugin-faq/) page for FAQ.
32
-
33
  == Installation ==
34
 
35
  1. Click Plugins/Add New from the WordPress admin panel
@@ -48,12 +46,18 @@ Visit [WPFront Scroll Top FAQ](http://wpfront.com/scroll-top-plugin-faq/) page f
48
 
49
  == Screenshots ==
50
 
51
- 1. Example 1.
52
- 2. Example 2.
53
- 3. Settings page.
54
 
55
  == Changelog ==
56
 
 
 
 
 
 
 
 
 
57
  = 1.5 =
58
  * JavaScript async.
59
  * Minified files.
@@ -106,6 +110,9 @@ Visit [WPFront Scroll Top FAQ](http://wpfront.com/scroll-top-plugin-faq/) page f
106
 
107
  == Upgrade Notice ==
108
 
 
 
 
109
  = 1.5 =
110
  * Performance improvements.
111
 
1
+ === WPFront Scroll Top ===
2
  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: 4.1
6
  Tested up to: 4.9
7
+ Stable tag: 1.6
8
  License: GPLv3
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
16
  ### Features
17
  * Displays a button when user scrolls down the page.
18
  * Scrolls the page back to top with animation.
19
+ * Create text, image or Font Awesome button.
20
  * Set any image you want.
21
  * Hide on small devices.
22
  * Hide on iframes.
28
 
29
  Visit [WPFront Scroll Top Settings](http://wpfront.com/scroll-top-plugin-settings/) page for detailed option descriptions.
30
 
 
 
31
  == Installation ==
32
 
33
  1. Click Plugins/Add New from the WordPress admin panel
46
 
47
  == Screenshots ==
48
 
49
+ 1. Settings page.
 
 
50
 
51
  == Changelog ==
52
 
53
+ = 1.6 =
54
+ * Font Awesome icons support.
55
+ * New image icons.
56
+ * Setting for moving menu under 'Settings'.
57
+ * Performance improvement.
58
+ * UI improvement.
59
+ * PHP 7 compatibility fixes.
60
+
61
  = 1.5 =
62
  * JavaScript async.
63
  * Minified files.
110
 
111
  == Upgrade Notice ==
112
 
113
+ = 1.6 =
114
+ * Performance improvements and new features added.
115
+
116
  = 1.5 =
117
  * Performance improvements.
118
 
templates/options-template.php CHANGED
@@ -29,9 +29,9 @@
29
  */
30
  ?>
31
 
32
- <?php @$this->options_page_header($this->__('WPFront Scroll Top Settings'), WPFront_Scroll_Top::OPTIONS_GROUP_NAME); ?>
33
 
34
- <h3><?php echo $this->__('Display'); ?></h3>
35
  <table class="form-table">
36
  <tr>
37
  <th scope="row">
@@ -47,7 +47,7 @@
47
  </th>
48
  <td>
49
  <input type="checkbox" name="<?php echo $this->options->javascript_async_name(); ?>" <?php echo $this->options->javascript_async() ? 'checked' : ''; ?> />
50
- <span class="description"><?php echo $this->__('[Increases site performance. Keep it enabled, if there are no conflicts.]'); ?></span>
51
  </td>
52
  </tr>
53
  <tr>
@@ -56,19 +56,18 @@
56
  </th>
57
  <td>
58
  <input class="pixels" name="<?php echo $this->options->scroll_offset_name(); ?>" value="<?php echo $this->options->scroll_offset(); ?>" />px
59
- <span class="description"><?php echo $this->__('[Number of pixels to be scrolled before the button appears.]'); ?></span>
60
  </td>
61
  </tr>
62
  <tr>
63
  <th scope="row">
64
- <?php echo $this->__('Button Size'); ?>
65
  </th>
66
  <td>
67
  <input class="pixels" name="<?php echo $this->options->button_width_name(); ?>" value="<?php echo $this->options->button_width(); ?>" />px
68
  X
69
  <input class="pixels" name="<?php echo $this->options->button_height_name(); ?>" value="<?php echo $this->options->button_height(); ?>" />px
70
- <span class="description"><?php echo $this->__('[Set 0px to auto fit.]'); ?></span>
71
-
72
  </td>
73
  </tr>
74
  <tr>
@@ -85,7 +84,7 @@
85
  </th>
86
  <td>
87
  <input class="seconds" name="<?php echo $this->options->button_fade_duration_name(); ?>" value="<?php echo $this->options->button_fade_duration(); ?>" />ms
88
- <span class="description"><?php echo $this->__('[Button fade duration in milliseconds.]'); ?></span>
89
  </td>
90
  </tr>
91
  <tr>
@@ -94,7 +93,7 @@
94
  </th>
95
  <td>
96
  <input class="seconds" name="<?php echo $this->options->scroll_duration_name(); ?>" value="<?php echo $this->options->scroll_duration(); ?>" />ms
97
- <span class="description"><?php echo $this->__('[Window scroll duration in milliseconds.]'); ?></span>
98
  </td>
99
  </tr>
100
  <tr>
@@ -111,7 +110,7 @@
111
  </th>
112
  <td>
113
  <input class="seconds" name="<?php echo $this->options->auto_hide_after_name(); ?>" value="<?php echo $this->options->auto_hide_after(); ?>" />sec
114
- <span class="description"><?php echo $this->__('[Button will be auto hidden after this duration in seconds, if enabled.]'); ?></span>
115
  </td>
116
  </tr>
117
  <tr>
@@ -120,7 +119,7 @@
120
  </th>
121
  <td>
122
  <input type="checkbox" name="<?php echo $this->options->hide_small_device_name(); ?>" <?php echo $this->options->hide_small_device() ? "checked" : ""; ?> />
123
- <span class="description"><?php echo $this->__('[Button will be hidden on small devices when the width matches.]'); ?></span>
124
  </td>
125
  </tr>
126
  <tr>
@@ -129,7 +128,7 @@
129
  </th>
130
  <td>
131
  <input class="pixels" name="<?php echo $this->options->small_device_width_name(); ?>" value="<?php echo $this->options->small_device_width(); ?>" />px
132
- <span class="description"><?php echo $this->__('[Button will be hidden on devices with lesser or equal width.]'); ?></span>
133
  </td>
134
  </tr>
135
  <tr>
@@ -138,7 +137,7 @@
138
  </th>
139
  <td>
140
  <input type="checkbox" name="<?php echo $this->options->hide_small_window_name(); ?>" <?php echo $this->options->hide_small_window() ? "checked" : ""; ?> />
141
- <span class="description"><?php echo $this->__('[Button will be hidden on broswer window when the width matches.]'); ?></span>
142
  </td>
143
  </tr>
144
  <tr>
@@ -147,7 +146,7 @@
147
  </th>
148
  <td>
149
  <input class="pixels" name="<?php echo $this->options->small_window_width_name(); ?>" value="<?php echo $this->options->small_window_width(); ?>" />px
150
- <span class="description"><?php echo $this->__('[Button will be hidden on browser window with lesser or equal width.]'); ?></span>
151
  </td>
152
  </tr>
153
  <tr>
@@ -156,7 +155,7 @@
156
  </th>
157
  <td>
158
  <input type="checkbox" name="<?php echo $this->options->hide_wpadmin_name(); ?>" <?php echo $this->options->hide_wpadmin() ? "checked" : ""; ?> />
159
- <span class="description"><?php echo $this->__('[Button will be hidden on \'wp-admin\'.]'); ?></span>
160
  </td>
161
  </tr>
162
  <tr>
@@ -165,74 +164,35 @@
165
  </th>
166
  <td>
167
  <input type="checkbox" name="<?php echo $this->options->hide_iframe_name(); ?>" <?php echo $this->options->hide_iframe() ? "checked" : ""; ?> />
168
- <span class="description"><?php echo $this->__('[Button will be hidden on iframes, usually inside popups.]'); ?></span>
169
- </td>
170
- </tr>
171
- <tr>
172
- <th scope="row">
173
- <?php echo $this->options->button_style_label(); ?>
174
- </th>
175
- <td>
176
- <div>
177
- <label><input type="radio" name="<?php echo $this->options->button_style_name(); ?>" value="image" <?php echo $this->options->button_style() == 'image' ? 'checked' : ''; ?> /> <?php echo $this->__('Image'); ?></label>
178
- <br />
179
- <label><input type="radio" name="<?php echo $this->options->button_style_name(); ?>" value="text" <?php echo $this->options->button_style() == 'text' ? 'checked' : ''; ?> /> <?php echo $this->__('Text'); ?></label>
180
- </div>
181
- </td>
182
- </tr>
183
- <tr>
184
- <th scope="row">
185
- <?php echo $this->options->image_alt_label(); ?>
186
- </th>
187
- <td>
188
- <input class="altText" name="<?php echo $this->options->image_alt_name(); ?>" value="<?php echo $this->options->image_alt(); ?>" />
189
- </td>
190
- </tr>
191
- </table>
192
-
193
- <h3><?php echo $this->__('Text Button'); ?></h3>
194
- <table class="form-table">
195
- <tr>
196
- <th scope="row">
197
- <?php echo $this->options->text_button_text_label(); ?>
198
- </th>
199
- <td>
200
- <input name="<?php echo $this->options->text_button_text_name(); ?>" value="<?php echo $this->options->text_button_text(); ?>" />
201
  </td>
202
  </tr>
203
  <tr>
204
  <th scope="row">
205
- <?php echo $this->options->text_button_text_color_label(); ?>
206
  </th>
207
  <td>
208
- <div class="color-selector-div">
209
- <div class="color-selector" color="<?php echo $this->options->text_button_text_color(); ?>"></div>&#160;<span><?php echo $this->options->text_button_text_color(); ?></span>
210
- <input type="hidden" name="<?php echo $this->options->text_button_text_color_name(); ?>" value="<?php echo $this->options->text_button_text_color(); ?>" />
211
- </div>
212
  </td>
213
  </tr>
214
  <tr>
215
  <th scope="row">
216
- <?php echo $this->options->text_button_background_color_label(); ?>
217
  </th>
218
  <td>
219
- <div class="color-selector-div">
220
- <div class="color-selector" color="<?php echo $this->options->text_button_background_color(); ?>"></div>&#160;<span><?php echo $this->options->text_button_background_color(); ?></span>
221
- <input type="hidden" name="<?php echo $this->options->text_button_background_color_name(); ?>" value="<?php echo $this->options->text_button_background_color(); ?>" />
 
 
 
222
  </div>
223
  </td>
224
  </tr>
225
- <tr>
226
- <th scope="row">
227
- <?php echo $this->options->text_button_css_label(); ?>
228
- </th>
229
- <td>
230
- <textarea name="<?php echo $this->options->text_button_css_name(); ?>" rows="5" cols="50"><?php echo $this->options->text_button_css(); ?></textarea>
231
- </td>
232
- </tr>
233
  </table>
234
 
235
- <h3><?php echo $this->__('Location'); ?></h3>
236
  <table class="form-table">
237
  <tr>
238
  <th scope="row">
@@ -240,10 +200,10 @@
240
  </th>
241
  <td>
242
  <select name="<?php echo $this->options->location_name(); ?>">
243
- <option value="1" <?php echo $this->options->location() == 1 ? 'selected' : ''; ?> ><?php echo $this->__('Bottom Right'); ?></option>
244
- <option value="2" <?php echo $this->options->location() == 2 ? 'selected' : ''; ?> ><?php echo $this->__('Bottom Left'); ?></option>
245
- <option value="3" <?php echo $this->options->location() == 3 ? 'selected' : ''; ?> ><?php echo $this->__('Top Right'); ?></option>
246
- <option value="4" <?php echo $this->options->location() == 4 ? 'selected' : ''; ?> ><?php echo $this->__('Top Left'); ?></option>
247
  </select>
248
  </td>
249
  </tr>
@@ -253,7 +213,7 @@
253
  </th>
254
  <td>
255
  <input class="pixels" name="<?php echo $this->options->marginX_name(); ?>" value="<?php echo $this->options->marginX(); ?>" />px
256
- <span class="description"><?php echo $this->__('[Negative value allowed.]'); ?></span>
257
  </td>
258
  </tr>
259
  <tr>
@@ -262,12 +222,12 @@
262
  </th>
263
  <td>
264
  <input class="pixels" name="<?php echo $this->options->marginY_name(); ?>" value="<?php echo $this->options->marginY(); ?>" />px
265
- <span class="description"><?php echo $this->__('[Negative value allowed.]'); ?></span>
266
  </td>
267
  </tr>
268
  </table>
269
 
270
- <h3><?php echo $this->__('Filter'); ?></h3>
271
  <table class="form-table">
272
  <tr>
273
  <th scope="row">
@@ -276,15 +236,16 @@
276
  <td>
277
  <label>
278
  <input type="radio" name="<?php echo $this->options->display_pages_name(); ?>" value="1" <?php echo $this->options->display_pages() == 1 ? 'checked' : ''; ?> />
279
- <span><?php echo $this->__('All pages.'); ?></span>
280
  </label>
281
  <br />
282
  <label>
283
  <input type="radio" name="<?php echo $this->options->display_pages_name(); ?>" value="2" <?php echo $this->options->display_pages() == 2 ? 'checked' : ''; ?> />
284
- <span><?php echo $this->__('Include in following pages'); ?></span>
285
  </label>
 
 
286
  <div class="pages-selection">
287
- <input type="hidden" name="<?php echo $this->options->include_pages_name(); ?>" value="<?php echo $this->options->include_pages(); ?>" />
288
  <?php
289
  $objects = $this->get_filter_objects();
290
  foreach ($objects as $key => $value) {
@@ -301,10 +262,11 @@
301
  </div>
302
  <label>
303
  <input type="radio" name="<?php echo $this->options->display_pages_name(); ?>" value="3" <?php echo $this->options->display_pages() == 3 ? 'checked' : ''; ?> />
304
- <span><?php echo $this->__('Exclude in following pages'); ?></span>
305
  </label>
 
 
306
  <div class="pages-selection">
307
- <input type="hidden" name="<?php echo $this->options->exclude_pages_name(); ?>" value="<?php echo $this->options->exclude_pages(); ?>" />
308
  <?php
309
  $objects = $this->get_filter_objects();
310
  foreach ($objects as $key => $value) {
@@ -323,31 +285,166 @@
323
  </tr>
324
  </table>
325
 
326
- <h3><?php echo $this->__('Image'); ?></h3>
327
- <div class="icons-container">
328
- <?php
329
- $files = scandir($this->iconsDIR);
330
- foreach ($files as $file) {
331
- if ($file == '.' || $file == '..')
332
- continue;
333
- echo '<div ' . ($this->options->image() == $file ? 'class="selected"' : '') . '>';
334
- echo '<input id="' . $file . '" name="' . $this->options->image_name() . '" type="radio" value="' . $file . '" ' . ($this->options->image() == $file ? 'checked' : '') . ' />';
335
- echo '<label for="' . $file . '"><img src="' . $this->iconsURL . $file . '"/></label>';
336
- echo '</div>';
337
- }
338
- ?>
339
- </div>
340
- <div>
341
- <input id="custom" name="<?php echo $this->options->image_name(); ?>" type="radio" value="custom" <?php echo ($this->options->image() == 'custom' ? 'checked' : ''); ?> />
342
- <label for="custom"><?php echo $this->__('Custom URL'); ?>
343
- <input class="customImage" name="<?php echo $this->options->custom_url_name(); ?>" value="<?php echo $this->options->custom_url(); ?>"/>
344
- </label>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
345
  </div>
346
 
347
  <?php @$this->options_page_footer('scroll-top-plugin-settings/', 'scroll-top-plugin-faq/'); ?>
348
 
349
  <script type="text/javascript">
350
  (function($) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
351
  function setColorPicker(div) {
352
  div.ColorPicker({
353
  color: div.attr('color'),
@@ -370,14 +467,25 @@
370
  });
371
 
372
  $('#wpfront-scroll-top-options .pages-selection input[type="checkbox"]').change(function() {
373
- var values = [];
374
- var div = $(this).parent().parent().parent();
375
- div.find('input:checked').each(function(i, e) {
376
- values.push($(e).val());
377
- });
378
- div.children(":first").val(values.join());
 
 
 
 
 
 
379
  });
380
-
 
 
 
 
 
381
  })(jQuery);
382
  </script>
383
 
29
  */
30
  ?>
31
 
32
+ <?php @$this->options_page_header(__('WPFront Scroll Top Settings', 'wpfront-scroll-top'), WPFront_Scroll_Top::OPTIONS_GROUP_NAME); ?>
33
 
34
+ <h3><?php echo __('Display', 'wpfront-scroll-top'); ?></h3>
35
  <table class="form-table">
36
  <tr>
37
  <th scope="row">
47
  </th>
48
  <td>
49
  <input type="checkbox" name="<?php echo $this->options->javascript_async_name(); ?>" <?php echo $this->options->javascript_async() ? 'checked' : ''; ?> />
50
+ <span class="description"><?php echo __('[Increases site performance. Keep it enabled, if there are no conflicts.]', 'wpfront-scroll-top'); ?></span>
51
  </td>
52
  </tr>
53
  <tr>
56
  </th>
57
  <td>
58
  <input class="pixels" name="<?php echo $this->options->scroll_offset_name(); ?>" value="<?php echo $this->options->scroll_offset(); ?>" />px
59
+ <span class="description"><?php echo __('[Number of pixels to be scrolled before the button appears.]', 'wpfront-scroll-top'); ?></span>
60
  </td>
61
  </tr>
62
  <tr>
63
  <th scope="row">
64
+ <?php echo __('Button Size', 'wpfront-scroll-top'); ?>
65
  </th>
66
  <td>
67
  <input class="pixels" name="<?php echo $this->options->button_width_name(); ?>" value="<?php echo $this->options->button_width(); ?>" />px
68
  X
69
  <input class="pixels" name="<?php echo $this->options->button_height_name(); ?>" value="<?php echo $this->options->button_height(); ?>" />px
70
+ <span class="description"><?php echo __('[Set 0px to auto fit.]', 'wpfront-scroll-top'); ?></span>
 
71
  </td>
72
  </tr>
73
  <tr>
84
  </th>
85
  <td>
86
  <input class="seconds" name="<?php echo $this->options->button_fade_duration_name(); ?>" value="<?php echo $this->options->button_fade_duration(); ?>" />ms
87
+ <span class="description"><?php echo __('[Button fade duration in milliseconds.]', 'wpfront-scroll-top'); ?></span>
88
  </td>
89
  </tr>
90
  <tr>
93
  </th>
94
  <td>
95
  <input class="seconds" name="<?php echo $this->options->scroll_duration_name(); ?>" value="<?php echo $this->options->scroll_duration(); ?>" />ms
96
+ <span class="description"><?php echo __('[Window scroll duration in milliseconds.]', 'wpfront-scroll-top'); ?></span>
97
  </td>
98
  </tr>
99
  <tr>
110
  </th>
111
  <td>
112
  <input class="seconds" name="<?php echo $this->options->auto_hide_after_name(); ?>" value="<?php echo $this->options->auto_hide_after(); ?>" />sec
113
+ <span class="description"><?php echo __('[Button will be auto hidden after this duration in seconds, if enabled.]', 'wpfront-scroll-top'); ?></span>
114
  </td>
115
  </tr>
116
  <tr>
119
  </th>
120
  <td>
121
  <input type="checkbox" name="<?php echo $this->options->hide_small_device_name(); ?>" <?php echo $this->options->hide_small_device() ? "checked" : ""; ?> />
122
+ <span class="description"><?php echo __('[Button will be hidden on small devices when the width matches.]', 'wpfront-scroll-top'); ?></span>
123
  </td>
124
  </tr>
125
  <tr>
128
  </th>
129
  <td>
130
  <input class="pixels" name="<?php echo $this->options->small_device_width_name(); ?>" value="<?php echo $this->options->small_device_width(); ?>" />px
131
+ <span class="description"><?php echo __('[Button will be hidden on devices with lesser or equal width.]', 'wpfront-scroll-top'); ?></span>
132
  </td>
133
  </tr>
134
  <tr>
137
  </th>
138
  <td>
139
  <input type="checkbox" name="<?php echo $this->options->hide_small_window_name(); ?>" <?php echo $this->options->hide_small_window() ? "checked" : ""; ?> />
140
+ <span class="description"><?php echo __('[Button will be hidden on broswer window when the width matches.]', 'wpfront-scroll-top'); ?></span>
141
  </td>
142
  </tr>
143
  <tr>
146
  </th>
147
  <td>
148
  <input class="pixels" name="<?php echo $this->options->small_window_width_name(); ?>" value="<?php echo $this->options->small_window_width(); ?>" />px
149
+ <span class="description"><?php echo __('[Button will be hidden on browser window with lesser or equal width.]', 'wpfront-scroll-top'); ?></span>
150
  </td>
151
  </tr>
152
  <tr>
155
  </th>
156
  <td>
157
  <input type="checkbox" name="<?php echo $this->options->hide_wpadmin_name(); ?>" <?php echo $this->options->hide_wpadmin() ? "checked" : ""; ?> />
158
+ <span class="description"><?php echo __('[Button will be hidden on \'wp-admin\'.]', 'wpfront-scroll-top'); ?></span>
159
  </td>
160
  </tr>
161
  <tr>
164
  </th>
165
  <td>
166
  <input type="checkbox" name="<?php echo $this->options->hide_iframe_name(); ?>" <?php echo $this->options->hide_iframe() ? "checked" : ""; ?> />
167
+ <span class="description"><?php echo __('[Button will be hidden on iframes, usually inside popups.]', 'wpfront-scroll-top'); ?></span>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
168
  </td>
169
  </tr>
170
  <tr>
171
  <th scope="row">
172
+ <?php echo $this->options->move_admin_menu_label(); ?>
173
  </th>
174
  <td>
175
+ <input class="move-admin-menu" type="checkbox" name="<?php echo $this->options->move_admin_menu_name(); ?>" <?php echo $this->options->move_admin_menu() ? "checked" : ""; ?> />
176
+ <span class="description"><?php echo __('[This will place the \'Scroll Top\' menu under \'Settings\'.]', 'wpfront-scroll-top'); ?></span>
 
 
177
  </td>
178
  </tr>
179
  <tr>
180
  <th scope="row">
181
+ <?php echo $this->options->button_style_label(); ?>
182
  </th>
183
  <td>
184
+ <div>
185
+ <label><input type="radio" class="button-style" name="<?php echo $this->options->button_style_name(); ?>" value="image" <?php echo $this->options->button_style() == 'image' ? 'checked' : ''; ?> /> <?php echo __('Image', 'wpfront-scroll-top'); ?></label>
186
+ <br />
187
+ <label><input type="radio" class="button-style" name="<?php echo $this->options->button_style_name(); ?>" value="text" <?php echo $this->options->button_style() == 'text' ? 'checked' : ''; ?> /> <?php echo __('Text', 'wpfront-scroll-top'); ?></label>
188
+ <br />
189
+ <label><input type="radio" class="button-style" name="<?php echo $this->options->button_style_name(); ?>" value="font-awesome" <?php echo $this->options->button_style() == 'font-awesome' ? 'checked' : ''; ?> /> <?php echo __('Font Awesome', 'wpfront-scroll-top'); ?></label>
190
  </div>
191
  </td>
192
  </tr>
 
 
 
 
 
 
 
 
193
  </table>
194
 
195
+ <h3><?php echo __('Location', 'wpfront-scroll-top'); ?></h3>
196
  <table class="form-table">
197
  <tr>
198
  <th scope="row">
200
  </th>
201
  <td>
202
  <select name="<?php echo $this->options->location_name(); ?>">
203
+ <option value="1" <?php echo $this->options->location() == 1 ? 'selected' : ''; ?> ><?php echo __('Bottom Right', 'wpfront-scroll-top'); ?></option>
204
+ <option value="2" <?php echo $this->options->location() == 2 ? 'selected' : ''; ?> ><?php echo __('Bottom Left', 'wpfront-scroll-top'); ?></option>
205
+ <option value="3" <?php echo $this->options->location() == 3 ? 'selected' : ''; ?> ><?php echo __('Top Right', 'wpfront-scroll-top'); ?></option>
206
+ <option value="4" <?php echo $this->options->location() == 4 ? 'selected' : ''; ?> ><?php echo __('Top Left', 'wpfront-scroll-top'); ?></option>
207
  </select>
208
  </td>
209
  </tr>
213
  </th>
214
  <td>
215
  <input class="pixels" name="<?php echo $this->options->marginX_name(); ?>" value="<?php echo $this->options->marginX(); ?>" />px
216
+ <span class="description"><?php echo __('[Negative value allowed.]', 'wpfront-scroll-top'); ?></span>
217
  </td>
218
  </tr>
219
  <tr>
222
  </th>
223
  <td>
224
  <input class="pixels" name="<?php echo $this->options->marginY_name(); ?>" value="<?php echo $this->options->marginY(); ?>" />px
225
+ <span class="description"><?php echo __('[Negative value allowed.]', 'wpfront-scroll-top'); ?></span>
226
  </td>
227
  </tr>
228
  </table>
229
 
230
+ <h3><?php echo __('Filter', 'wpfront-scroll-top'); ?></h3>
231
  <table class="form-table">
232
  <tr>
233
  <th scope="row">
236
  <td>
237
  <label>
238
  <input type="radio" name="<?php echo $this->options->display_pages_name(); ?>" value="1" <?php echo $this->options->display_pages() == 1 ? 'checked' : ''; ?> />
239
+ <span><?php echo __('All pages.', 'wpfront-scroll-top'); ?></span>
240
  </label>
241
  <br />
242
  <label>
243
  <input type="radio" name="<?php echo $this->options->display_pages_name(); ?>" value="2" <?php echo $this->options->display_pages() == 2 ? 'checked' : ''; ?> />
244
+ <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>
245
  </label>
246
+ <br />
247
+ <input class="post-id-list" name="<?php echo $this->options->include_pages_name(); ?>" value="<?php echo $this->options->include_pages(); ?>" />
248
  <div class="pages-selection">
 
249
  <?php
250
  $objects = $this->get_filter_objects();
251
  foreach ($objects as $key => $value) {
262
  </div>
263
  <label>
264
  <input type="radio" name="<?php echo $this->options->display_pages_name(); ?>" value="3" <?php echo $this->options->display_pages() == 3 ? 'checked' : ''; ?> />
265
+ <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>
266
  </label>
267
+ <br />
268
+ <input class="post-id-list" name="<?php echo $this->options->exclude_pages_name(); ?>" value="<?php echo $this->options->exclude_pages(); ?>" />
269
  <div class="pages-selection">
 
270
  <?php
271
  $objects = $this->get_filter_objects();
272
  foreach ($objects as $key => $value) {
285
  </tr>
286
  </table>
287
 
288
+ <h3 class="button-options text"><?php echo __('Text Button', 'wpfront-scroll-top'); ?></h3>
289
+ <table class="form-table button-options text">
290
+ <tr>
291
+ <th scope="row">
292
+ <?php echo $this->options->text_button_text_label(); ?>
293
+ </th>
294
+ <td>
295
+ <input name="<?php echo $this->options->text_button_text_name(); ?>" value="<?php echo $this->options->text_button_text(); ?>" />
296
+ </td>
297
+ </tr>
298
+ <tr>
299
+ <th scope="row">
300
+ <?php echo $this->options->text_button_text_color_label(); ?>
301
+ </th>
302
+ <td>
303
+ <div class="color-selector-div">
304
+ <div class="color-selector" color="<?php echo $this->options->text_button_text_color(); ?>"></div>&#160;<span><?php echo $this->options->text_button_text_color(); ?></span>
305
+ <input type="hidden" name="<?php echo $this->options->text_button_text_color_name(); ?>" value="<?php echo $this->options->text_button_text_color(); ?>" />
306
+ </div>
307
+ </td>
308
+ </tr>
309
+ <tr>
310
+ <th scope="row">
311
+ <?php echo $this->options->text_button_background_color_label(); ?>
312
+ </th>
313
+ <td>
314
+ <div class="color-selector-div">
315
+ <div class="color-selector" color="<?php echo $this->options->text_button_background_color(); ?>"></div>&#160;<span><?php echo $this->options->text_button_background_color(); ?></span>
316
+ <input type="hidden" name="<?php echo $this->options->text_button_background_color_name(); ?>" value="<?php echo $this->options->text_button_background_color(); ?>" />
317
+ </div>
318
+ </td>
319
+ </tr>
320
+ <tr>
321
+ <th scope="row">
322
+ <?php echo $this->options->text_button_hover_color_label(); ?>
323
+ </th>
324
+ <td>
325
+ <div class="color-selector-div">
326
+ <div class="color-selector" color="<?php echo $this->options->text_button_hover_color(); ?>"></div>&#160;<span><?php echo $this->options->text_button_hover_color(); ?></span>
327
+ <input type="hidden" name="<?php echo $this->options->text_button_hover_color_name(); ?>" value="<?php echo $this->options->text_button_hover_color(); ?>" />
328
+ </div>
329
+ </td>
330
+ </tr>
331
+ <tr>
332
+ <th scope="row">
333
+ <?php echo $this->options->text_button_css_label(); ?>
334
+ </th>
335
+ <td>
336
+ <textarea name="<?php echo $this->options->text_button_css_name(); ?>" rows="5" cols="100"><?php echo $this->options->text_button_css(); ?></textarea>
337
+ <br />
338
+ <span class="description"><?php echo '[' . __('ex:', 'wpfront-scroll-top') . ' font-size: 1.5em; padding: 10px;]'; ?></span>
339
+ </td>
340
+ </tr>
341
+ </table>
342
+
343
+ <h3 class="button-options font-awesome"><?php echo __('Font Awesome Button', 'wpfront-scroll-top'); ?></h3>
344
+ <table class="form-table button-options font-awesome">
345
+ <tr>
346
+ <th scope="row">
347
+ <?php echo $this->options->fa_button_class_label(); ?>
348
+ </th>
349
+ <td>
350
+ <input class="regular-text" name="<?php echo $this->options->fa_button_class_name(); ?>" value="<?php echo $this->options->fa_button_class(); ?>" />
351
+ <span class="description"><?php echo '[' . __('ex:', 'wpfront-scroll-top') . ' fa fa-arrow-circle-up fa-5x]'; ?></span>
352
+ </td>
353
+ </tr>
354
+ <tr>
355
+ <th scope="row">
356
+ <?php echo $this->options->fa_button_URL_label(); ?>
357
+ </th>
358
+ <td>
359
+ <input class="url" name="<?php echo $this->options->fa_button_URL_name(); ?>" value="<?php echo $this->options->fa_button_URL(); ?>" />
360
+ <br />
361
+ <span class="description"><?php echo '[Leave blank to use BootstrapCDN URL by MaxCDN. Otherwise specify the URL you want to use.]'; ?></span>
362
+ </td>
363
+ </tr>
364
+ <tr>
365
+ <th scope="row">
366
+ <?php echo $this->options->fa_button_exclude_URL_label(); ?>
367
+ </th>
368
+ <td>
369
+ <input type="checkbox" name="<?php echo $this->options->fa_button_exclude_URL_name(); ?>" <?php echo $this->options->fa_button_exclude_URL() ? "checked" : ""; ?> />
370
+ <span class="description"><?php echo '[Enable this setting if your site already has Font Awesome. Usually your theme includes it.]'; ?></span>
371
+ </td>
372
+ </tr>
373
+ <tr>
374
+ <th scope="row">
375
+ <?php echo $this->options->fa_button_text_color_label(); ?>
376
+ </th>
377
+ <td>
378
+ <div class="color-selector-div">
379
+ <div class="color-selector" color="<?php echo $this->options->fa_button_text_color(); ?>"></div>&#160;<span><?php echo $this->options->fa_button_text_color(); ?></span>
380
+ <input type="hidden" name="<?php echo $this->options->fa_button_text_color_name(); ?>" value="<?php echo $this->options->fa_button_text_color(); ?>" />
381
+ </div>
382
+ </td>
383
+ </tr>
384
+ <tr>
385
+ <th scope="row">
386
+ <?php echo $this->options->fa_button_css_label(); ?>
387
+ </th>
388
+ <td>
389
+ <textarea name="<?php echo $this->options->fa_button_css_name(); ?>" rows="5" cols="100"><?php echo $this->options->fa_button_css(); ?></textarea>
390
+ <br />
391
+ <span class="description"><?php echo '[' . __('ex:', 'wpfront-scroll-top') . ' #wpfront-scroll-top-container i:hover{ color: #000000; }]'; ?></span>
392
+ </td>
393
+ </tr>
394
+ </table>
395
+
396
+ <h3 class="button-options image"><?php echo __('Image Button', 'wpfront-scroll-top'); ?></h3>
397
+ <div class="button-options image">
398
+ <div class="icons-container">
399
+ <?php
400
+ $files = scandir($this->iconsDIR);
401
+ foreach ($files as $file) {
402
+ if ($file == '.' || $file == '..')
403
+ continue;
404
+ echo '<div ' . ($this->options->image() == $file ? 'class="selected"' : '') . '>';
405
+ echo '<input id="' . $file . '" name="' . $this->options->image_name() . '" type="radio" value="' . $file . '" ' . ($this->options->image() == $file ? 'checked' : '') . ' />';
406
+ echo '<label for="' . $file . '"><img src="' . $this->iconsURL . $file . '"/></label>';
407
+ echo '</div>';
408
+ }
409
+ ?>
410
+ </div>
411
+ <div>
412
+ <input id="custom" name="<?php echo $this->options->image_name(); ?>" type="radio" value="custom" <?php echo ($this->options->image() == 'custom' ? 'checked' : ''); ?> />
413
+ <label for="custom"><?php echo __('Custom URL', 'wpfront-scroll-top'); ?>
414
+ <input class="url" name="<?php echo $this->options->custom_url_name(); ?>" value="<?php echo $this->options->custom_url(); ?>"/>
415
+ </label>
416
+ </div>
417
+ <table class="form-table">
418
+ <tr>
419
+ <th scope="row">
420
+ <?php echo $this->options->image_alt_label(); ?>
421
+ </th>
422
+ <td>
423
+ <input class="altText" name="<?php echo $this->options->image_alt_name(); ?>" value="<?php echo $this->options->image_alt(); ?>" />
424
+ </td>
425
+ </tr>
426
+ </table>
427
  </div>
428
 
429
  <?php @$this->options_page_footer('scroll-top-plugin-settings/', 'scroll-top-plugin-faq/'); ?>
430
 
431
  <script type="text/javascript">
432
  (function($) {
433
+ var moveMenu = <?php echo $this->options->move_admin_menu()? 'true' : 'false'; ?>;
434
+ var optionsURL = '<?php echo admin_url('admin.php?page=wpfront-scroll-top&settings-updated=true')?>';
435
+
436
+ $('#wpfront-scroll-top-options form').submit(function(e) {
437
+ if(moveMenu && !$('#wpfront-scroll-top-options .move-admin-menu').prop('checked')) {
438
+ e.preventDefault();
439
+
440
+ $.post($(this).attr('action'), $(this).serialize()).always(function() {
441
+ $(location).attr('href', optionsURL);
442
+ });
443
+
444
+ $(this).find(':input').prop('disabled', true);
445
+ }
446
+ });
447
+
448
  function setColorPicker(div) {
449
  div.ColorPicker({
450
  color: div.attr('color'),
467
  });
468
 
469
  $('#wpfront-scroll-top-options .pages-selection input[type="checkbox"]').change(function() {
470
+ var $this = $(this);
471
+ var $input = $this.parent().parent().parent().prev();
472
+ var $text = $input.val();
473
+
474
+ if($this.prop('checked')) {
475
+ $text += ',' + $this.val();
476
+ } else {
477
+ $text = (',' + $text + ',').replace(',' + $this.val() + ',', ',');
478
+ }
479
+
480
+ $text = $text.replace(/(^[,\s]+)|([,\s]+$)/g, '');
481
+ $input.val($text);
482
  });
483
+
484
+ $('#wpfront-scroll-top-options input.button-style').change(function() {
485
+ $('#wpfront-scroll-top-options .button-options').hide().filter('.' + $(this).val()).show();
486
+ });
487
+
488
+ $('#wpfront-scroll-top-options .button-options').hide().filter('.<?php echo $this->options->button_style(); ?>').show();
489
  })(jQuery);
490
  </script>
491
 
templates/scroll-top-template.php CHANGED
@@ -61,32 +61,36 @@
61
  if ($this->options->button_style() == 'text') {
62
  ?>
63
  <div id="wpfront-scroll-top-container">
64
- <table>
65
- <tr>
66
- <td class="button-holder" align="center" valign="middle">
67
- <?php echo $this->options->text_button_text(); ?>
68
- </td>
69
- </tr>
70
- </table>
71
  </div>
72
 
73
  <style type="text/css">
74
- #wpfront-scroll-top-container .button-holder {
75
  color: <?php echo $this->options->text_button_text_color(); ?>;
76
  background-color: <?php echo $this->options->text_button_background_color(); ?>;
77
- padding: 3px 10px;
78
- border-radius: 3px;
79
- -webkit-border-radius: 3px;
80
- -webkit-box-shadow: 4px 4px 5px 0px rgba(50, 50, 50, 0.5);
81
- -moz-box-shadow: 4px 4px 5px 0px rgba(50, 50, 50, 0.5);
82
- box-shadow: 4px 4px 5px 0px rgba(50, 50, 50, 0.5);
83
  width: <?php echo $this->options->button_width() == 0 ? 'auto' : $this->options->button_width() . 'px'; ?>;
84
  height: <?php echo $this->options->button_height() == 0 ? 'auto' : $this->options->button_height() . 'px'; ?>;
85
- }
86
-
87
- #wpfront-scroll-top-container .button-holder {
88
  <?php echo $this->options->text_button_css(); ?>
89
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
90
  </style>
91
  <?php
92
  } else {
61
  if ($this->options->button_style() == 'text') {
62
  ?>
63
  <div id="wpfront-scroll-top-container">
64
+ <div class="text-holder">
65
+ <?php echo $this->options->text_button_text(); ?>
66
+ </div>
 
 
 
 
67
  </div>
68
 
69
  <style type="text/css">
70
+ #wpfront-scroll-top-container div.text-holder {
71
  color: <?php echo $this->options->text_button_text_color(); ?>;
72
  background-color: <?php echo $this->options->text_button_background_color(); ?>;
 
 
 
 
 
 
73
  width: <?php echo $this->options->button_width() == 0 ? 'auto' : $this->options->button_width() . 'px'; ?>;
74
  height: <?php echo $this->options->button_height() == 0 ? 'auto' : $this->options->button_height() . 'px'; ?>;
75
+
 
 
76
  <?php echo $this->options->text_button_css(); ?>
77
  }
78
+
79
+ #wpfront-scroll-top-container div.text-holder:hover {
80
+ background-color: <?php echo $this->options->text_button_hover_color(); ?>;
81
+ }
82
+ </style>
83
+ <?php
84
+ } elseif($this->options->button_style() == 'font-awesome') {
85
+ ?>
86
+ <div id="wpfront-scroll-top-container"><i class="<?php echo $this->options->fa_button_class(); ?>"></i></div>
87
+
88
+ <style type="text/css">
89
+ #wpfront-scroll-top-container i {
90
+ color: <?php echo $this->options->fa_button_text_color(); ?>;
91
+ }
92
+
93
+ <?php echo $this->options->fa_button_css(); ?>
94
  </style>
95
  <?php
96
  } else {
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: 1.5
7
  * Author: Syam Mohan
8
  * Author URI: http://wpfront.com
9
  * License: GPL v3
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: 1.6
7
  * Author: Syam Mohan
8
  * Author URI: http://wpfront.com
9
  * License: GPL v3