=== P-ivo - Lite Mode ===
Contributors: pluginivo
Tags: performance, data saver, low bandwidth, accessibility, reading mode
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.7
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A free data-saver, low-bandwidth, text and reading mode for WordPress. No premium version, no account and no tracking.

== Description ==

P-ivo - Lite Mode helps visitors use less data and read WordPress sites more comfortably.

It is a free community project by Pluginivo. There is no premium edition and no intentionally restricted functionality.

The plugin provides four visitor-selectable modes:

* Normal - the original site experience.
* Lite - reduces media bandwidth while keeping the site visually familiar.
* Text - removes most media while preserving useful image ALT descriptions when available.
* Reading - adds adjustable text size, line spacing, content width and light/dark reading preferences.

Highlights:

* Downsizes WordPress attachment images in Lite Mode.
* Defers iframe, video and audio content until the visitor asks to load it.
* Preserves meaningful ALT text when images are removed in Text Mode.
* Offers Lite Mode when supported browser/network signals report Data Saver or a very slow connection.
* Supports the HTTP Save-Data request signal when available.
* Provides a compact Data Saver status showing reduced/deferred content.
* Remembers the visitor choice for a configurable period or for the browser session only.
* Includes URL/path exclusions and a per-page/post Allow/Disable override.
* Protects WooCommerce cart, checkout and account pages by default.
* Uses query-driven server transformations so visitor cookies cannot contaminate a shared full-page cache.
* Includes a cache-safe query-string fallback for visitor-selected modes.
* Preserves the selected mode across same-site links so visitors do not reload each page twice.
* Applies saved preferences early in the document head before most body media can start loading.
* Provides Copy Lite Link for sharing a low-bandwidth version.
* Provides a clean Print / Save as PDF action through the browser print dialog.
* Lets administrators choose Auto, Day or Night appearance for the floating switcher.
* Respects reduced-motion preferences.
* Uses no external account, telemetry, CDN or remote service.

= Cache compatibility =

Visitor-selected modes can change server-rendered HTML. P-ivo - Lite Mode sends no-cache hints for transformed responses and uses a `?pvlm=lite`, `?pvlm=text` or `?pvlm=reading` URL fallback when needed so a cached Normal page can recover the visitor's saved preference. Mode URL variants are marked noindex.

Some page-cache/CDN configurations can intentionally ignore query parameters. After activation, test your cache setup and exclude the `pvlm` query parameter from any rule that strips or ignores functional query strings.

= Privacy =

P-ivo - Lite Mode does not create an external account, send analytics to Pluginivo, or track visitors. The selected mode is stored in a first-party cookie on the visitor's device for the administrator-selected retention period. Reading preferences are stored locally in the visitor's browser. A temporary browser session flag may be used when a visitor dismisses the optional slow-connection suggestion.

= Community mission =

The web should work for everyone, including people on slow, expensive or unreliable connections. P-ivo - Lite Mode is provided free and open source with no premium version.

== Installation ==

1. Upload the `p-ivo-lite-mode` folder to `/wp-content/plugins/`, or install the ZIP from Plugins > Add New > Upload Plugin.
2. Activate P-ivo - Lite Mode.
3. Open Settings > Lite Mode.
4. Keep the safe defaults or adjust the visitor switcher, image size, exclusions and preference duration.
5. If you use full-page caching or a CDN, test Normal, Lite, Text and Reading modes after clearing the cache.

== Frequently Asked Questions ==

= Is there a Pro or premium version? =

No. The plugin is intentionally free and open source.

= Does it send visitor data to Pluginivo? =

No. There is no Pluginivo analytics endpoint, account requirement or telemetry in the plugin.

= Will Lite Mode break checkout pages? =

The default WooCommerce safety option keeps cart, checkout and account pages in Normal mode. You can also exclude any custom URL/path and disable Lite Mode on individual posts or pages.

= Does it work with page caching? =

The plugin includes no-cache hints and a cache-safe query-string fallback. However, cache/CDN configurations differ. Test your own cache after activation, especially if it is configured to ignore all query parameters.

= Why does Text Mode show some image descriptions? =

When an image has meaningful ALT text, Text Mode preserves that information as text instead of silently deleting it. Decorative images with empty ALT text disappear.

= Does the plugin guarantee a specific percentage of bandwidth savings? =

No. Savings depend on the theme, page content, image sizes, embeds and caching configuration. The status panel reports concrete transformations instead of inventing a savings percentage.

= Does the plugin guarantee accessibility or WCAG compliance? =

No. Reading and reduced-motion features can improve comfort for some visitors, but no plugin can guarantee legal or standards compliance for an entire website.

== Changelog ==

= 1.0.7 =
* Release version synchronized with Pluginivo product documentation and distribution package.
* No functional changes compared with the preceding packaged code; no new fixes or features are claimed.


= 1.0.0 =
* Directory submission: naming, input sanitization, i18n translator comments and explicit read-only GET handling reviewed.
* Final Reading regression pass: theme surfaces now include text-bearing elements with their own backgrounds, fallback body scans exclude common sidebar/widget/admin regions, and AJAX text-node updates trigger a debounced refresh.
* Final Reading engine hardening: A+/A-, Spacing, Width and Light/Dark now use the same universal content detection across Elementor, Gutenberg and custom/listing layouts.
* Reading roots are deduplicated to avoid repeated nested scans, and dynamic content is refreshed with a debounced observer.
* Nested inline text is scaled with a two-pass base-size capture so strong/span text cannot be enlarged twice.
* Custom cards/boxes with their own backgrounds are neutralized in Reading Light/Dark to preserve contrast.
* GET-form mode propagation now skips nonce/action-style forms as an additional safety guard.
* Clean uninstall now removes plugin options and per-content overrides across all sites in WordPress multisite.
* Reading Light/Dark now applies to custom/listing home-page content detected by the universal Reading engine.
* Reading Mode text discovery now covers custom theme/listing content across the main page area, not only Elementor/Gutenberg text widgets.
* Reading text-size controls now scale all detected text-bearing reading blocks consistently, including Elementor/custom text containers.
* Final image hardening: Lite Mode now compares against the proven WordPress width of the current source URL, so a visually large HTML width can never cause an upgrade to a heavier image.
* Site-scoped preference cookies prevent mode choices from leaking between WordPress subdirectory/multisite sites on the same host; HTTPS cookies now use Secure.
* Added Save-Data response variation metadata so compliant shared caches do not reuse one visitor's connection-hint state for another.
* Fixed Reading System theme so it truly follows the visitor device light/dark preference, including live OS theme changes.
* Dynamic Text Mode images/pictures are now converted to ALT descriptions when inserted after initial page load.
* Hardened Text Mode against dynamic/lazy-load images that set src/srcset after insertion.
* Reading preferences are validated before being applied, preventing corrupted local browser data from breaking the reading layout.
* Dynamic Text Mode image descriptions now use the plugin translation string.
* Protected pages now remain completely untouched by P-ivo - Lite Mode frontend assets/body classes, including WooCommerce cart/checkout/account pages.
* Redundant `?pvlm=normal` URLs are redirected to the canonical URL without the mode parameter.
* Final hardening: Lite Mode strips responsive srcset/sizes from Gutenberg/classic content images and only swaps src when a smaller WordPress candidate can be proven.
* Fixed mode URL cleanup for WordPress installations in subdirectories.
* Narrowed Reading contrast selectors to avoid recoloring unrelated badges/icons inside text widgets.
* Hardened Lite image handling so responsive srcset candidates cannot load larger images and src replacement only occurs when it is provably smaller.
* Improved Reading light/dark contrast for Elementor inline text colors.
* Direct file/download links are no longer decorated with mode parameters, and invalid mode URLs are cleaned.
* Hardened internal mode-link propagation so action/nonces/WooCommerce operation URLs are not decorated.
* Optimized Text Mode background detection to scan targeted hero/banner/Elementor/background candidates instead of the full DOM.
* Text Mode now removes CSS background images, including Elementor hero and section backgrounds.
* Initial WordPress.org release candidate.
* Normal, Lite, Text and Reading modes.
* Visitor mode switcher with configurable first-party preference cookie.
* Cache-safe query-driven mode URLs and no-cache hints for transformed responses.
* Attachment image downsizing without globally lowering image fetch priority.
* On-demand iframe, video and audio embeds in Lite Mode.
* ALT text preservation in Text Mode.
* Browser and HTTP Data Saver / slow-connection suggestion.
* Data Saver status with transformed-media counters.
* Reading controls for font size, spacing, content width and light/dark preference.
* Safe Reading light/dark surfaces that avoid recoloring entire Elementor layouts.
* Same-site mode continuity with early preference bootstrap to reduce duplicate page loads.
* Protected mode URLs are cleaned back to their Normal URL.
* Auto / Day / Night switcher appearance.
* Hardened browser storage handling and cache-safe preference synchronization.
* URL/path exclusions and per-content Allow/Disable override.
* Optional safe decorative-background reduction.
* Copy Lite Link.
* Clean Print / Save action.
* Reduced-motion support.
* WooCommerce transaction-page protection.
* No telemetry, external account, remote service or premium functionality.
