Changeset 3443487
- Timestamp:
- 01/20/2026 06:24:17 PM (4 weeks ago)
- Location:
- jquery-smooth-scroll/trunk
- Files:
-
- 1 added
- 3 edited
-
css/style.css (modified) (2 diffs)
-
jquery-smooth-scroll.php (modified) (8 diffs)
-
js/admin-script.js (added)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
jquery-smooth-scroll/trunk/css/style.css
r1927242 r3443487 1 1 a#scroll-to-top { 2 2 3 3 /* Background image, replace in images folder */ 4 4 background: url(../images/arrow.png) no-repeat center center; 5 5 6 6 /* Match to background image size */ 7 7 width: 35px; 8 8 height: 35px; 9 9 10 10 /* Postion on the page */ 11 position: fixed; 11 position: fixed; 12 12 right: 30px; 13 13 bottom: 30px; 14 14 15 15 /* Hide link text */ 16 16 text-indent: -9999px; 17 17 font-size: 0; 18 18 19 19 /* Other */ 20 cursor: pointer; 20 cursor: pointer; 21 21 outline: 0; 22 22 23 23 } 24 24 … … 29 29 /* Responsive Design Support */ 30 30 @media only screen and (max-width: 480px) { 31 31 32 32 a#scroll-to-top { 33 34 /* Changing Position */ 35 right: 0;36 bottom: 0;33 34 /* Changing Position */ 35 right: 5px; 36 bottom: 10px; 37 37 } 38 38 39 39 body.rtl a#scroll-to-top { 40 left: 0;41 bottom: 0;40 left: 5px; 41 bottom: 10px; 42 42 } 43 43 } 44 45 /* Custom Image Support */ 46 a#scroll-to-top.custom-image { 47 background: none; 48 width: auto; 49 height: auto; 50 text-indent: 0; 51 } 52 53 a#scroll-to-top.custom-image img { 54 display: block; 55 max-width: 60px; /* Reasonable default limit */ 56 height: auto; 57 } -
jquery-smooth-scroll/trunk/jquery-smooth-scroll.php
r2116269 r3443487 2 2 /* 3 3 Plugin Name: jQuery Smooth Scroll 4 Version: 1. 4.54 Version: 1.5.0 5 5 Plugin URI: https://www.digitalliberation.org/plugins/jquery-smooth-scroll/?utm_source=plugin&utm_medium=link&utm_campaign=jss_plugin_link 6 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. … … 10 10 11 11 jQuery Smooth Scroll 12 Copyright (C) 2013- 19, Anand Kumar <[email protected]>12 Copyright (C) 2013-26, Anand Kumar <[email protected]> 13 13 14 14 This program is free software; you can redistribute it and/or modify it under the terms of the GNU … … 34 34 35 35 // Prevent loading this file directly - Busted! 36 if ( ! class_exists( 'WP' ) ) { 37 header( 'Status: 403 Forbidden' ); 38 header( 'HTTP/1.1 403 Forbidden' ); 36 if ( ! defined( 'ABSPATH' ) ) { 39 37 exit; 40 38 } … … 48 46 $blogsynthesis_jss_plugin_url = trailingslashit ( WP_PLUGIN_URL . '/' . dirname ( plugin_basename ( __FILE__ ) ) ); 49 47 $pluginname = 'jQuery Smooth Scroll'; 50 $plugin_version = '1. 4.2';48 $plugin_version = '1.5.0'; 51 49 52 50 // load plugin Scripts … … 58 56 add_action( 'wp_footer', array( &$this, 'wp_footer' ) ); 59 57 58 // Admin menu and settings 59 add_action( 'admin_menu', array( &$this, 'add_plugin_page' ) ); 60 add_action( 'admin_init', array( &$this, 'page_init' ) ); 61 add_action( 'admin_enqueue_scripts', array( &$this, 'admin_scripts' ) ); 62 63 } 64 65 public function add_plugin_page() { 66 add_options_page( 67 'jQuery Smooth Scroll Settings', 68 'jQuery Smooth Scroll', 69 'manage_options', 70 'jquery-smooth-scroll', 71 array( &$this, 'create_admin_page' ) 72 ); 73 } 74 75 public function page_init() { 76 register_setting( 'jquery_smooth_scroll_option_group', 'jss_scroll_to_top_image', 'esc_url_raw' ); 77 } 78 79 public function admin_scripts( $hook ) { 80 if ( 'settings_page_jquery-smooth-scroll' != $hook ) { 81 return; 82 } 83 wp_enqueue_media(); 84 wp_enqueue_script( 'jss-admin-script', plugin_dir_url( __FILE__ ) . 'js/admin-script.js', array( 'jquery' ), '1.0', true ); 85 } 86 87 public function create_admin_page() { 88 ?> 89 <div class="wrap"> 90 <h1>jQuery Smooth Scroll Settings</h1> 91 <form method="post" action="options.php"> 92 <?php settings_fields( 'jquery_smooth_scroll_option_group' ); ?> 93 <?php do_settings_sections( 'jquery_smooth_scroll_option_group' ); ?> 94 <table class="form-table"> 95 <tr valign="top"> 96 <th scope="row">Scroll to Top Image</th> 97 <td> 98 <?php $image_url = get_option( 'jss_scroll_to_top_image' ); ?> 99 <input type="hidden" id="jss_scroll_to_top_image" name="jss_scroll_to_top_image" value="<?php echo esc_attr( $image_url ); ?>" /> 100 <div style="margin-bottom: 10px;"> 101 <img id="jss_image_preview" src="<?php echo esc_attr( $image_url ); ?>" style="max-width: 100px; max-height: 100px; display: <?php echo $image_url ? 'block' : 'none'; ?>;" /> 102 </div> 103 <input type="button" class="button" value="<?php esc_attr_e( 'Upload Image', 'jquery-smooth-scroll' ); ?>" id="upload_image_button" /> 104 <input type="button" class="button button-secondary" value="<?php esc_attr_e( 'Remove Image', 'jquery-smooth-scroll' ); ?>" id="remove_image_button" style="display: <?php echo $image_url ? 'inline-block' : 'none'; ?>;" /> 105 <p class="description">Upload a custom PNG, JPG, JPEG, or SVG image for the scroll to top button.</p> 106 </td> 107 </tr> 108 </table> 109 <?php submit_button(); ?> 110 </form> 111 </div> 112 <?php 60 113 } 61 114 … … 67 120 68 121 // register and enqueue CSS 69 wp_register_style( 'jquery-smooth-scroll', plugin_dir_url( __FILE__ ) . 'css/style.css', false);122 wp_register_style( 'jquery-smooth-scroll', plugin_dir_url( __FILE__ ) . 'css/style.css', array(), '1.4.5' ); 70 123 wp_enqueue_style( 'jquery-smooth-scroll' ); 71 124 … … 76 129 $extension = '.js'; 77 130 } 78 wp_enqueue_script( 'jquery-smooth-scroll', plugin_dir_url( __FILE__ ) . 'js/script'.$extension, array('jquery'), false, true );131 wp_enqueue_script( 'jquery-smooth-scroll', plugin_dir_url( __FILE__ ) . 'js/script'.$extension, array('jquery'), '1.4.5', true ); 79 132 80 133 // You may now choose easing effect. For more information visit http://www.blogsynthesis.com/?p=860 … … 84 137 85 138 public function wp_footer() { 86 // the html button which will be added to wp_footer ?> 87 <a id="scroll-to-top" href="#" title="<?php esc_attr_e( 'Scroll to Top', 'blogsynthesis' ); ?>"><?php esc_html_e( 'Top', 'blogsynthesis' ); ?></a> 88 <?php 139 // the html button which will be added to wp_footer 140 $image_url = get_option( 'jss_scroll_to_top_image' ); 141 if ( $image_url ) { 142 ?> 143 <a id="scroll-to-top" class="custom-image" href="#" title="<?php esc_attr_e( 'Scroll to Top', 'jquery-smooth-scroll' ); ?>"> 144 <img src="<?php echo esc_url( $image_url ); ?>" alt="<?php esc_attr_e( 'Scroll to Top', 'jquery-smooth-scroll' ); ?>" /> 145 </a> 146 <?php 147 } else { 148 ?> 149 <a id="scroll-to-top" href="#" title="<?php esc_attr_e( 'Scroll to Top', 'jquery-smooth-scroll' ); ?>"><?php esc_html_e( 'Top', 'jquery-smooth-scroll' ); ?></a> 150 <?php 151 } 89 152 } 90 153 -
jquery-smooth-scroll/trunk/readme.txt
r2116636 r3443487 1 1 === jQuery Smooth Scroll === 2 Contributors: digitalliberation,anand_kumar3 Tags: Smooth Scroll, smooth scroll anchor, scroll to top, scroll, back to top, jquery, top of page4 Donate link: https://www. digitalliberation.org2 Contributors: anand_kumar 3 Tags: Smooth Scroll, smooth scroll anchor, scroll to top, back to top 4 Donate link: https://www.anandkumar.net 5 5 Requires at least: 4.0 6 Tested up to: 5.2.27 Stable tag: 1. 4.58 Requires PHP: 5.66 Tested up to: 6.9 7 Stable tag: 1.5.0 8 Requires PHP: 7.0 9 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 26 26 27 27 = Important Links: = 28 * [**Support**](https:// forums.digitalliberation.org/?utm_source=plugin&utm_medium=link&utm_campaign=jss_plugin_link)28 * [**Support**](https://wordpress.org/support/plugin/jquery-smooth-scroll/?utm_source=plugin&utm_medium=link&utm_campaign=jss_plugin_link) 29 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)30 * [Contribute](https://github.com/anandkumar/jquery-smooth-scroll/issues?utm_source=plugin&utm_medium=link&utm_campaign=jss_plugin_link) 31 31 32 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. … … 71 71 72 72 == Changelog == 73 74 = 1.5.0 = 75 * Feature: Added custom scroll to top image upload setting. 76 * Fix: Security hardening (Added direct file access check). 77 * Fix: Added missing version parameters to enqueue calls. 78 * Fix: Corrected text domains. 79 * Fix: Added sanitization and escaping in admin settings. 80 * Tested up to WordPress 6.9. 73 81 74 82 = 1.4.4 =
Note: See TracChangeset
for help on using the changeset viewer.