| 开发者 | kusimo |
|---|---|
| 更新时间 | 2026年3月20日 23:35 |
| 捐献地址: | 去捐款 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 6.7 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
[quick_download_button_group] shortcode — place multiple buttons side by side with gap, alignment, and stack-on-mobile controlspdf, mp3, mov, zip, txt, doc, xml, mp4, ppt, htm, html, ps, tex, csv, xlsx, pptx, js, css, php, and common images (png, gif, jpg, jpeg, bmp).
Developer-friendly
The plugin exposes several action and filter hooks so add-on plugins can extend it without editing core files:
qdb_editor_localize_data — add data to the Gutenberg editor scriptqdb_localize_script_data — add data to the frontend scriptqdb_shortcode_atts — modify parsed shortcode attributesqdb_user_can_access — override or extend the access checkqdb_button_data_atts — inject extra data-* attributes onto the button elementqdb_shortcode_output — filter the final button HTML before outputquick-download-button folder to /wp-content/plugins/.[quick_download_button] shortcode.Yes. When a file is hosted in your WordPress uploads folder, the plugin stores the attachment ID rather than the URL. The real file URL is never printed in the page source. Downloads pass through a server-side check before the file is served.
Yes. Paste your AdSense or any other ad embed code as the shortcode content or enter it in the Popup Content textarea in the Gutenberg block. The plugin renders the content inside a modal overlay while the countdown runs. When the timer reaches zero the download fires and the popup closes automatically.
Yes. Set popup_closable="0" in the shortcode or toggle Allow user to close popup off in the block settings. When disabled, the close button, overlay click, and Escape key are all inactive. The popup disappears only when the countdown ends.
The download opens automatically (in the same tab or a new one, depending on your setting), the loading indicator is removed, and the popup modal (if active) closes. No action is required from the visitor.
Yes. Use the [quick_download_button] shortcode in the Classic Editor or any text/HTML widget.
Yes. Enter the file size manually using the file_size attribute or the Manual file size field in the block editor. Auto-detection only works for files stored in the WordPress uploads folder.
Yes. Use the Button Row block in Gutenberg (add it, then add Download Button blocks inside it), or wrap shortcodes in [quick_download_button_group].
Yes. Use user_must_be="loggedin" to require login, or user_must_be="subscriber" (or any role slug) to require a specific role. Visitors who do not meet the requirement see a configurable error message.
No. The plugin's CSS and JavaScript only load on pages that actually contain a download button (block or shortcode). All other pages are unaffected.
Toggle the Show file size option off in the block settings sidebar. In the shortcode, simply omit the file_size attribute.
Yes. Both the download icon and the file size icon support custom SVG. In the shortcode use custom_file_type_icon or custom_file_size_icon. In the block editor use the Custom SVG textarea in the icon picker panel.
[quick_download_button_group] shortcode — arrange multiple buttons horizontally or stacked, with gap and alignment controls and an optional stack-on-mobile mode.p.down).data-qdb-running guard prevents countdown from stacking if the button is clicked while a timer is already running.esc_url() sanitisation that stripped local file paths.wait and color_bg shortcode attributes.