=== EffortLess Software Download Recommendation ===
Contributors: domclic
Tags: download, software, os detection, recommendation, analytics
Requires at least: 6.3
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.1.7
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Automatically detects the visitor's OS and architecture, then recommends the correct software download package.

== Description ==

EffortLess Software Download Recommendation detects the visitor's operating system and CPU architecture client-side, then recommends the correct software download package with step-by-step installation instructions.

**Features:**

* Automatic OS and architecture detection (Windows, macOS, Linux, Android, iOS)
* Per-platform download packages managed from WP admin
* SHA-256 integrity hash display
* QR code generation for mobile downloads
* Linux distribution selector (deb, rpm, AppImage, Flatpak)
* Fallback manual OS selector for undetected platforms
* Download analytics dashboard with Chart.js charts
* CSV export of download statistics
* Admin notifications for new versions
* `[elsdr_download]` shortcode
* Native Gutenberg block
* Light and dark mode widget
* i18n ready

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/`.
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. Go to **Software Downloads → Versions** to add your first software version.
4. Upload your package file via the WordPress media library.
5. Use `[elsdr_download]` on any page or add the **Software Download Widget** block.

== Changelog ==

= 1.1.7 =
* Fix: Remove executable/installer MIME types (exe, msi, msix, dmg, pkg, deb, rpm, appimage, flatpak, apk) from the media library upload_mimes filter entirely, resolving the Plugin Check "insecure MIME types" flag. Use the existing External URL option on a version to link to installers hosted elsewhere. Generic archive types (tar, gz, bz2, xz) remain uploadable.
* Enhancement: Add a description note on the Add/Edit Version form explaining the local-upload restriction.

= 1.1.6 =
* Fix: Guard is_plugin_active_for_network() call with a require of wp-admin/includes/plugin.php so new-site table creation doesn't fatal when wp_initialize_site fires outside wp-admin (e.g. REST/WP-CLI site creation).
* Fix: uninstall.php now also deletes the elsdr_db_version option and the network-wide elsdr_global_mode / elsdr_global_source_site options.
* Fix: Bump "Requires at least" to 6.3 to match block.json's apiVersion 3 requirement (was previously understated at 5.8/6.2).
* Fix: Align license header ("GPLv2 or later") between the plugin file and readme.txt.
* Hardening: Replace raw string concatenation into innerHTML with textContent/DOM methods in admin-analytics.js and widget.js for defense-in-depth against stored XSS.

= 1.1.5 =
* Fix: Corrected admin page hook names so admin.css, Chart.js, and the analytics script actually load on the Analytics and Settings screens (previous hook check never matched).
* Fix: Removed Plugin URI and Author URI headers (pointed to the author's own promotional site).
* Fix: Parameterize dynamic table names with `%i` instead of `esc_sql()` + string interpolation. Bumps "Requires at least" to 6.2 (required for `%i` support).
* Fix: Stopped tracking AI-assistant planning docs (docs/superpowers/) in git; added to .gitignore.
* Enhancement: Override core's asymmetric `.wrap` margin on all admin pages for consistent card/box alignment.

= 1.1.4 =
* Fix: Move inline `<script>` blocks in the version-edit and network-settings admin pages to properly enqueued JS files.
* Fix: Restrict executable/installer MIME type uploads (exe, msi, msix, dmg, pkg, appimage, apk, etc.) to administrators.
* Update: Bundled Chart.js from 4.4.0 to 4.5.1.

= 1.1.3 =
* Fix: Rename Effortless_Donate_Notice class to ELSDR_Donate_Notice to satisfy plugin prefix naming conventions (WordPress.NamingConventions.PrefixAllGlobals).

= 1.1.2 =
* Update: Confirmed compatibility with WordPress 7.0.

= 1.1.1 =
* Fix text domain to match plugin slug (effortless-software-download-recommendation).
* Remove deprecated load_plugin_textdomain() call (auto-loaded since WP 4.6).
* Replace external Font Awesome CDN with bundled local SVG icons.
* Bump block.json apiVersion to 3 for WordPress 7.0 iframe editor compatibility.
* Update "Tested up to" to WordPress 7.0.
* Prefix global variables in uninstall.php to meet naming conventions.
* Escape DB table names with esc_sql() to satisfy Plugin Checker security rules.

= 1.1.0 =
* Replace custom SVG icon files with Font Awesome 6 Free brand icons (Apple, Windows, Linux, Android) for crisp rendering at all sizes.
* OS icons now use the FA web font loaded via jsDelivr CDN with proper brand colors.

= 1.0.9 =
* Complete i18n: all strings translated into French (fr_FR), Spanish (es_ES), and Taiwan Mandarin (zh_TW).
* Regenerated .pot from source; synced and compiled all .po/.mo files.

= 1.0.8 =
* Global mode: add "Source Site" dropdown to choose which site all subsites read from (defaults to main site).
* Source site selector appears only when Global mode is selected; hidden in Per Site mode.

= 1.0.7 =
* Fix macOS icon: adjusted SVG viewBox to trim empty top space so the leaf/stem renders correctly at small sizes.

= 1.0.6 =
* Network settings: replaced global mode checkbox with explicit "Per Site" / "Global" radio buttons for clarity.

= 1.0.5 =
* Multisite global mode: all subsites share versions and analytics from the main site.
* Network admin settings page (Settings > Software Downloads) to toggle global mode.
* Subsite admin shows a notice with a link to the main site when global mode is active.

= 1.0.4 =
* Allow software distribution MIME types in media library (exe, dmg, pkg, deb, rpm, AppImage, Flatpak, apk, tar…).
* Add external URL option as alternative to local media library file.
* Auto-upgrade DB on plugins_loaded to add external_url column to existing installs.

= 1.0.3 =
* Added dismissible donate notice on plugin admin pages.

= 1.0.2 =
* QR codes now delegate to effortless-qr-code-generator plugin when active; bundled qrcode.js removed.
* QR option is hidden when effortless-qr-code-generator is not installed.

= 1.0.1 =
* Added multisite support (network activation, new site auto-setup).
* Added translations: French (fr_FR), Spanish (es_ES), Taiwan Mandarin (zh_TW).

= 1.0.0 =
* Initial release.
