Version Description
Download this release
Release Info
Developer | anand_kumar |
Plugin | jQuery Smooth Scroll |
Version | 1.4.3 |
Comparing to | |
See all releases |
Code changes from version 1.4.1 to 1.4.3
- jquery-smooth-scroll.php +96 -158
- readme.txt +128 -121
jquery-smooth-scroll.php
CHANGED
@@ -1,158 +1,96 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
Plugin Name: jQuery Smooth Scroll
|
4 |
-
Version: 1.4.
|
5 |
-
Plugin URI:
|
6 |
-
Description: The plugin not only add smooth scroll to top feature/link in the lower-right corner of long pages while scrolling but also makes all jump links to scroll smoothly.
|
7 |
-
Author:
|
8 |
-
Author URI: http://
|
9 |
-
License: GPL
|
10 |
-
|
11 |
-
jQuery Smooth Scroll
|
12 |
-
Copyright (C) 2013-
|
13 |
-
|
14 |
-
This program is free software
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
*
|
30 |
-
*
|
31 |
-
*
|
32 |
-
*
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
//
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
//
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
//////////////////////////////////////////////////////////////////////////////
|
100 |
-
|
101 |
-
add_action('wp_dashboard_setup', 'blogsynthesis_jss_dashboard_widgets');
|
102 |
-
|
103 |
-
function blogsynthesis_jss_dashboard_widgets() {
|
104 |
-
global $wp_meta_boxes;
|
105 |
-
wp_add_dashboard_widget('blogsynthesisshfswidget', 'Latest from BlogSynthesis', 'blogsynthesis_jss_widget');
|
106 |
-
}
|
107 |
-
|
108 |
-
function blogsynthesis_jss_widget() {
|
109 |
-
include_once( ABSPATH . WPINC . '/feed.php' );
|
110 |
-
|
111 |
-
$rss = fetch_feed( 'http://feeds2.feedburner.com/blogsynthesis' );
|
112 |
-
|
113 |
-
if ( ! is_wp_error( $rss ) ) :
|
114 |
-
|
115 |
-
// Figure out how many total items there are, but limit it to 10.
|
116 |
-
$maxitems = $rss->get_item_quantity( 10 );
|
117 |
-
|
118 |
-
// Build an array of all the items, starting with element 0 (first element).
|
119 |
-
$rss_items = $rss->get_items( 0, $maxitems );
|
120 |
-
|
121 |
-
endif;
|
122 |
-
|
123 |
-
{ ?>
|
124 |
-
<div class="rss-widget">
|
125 |
-
<a href="http://www.blogsynthesis.com/support/#utm_source=wpadmin&utm_medium=dashboardwidget&utm_term=newsitemlogo&utm_campaign=jss" title="BlogSynthesis - For Bloggers" target="_blank"><img src="<?php echo plugin_dir_url( __FILE__ ); ?>images/blogsynthesis-100px.png" class="alignright" alt="BlogSynthesis"/></a>
|
126 |
-
<ul>
|
127 |
-
<?php if ( $maxitems == 0 ) : ?>
|
128 |
-
<li><?php _e( 'No items', 'shfs-text-domain' ); ?></li>
|
129 |
-
<?php else : ?>
|
130 |
-
<?php // Loop through each feed item and display each item as a hyperlink. ?>
|
131 |
-
<?php foreach ( $rss_items as $item ) : ?>
|
132 |
-
<li>
|
133 |
-
<a href="<?php echo esc_url( $item->get_permalink() ); ?>#utm_source=wpadmin&utm_medium=dashboardwidget&utm_term=newsitem&utm_campaign=shfs"
|
134 |
-
title="<?php printf( __( 'Posted %s', 'shfs-text-domain' ), $item->get_date('j F Y | g:i a') ); ?>" target="_blank">
|
135 |
-
<?php echo esc_html( $item->get_title() ); ?>
|
136 |
-
</a>
|
137 |
-
</li>
|
138 |
-
<?php endforeach; ?>
|
139 |
-
<?php endif; ?>
|
140 |
-
</ul>
|
141 |
-
<div style="border-top: 1px solid #ddd; padding-top: 10px; text-align:center;">
|
142 |
-
<span class="addthis_toolbox addthis_default_style" style="float:left;">
|
143 |
-
<a class="addthis_button_facebook_follow" addthis:userid="blogsynthesis"></a>
|
144 |
-
<a class="addthis_button_twitter_follow" addthis:userid="blogsynthesis"></a>
|
145 |
-
<a class="addthis_button_google_follow" addthis:userid="+BlogSynthesis"></a>
|
146 |
-
<a class="addthis_button_rss_follow" addthis:userid="http://feeds2.feedburner.com/blogsynthesis"></a>
|
147 |
-
</span>
|
148 |
-
<a href="http://www.blogsynthesis.com/support/#utm_source=wpadmin&utm_medium=dashboardwidget&utm_term=newsitemlogo&utm_campaign=jss"><img src="<?php echo plugin_dir_url( __FILE__ ); ?>images/email-16px.png" alt="Subscribe via Email"/>Get Plugin Support</a>
|
149 |
-
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-525ab1d176544441"></script>
|
150 |
-
</div>
|
151 |
-
</div>
|
152 |
-
<?php }
|
153 |
-
|
154 |
-
}
|
155 |
-
|
156 |
-
$jQuerySmoothScroll = new jQuerySmoothScroll();
|
157 |
-
|
158 |
-
}
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Plugin Name: jQuery Smooth Scroll
|
4 |
+
Version: 1.4.3
|
5 |
+
Plugin URI: https://www.digitalliberation.org/plugins/jquery-smooth-scroll/?utm_source=plugin&utm_medium=link&utm_campaign=jss_plugin_link
|
6 |
+
Description: The plugin not only add smooth scroll to top feature/link in the lower-right corner of long pages while scrolling but also makes all jump links to scroll smoothly.
|
7 |
+
Author: DigitalLiberation
|
8 |
+
Author URI: http://digitalliberation.org/?utm_source=plugin&utm_medium=link&utm_campaign=jss_plugin_link
|
9 |
+
License: GPL v2 or later
|
10 |
+
|
11 |
+
jQuery Smooth Scroll
|
12 |
+
Copyright (C) 2013-18, Anand Kumar <anand@anandkumar.net>
|
13 |
+
|
14 |
+
This program is free software; you can redistribute it and/or modify it under the terms of the GNU
|
15 |
+
General Public License as published by the Free Software Foundation; either version 2 of the License,
|
16 |
+
or (at your option) any later version.
|
17 |
+
|
18 |
+
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
|
19 |
+
even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
20 |
+
|
21 |
+
You should have received a copy of the GNU General Public License along with this program; if not, write
|
22 |
+
to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
23 |
+
*/
|
24 |
+
|
25 |
+
/****************************************************************
|
26 |
+
*
|
27 |
+
* THERE ARE A FEW THINGS YOU SHOULD MUST KNOW
|
28 |
+
* BEFORE EDITING THE PLUGIN
|
29 |
+
*
|
30 |
+
* FOR DETAILS VISIT:
|
31 |
+
* http://www.blogsynthesis.com/?p=860
|
32 |
+
* *
|
33 |
+
****************************************************************/
|
34 |
+
|
35 |
+
// Prevent loading this file directly - Busted!
|
36 |
+
if ( ! class_exists( 'WP' ) )
|
37 |
+
{
|
38 |
+
header( 'Status: 403 Forbidden' );
|
39 |
+
header( 'HTTP/1.1 403 Forbidden' );
|
40 |
+
exit;
|
41 |
+
}
|
42 |
+
|
43 |
+
if ( !class_exists( 'jQuerySmoothScroll' ) ) {
|
44 |
+
|
45 |
+
class jQuerySmoothScroll {
|
46 |
+
|
47 |
+
public function __construct() {
|
48 |
+
|
49 |
+
$blogsynthesis_jss_plugin_url = trailingslashit ( WP_PLUGIN_URL . '/' . dirname ( plugin_basename ( __FILE__ ) ) );
|
50 |
+
$pluginname = 'jQuery Smooth Scroll';
|
51 |
+
$plugin_version = '1.4.2';
|
52 |
+
|
53 |
+
// load plugin Scripts
|
54 |
+
//changed to action 'wp_enqueue_scripts' as its the recommended way to enqueue scripts and styles
|
55 |
+
// see http://codex.wordpress.org/Plugin_API/Action_Reference/wp_enqueue_scripts
|
56 |
+
add_action( 'wp_enqueue_scripts', array( &$this, 'wp_head') );
|
57 |
+
|
58 |
+
// add move to top button at wp_footer
|
59 |
+
add_action( 'wp_footer', array( &$this, 'wp_footer') );
|
60 |
+
|
61 |
+
}
|
62 |
+
|
63 |
+
// load our css to the head
|
64 |
+
public function wp_head() {
|
65 |
+
|
66 |
+
if ( !is_admin() ) {
|
67 |
+
global $blogsynthesis_jss_plugin_url;
|
68 |
+
|
69 |
+
// register and enqueue CSS
|
70 |
+
wp_register_style( 'jquery-smooth-scroll', plugin_dir_url( __FILE__ ) . 'css/style.css', false );
|
71 |
+
wp_enqueue_style( 'jquery-smooth-scroll' );
|
72 |
+
|
73 |
+
// enqueue script
|
74 |
+
wp_enqueue_script('jquery');
|
75 |
+
$extension='.min.js';
|
76 |
+
if( defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ) {
|
77 |
+
$extension='.js';
|
78 |
+
}
|
79 |
+
wp_enqueue_script( 'jquery-smooth-scroll', plugin_dir_url( __FILE__ ) . 'js/script'.$extension, array('jquery'),false, true );
|
80 |
+
|
81 |
+
// You may now choose easing effect. For more information visit http://www.blogsynthesis.com/?p=860
|
82 |
+
// wp_enqueue_script("jquery-effects-core");
|
83 |
+
}
|
84 |
+
}
|
85 |
+
|
86 |
+
public function wp_footer() {
|
87 |
+
// the html button which will be added to wp_footer ?>
|
88 |
+
<a id="scroll-to-top" href="#" title="<?php _e('Scroll to Top','blogsynthesis'); ?>"><?php _e('Top','blogsynthesis'); ?></a>
|
89 |
+
<?php
|
90 |
+
}
|
91 |
+
|
92 |
+
}
|
93 |
+
|
94 |
+
$jQuerySmoothScroll = new jQuerySmoothScroll();
|
95 |
+
|
96 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
readme.txt
CHANGED
@@ -1,121 +1,128 @@
|
|
1 |
-
=== jQuery Smooth Scroll ===
|
2 |
-
Contributors:
|
3 |
-
Tags: Smooth Scroll, smooth scroll anchor, scroll to top, scroll, back to top, jquery, top of page
|
4 |
-
Donate link: https://digitalliberation.org
|
5 |
-
Requires at least: 4.0
|
6 |
-
Tested up to: 4.9.
|
7 |
-
Stable tag: 1.4.
|
8 |
-
Requires PHP: 5.
|
9 |
-
License: GPLv2 or later
|
10 |
-
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
-
|
12 |
-
Activate the plugin for smooth scrolling and smooth "back to top" feature.
|
13 |
-
|
14 |
-
== Description ==
|
15 |
-
|
16 |
-
This plugin makes your anchor
|
17 |
-
|
18 |
-
= Features include: =
|
19 |
-
* Smooth
|
20 |
-
* A back to top button on right hand side.
|
21 |
-
*
|
22 |
-
*
|
23 |
-
*
|
24 |
-
*
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
* [**
|
29 |
-
* [
|
30 |
-
* [
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
http://www.youtube.com/watch?v=2gsdGOPfqF0
|
35 |
-
|
36 |
-
== Installation ==
|
37 |
-
|
38 |
-
1. Upload the plugin in `Plugins > Add New` or FTP into the `/wp-content/plugins/` directory.
|
39 |
-
2. Activate the plugin through the `Plugins` menu in WordPress.
|
40 |
-
3. Visit a long page and start scrolling down to see the link appear.
|
41 |
-
|
42 |
-
== Frequently Asked Questions ==
|
43 |
-
|
44 |
-
= Why I am not able to find any menu link in my WordPress Dashboard? =
|
45 |
-
Because there is none. All you have to install and activate the plugin. However, There might be some compatibility issues especially with a slider or tab. Please consult us for help.
|
46 |
-
|
47 |
-
=
|
48 |
-
|
49 |
-
|
50 |
-
=
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
Note: This plugin is based on "Cudazi scroll to top".
|
66 |
-
|
67 |
-
== Screenshots ==
|
68 |
-
|
69 |
-
1. Example usage on light background
|
70 |
-
2. Example usage on dark background
|
71 |
-
|
72 |
-
== Changelog ==
|
73 |
-
|
74 |
-
= 1.4.
|
75 |
-
*
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
*
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
*
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
*
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
*
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
=== jQuery Smooth Scroll ===
|
2 |
+
Contributors: DigitalLiberation, Anand_Kumar
|
3 |
+
Tags: Smooth Scroll, smooth scroll anchor, scroll to top, scroll, back to top, jquery, top of page
|
4 |
+
Donate link: https://digitalliberation.org
|
5 |
+
Requires at least: 4.0
|
6 |
+
Tested up to: 4.9.8
|
7 |
+
Stable tag: 1.4.3
|
8 |
+
Requires PHP: 5.6
|
9 |
+
License: GPLv2 or later
|
10 |
+
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
+
|
12 |
+
Activate the plugin for smooth scrolling and smooth "back to top" feature.
|
13 |
+
|
14 |
+
== Description ==
|
15 |
+
|
16 |
+
This plugin makes your anchor links to scroll smooth and adds a scroll to top button in the lower-right corner of long pages. The scroll to top button appears after some scrolling and hides automatically reaching top. This plugin is based on cudazi's plugin "Scroll to Top", and you may use this plugin if you need "Scroll to top" feature.
|
17 |
+
|
18 |
+
= Features include: =
|
19 |
+
* Smooth Scroll for all anchor links.
|
20 |
+
* A back to top button on right hand side.
|
21 |
+
* Support RTL
|
22 |
+
* No unnecessary menu item in WordPress Dashboard.
|
23 |
+
* Easy customization with some css/js code edit.
|
24 |
+
* All CSS and JS files are compressed to score high in Google Page Speed score.
|
25 |
+
* Now change easing effect with the help of jQueruyUI
|
26 |
+
|
27 |
+
= Important Links: =
|
28 |
+
* [**Support**](https://digitalliberation.org/support/?utm_source=plugin&utm_medium=link&utm_campaign=jss_plugin_link)
|
29 |
+
* [**Github Repo**](https://github.com/anandkumar/jquery-smooth-scroll)
|
30 |
+
* [Contribute](https://www.digitalliberation.org/contribute/?utm_source=plugin&utm_medium=link&utm_campaign=jss_plugin_link)
|
31 |
+
|
32 |
+
NOTE: The plugin might not be compatible with some other plugins. If there are limited number of tabs or anchor links we may exclude them manually. Please report compatibility issue on the [GitHub repository](https://github.com/anandkumar/jquery-smooth-scroll). You are welcomed to contribute towards the development of the plugin.
|
33 |
+
|
34 |
+
http://www.youtube.com/watch?v=2gsdGOPfqF0
|
35 |
+
|
36 |
+
== Installation ==
|
37 |
+
|
38 |
+
1. Upload the plugin in `Plugins > Add New` or FTP into the `/wp-content/plugins/` directory.
|
39 |
+
2. Activate the plugin through the `Plugins` menu in WordPress.
|
40 |
+
3. Visit a long page and start scrolling down to see the link appear.
|
41 |
+
|
42 |
+
== Frequently Asked Questions ==
|
43 |
+
|
44 |
+
= Why I am not able to find any menu link in my WordPress Dashboard? =
|
45 |
+
Because there is none. All you have to install and activate the plugin. However, There might be some compatibility issues especially with a slider or tab. Please consult us for help.
|
46 |
+
|
47 |
+
= Why the plugin is not working for me? =
|
48 |
+
This plugin might not be compatible with your theme or some other plugin. They are mostly tabs, sliders. Shoot a support request so I could help further.
|
49 |
+
|
50 |
+
= I am looking for PSD file. =
|
51 |
+
The PSD file could be found in the plugin directory.
|
52 |
+
|
53 |
+
= Can I use a custom icon? =
|
54 |
+
|
55 |
+
Yes, just overwrite the arrow.png image or use the included PSD to tweak.
|
56 |
+
|
57 |
+
= Can I adjust the point when the icon/link appears? =
|
58 |
+
|
59 |
+
Yes, just edit the upperLimit value in js/jss-script.min.js.
|
60 |
+
|
61 |
+
= Why everything looks weird in js and css files? =
|
62 |
+
|
63 |
+
Because these files are compressed. I have included reader friendly files i.e. js/jss-script.min.js and css/jss-style.js
|
64 |
+
|
65 |
+
Note: This plugin is based on "Cudazi scroll to top".
|
66 |
+
|
67 |
+
== Screenshots ==
|
68 |
+
|
69 |
+
1. Example usage on light background
|
70 |
+
2. Example usage on dark background
|
71 |
+
|
72 |
+
== Changelog ==
|
73 |
+
|
74 |
+
= 1.4.2 =
|
75 |
+
* Compatibility checked with Wordpress 4.9.8
|
76 |
+
|
77 |
+
= 1.4.2 =
|
78 |
+
* Fix: Removed social media link
|
79 |
+
* Compatibility checked with Wordpress 4.9.1
|
80 |
+
|
81 |
+
= 1.4.1 =
|
82 |
+
* Improvement: now tab links will be skipped. Should support Woocommerce.
|
83 |
+
* jQuery warning fixed.
|
84 |
+
* Compatibility checked with WP 4.5
|
85 |
+
|
86 |
+
= 1.4.0 =
|
87 |
+
* Improvement: PHP5 style construct. made the plugin future proof
|
88 |
+
* Compatibility checked with WP 4.4.2
|
89 |
+
|
90 |
+
= 1.3.2 =
|
91 |
+
* Bugfix
|
92 |
+
* Compatibility checked with WP 4.0
|
93 |
+
|
94 |
+
= 1.3.1 =
|
95 |
+
* Fixed compatibility issue with OptimizePress Plugin.
|
96 |
+
(There was a prablem with Live Editor)
|
97 |
+
|
98 |
+
= 1.3.0 =
|
99 |
+
|
100 |
+
* Now you may easily customize speed and easing effect
|
101 |
+
* Fixed compatibility issue with other plugins.
|
102 |
+
|
103 |
+
= 1.2.4 =
|
104 |
+
|
105 |
+
* Compatibility check for WordPress 3.7.1
|
106 |
+
* Asking for feedback and listing incompatibility.
|
107 |
+
* Minor improvement.
|
108 |
+
|
109 |
+
= 1.2.3 =
|
110 |
+
|
111 |
+
* Fixed Incompatibility with Hello Bar Plugin.
|
112 |
+
* Added Easy Smooth Scroll links script.
|
113 |
+
|
114 |
+
= 1.2.0 =
|
115 |
+
|
116 |
+
* Major js change
|
117 |
+
|
118 |
+
= 1.0.1 =
|
119 |
+
|
120 |
+
* Improved readme.txt for WordPress.org plugin library.
|
121 |
+
* Initial release at [WordPress.org](http://wordpress.org/extend/plugins/jquery-smooth-scroll/)
|
122 |
+
|
123 |
+
= 1.0.0 =
|
124 |
+
|
125 |
+
* Initial release at [blogsynthesis.com](https://www.blogsynthesis.com/plugins/jquery-smooth-scroll/)
|
126 |
+
|
127 |
+
== Upgrade Notice ==
|
128 |
+
Any modification made to the plugin files will be gone after upgrade. Please consider backing up before this upgrade. [Contact us](https://digitalliberation.org/wordpress) any clarification.
|