=== AddonLogic File Attachment Field ===
Contributors: snehalpancholi
Tags: file attachment, meta field, download, media library
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.1
Stable tag: 1.0.0
License: GPL-2.0+
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Attach any media library file to a post and render a styled download link on the frontend via shortcode.

== Description ==

AddonLogic File Attachment Field lets you attach any file from the WordPress Media Library to a post or page. A clean meta box in the editor lets you pick the file with one click. On the frontend, the `[addlc_file_attachment]` shortcode renders a download button or link with optional file size, type, and icon.

**Key Features:**

* Attach any Media Library file to posts, pages, or custom post types
* One-click Media Library picker — no URL typing
* Shortcode renders button-style or plain link download
* Displays file type, file size, and dashicon automatically
* Settings control which post types show the field and global defaults
* Lightweight — no external libraries

== Installation ==

1. Upload the `file-attachment-field` folder to `/wp-content/plugins/`
2. Activate through the 'Plugins' menu
3. Go to **Settings → File Attachment Field** to configure post types and defaults
4. Edit any post, select a file in the **File Attachment** meta box
5. Add `[addlc_file_attachment]` to your post content

== Shortcode ==

`[addlc_file_attachment]`

Attributes:
* `post_id` — Post to pull the attachment from (default: current post)
* `label` — Button/link text (default: global setting)
* `show_size` — yes/no show file size (default: yes)
* `show_type` — yes/no show file extension (default: yes)
* `show_icon` — yes/no show dashicon (default: yes)
* `style` — button or link (default: button)

== Changelog ==

= 1.0.0 =
* Initial release

== Screenshots ==

1. File Attachment meta box in the post editor
2. Frontend button-style download link with file info
3. Settings page
