Version Description
WordPress 3.9 Compatible
Links in Image Map are now supported
Download this release
Release Info
| Developer | Jeriff Cheng |
| Plugin | |
| Version | 1.7 |
| Comparing to | |
| See all releases | |
Code changes from version 1.5 to 1.7
- anchor/plugin.min.js +1 -0
- index.php +29 -12
- options.php +1 -2
- readme.txt +19 -6
- screenshot-1.png +0 -0
- screenshot-3.jpg +0 -0
- screenshot-3.png +0 -0
- screenshot-4.jpg +0 -0
- screenshot-4.png → screenshot-5.png +0 -0
anchor/plugin.min.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
| 1 |
+
tinymce.PluginManager.add("anchor",function(e){function t(){var t=e.selection.getNode();e.windowManager.open({title:"Anchor",body:{type:"textbox",name:"name",size:40,label:"Name",value:t.name||t.name},onsubmit:function(t){e.execCommand("mceInsertContent",!1,e.dom.createHTML("a",{name:t.data.name}))}})}e.addButton("anchor",{icon:"anchor",tooltip:"Anchor",onclick:t,stateSelector:"a:not([href])"}),e.addMenuItem("anchor",{icon:"anchor",text:"Anchor",context:"insert",onclick:t})});
|
index.php
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
Plugin Name: Easy Smooth Scroll Links
|
| 4 |
Plugin URI: http://www.jeriffcheng.com/wordpress-plugins/easy-smooth-scroll-links
|
| 5 |
Description: Create anchors and add up to to 30 scrolling animation effects to links that link to page anchors. You can set scroll speed and offset value.
|
| 6 |
-
Version: 1.
|
| 7 |
Author: Jeriff Cheng
|
| 8 |
Author URI: http://www.jeriffcheng.com/
|
| 9 |
*/
|
|
@@ -26,16 +26,32 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
| 26 |
|
| 27 |
*/
|
| 28 |
|
| 29 |
-
//
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
}
|
| 37 |
|
| 38 |
-
|
| 39 |
//Shortcode
|
| 40 |
if ( ! function_exists('essl_shortcode') ) {
|
| 41 |
function essl_shortcode( $atts, $content = null ) {
|
|
@@ -89,7 +105,8 @@ define('ESSLPluginOptions_NICK', 'ESSL Settings');
|
|
| 89 |
|
| 90 |
register_setting(ESSLPluginOptions_ID.'_options', 'essl_top_enabled');
|
| 91 |
register_setting(ESSLPluginOptions_ID.'_options', 'essl_top_speed');
|
| 92 |
-
register_setting(ESSLPluginOptions_ID.'_options', 'essl_top_easing');
|
|
|
|
| 93 |
}
|
| 94 |
/** function/method
|
| 95 |
* Usage: hooking (registering) the plugin menu
|
|
@@ -174,7 +191,7 @@ define('ESSLPluginOptions_NICK', 'ESSL Settings');
|
|
| 174 |
(function( $ ) {
|
| 175 |
$(function() {
|
| 176 |
// More code using $ as alias to jQuery
|
| 177 |
-
$("a[href*=#]:not([href=#]):not([href^='#tab']):not([href^='#quicktab']):not([href^='#pane'])<?php if($essl_exclude_begin) echo $essl_exclude_begin; ?><?php if($essl_exclude_match) echo $essl_exclude_match; ?>").click(function() {
|
| 178 |
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
|
| 179 |
var target = $(this.hash);
|
| 180 |
target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
|
|
@@ -213,7 +230,7 @@ define('ESSLPluginOptions_NICK', 'ESSL Settings');
|
|
| 213 |
}
|
| 214 |
});
|
| 215 |
$('a[href=#essltop]').click(function () {
|
| 216 |
-
$('html, body').animate({scrollTop
|
| 217 |
return false;
|
| 218 |
});
|
| 219 |
});
|
| 3 |
Plugin Name: Easy Smooth Scroll Links
|
| 4 |
Plugin URI: http://www.jeriffcheng.com/wordpress-plugins/easy-smooth-scroll-links
|
| 5 |
Description: Create anchors and add up to to 30 scrolling animation effects to links that link to page anchors. You can set scroll speed and offset value.
|
| 6 |
+
Version: 1.7
|
| 7 |
Author: Jeriff Cheng
|
| 8 |
Author URI: http://www.jeriffcheng.com/
|
| 9 |
*/
|
| 26 |
|
| 27 |
*/
|
| 28 |
|
| 29 |
+
//Anchor Button to TinyMCE Editor
|
| 30 |
+
global $wp_version;
|
| 31 |
+
if ( $wp_version < 3.9 ) {
|
| 32 |
+
if ( ! function_exists('enable_anchor_button') ) {
|
| 33 |
+
function enable_anchor_button($buttons) {
|
| 34 |
+
$buttons[] = 'anchor';
|
| 35 |
+
return $buttons;
|
| 36 |
+
}
|
| 37 |
+
}
|
| 38 |
+
add_filter("mce_buttons_2", "enable_anchor_button");
|
| 39 |
+
} else {
|
| 40 |
+
add_action( 'init', 'anchor_button' );
|
| 41 |
+
function anchor_button() {
|
| 42 |
+
add_filter( "mce_external_plugins", "anchor_add_button" );
|
| 43 |
+
add_filter( 'mce_buttons_2', 'anchor_register_button' );
|
| 44 |
+
}
|
| 45 |
+
function anchor_add_button( $plugin_array ) {
|
| 46 |
+
$plugin_array['anchor'] = $dir = plugins_url( '/anchor/plugin.min.js', __FILE__ );
|
| 47 |
+
return $plugin_array;
|
| 48 |
+
}
|
| 49 |
+
function anchor_register_button( $buttons ) {
|
| 50 |
+
array_push( $buttons, 'anchor' );
|
| 51 |
+
return $buttons;
|
| 52 |
+
}
|
| 53 |
}
|
| 54 |
|
|
|
|
| 55 |
//Shortcode
|
| 56 |
if ( ! function_exists('essl_shortcode') ) {
|
| 57 |
function essl_shortcode( $atts, $content = null ) {
|
| 105 |
|
| 106 |
register_setting(ESSLPluginOptions_ID.'_options', 'essl_top_enabled');
|
| 107 |
register_setting(ESSLPluginOptions_ID.'_options', 'essl_top_speed');
|
| 108 |
+
register_setting(ESSLPluginOptions_ID.'_options', 'essl_top_easing');
|
| 109 |
+
register_setting(ESSLPluginOptions_ID.'_options', 'essl_top_offset');
|
| 110 |
}
|
| 111 |
/** function/method
|
| 112 |
* Usage: hooking (registering) the plugin menu
|
| 191 |
(function( $ ) {
|
| 192 |
$(function() {
|
| 193 |
// More code using $ as alias to jQuery
|
| 194 |
+
$("area[href*=#],a[href*=#]:not([href=#]):not([href^='#tab']):not([href^='#quicktab']):not([href^='#pane'])<?php if($essl_exclude_begin) echo $essl_exclude_begin; ?><?php if($essl_exclude_match) echo $essl_exclude_match; ?>").click(function() {
|
| 195 |
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
|
| 196 |
var target = $(this.hash);
|
| 197 |
target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
|
| 230 |
}
|
| 231 |
});
|
| 232 |
$('a[href=#essltop]').click(function () {
|
| 233 |
+
$('html, body').animate({scrollTop:<?php if (get_option('essl_top_offset')!='') {echo get_option('essl_top_offset');} else {echo '0';} ?>}, <?php if (get_option('essl_top_speed')!='') {echo get_option('essl_top_speed');} else {echo '900';} ?>,'<?php echo get_option('essl_top_easing','easeInQuint');?>');
|
| 234 |
return false;
|
| 235 |
});
|
| 236 |
});
|
options.php
CHANGED
|
@@ -1,5 +1,4 @@
|
|
| 1 |
<div class="wrap">
|
| 2 |
-
|
| 3 |
<?php screen_icon(); ?>
|
| 4 |
<form action="options.php" method="post" id="<?php echo $plugin_id; ?>_options_form" name="<?php echo $plugin_id; ?>_options_form">
|
| 5 |
|
|
@@ -109,7 +108,7 @@
|
|
| 109 |
<label for="essl_top_enabled">
|
| 110 |
<p><strong>Enable GoToTop Button ?</strong></p>
|
| 111 |
<p><input type="checkbox" value="1" id="gototop_enabled" name="essl_top_enabled" <?php if (get_option( 'essl_top_enabled' )) echo 'checked' ; ?>><strong>YES</strong>. →
|
| 112 |
-
GoToTop Speed( Default:900) <input size="10" id="topspeed" type="text" name="essl_top_speed" value="<?php echo get_option('essl_top_speed'); ?>" /> →Animation Effect <select name="essl_top_easing">
|
| 113 |
<option disabled="disabled" >Choose an Animation Effects</option>
|
| 114 |
<option name="essl_top_easing" value="easeInBounce" <?php echo (get_option('essl_top_easing') == "easeInBounce") ? 'selected="selected"' : ''; ?>>easeInBounce</option>
|
| 115 |
<option name="essl_top_easing" value="easeOutBounce" <?php echo (get_option('essl_top_easing') == "easeOutBounce") ? 'selected="selected"' : ''; ?>>easeOutBounce</option>
|
| 1 |
<div class="wrap">
|
|
|
|
| 2 |
<?php screen_icon(); ?>
|
| 3 |
<form action="options.php" method="post" id="<?php echo $plugin_id; ?>_options_form" name="<?php echo $plugin_id; ?>_options_form">
|
| 4 |
|
| 108 |
<label for="essl_top_enabled">
|
| 109 |
<p><strong>Enable GoToTop Button ?</strong></p>
|
| 110 |
<p><input type="checkbox" value="1" id="gototop_enabled" name="essl_top_enabled" <?php if (get_option( 'essl_top_enabled' )) echo 'checked' ; ?>><strong>YES</strong>. →
|
| 111 |
+
GoToTop Speed( Default:900) <input size="10" id="topspeed" type="text" name="essl_top_speed" value="<?php echo get_option('essl_top_speed'); ?>" /> →Offset( Default:0) <input size="10" id="topoffset" type="text" name="essl_top_offset" value="<?php echo get_option('essl_top_offset'); ?>" /> →Animation Effect <select name="essl_top_easing">
|
| 112 |
<option disabled="disabled" >Choose an Animation Effects</option>
|
| 113 |
<option name="essl_top_easing" value="easeInBounce" <?php echo (get_option('essl_top_easing') == "easeInBounce") ? 'selected="selected"' : ''; ?>>easeInBounce</option>
|
| 114 |
<option name="essl_top_easing" value="easeOutBounce" <?php echo (get_option('essl_top_easing') == "easeOutBounce") ? 'selected="selected"' : ''; ?>>easeOutBounce</option>
|
readme.txt
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
Contributors: Jeriff Cheng
|
| 3 |
Tags: smooth scroll,jquery smooth scroll div,smooth scroll jquery,smooth scroll chrome,smooth scroll firefox,smooth scroll javascript,smooth scroll to anchor,smooth scroll plugin,smooth scroll tutorial,anchor,anchor text
|
| 4 |
Requires at least: 2.6.5
|
| 5 |
-
Tested up to: 3.
|
| 6 |
Stable tag: trunk
|
| 7 |
|
| 8 |
== Description ==
|
|
@@ -13,7 +13,7 @@ Create anchors and add up to to 30 scrolling animation effects to links that lin
|
|
| 13 |
* You can set __scroll speed__ and __offset value__.
|
| 14 |
* Choose from __30 Scrolling Animation Effects__
|
| 15 |
* You can __exclude certain anchors from scrolling__.
|
| 16 |
-
* Option to enable __Go To Top Button__.
|
| 17 |
* Works on __all major browsers__: IE, Firefox, Chrome, Safari...
|
| 18 |
* __Visual Editor__ Anchor Button
|
| 19 |
* __Shortcode__ Supported [anchor]anchorname[/anchor]
|
|
@@ -37,11 +37,22 @@ For FAQs and bug report,refer to <a target="_blank" rel="follow" href="http://ww
|
|
| 37 |
|
| 38 |
1. Plugin Options Page
|
| 39 |
2. Animation Effects
|
| 40 |
-
3.
|
| 41 |
-
4.
|
|
|
|
| 42 |
|
| 43 |
== Changelog ==
|
| 44 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
= 1.5 =
|
| 46 |
|
| 47 |
*New: Option to enable Go To Top Button (with custom scroll speed and animation effect)
|
|
@@ -85,6 +96,8 @@ Changed : Use wp_enqueue_script function to load the script instead of the defau
|
|
| 85 |
|
| 86 |
== Upgrade Notice ==
|
| 87 |
|
| 88 |
-
= 1.
|
|
|
|
|
|
|
| 89 |
|
| 90 |
-
*
|
| 2 |
Contributors: Jeriff Cheng
|
| 3 |
Tags: smooth scroll,jquery smooth scroll div,smooth scroll jquery,smooth scroll chrome,smooth scroll firefox,smooth scroll javascript,smooth scroll to anchor,smooth scroll plugin,smooth scroll tutorial,anchor,anchor text
|
| 4 |
Requires at least: 2.6.5
|
| 5 |
+
Tested up to: 3.9
|
| 6 |
Stable tag: trunk
|
| 7 |
|
| 8 |
== Description ==
|
| 13 |
* You can set __scroll speed__ and __offset value__.
|
| 14 |
* Choose from __30 Scrolling Animation Effects__
|
| 15 |
* You can __exclude certain anchors from scrolling__.
|
| 16 |
+
* Option to enable __Go To Top Button__ (with offset, animation effect and speed settings).
|
| 17 |
* Works on __all major browsers__: IE, Firefox, Chrome, Safari...
|
| 18 |
* __Visual Editor__ Anchor Button
|
| 19 |
* __Shortcode__ Supported [anchor]anchorname[/anchor]
|
| 37 |
|
| 38 |
1. Plugin Options Page
|
| 39 |
2. Animation Effects
|
| 40 |
+
3. TinyMCE Editor Anchor Button
|
| 41 |
+
4. Enter Anchor Name
|
| 42 |
+
5. Go To Top Button
|
| 43 |
|
| 44 |
== Changelog ==
|
| 45 |
|
| 46 |
+
= 1.7 =
|
| 47 |
+
|
| 48 |
+
* WordPress 3.9 Compatible
|
| 49 |
+
|
| 50 |
+
* Links in Image Map are now supported
|
| 51 |
+
|
| 52 |
+
= 1.6 =
|
| 53 |
+
|
| 54 |
+
*New: Option to set offset for GoToTop Button.
|
| 55 |
+
|
| 56 |
= 1.5 =
|
| 57 |
|
| 58 |
*New: Option to enable Go To Top Button (with custom scroll speed and animation effect)
|
| 96 |
|
| 97 |
== Upgrade Notice ==
|
| 98 |
|
| 99 |
+
= 1.7 =
|
| 100 |
+
|
| 101 |
+
* WordPress 3.9 Compatible
|
| 102 |
|
| 103 |
+
* Links in Image Map are now supported
|
screenshot-1.png
CHANGED
|
Binary file
|
screenshot-3.jpg
ADDED
|
Binary file
|
screenshot-3.png
DELETED
|
Binary file
|
screenshot-4.jpg
ADDED
|
Binary file
|
screenshot-4.png → screenshot-5.png
RENAMED
|
File without changes
|
