Scroll Back To Top - Version 1.1.1

Version Description

  • Addresses PHP error in versions of PHP prior to 5.3
Download this release

Release Info

Developer joesexton00
Plugin Icon wp plugin Scroll Back To Top
Version 1.1.1
Comparing to
See all releases

Code changes from version 1.1 to 1.1.1

controller/SBTT_AdminMenuController.php CHANGED
@@ -13,7 +13,10 @@
13
  if ( !class_exists( 'SBTT_AdminMenuController' ) ){
14
  class SBTT_AdminMenuController extends JmsAdminSettingsPage {
15
 
16
- const VERSION = 1.1;
 
 
 
17
 
18
  /**
19
  * register Wordpress actions and filters
@@ -46,11 +49,11 @@ class SBTT_AdminMenuController extends JmsAdminSettingsPage {
46
 
47
  // v1.1 adds a few new options to the settings menu, init the default values.
48
  if (
49
- ( isset($wp_option[SBTT_Options::VERSION_KEY] ) && $wp_option[SBTT_Options::VERSION_KEY] < 1.1 ) ||
50
- !isset( $wp_option[SBTT_Options::VERSION_KEY] )
51
  ) {
52
 
53
- $wp_option[SBTT_Options::VERSION_KEY] = static::VERSION;
54
 
55
  if ( !isset( $wp_option['min_resolution'] ) ) {
56
  $wp_option['min_resolution'] = $defaults['min_resolution'] ?: 0;
13
  if ( !class_exists( 'SBTT_AdminMenuController' ) ){
14
  class SBTT_AdminMenuController extends JmsAdminSettingsPage {
15
 
16
+ /**
17
+ * @var float
18
+ */
19
+ protected $version = 1.1;
20
 
21
  /**
22
  * register Wordpress actions and filters
49
 
50
  // v1.1 adds a few new options to the settings menu, init the default values.
51
  if (
52
+ ( isset($wp_option['version'] ) && $wp_option['version'] < 1.1 ) ||
53
+ !isset( $wp_option['version'] )
54
  ) {
55
 
56
+ $wp_option['version'] = $options->getVersion();
57
 
58
  if ( !isset( $wp_option['min_resolution'] ) ) {
59
  $wp_option['min_resolution'] = $defaults['min_resolution'] ?: 0;
controller/SBTT_FrontendController.php CHANGED
@@ -12,7 +12,10 @@
12
  if ( !class_exists( 'SBTT_FrontEndController' ) ){
13
  class SBTT_FrontEndController extends JmsController {
14
 
15
- const VERSION = 1.1;
 
 
 
16
 
17
  /**
18
  * @var array
12
  if ( !class_exists( 'SBTT_FrontEndController' ) ){
13
  class SBTT_FrontEndController extends JmsController {
14
 
15
+ /**
16
+ * @var float
17
+ */
18
+ protected $version = 1.1;
19
 
20
  /**
21
  * @var array
framework/JmsAdminSettingsPage.php CHANGED
@@ -13,7 +13,10 @@
13
  if ( !class_exists( 'JmsAdminSettingsPage' ) ){
14
  abstract class JmsAdminSettingsPage extends JmsController {
15
 
16
- const VERSION = 1.3;
 
 
 
17
 
18
  /**
19
  * @var string
13
  if ( !class_exists( 'JmsAdminSettingsPage' ) ){
14
  abstract class JmsAdminSettingsPage extends JmsController {
15
 
16
+ /**
17
+ * @var float
18
+ */
19
+ protected $version = 1.3;
20
 
21
  /**
22
  * @var string
framework/JmsBootstrap.php CHANGED
@@ -12,7 +12,10 @@
12
  if ( !class_exists( 'JmsBootstrap' ) ){
13
  class JmsBootstrap {
14
 
15
- const VERSION = 1.2;
 
 
 
16
 
17
  /**
18
  * @var string
@@ -177,5 +180,14 @@ if ( !class_exists( 'JmsBootstrap' ) ){
177
 
178
  return null;
179
  }
 
 
 
 
 
 
 
 
 
180
  }
181
  }
12
  if ( !class_exists( 'JmsBootstrap' ) ){
13
  class JmsBootstrap {
14
 
15
+ /**
16
+ * @var float
17
+ */
18
+ protected $version = 1.2;
19
 
20
  /**
21
  * @var string
180
 
181
  return null;
182
  }
183
+
184
+ /**
185
+ * Get version
186
+ *
187
+ * @return float
188
+ */
189
+ public function getVersion() {
190
+ return $this->version;
191
+ }
192
  }
193
  }
framework/JmsController.php CHANGED
@@ -12,7 +12,10 @@
12
  if ( !class_exists( 'JmsController' ) ){
13
  abstract class JmsController {
14
 
15
- const VERSION = 1.2;
 
 
 
16
 
17
  /**
18
  * @var string
@@ -419,5 +422,14 @@ if ( !class_exists( 'JmsController' ) ){
419
 
420
  return $this->pluginSlug;
421
  }
 
 
 
 
 
 
 
 
 
422
  }
423
  }
12
  if ( !class_exists( 'JmsController' ) ){
13
  abstract class JmsController {
14
 
15
+ /**
16
+ * @var float
17
+ */
18
+ protected $version = 1.2;
19
 
20
  /**
21
  * @var string
422
 
423
  return $this->pluginSlug;
424
  }
425
+
426
+ /**
427
+ * Get version
428
+ *
429
+ * @return float
430
+ */
431
+ public function getVersion() {
432
+ return $this->version;
433
+ }
434
  }
435
  }
framework/JmsUserOptionsCollection.php CHANGED
@@ -11,8 +11,10 @@
11
  if ( !class_exists( 'JmsPluginUserOptionsCollection' ) ){
12
  class JmsUserOptionsCollection {
13
 
14
- const VERSION_KEY = 'version';
15
- const VERSION = 1.3;
 
 
16
 
17
  /**
18
  * @var string
@@ -209,7 +211,7 @@ if ( !class_exists( 'JmsPluginUserOptionsCollection' ) ){
209
 
210
  $defaults[$fieldKey] = $this->fieldOption( $fieldKey, 'default' );
211
  }
212
- $defaults[static::VERSION_KEY] = static::VERSION;
213
 
214
  return $defaults;
215
  }
@@ -249,5 +251,14 @@ if ( !class_exists( 'JmsPluginUserOptionsCollection' ) ){
249
 
250
  return $this->optionMap;
251
  }
 
 
 
 
 
 
 
 
 
252
  }
253
  }
11
  if ( !class_exists( 'JmsPluginUserOptionsCollection' ) ){
12
  class JmsUserOptionsCollection {
13
 
14
+ /**
15
+ * @var float
16
+ */
17
+ protected $version = 1.3;
18
 
19
  /**
20
  * @var string
211
 
212
  $defaults[$fieldKey] = $this->fieldOption( $fieldKey, 'default' );
213
  }
214
+ $defaults['version'] = $this->getVersion();
215
 
216
  return $defaults;
217
  }
251
 
252
  return $this->optionMap;
253
  }
254
+
255
+ /**
256
+ * Get version
257
+ *
258
+ * @return float
259
+ */
260
+ public function getVersion() {
261
+ return $this->version;
262
+ }
263
  }
264
  }
model/SBTT_Options.php CHANGED
@@ -10,7 +10,10 @@
10
  if ( !class_exists( 'SBTT_Options' ) ){
11
  class SBTT_Options extends JmsUserOptionsCollection {
12
 
13
- const VERSION = 1.1;
 
 
 
14
 
15
  /**
16
  * @var string
10
  if ( !class_exists( 'SBTT_Options' ) ){
11
  class SBTT_Options extends JmsUserOptionsCollection {
12
 
13
+ /**
14
+ * @var float
15
+ */
16
+ protected $version = 1.1;
17
 
18
  /**
19
  * @var string
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: joesexton00
3
  Tags: back to top, jquery, scroll to top, button, scroll, scroll top, scroll back to top, scroll up, widget, icon, scroller, vertical scroller, arrow, link to top, back to top, smooth scroll, top, back
4
  Requires at least: 3.0
5
  Tested up to: 3.9
6
- Stable tag: 1.1
7
 
8
  This plugin will add a button that allows users to scroll smoothly to the top of the page.
9
 
@@ -63,6 +63,9 @@ Absolutely not. This plugin is designed to work immediately upon activation, wi
63
 
64
  == Change Log ==
65
 
 
 
 
66
  = 1.1 =
67
  - Adds support for an optional display timeout
68
  - Adds min/max browser resolutions
3
  Tags: back to top, jquery, scroll to top, button, scroll, scroll top, scroll back to top, scroll up, widget, icon, scroller, vertical scroller, arrow, link to top, back to top, smooth scroll, top, back
4
  Requires at least: 3.0
5
  Tested up to: 3.9
6
+ Stable tag: 1.1.1
7
 
8
  This plugin will add a button that allows users to scroll smoothly to the top of the page.
9
 
63
 
64
  == Change Log ==
65
 
66
+ = 1.1.1 =
67
+ - Addresses PHP error in versions of PHP prior to 5.3
68
+
69
  = 1.1 =
70
  - Adds support for an optional display timeout
71
  - Adds min/max browser resolutions
scroll-back-to-top.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Scroll Back to Top
4
  Description: Adds a scroll to top button
5
  Plugin URI: http://www.webtipblog.com/scroll-back-top-wordpress-plugin/
6
  Text Domain: scroll-back-to-top
7
- Version: 1.1
8
  Author: Joe Sexton
9
  Author URI: http://www.josephmsexton.com
10
  */
4
  Description: Adds a scroll to top button
5
  Plugin URI: http://www.webtipblog.com/scroll-back-top-wordpress-plugin/
6
  Text Domain: scroll-back-to-top
7
+ Version: 1.1.1
8
  Author: Joe Sexton
9
  Author URI: http://www.josephmsexton.com
10
  */