Version Description
- FIX: create config files for new installations
Download this release
Release Info
Developer | kubiq |
Plugin | MouseWheel Smooth Scroll |
Version | 5.5 |
Comparing to | |
See all releases |
Code changes from version 5.4 to 5.5
- js/wpmss.min.js +0 -1
- js/wpmssab.min.js +0 -1
- mousewheel-smooth-scroll.php +12 -14
- readme.txt +4 -1
js/wpmss.min.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
SmoothScroll({frameRate:150,animationTime:1000,stepSize:100,pulseAlgorithm:1,pulseScale:4,pulseNormalize:1,accelerationDelta:50,accelerationMax:3,keyboardSupport:1,arrowScroll:50,fixedBackground:0})
|
|
js/wpmssab.min.js
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
var allowedBrowsers=["IEWin7","Chrome","Safari"];
|
|
mousewheel-smooth-scroll.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: MouseWheel Smooth Scroll
|
4 |
Plugin URI: https://kubiq.sk
|
5 |
Description: MouseWheel smooth scrolling for your WordPress website
|
6 |
-
Version: 5.
|
7 |
Author: KubiQ
|
8 |
Author URI: https://kubiq.sk
|
9 |
Text Domain: wpmss
|
@@ -14,6 +14,7 @@ class wpmss{
|
|
14 |
var $plugin_admin_page;
|
15 |
var $settings;
|
16 |
var $tab;
|
|
|
17 |
|
18 |
function __construct(){
|
19 |
add_action( 'plugins_loaded', array( $this, 'plugins_loaded' ) );
|
@@ -53,6 +54,8 @@ class wpmss{
|
|
53 |
update_option( 'wpmss_settings', $this->settings );
|
54 |
}
|
55 |
|
|
|
|
|
56 |
$this->process_settings();
|
57 |
|
58 |
add_action( 'wp_enqueue_scripts', array( $this, 'plugin_scripts_load' ) );
|
@@ -71,20 +74,16 @@ class wpmss{
|
|
71 |
$this->settings['general']['arrowScroll'] = isset( $this->settings['general']['arrowScroll'] ) && trim( $this->settings['general']['arrowScroll'] ) ? intval( $this->settings['general']['arrowScroll'] ) : 50;
|
72 |
$this->settings['general']['fixedBackground'] = isset( $this->settings['general']['fixedBackground'] ) ? 1 : 0;
|
73 |
$this->settings['general']['allowedBrowsers'] = isset( $this->settings['general']['allowedBrowsers'] ) ? (array)$this->settings['general']['allowedBrowsers'] : array( 'IEWin7', 'Chrome', 'Safari' );
|
74 |
-
|
75 |
-
|
76 |
-
if( file_exists( __DIR__ . '/js/wpmssab.min.js' ) ){
|
77 |
-
unlink( __DIR__ . '/js/wpmssab.min.js' );
|
78 |
-
}
|
79 |
$this->save_js_config();
|
80 |
}
|
81 |
}
|
82 |
|
83 |
function plugin_scripts_load(){
|
84 |
-
$uploads
|
85 |
-
wp_enqueue_script( 'wpmssab', $uploads['baseurl'] . '/wpmss/wpmssab.min.js', array('jquery'), $this->settings['general']['timestamp'] + 541410, 1 );
|
86 |
wp_enqueue_script( 'SmoothScroll', plugins_url( 'js/SmoothScroll.min.js', __FILE__ ), array('wpmssab'), '1.4.10', 1 );
|
87 |
-
wp_enqueue_script( 'wpmss', $uploads['baseurl'] . '/wpmss/wpmss.min.js', array('SmoothScroll'), $this->settings['general']['timestamp'] + 541410, 1 );
|
88 |
}
|
89 |
|
90 |
function plugin_admin_tabs( $current = 'general' ){
|
@@ -97,15 +96,14 @@ class wpmss{
|
|
97 |
}
|
98 |
|
99 |
function save_js_config(){
|
100 |
-
$uploads
|
101 |
-
|
102 |
-
mkdir( $uploads['basedir'] . '/wpmss', 0777, true );
|
103 |
}
|
104 |
$allowedBrowsers = sprintf(
|
105 |
'var allowedBrowsers=["%s"];',
|
106 |
implode( '","', $this->settings['general']['allowedBrowsers'] )
|
107 |
);
|
108 |
-
file_put_contents( $uploads['basedir'] . '/wpmss/wpmssab.min.js', $allowedBrowsers );
|
109 |
|
110 |
$content = sprintf(
|
111 |
'SmoothScroll({'.
|
@@ -133,7 +131,7 @@ class wpmss{
|
|
133 |
intval( $this->settings['general']['arrowScroll'] ),
|
134 |
intval( $this->settings['general']['fixedBackground'] )
|
135 |
);
|
136 |
-
file_put_contents( $uploads['basedir'] . '/wpmss/wpmss.min.js', $content );
|
137 |
}
|
138 |
|
139 |
function admin_options_page(){
|
3 |
Plugin Name: MouseWheel Smooth Scroll
|
4 |
Plugin URI: https://kubiq.sk
|
5 |
Description: MouseWheel smooth scrolling for your WordPress website
|
6 |
+
Version: 5.5
|
7 |
Author: KubiQ
|
8 |
Author URI: https://kubiq.sk
|
9 |
Text Domain: wpmss
|
14 |
var $plugin_admin_page;
|
15 |
var $settings;
|
16 |
var $tab;
|
17 |
+
var $uploads;
|
18 |
|
19 |
function __construct(){
|
20 |
add_action( 'plugins_loaded', array( $this, 'plugins_loaded' ) );
|
54 |
update_option( 'wpmss_settings', $this->settings );
|
55 |
}
|
56 |
|
57 |
+
$this->uploads = wp_get_upload_dir();
|
58 |
+
|
59 |
$this->process_settings();
|
60 |
|
61 |
add_action( 'wp_enqueue_scripts', array( $this, 'plugin_scripts_load' ) );
|
74 |
$this->settings['general']['arrowScroll'] = isset( $this->settings['general']['arrowScroll'] ) && trim( $this->settings['general']['arrowScroll'] ) ? intval( $this->settings['general']['arrowScroll'] ) : 50;
|
75 |
$this->settings['general']['fixedBackground'] = isset( $this->settings['general']['fixedBackground'] ) ? 1 : 0;
|
76 |
$this->settings['general']['allowedBrowsers'] = isset( $this->settings['general']['allowedBrowsers'] ) ? (array)$this->settings['general']['allowedBrowsers'] : array( 'IEWin7', 'Chrome', 'Safari' );
|
77 |
+
|
78 |
+
if( ! file_exists( $this->uploads['basedir'] . '/wpmss/wpmss.min.js' ) ){
|
|
|
|
|
|
|
79 |
$this->save_js_config();
|
80 |
}
|
81 |
}
|
82 |
|
83 |
function plugin_scripts_load(){
|
84 |
+
wp_enqueue_script( 'wpmssab', $this->uploads['baseurl'] . '/wpmss/wpmssab.min.js', array('jquery'), $this->settings['general']['timestamp'] + 541410, 1 );
|
|
|
85 |
wp_enqueue_script( 'SmoothScroll', plugins_url( 'js/SmoothScroll.min.js', __FILE__ ), array('wpmssab'), '1.4.10', 1 );
|
86 |
+
wp_enqueue_script( 'wpmss', $this->uploads['baseurl'] . '/wpmss/wpmss.min.js', array('SmoothScroll'), $this->settings['general']['timestamp'] + 541410, 1 );
|
87 |
}
|
88 |
|
89 |
function plugin_admin_tabs( $current = 'general' ){
|
96 |
}
|
97 |
|
98 |
function save_js_config(){
|
99 |
+
if( ! file_exists( $this->uploads['basedir'] . '/wpmss' ) ){
|
100 |
+
mkdir( $this->uploads['basedir'] . '/wpmss', 0777, true );
|
|
|
101 |
}
|
102 |
$allowedBrowsers = sprintf(
|
103 |
'var allowedBrowsers=["%s"];',
|
104 |
implode( '","', $this->settings['general']['allowedBrowsers'] )
|
105 |
);
|
106 |
+
file_put_contents( $this->uploads['basedir'] . '/wpmss/wpmssab.min.js', $allowedBrowsers );
|
107 |
|
108 |
$content = sprintf(
|
109 |
'SmoothScroll({'.
|
131 |
intval( $this->settings['general']['arrowScroll'] ),
|
132 |
intval( $this->settings['general']['fixedBackground'] )
|
133 |
);
|
134 |
+
file_put_contents( $this->uploads['basedir'] . '/wpmss/wpmss.min.js', $content );
|
135 |
}
|
136 |
|
137 |
function admin_options_page(){
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.me/jakubnovaksl
|
|
4 |
Tags: smooth scroll, mousewheel scroll, scrolling
|
5 |
Requires at least: 3.0.1
|
6 |
Tested up to: 5.4
|
7 |
-
Stable tag: 5.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -26,6 +26,9 @@ Replace basic website scrolling "effect" with nice smooth scroll using mousewhee
|
|
26 |
|
27 |
== Changelog ==
|
28 |
|
|
|
|
|
|
|
29 |
= 5.4 =
|
30 |
* tested on WP 5.4
|
31 |
* JS files with user settings moved to `/uploads/wpmss/` folder
|
4 |
Tags: smooth scroll, mousewheel scroll, scrolling
|
5 |
Requires at least: 3.0.1
|
6 |
Tested up to: 5.4
|
7 |
+
Stable tag: 5.5
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
26 |
|
27 |
== Changelog ==
|
28 |
|
29 |
+
= 5.5 =
|
30 |
+
* FIX: create config files for new installations
|
31 |
+
|
32 |
= 5.4 =
|
33 |
* tested on WP 5.4
|
34 |
* JS files with user settings moved to `/uploads/wpmss/` folder
|