Description
WaltersWorks File Library gives your site a small, dependable library of downloadable files. Add a file, put it in one or more categories, and list a category anywhere with a shortcode.
It is also a drop-in replacement for the Better File Download plugin. It reads the same data, supports the same shortcodes, and keeps old /bfd_download/{name}/ links working, so you can switch without re-entering anything or editing your pages.
Features
- A Downloads screen in the admin, with a File column and a category filter.
- Upload a file or choose one from the Media Library.
[wwfl_category]lists every file in a category, newest first.[wwfl_file]links to a single file.- PDFs open in the browser. Other file types download.
- Clean, accessible list markup that inherits your theme’s styles.
- Purges W3 Total Cache, WP Super Cache, WP Rocket and LiteSpeed Cache after a change, so visitors see new files right away.
- Never deletes your data. Deactivating or deleting the plugin leaves every file and category in place.
Security
WaltersWorks File Library refuses script and executable files, so a Download can’t be used to put a program or web page on your site. It checks:
- The file’s extension, including double extensions such as
report.php.pdf. - Disguised names: right-to-left override and other hidden characters, control characters, colons, and names ending in a dot or space.
- The file’s contents, so a program renamed to
invoice.pdfis still caught.
When a file is refused, or an upload fails because of a size limit or a server problem, WaltersWorks File Library says what went wrong and how to fix it. These checks apply only to Downloads. Uploads anywhere else on your site are unchanged.
Shortcodes
List the files in a category:
[wwfl_category category="reports"]
Options:
category(required): the category’s slug.latest: show only this many files. Default: all.orderby:date,titleormenu_order. Default:date.order:DESCorASC. Default:DESC.
Link to one file:
[wwfl_file id="123"]
Options:
id(required): the Download’s ID, shown in the address bar when you edit it.title: link text. Default: the Download’s title.
Better File Download’s [download_category] and [download] shortcodes work the same way, so existing pages need no changes. WaltersWorks File Library only registers them when no other plugin already uses those names.
Installation
- Install and activate WaltersWorks File Library from Plugins > Add New, or upload the
waltersworks-file-libraryfolder to/wp-content/plugins/. - Go to Downloads > Categories and add a category.
- Go to Downloads > Add New, give the file a title, choose the file, and pick its category.
- Add
[wwfl_category category="your-category-slug"]to any page.
Switching from Better File Download
- Deactivate Better File Download. Don’t delete it until you’ve confirmed everything works, and don’t run both plugins at once.
- Install and activate WaltersWorks File Library.
- Your existing files, categories, shortcodes and links work as before.
WaltersWorks File Library stores its data under Better File Download’s names (the bfd_download post type and download-categories taxonomy) so the switch needs no migration. New sites use the same names.
FAQ
-
Which file types are refused?
-
Server scripts (such as PHP), files that run in the browser (such as HTML, SVG and JavaScript), programs and installers (such as EXE, MSI, DMG, APK and JAR), macro-enabled Office files (such as DOCM and XLSM), and server configuration files. Documents, spreadsheets, presentations, images, audio, video and archives are fine.
Developers can change the list with the
wwfl_blocked_extensionsfilter. -
What if a Download already points to a blocked file?
-
Files saved before WaltersWorks File Library was installed were never checked. The Downloads list marks any with a blocked file type, and the edit screen explains why. Replace the file to clear the warning.
-
Why was my upload refused for its size?
-
Your server sets the largest file it accepts. WaltersWorks File Library shows the limit on each Download’s edit screen and names it in the error. To upload larger files, ask your hosting provider to raise PHP’s
upload_max_filesizeandpost_max_size. -
Does WaltersWorks File Library count downloads?
-
No. Links go straight to the file. If your site has an existing Better File Download count, WaltersWorks File Library leaves it untouched.
-
Can I turn off the cache purge?
-
Yes. Add
add_filter( 'wwfl_purge_page_cache', '__return_false' );to your theme or a small plugin. To purge a cache WaltersWorks File Library doesn’t know about, hook into thewwfl_after_purge_page_cacheaction. -
Does WaltersWorks File Library contact any outside service?
-
No. It sends no data anywhere and loads nothing from other sites.
-
Is WaltersWorks File Library affiliated with Better File Download?
-
No. WaltersWorks File Library is an independent plugin that reads the same data, so sites can keep their files after Better File Download stopped being maintained.
Reviews
There are no reviews for this plugin.
Contributors & Developers
“WaltersWorks File Library” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “WaltersWorks File Library” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
1.0.0
- First public release.