Changeset 3115646
- Timestamp:
- 07/10/2024 01:55:07 PM (2 weeks ago)
- Location:
- x-scroll-to-top-responsive/trunk
- Files:
-
- 24 added
- 1 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
x-scroll-to-top-responsive/trunk/assets/css/custom.css
r2238460 r3115646 24 24 25 25 .scroll-to-top { 26 26 27 position: fixed; 27 28 bottom: 4%; -
x-scroll-to-top-responsive/trunk/assets/js/active.js
r2238460 r3115646 1 1 (function ($) { 2 "use strict"; 3 4 /* ========================================================================= 5 Window Scroll Function 6 =========================================================================*/ 7 jQuery(window).on('scroll', function () { 8 /* ================================================================= 9 Scroll to Top active 10 ===================================================================*/ 11 if ($(window).scrollTop() > 300) { 12 $(".scroll-to-top").fadeIn(); 13 } else { 14 $(".scroll-to-top").fadeOut(); 15 } 2 "use strict"; 3 4 // Cache the selectors for better performance 5 var $window = $(window); 6 var $scrollToTop = $(".scroll-to-top"); 16 7 17 }); 18 /* ================================================================= 19 Window Load Function 20 ===================================================================*/ 21 $(window).on('load', function () { 22 /* ================================================================= 23 Scroll Bottom to Top 24 ===================================================================*/ 25 $(".scroll-to-top").on("click", function () { 26 $('html, body').animate({ scrollTop: 0 }, 800); 27 return false; 28 }); 29 }); 8 // Ensure the button is hidden initially using JavaScript 9 $scrollToTop.hide(); 30 10 11 12 13 14 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 31 66 32 67 }(jQuery)); -
x-scroll-to-top-responsive/trunk/plugin-hook.php
r2238460 r3115646 1 1 <?php 2 2 /* 3 Plugin Name: X-Scroll To Top - Responsive3 Plugin Name:X-Scroll To Top - Responsive 4 4 Plugin URI: https://wordpress.org/plugins/x-scroll-to-top-responsive/ 5 Description: This plugin will add a scroll to top button on footer center.5 Description: This plugin will add a scroll to top. 6 6 Author: Jahid 7 7 Author URI: https://jahid.co 8 Version: 3.0.0 9 Copyright 2014-2019 Md. Jahidul Islam (email : contact@jahid.co) 8 Text Domain: x-scroll-to-top-responsive 9 Domain Path: /i18n/languages 10 Version: 3.1.0 11 */ 10 12 11 This program is free software; you can redistribute it and/or modify 12 it under the terms of the GNU General Public License, version 2, as 13 published by the Free Software Foundation. 13 if (!defined('ABSPATH')) exit; // Exit if accessed directly 14 14 15 This program is distributed in the hope that it will be useful, 16 but WITHOUT ANY WARRANTY; without even the implied warranty of 17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 GNU General Public License for more details. 19 20 You should have received a copy of the GNU General Public License 21 along with this program; if not, write to the Free Software 22 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 23 */ 24 if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly 15 // Include the Composer autoloader 16 require_once __DIR__ . '/vendor/autoload.php'; 25 17 26 18 /** 27 * 19 * Plugin Text Domain 28 20 */ 29 21 function xscroll_domain_load_function(){ 30 load_plugin_textdomain('xscroll', false, dirname(__FILE__)."/languages");22 /languages"); 31 23 } 32 add_action('plugins_loaded','xscroll_domain_load_function'); 33 24 add_action('plugins_loaded', 'xscroll_domain_load_function'); 34 25 35 26 /** 36 27 * Currently plugin version. 37 * Start at version 1.0.028 * Start at version .0 38 29 * Rename this for your plugin and update it as you release new versions. 39 30 */ 40 define( 'XSTR_VERSION', '3.0.0');31 define(); 41 32 42 33 define('XSTR_PLUGIN_URL', plugin_dir_url(__FILE__)); … … 50 41 /** 51 42 * The code that runs during plugin activation. 52 * This action is documented in includes/class-jahid-activator.php53 43 */ 54 44 function activate_XSTR() { 55 require_once XSTR_PLUGIN_PATH . 'inc/class-XSTR-activator.php'; 56 XSTR_Activator::activate(); 45 CoderPlus\XScrollTopResponsive\Activator::activate(); 57 46 } 58 47 59 48 /** 60 49 * The code that runs during plugin deactivation. 61 * This action is documented in includes/class-jahid-deactivator.php62 50 */ 63 51 function deactivate_XSTR() { 64 require_once XSTR_PLUGIN_PATH . 'inc/class-XSTR-deactivator.php'; 65 XSTR_Deactivator::deactivate(); 52 CoderPlus\XScrollTopResponsive\Deactivator::deactivate(); 66 53 } 67 54 68 register_activation_hook( 69 register_deactivation_hook( __FILE__, 'deactivate_XSTR');55 register_activation_hook(__FILE__, 'activate_XSTR'); 56 register_deactivation_hook(); 70 57 71 /** 72 * The core plugin class that is used to define internationalization, 73 * admin-specific hooks, and public-facing site hooks. 74 */ 58 use CoderPlus\XScrollTopResponsive\Core; 59 use CoderPlus\XScrollTopResponsive\Assets; 60 use CoderPlus\XScrollTopResponsive\Customizer; 61 use CoderPlus\XScrollTopResponsive\AdminNotice; 62 use CoderPlus\XScrollTopResponsive\CoreUpdate; 75 63 64 76 65 77 require_once XSTR_PLUGIN_PATH.'inc/class-XSTR-core.php'; 78 require_once XSTR_PLUGIN_PATH.'inc/class-XSTR-assets.php'; 79 require XSTR_PLUGIN_PATH.'inc/class-XSTR-custom-customizer.php'; 80 require_once XSTR_PLUGIN_PATH.'inc/class-XSTR-customizer.php'; 81 require_once XSTR_PLUGIN_PATH.'inc/class-XSTR-admin-notice.php'; 82 83 84 85 add_action('admin_notices', 'XSTR_admin_notice::admin_notices_old_user'); 86 87 $core = new XSTR_core(); 66 // Initialize the Core class 67 $core = new Core(); 88 68 $core->init(); 89 69 90 $assets = new XSTR_assets(); 70 // Initialize the CoreUpdate class 71 CoreUpdate::init(); 72 73 // Hook the migration function 74 register_activation_hook(__FILE__, [CoreUpdate::class, 'run_migrations']); 75 add_action('upgrader_process_complete', function($upgrader_object, $options) { 76 if ($options['action'] == 'update' && $options['type'] == 'plugin' ) { 77 if (isset($options['plugins']) && in_array(plugin_basename(__FILE__), $options['plugins'])) { 78 CoreUpdate::run_migrations(); 79 } 80 } 81 }, 10, 2); 82 83 $assets = new Assets(); 91 84 $assets->init(); 92 85 93 $customizer = new XSTR_customizer();86 $customizer = new ustomizer(); 94 87 $customizer->init(); 95 88 89 90 91 92 93 94 95 96 97 98 99 -
x-scroll-to-top-responsive/trunk/readme.txt
r2238516 r3115646 1 1 === X-Scroll To Top - Responsive === 2 2 Contributors: Md. Jahidul Islam 3 Tags: scroll to top, scroll up, Responsive , Scroll button, free scroll to top, scroll up button4 Requires at least: 4.05 Tested up to: 5.3.23 Tags: scroll to top, scroll up, Responsive, scroll up button 4 Requires at least: .0 5 Tested up to: 6 6 Stable tag: 3.0.0 7 7 Requires PHP: 5.4 … … 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html 10 10 11 "X-Scroll To Top - Responsives" plugin will add a scroll up button bottom center of your website. It came with bunch of custom option.11 . 12 12 13 13 == Description == 14 14 15 **X Scroll to top plugin makes the scrolling of a page easier. It appends an icon at bottom of the page which attracts user attention. When the user click on this button 16 17 it smoothly scrolls to the top of Webpage. X Scroll To Top plugin offers custom settings flexibility which no other plugin have. It is a simple scroll up plugin just 18 19 with 4 option but it has ability to fulfill all needed about scroll up button. 15 The X-Scroll To Top plugin makes scrolling a webpage easier by adding an attention-grabbing icon at the bottom. When users click this button, it smoothly scrolls the page back to the top. The plugin offers a unique level of customization with flexible settings, allowing users to personalize the button's appearance and behavior. Users can also see changes visually in real-time, making it easy to tailor the scroll-up button to their site’s design and functionality. Despite its simplicity with just four options, it effectively meets all the needs for a scroll-up button. 20 16 21 17 22 > Features: 23 > 1. 15 Different scroll up icon 24 > 2. Custom icon size 25 > 3. Custom Circle or border radius option 26 > 4. Unlimited icon color 27 > 5. Unlimited icon background color option 28 > 6. Unlimited icon hover color 29 > 7. Unlimited icon background color 30 > 8. Custom Scroll up icon position 31 > 9. Fully responsive design 32 > 10. Custom scroll up position for mobile & tab 33 > 11. Add option for hide notice in mobile version 18 ###Features 19 * 15 Different Scroll-Up Icons: Choose from 15 unique icons to customize the scroll-up button. 20 * Custom Icon Size: Easily adjust the icon size to fit your website’s design. 21 * Custom Circle or Border Radius Option: Personalize the button’s shape with customizable border radius settings. 22 * Unlimited Icon Color Options: Select any color for your scroll-up icon to match your site’s theme. 23 * Unlimited Icon Background Color Options: Customize the background color of the icon for better visibility and style. 24 * Unlimited Icon Hover Color: Change the icon color when hovered over to enhance user interaction. 25 * Unlimited Icon Hover Background Color: Adjust the background color of the icon on hover for a dynamic effect. 26 * Custom Scroll-Up Icon Position: Position the scroll-up button anywhere on the screen to suit your layout. 27 * Fully Responsive Design: Ensures the scroll-up button looks great on all devices, including desktops, tablets, and mobile phones. 28 * Custom Scroll-Up Position for Mobile & Tablet: Set different positions for the scroll-up button on mobile and tablet devices for better accessibility. 29 * Option to Hide Notice on Mobile: Add an option to hide the scroll-up button on mobile devices to improve user experience. 34 30 35 31 https://vimeo.com/389293056 … … 56 52 == Frequently Asked Questions == 57 53 58 = Does it works with all theme? =54 = ? = 59 55 60 We tested with mejor themes & it works really fine. Still if it not works just contact with me via support forum or email me contact@jahid.co. 56 To access the settings for the X-Scroll To Top plugin, go to your WordPress dashboard and navigate to Appearance -> Customize -> X-Scroll To Top Settings. Here you can customize the scroll-up button according to your preferences. 57 58 = Can I customize the colors of the scroll-up button? = 59 60 Absolutely! You can customize the icon color, background color, hover color, and hover background color. These options are available in the Customizer settings, allowing you to match the scroll-up button with your site’s design. 61 62 = What if I want to hide the scroll-up button on mobile devices? = 63 64 You can choose to hide the scroll-up button on mobile devices by enabling the corresponding option in the Customizer settings. 65 66 = How do I set the border radius for the scroll-up button? = 67 68 You can set the border radius from the Customizer settings under the X-Scroll To Top section. This allows you to create a circular or rounded scroll-up button based on your preference. 69 70 = Can I set different settings for mobile and tablet devices? = 71 72 Yes, the X-Scroll To Top plugin allows you to set different scroll-up button positions for mobile and tablet devices, ensuring optimal user experience across all devices. 73 74 75 = Does it work with all themes? = 76 77 Yes, the X-Scroll To Top plugin is designed to be compatible with all WordPress themes. It integrates seamlessly to provide a smooth scroll-to-top functionality regardless of the theme you are using. 78 79 = How do I change the icon of the scroll-to-top button? = 80 81 You can change the icon from the WordPress Customizer. Go to Appearance -> Customize -> X-Scroll To Top Settings and choose your preferred icon from the available options. 61 82 62 83 … … 70 91 71 92 == Changelog == 93 94 95 96 97 98 99 100 101 102 72 103 =3.0.0= 73 104 Note: Before update please check new Screenshots and documentation … … 84 115 85 116 = 2.0 = 86 -Improve Code117 Improve Code 87 118 88 119 = 1.0 = 89 - initial release 120 ** initial release 121 122 == Upgrade Notice == 123 124 = 3.1.0 = 125 Before updating, please review the new screenshots and documentation. We've made significant changes to the core functionalities and added a migration feature to transfer data from the old settings in version 2.0.2 to the new version. -
x-scroll-to-top-responsive/trunk/uninstall.php
r2238460 r3115646 34 34 */ 35 35 36 global $wpdb; 37 $name = 'xstr_option'; 38 $table = $wpdb->prefix.'_options'; 39 $wpdb->delete( $table, array( 'option_name' => $name ) ); 36 global $wpdb; 37 $name = 'xstr_option'; 38 $table = $wpdb->prefix . 'options'; // Corrected the table name concatenation 39 40 // Check if the option exists 41 $option_exists = $wpdb->get_var($wpdb->prepare("SELECT option_id FROM $table WHERE option_name = %s", $name)); 42 43 if ($option_exists) { 44 // If the option exists and name is not empty, delete it 45 if (!empty($name)) { 46 $wpdb->delete($table, array('option_name' => $name)); 47 } 48 } 49 50 40 51 41 52
Note: See TracChangeset
for help on using the changeset viewer.