Опис
Quick download button is a download button for WordPress. You can easily add a better download link to your post with this plugin. Some of the features include countdown timer, 4 button styles, colors, hide/show file size and extension. Support for wordpress block and shortcodes.
Features
- Display file size and file extension
- Create a download button link with shortcode with options
- Customize your download button to suit your site brand
- Link your download button to anywhere on the web where it’s publicly available.
- Allow free music download, video download, PDF download, spreadsheet file download and more.
- Hide download link
- Countdown – Wait before download, you can specify how many seconds you want the user to wait before download starts.
- Show the user a message while waiting for the download to start.
- Support for external download link
- Shows download file extension for ‘pdf’,’mp3′,’mov’,’zip’,’txt’,’doc’,’xml’,’mp4′,’ppt’ and images ( png, gif, jpg, jpeg, bmp)
- Support for htm, html, ps, tex, xml, txt, csv, xlsx (Microsoft Excel), pptx (Microsoft PowerPoint), js, css, php
- Open external download in new tab or same window.
- Force file download
- Control access to download using users’ role and logged in.
- Support for WordPress Gutenberg
Basic Usage
** Shortcode **
Open the post or page you want to add a download button to, paste the shortcode example below
[quick_download_button title="Download" url="http://yoursite/wp-content/upload/fileto_download.pdf"]
The url value needs to be replaced with your media link URL. To change the title, enter a different text in the title value. The default value is Download.
More Shortcode Usage
** Open link in a new window **
To open the download link in a new window (tab), set attribute ‘open_new_window” to true. To open link in the same window set the attribute to ‘false’ See example below:
[quick_download_button title="Download" open_new_window="true" url_external="https://google.com"]
** Set the button background color (color_bg=”#ffc107″), set waiting timer (wait=15) and waiting message (msg=”Please wait 15 seconds”) **
[quick_download_button title="Download" color_bg="#ffc107" open_new_window="true" wait=15 msg="Please wait 15 seconds" url_external="https://google.com"]
** Link to external URL **
To use external url, add url_external attribute
[quick_download_button title="Download" url_external="https://google.com"]
** Auto calculates file size. **
To let the plugin generate file size, make sure the file URL link is in the WordPress upload directory when using with shortcode e.g wp-content/upload and change filesize value to 1 like below
[quick_download_button file_size="1" title="Download" url="http://yoursite/wp-content/upload/fileto_download.pdf"]
** Add file size manually **
The plugin can calculate the file size for you by entering 1 in the filesize value. You don’t have to enter it manually but in case, enter the file size value in the filesize attribute like below.
[quick_download_button file_size="14.5MB" title="Download" url="http://yoursite/wp-content/upload/fileto_download.pdf"]
** Hide icon for file extension **
To hide icon image for the file extension, set the extension value to 0. Note, this will also hide file extension text.
[quick_download_button title="Download" filesize="1" extension="0" url="http://yoursite/wp-content/upload/fileto_download.pdf"]
** Show icon image and file extension text **
To show both file extension icon and text, set extension value to 1 and extension_text to 1
[quick_download_button title="Download" filesize="1" extension="1" extension_text="1" url="http://yoursite/wp-content/upload/fileto_download.pdf"]
** Gutenberg Block **
- Open the post you want to add a download link to, click on add block icon (+).
- Under Media, click on the Download Button icon.
- Click on the button to change the title, click on the download icon next to the button to upload a file for download.
- Enter a suitable title in the text box, the default title is download. All done!
** More Gutenberg Usage **
To hide the file size, use the advanced option in the Gutenberg settings. Click on the Additional CSS class(es) and add ‘hide-size’ to the class.
To use in a theme file (Developers)
To use in your theme file, add the code below with necessary attributes and values.
echo do_shortcode('[quick_download_button title="Download" url="http://yoursite/wp-content/upload/fileto_download.pdf"]');
Donations
Would you like to support the advancement of this plugin? Donate
Documentation
To contribute and improve this plugin please visit the Git repo.
Блоки
Цей плагін надає 1 блок.
- Download Button
Встановлення
- Upload the quick-download-button folder to the /wp-content/plugins/ directory
- Activate the Delete Quick Download Button plugin through the \’Plugins\’ menu in WordPress
Часті питання
-
Can this plugin be used to hide (protect) download link on my site?
-
Yes.
-
Can I use the plugin in Classic Editor
-
Yes. You can use this plugin with shortcodes.
-
Can this plugin be used to display download file size on my site?
-
Yes.
-
Can I hide the ‘Please wait…’ message for countdown timer?
-
If using shortcode, in leave the attribute ‘msg’ blank. For example:
[quick_download_button button_type="small" msg="" title="Download Now" url_external="http://external-url-here/"]
If using block, under the ‘Countdown Settings’, select time to wait (E.g 15 for 15 seconds) and the message box will show up. Remove the default message.
-
What are the shortcode attributes?
-
- ‘title’
- ‘file_size’
- ‘url’
- ‘extension’
- ‘url_external’
- ‘open_new_window’
- ‘wait’
- ‘color_bg’
- ‘color_font’
- ‘color_icon_dark’
- ‘msg’
- ‘button_type’ (large / mid / small / basic )
- ‘border_width’
- ‘border_style’
- ‘border_color’
- ‘border_radius’
- ‘align’
- ‘padding’
Example: Change button style with ‘button_type’
[quick_download_button button_type="small" title="Download Now" url_external="http://external-url-here/"]
Example: Add file from your WordPress site with ‘url’
[quick_download_button button_type="mid" title="Download Now" url="http://yoursite/wp-content/uploads/yourfile.pdf"]
Example: Add border radius with ‘border_radius’
[quick_download_button button_type="small" border_radius="9" title="Download Now" url_external="http://external-url-here/"]
Example: Change icon color from dark to light with ‘color_icon_dark’
[quick_download_button button_type="large" color_icon_dark="false" color_bg="black" color_font="#FFF" title="Download Now" url_external="http://external-url-here/"]
Example: Add countdown and wait message with ‘wait’ and ‘msg’
[quick_download_button button_type="basic" wait="10" msg="Please wait..." title="Download Now" url_external="http://external-url-here/"]
Example: Add file size manually with ‘file_size’ – This is useful for external download lik
[quick_download_button button_type="basic" wait="10" msg="Please wait..." file_size="40MB" title="Download Now" url_external="http://external-url-here/"]
Example: Hide file extension (icon) with ‘extension’
[quick_download_button button_type="basic" extension="0" title="Download Now" url_external="http://external-url-here/"]
Example: Add border style
[quick_download_button button_type="small" border_width="2" border_style="solid" border_color="black" title="Download Now" url_external="http://external-url-here/"]
Example: By default, the button is position at the center of the page. Change alignment with ‘align’
[quick_download_button button_type="small" align="left" title="Download Now" url_external="http://external-url-here/"]
Відгуки
Учасники та розробники
“Quick Download Button” — проект з відкритим вихідним кодом. В розвиток плагіну внесли свій вклад наступні учасники:
УчасникиПерекладіть “Quick Download Button” на вашу мову.
Цікавитесь розробкою?
Перегляньте код, перегляньте сховище SVN або підпишіться на журнал розробки за допомогою RSS.
Журнал змін
1.2.5 April 19th, 2023
- Minor fixes of 404 error that occurs when quick download button page is deleted. After deletion of the QDB page, please deactivate and reactive the plugin.
1.2.4 March 13th, 2023
- Fixed the error nonce did not verify when download link is external URL
1.2.3 August 29th, 2022
- Control access to download using users’ role and logged in.
1.2.0 August 27th, 2022
- Fixed CSS for the large button so it works with new upgrade.
1.0.9 August 27th, 2022
- Add 3 extra buttons – small, medium and basic.
- Add button alignment – center, left or right.
1.0.8 August 13th, 2022
- Fixed message not showing up when user is waiting for download.
1.0.5 July 23rd, 2022
- Add support for multi site.
- Add wait time attribute and background color attribute to shortcode.