
內容簡介
WP-Force Images Download 是一款輕量級且開發者友好的 WordPress 圖片下載外掛,專為攝影師、數位資產商店及內容創作者設計,能將任何圖片轉換為安全的一鍵強制下載按鈕,提升用戶體驗。
【主要功能】
• 四種專業按鈕樣式
• 全球顏色系統設定
• 無依賴 jQuery 的輕量化設計
• 高度可自訂的短碼功能
• 兼容未來格式如 WebP 和 AVIF
• 無衝突的命名空間設計
外掛標籤
開發者團隊
原文外掛簡介
WP-Force Images Download is the most complete, lightweight, and developer-friendly image download plugin for WordPress. Designed for photographers, wallpaper sites, digital asset stores, creative agencies, and content creators — it transforms any image into a secure, one-click force download with a pixel-perfect branded button.
Whether you need a simple [wpfid] shortcode or full programmatic control with PHP template tags, this plugin covers every use case with zero performance overhead.
🚀 Why WP-Force Images Download?
Most download plugins are bloated. This one is different:
Featherweight — Loads only one CSS file + one JS file on the frontend. No jQuery dependency for core functionality.
SaaS-grade Admin UI — Tabbed settings page with Live Button Preview so you see exactly what visitors will see before saving.
Future-proof — Uses wp_check_filetype() instead of hardcoded whitelists, so WebP, AVIF, HEIC and any new format WordPress adds is automatically supported.
Accessible — Buttons are semantic
✨ Core Features
🎨 4 Premium Button Styles
Choose from four professionally engineered CSS button styles — all powered by CSS custom properties (--wpfid-color, --wpfid-text) for effortless theming:
Solid — Bold, filled CTA button with subtle elevation shadow.
Outline — Transparent background with a crisp colored border. Text color adapts on hover.
Soft / Ghost — Tinted semi-transparent background (powered by color-mix()). Elegant and modern.
Text Only — Minimal styled link, zero background or borders. Perfect for inline usage.
🖼️ Universal Color System
Set a global button color and text color once in the settings. Override them per-post using shortcode attributes. Supports HEX (#2271b1), RGB (rgb(255,0,0)), RGBA, and natural language color names (MidnightBlue, Tomato, DodgerBlue).
👁️ AJAX Live Preview
The settings page features a real-time sticky preview widget powered by WordPress’s native wpColorPicker. Every change you make — style, color, icon, file size toggle — reflects instantly in the preview. No save → reload → check cycle.
⚡ AJAX Downloads (Zero Reload)
When AJAX Downloads are enabled, visitors click the button and the file downloads immediately in-page using the Fetch API + Blob URL approach. No new tab opens. No page reloads. No redirect confusion.
📊 Download Stats Dashboard
Every download is tracked using WordPress post meta. View a sortable, paginated analytics table from WPFID > Stats Dashboard in your admin. See which images are most popular, filter by date, and export data.
🤖 Auto-Attach Button
Zero coding required. Enable Auto-Attach and the download button is automatically injected before or after post content on any public post type that has a featured image. Toggle per post type (Post, Page, custom CPTs).
🔐 Email Gate
Require visitors to enter their email address before the download begins. The email is captured via AJAX (no page reload), securely saved to the database, and then the download starts automatically. Collected emails are viewable in the database or Stats page.
🔒 Login Gate / Require Login
Restrict downloads to logged-in users only. Unauthenticated visitors are redirected to the WordPress login page and returned to the download after successful authentication.
📐 Image Size Picker
When enabled, a dropdown appears on the download button allowing visitors to choose between registered WordPress image sizes (Thumbnail, Medium, Large, Full, or any custom size registered by your theme).
🔢 Download Counter
Optionally display the total download count directly below the button. Powered by post meta for instant reads and lightweight writes.
📁 Bulk Rename / Filename Templates
Control exactly what filename visitors receive when they download, using a powerful variable templating system:
%site_name%, %post_title%, %post_id%, %filename%, %timestamp%, %rand%, %md5%
Example: [wpfid new_name="%post_title%_%rand%"] produces My-Post-Title_48291.jpg
🌐 Modern Format Support
Powered by native wp_check_filetype(). The plugin automatically supports every image MIME type WordPress recognizes — including WebP, AVIF, HEIC, SVG, PNG, JPEG, GIF, BMP, ICO, and any future format added to WordPress Core. No configuration required.
🛡️ Enterprise-Grade Security
– All form submissions verified with WordPress nonces
– Rate limiting: 30 requests per minute per IP prevents download abuse
– Full input sanitization and output escaping on every field
– Session-aware download handler via admin-post.php + admin-ajax.php
– defined('ABSPATH') || die() guard on every file
🛠️ Usage
Basic Shortcode
Place in any Post, Page, or Widget:
[wpfid]
With Custom Label
[wpfid title=”Download HD Wallpaper”]
With Specific Image URL
[wpfid link=”https://example.com/my-image.jpg”]
With Color Overrides
[wpfid color=”#e83e8c” textcolor=”#ffffff”]
Combined Example
[wpfid title=”Get the Image” color=”MidnightBlue” textcolor=”white” new_name=”%post_title%”]
PHP Template Tag (for theme developers)
Or use the direct function call:
📋 Shortcode Attributes Reference
Attribute
Default
Description
title
Download
Button label text
link
(featured image)
Direct URL to the image to download
color
Settings value
Button background color (HEX, RGB, or color name)
textcolor
Settings value
Button text/icon color
new_name
Settings value
Filename template for the downloaded file
class
(empty)
Additional CSS class(es) on the button wrapper
style
Settings value
Button style override: 1=Solid, 2=Outline, 3=Soft, 4=Text
📈 Details
Semantic HTML5 Output
Every download button is a native
