=== BBA Secure File Downloads ===
Contributors: sofrustrate
Tags: downloads, secure download, file download, media library, shortcode
Requires at least: 5.8
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.8
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Serve Media Library files through a controlled download endpoint, and place download buttons anywhere with a shortcode.

== Description ==
BBA Secure File Downloads lets you select files from the Media Library and generate a stable File ID for each file. Then you can place a download button anywhere using:

[bbasfd_download id="FILE_ID"]

The download is served through a controlled endpoint instead of exposing the direct file URL.

Looking for the PRO version?
https://bigbad.agency/portfolio/wordpress-plugins/secure-file-downloads-for-wordpress/

== Installation ==
1. Upload the plugin folder to /wp-content/plugins/ or install via Plugins.
2. Activate the plugin.
3. Go to Secure Downloads → Files and add your files.
4. Copy the shortcode and paste it into a page/post.

== Usage ==
Shortcode:
* [bbasfd_download id="FILE_ID"]
Optional:
* text="Get the free plugin"
* class="my-css-class"

== FAQ ==
= Why does FREE limit to 3 files? =
This keeps the free plugin fully usable while allowing a PRO upgrade path. PRO can unlock unlimited files.  With PRO, you can also enjoy analytics, password protected downloads, limited number of downloads and complete control of your file download system.

= Does it work with Elementor? =
Yes. Use Elementor’s Shortcode widget with the [bbasfd_download] shortcode.

= Where can I get the PRO version? =
You can learn more about the PRO version here:
https://bigbad.agency/portfolio/wordpress-plugins/secure-file-downloads-for-wordpress/

== Changelog ==

= 1.0.8 - 2026-05-21 =
* Compatibility bump. Re-verified against current WordPress release.
* Raised Requires PHP floor to 7.4 (PHP 7.0-7.3 are EOL).
* No functional changes.

= 1.0.7 =
* Security: Validate the download nonce before touching any other request input.
* Security: Add clear permission hooks for download authorization.
* Compliance: Document raw/binary output in the download endpoint for scanners.

= 1.0.2 =
* Fix: Plugin Check compliance (admin enqueue without direct $_GET access, readme headers).


= 1.0.1 =
* Fix: add nonce to download links and validate in handler.
* Fix: use WP_Filesystem for file reads (Plugin Check compliance).
* Fix: wp_unslash() before sanitization for request values.
* Fix: translators comment for placeholder strings.
* Meta: bump Tested up to.

= 1.0.0 =
* Initial release: Files UI, Settings, How to Use, Help/About, shortcode, and secure download endpoint.
