Version Description
- tested on WP 5.4
- JS files with user settings moved to
/uploads/wpmss/
folder
Download this release
Release Info
Developer | kubiq |
Plugin | MouseWheel Smooth Scroll |
Version | 5.4 |
Comparing to | |
See all releases |
Code changes from version 5.3 to 5.4
- mousewheel-smooth-scroll.php +17 -5
- readme.txt +7 -3
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
|
@@ -71,12 +71,20 @@ 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 |
function plugin_scripts_load(){
|
77 |
-
|
|
|
78 |
wp_enqueue_script( 'SmoothScroll', plugins_url( 'js/SmoothScroll.min.js', __FILE__ ), array('wpmssab'), '1.4.10', 1 );
|
79 |
-
wp_enqueue_script( 'wpmss',
|
80 |
}
|
81 |
|
82 |
function plugin_admin_tabs( $current = 'general' ){
|
@@ -89,11 +97,15 @@ class wpmss{
|
|
89 |
}
|
90 |
|
91 |
function save_js_config(){
|
|
|
|
|
|
|
|
|
92 |
$allowedBrowsers = sprintf(
|
93 |
'var allowedBrowsers=["%s"];',
|
94 |
implode( '","', $this->settings['general']['allowedBrowsers'] )
|
95 |
);
|
96 |
-
file_put_contents(
|
97 |
|
98 |
$content = sprintf(
|
99 |
'SmoothScroll({'.
|
@@ -121,7 +133,7 @@ class wpmss{
|
|
121 |
intval( $this->settings['general']['arrowScroll'] ),
|
122 |
intval( $this->settings['general']['fixedBackground'] )
|
123 |
);
|
124 |
-
file_put_contents(
|
125 |
}
|
126 |
|
127 |
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.4
|
7 |
Author: KubiQ
|
8 |
Author URI: https://kubiq.sk
|
9 |
Text Domain: 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 |
+
if( file_exists( __DIR__ . '/js/wpmss.min.js' ) ){
|
75 |
+
unlink( __DIR__ . '/js/wpmss.min.js' );
|
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 = wp_get_upload_dir();
|
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 |
}
|
98 |
|
99 |
function save_js_config(){
|
100 |
+
$uploads = wp_get_upload_dir();
|
101 |
+
if( ! file_exists( $uploads['basedir'] . '/wpmss' ) ){
|
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 |
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(){
|
readme.txt
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
=== Plugin Name ===
|
2 |
Contributors: KubiQ
|
3 |
-
Donate link: https://
|
4 |
Tags: smooth scroll, mousewheel scroll, scrolling
|
5 |
Requires at least: 3.0.1
|
6 |
-
Tested up to: 5.
|
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,10 @@ Replace basic website scrolling "effect" with nice smooth scroll using mousewhee
|
|
26 |
|
27 |
== Changelog ==
|
28 |
|
|
|
|
|
|
|
|
|
29 |
= 5.3 =
|
30 |
* updated scrolling script to version 1.4.10
|
31 |
* new browsers selection settings
|
1 |
=== Plugin Name ===
|
2 |
Contributors: KubiQ
|
3 |
+
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.4
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
26 |
|
27 |
== Changelog ==
|
28 |
|
29 |
+
= 5.4 =
|
30 |
+
* tested on WP 5.4
|
31 |
+
* JS files with user settings moved to `/uploads/wpmss/` folder
|
32 |
+
|
33 |
= 5.3 =
|
34 |
* updated scrolling script to version 1.4.10
|
35 |
* new browsers selection settings
|