=== WP Preloader === Contributors: mamunitiw Tags: preloader, loading screen, spinner, page loader, preload Requires at least: 5.0 Tested up to: 6.8 Requires PHP: 7.4 Stable tag: 2.0.0 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html A simple, responsive and customizable WordPress preloader plugin with CSS spinners, fade-out animation, and zero configuration required. == Description == **WP Preloader** displays a beautiful loading screen while your website loads — and fades it out smoothly once the page is ready. Version 2.0 is a complete rewrite with modern features, improved performance, and full WordPress 6.x compatibility. = ✨ What's New in v2.0 = * **Auto-inject** — No shortcode or theme file editing needed. Just activate and go. * **5 built-in CSS spinners** — Circle, Ring, Dots, Bars, and Pulse. No image required. * **Live preview** in the admin settings panel * **Fade-out animation** — Smooth and configurable * **Minimum display time** — Control how long the preloader stays on screen * **Disable for logged-in users** — Admins won't see the preloader * **Disable on mobile** — Optional, for faster mobile experience * **Exclude specific pages** — Skip the preloader on chosen pages * **Background opacity control** — Solid or semi-transparent overlay * **Custom image / GIF support** — Still supported for those who prefer it * **PHP 8.x compatible** * **WordPress 6.x compatible** = 🎨 Spinner Styles = 1. **Circle** — Classic rotating arc 2. **Ring** — Dual-color spinning ring 3. **Dots** — Three bouncing dots 4. **Bars** — Four animated wave bars 5. **Pulse** — Ripple / sonar effect = ⚙️ Settings = All settings are available under **Settings → WP Preloader** in your WordPress admin. * Enable / disable the preloader * Choose spinner type and color * Set background color and opacity * Upload a custom GIF or image (optional) * Set minimum display time (ms) * Set fade-out animation duration (ms) * Disable for logged-in users * Disable on mobile devices * Exclude specific pages by slug or ID = Backward Compatibility = The legacy shortcode `[new_loader]` from v1.0 is still supported but no longer required. == Installation == 1. Upload the plugin files to `/wp-content/plugins/wp-preloader/`, or install via **Plugins → Add New** in WordPress admin. 2. Activate the plugin through the **Plugins** screen in WordPress. 3. Go to **Settings → WP Preloader** to configure. 4. That's it — no theme file editing required! == Frequently Asked Questions == = Do I need to edit my theme files? = No. WP Preloader v2.0 automatically injects the preloader HTML using WordPress hooks. No shortcode or header.php editing needed. = Does it work with page builders like Elementor, Divi, Beaver Builder? = Yes. The preloader is injected at the WordPress level and works with any theme or page builder. = Can I still use a GIF image? = Yes. Upload your GIF via **Settings → WP Preloader → Custom Image**. When an image is set, it replaces the CSS spinner. = Will logged-in admins see the preloader? = By default, no. The "Disable for Logged-in Users" option is enabled by default so admins don't see it while editing. = How do I exclude a page? = Go to Settings → WP Preloader and enter page slugs or IDs (comma-separated) in the "Excluded Pages" field. Example: `contact, 42, about-us` = The preloader doesn't go away — what's wrong? = There is a built-in 8-second failsafe — the preloader will always disappear after 8 seconds even if the page fails to fully load. If you're having issues, try increasing the "Minimum Display Time" or check for JavaScript errors in your browser console. == Screenshots == 1. Admin Settings Panel with Live Preview 2. Circle Spinner on dark background 3. Dots Spinner example 4. Bars Spinner example 5. Pulse Spinner example 6. Custom GIF / Image mode == Changelog == = 2.0.0 = * Complete rewrite for WordPress 6.x and PHP 8.x compatibility * Added auto-injection via wp_body_open / wp_footer hooks (no shortcode needed) * Added 5 CSS-only spinner styles: Circle, Ring, Dots, Bars, Pulse * Added live preview in admin settings panel * Added spinner color picker * Added background opacity control * Added minimum display time setting * Added fade-out duration control * Added disable for logged-in users option * Added disable on mobile option * Added excluded pages option * Added custom image width control * Added 8-second failsafe timeout * Improved security: nonces, sanitization, escaping throughout * Improved admin UI with toggle switches and card layout * Backward compatible: legacy [new_loader] shortcode still works = 1.0 = * First Release == Upgrade Notice == = 2.0.0 = Major update — full rewrite with new features, WordPress 6.x compatibility, and improved security. After upgrading, visit Settings → WP Preloader to review your settings. The plugin now auto-injects — you can remove the old shortcode from your header.php if you added it manually.