=== Sweet Sharmin Preloader ===
Contributors:      yeasin62
Tags:              preloader, loading screen, page loader, animated preloader, svg preloader
Requires at least: 5.0
Tested up to:      6.9
Stable tag:        2.0
Requires PHP:      7.2
License:           GPLv2 or later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html

A beautiful animated preloader plugin for WordPress. Choose from 14 stunning SVG preloader styles with a live preview admin panel.

== Description ==

**Sweet Sharmin Preloader** displays a gorgeous animated loading screen while your WordPress site loads. It comes with **14 unique SVG-based preloader animations** — each handcrafted to be visually stunning, smooth, and lightweight.

All animations are built with pure SVG — no GIF files, no external image requests, no third-party libraries. Just clean, fast, beautiful animations that work on every device and browser.

Browse and select your preferred style directly from the WordPress admin panel with an animated **live preview** — no coding required.

= ✨ Key Features =

* **14 Unique Preloader Styles** — Pure SVG animations. No GIFs, no external libraries, no HTTP requests for assets.
* **Live Preview in Admin** — Click any style and instantly see it animate in the preview panel before saving.
* **Background Color Picker** — Choose any hex color for the preloader overlay to perfectly match your brand or theme.
* **Enable / Disable Toggle** — Turn the preloader on or off instantly without deactivating the plugin.
* **Lightweight & Fast** — Zero image dependencies. The plugin adds minimal overhead to your site.
* **Smooth Fade-out** — The preloader fades away elegantly after the page finishes loading.
* **Theme Compatible** — Uses the `wp_body_open` hook with a `wp_footer` fallback for universal theme support.
* **No Shortcodes Needed** — Works automatically on every page, front page, posts, and archives after activation.
* **Clean Admin UI** — A beautifully designed settings panel with colorful gradient accents, intuitive controls, and a responsive layout.
* **Settings Stored in Database** — All preferences are saved in the WordPress options table and applied site-wide instantly.
* **WordPress Coding Standards** — All output is properly escaped. Follows WordPress best practices throughout.

= 🎨 Preloader Styles =

1. **Flower Bloom** — Seven colorful petals (pink, orange, yellow, green, blue, purple, red) rotate around a white center core, each pulsing open and closed like a blooming flower. A mesmerizing, cheerful animation.

2. **Infinity Loop** — A gradient infinity symbol (indigo → pink → amber) continuously draws and un-draws itself along the path, creating a hypnotic looping effect. Great for creative or portfolio sites.

3. **Neon Spinner** — Three concentric glowing rings in neon cyan, magenta, and green spin at different speeds with a CSS blur glow filter applied. Striking and modern — perfect for tech or gaming sites.

4. **Diamond Cascade** — Three nested diamond (rhombus) shapes rotating in alternating directions, fading in and out with a glowing center dot that pulses. Elegant and geometric.

5. **Clock Tick** — A realistic analog clock face with hour marks, a sweeping purple minute hand, a pink hour hand, and a circular progress arc that fills as the clock ticks. Unique and professional.

6. **Cube 3D** — An isometric 3D cube with three visible faces in different shades of indigo that rotates in three-dimensional space. Clean and minimalist.

7. **Snake Trail** — A gradient arc (amber to red) extends and contracts as it orbits a circular track, resembling a snake chasing its own tail. Smooth and satisfying to watch.

8. **Particle Burst** — Eight colored particles (red, orange, yellow, green, cyan, indigo, purple, pink) orbit a glowing indigo center, each pulsing and fading at different phases. Dynamic and energetic.

9. **Water Drop** — A realistic animated water droplet shape with an internal white highlight reflection. The droplet gently morphs in shape and size, giving a natural liquid feel.

10. **Rainbow Arc** — Six concentric arcs in red, orange, yellow, green, cyan, and indigo draw themselves one by one in sequence, creating a beautiful rainbow effect. Colorful and playful.

11. **Kaleidoscope** — Two layers of six symmetric geometric triangles rotate in opposite directions at different speeds around a white pulsing center, producing a mesmerizing kaleidoscope pattern. Artistic and unique.

12. **Starfield** — A twinkling star polygon at the center, surrounded by smaller stars of different colors (blue, pink, green, purple, orange, teal) blinking at varying rates and sizes. Cosmic and magical.

13. **DNA Spiral** — A double helix animation showing two twisted strands (indigo and pink) with fading crossbar rungs, mimicking the structure of DNA. Perfect for science, health, or research sites.

14. **Fire Flame** — A flickering flame with an animated gradient from yellow to red, a bright glowing inner core, and a continuously morphing flame shape that realistically simulates fire movement.

= 🛠 How to Use =

1. Install and activate the plugin.
2. Go to **Sharmin Preloader** in your WordPress admin sidebar.
3. Click on any preloader card — you will see a live animated preview in the sidebar instantly.
4. Optionally choose a background color using the color picker.
5. Toggle the preloader on or off using the enable switch.
6. Click **Save Settings** — your visitors will now see the selected preloader when they visit your website.

= ⚡ Technical Details =

* All 14 preloaders use native SVG SMIL animations — no CSS keyframe dependencies.
* The preloader overlay uses `z-index: 99999` to always appear on top.
* Uses `jQuery(window).on('load')` — compatible with all modern WordPress/jQuery versions.
* Supports `wp_body_open` hook (WordPress 5.2+) with automatic `wp_footer` fallback.
* Script and style handles are uniquely prefixed (`ssp-`) to avoid conflicts with other plugins.
* Settings are stored as WordPress options: `ssp_preloader_style`, `ssp_preloader_bg`, `ssp_preloader_enabled`.

== Installation ==

**Automatic Installation:**

1. Go to **Plugins → Add New** in your WordPress dashboard.
2. Search for "Sweet Sharmin Preloader".
3. Click **Install Now**, then **Activate**.

**Manual Installation:**

1. Download the plugin zip file.
2. Go to **Plugins → Add New → Upload Plugin**.
3. Upload the zip file and click **Install Now**.
4. Activate the plugin through the **Plugins** menu.

**After Activation:**

1. Go to **Sharmin Preloader** in the admin sidebar.
2. Choose a preloader style and save. That's it!

== Frequently Asked Questions ==

= Will this plugin slow down my website? =

No. All 14 animations are pure inline SVG — there are no external image requests, no GIF files, and no third-party JavaScript libraries. The plugin adds minimal overhead to your page load.

= Can I pick a custom background color for the overlay? =

Yes. The settings panel includes a color picker where you can choose any background color to match your site's design.

= Does it work with all WordPress themes? =

Yes. Sweet Sharmin Preloader uses the `wp_body_open` hook (supported by all well-coded themes) with an automatic `wp_footer` fallback, ensuring compatibility with virtually all WordPress themes including Astra, OceanWP, GeneratePress, Divi, Avada, and more.

= Can I disable it temporarily without deactivating? =

Yes. Simply toggle the **Enable Preloader** switch in the settings panel to off and save. The plugin stays active but the preloader will not appear on the front end.

= Does it work with Elementor, WPBakery, or other page builders? =

Yes. The preloader runs at the page HTML level and is completely independent of any page builder or theme builder.

= Is the preloader shown in the WordPress admin? =

No. The preloader only loads on the front end of your website. It does not affect the WordPress admin dashboard.

= How is the selected preloader saved? =

The selected style ID, background color, and enabled status are stored as WordPress options in the database and applied immediately to all front-end pages.

= Can I use this on a multisite installation? =

Yes. The plugin is compatible with WordPress Multisite. Settings are stored per-site.

== Screenshots ==

1. Admin panel showing all 14 preloader styles in a responsive grid with live preview sidebar.
2. Background color picker and enable/disable toggle controls in the settings sidebar.
3. Flower Bloom preloader displayed on a live website.
4. Neon Spinner preloader displayed on a live website.
5. Fire Flame preloader displayed on a live website.

== Changelog ==

= 2.0 =
* Complete plugin rewrite with a modern codebase.
* Added 14 unique hand-crafted SVG animated preloader styles.
* Added a beautiful live preview admin panel with gradient UI.
* Added background color picker for the preloader overlay.
* Added enable/disable toggle — no need to deactivate the plugin.
* Replaced deprecated `jQuery(window).load()` with `jQuery(window).on('load')`.
* Added `wp_body_open` hook support with automatic `wp_footer` fallback.
* Removed all GIF-based preloader assets and image dependencies.
* Added activation hook with default option values.
* All output is properly escaped. Follows WordPress coding standards.
* Added unique `ssp_` prefix to all functions, options, and handles.

= 1.0 =
* Initial release with a single GIF-based preloader animation.

== Upgrade Notice ==

= 2.0 =
Major update — replaces the GIF preloader with 14 stunning SVG animated styles. Adds a full admin panel with live preview, background color picker, and enable/disable toggle. Highly recommended upgrade.
