跳到内容

m1.DownloadList

v0.26

maennchen1.de · 2015年9月11日 上架

This plugin easily displays the folders and files from a selected directory. It can be placed by block or shortcode in any post.

正在使用
400+
评分
4.7 / 5
累计下载
2 万
最近更新
2026年11月22日
21 条评价需要 WordPress 4.9+已测试到 7.1.5PHP 7.0+

贡献者

截图

Block "Download list" in the editor with folder picker
Block "Download list" in the editor with folder picker
Layout "list"
Layout "list"
Layout "table" on a phone, sorted by size
Layout "table" on a phone, sorted by size
Layout "grid" with Bootstrap icons
Layout "grid" with Bootstrap icons
The four icon sets: m1, WordPress, Tabler, Bootstrap
The four icon sets: m1, WordPress, Tabler, Bootstrap

This plugin easily displays the folders and files from a selected directory, as block “Download list” or shortcode. Uploads must be done by a separate FTP program. No managing options.

  • block with folder picker and preview (WordPress 5.8+); [m1dll] shortcodes convert into it

  • visitors can browse into subfolders, a breadcrumb leads back

  • file type icons, file size and modification date
  • filter by file type, hide single files or folders
  • several lists on one page
  • needs the PHP extension mbstring

available optional shortcode parameters

  • path = directory path, starting at the WordPress root folder (default: the uploads folder, usually wp-content/uploads/)
  • target = browser window name, for example _blank
  • sort = by name ASC/DESC (default: ASC)
  • sort-order = filename/filetype/ftime/filetime/foldertime (default: filename)
  • label = custom top level label
  • nosize = displays no file size
  • hidedirs = displays no folders, only files
  • filetype = (comma separated list) filter files by their extension
  • hidefiletype = (comma separated list) hide files with filetype
  • hidefilename = (comma separated list) hide named files and folders
  • noext = hide the file extensions
  • nobreadcrumb = hide breadcrumb / title
  • ftime = display file and folder modification date and time (standard = “1” or use date formatting like “Y-m-d H:i”), see PHP date formatting
  • filetime = same as ftime, just for files
  • foldertime = same as ftime, just for folders
  • layout = classic/list/table/grid (default: classic, the display of all earlier versions)
  • nodate = hides the date in the layouts list, table and grid
  • icons = icon set of the layouts: m1 (default), wordpress, tabler, bootstrap or none

layouts

  • classic is the display of all earlier versions and stays the default, so existing pages do not change.
  • list shows one row per entry with a file type icon, type, size and date.
  • table shows sortable columns for name, type, size and date. Visitors sort by clicking a column header; on narrow screens a sort bar replaces the header.
  • grid shows cards, good for a few files like brochures.
  • The layouts take font and colours from the theme, work in light and dark themes and need no JavaScript.
  • In the layouts the file name is shown without extension, because the type is shown separately. noext="0" shows the extension.
  • The date shows the date format of the site; ftime, filetime and foldertime change it as before.
  • icons="wordpress" uses the media icons of WordPress, tabler and bootstrap icons in the text colour of the theme.
  • Themes can change the markup: copy templates/list.php, table.php or grid.php of the plugin to your-theme/m1downloadlist/.

(most of it can be combined together)

shortcode examples

  1. displays content of wp-content/uploads/: [m1dll]
  2. displays content of wp-content/uploads/your/foldername/here/: [m1dll path="wp-content/uploads/your/foldername/here/"]
  3. displays content of your/foldername/here/ and sort descending: [m1dll path="your/foldername/here/" sort="DESC"]
  4. displays content of your/foldername/here/, open files in a new window: [m1dll path="your/foldername/here/" target="_blank"]
  5. displays content of wp-content/uploads/, displays no file size: [m1dll nosize="1"]
  6. displays content of wp-content/uploads/, displays no folders: [m1dll hidedirs="1"]
  7. displays content of wp-content/uploads/, displays only pdf- and docx-documents: [m1dll filetype="pdf,docx"]
  8. displays content of wp-content/uploads/, do not display pdf- and docx-documents: [m1dll hidefiletype="pdf,docx"]
  9. displays content of wp-content/uploads/, do not display file secret.txt and secret.docx: [m1dll hidefilename="secret.txt,secret.docx"]
  10. displays content of wp-content/uploads/, displays no file extensions: [m1dll noext="1"]
  11. displays content of wp-content/uploads/, displays no breadcrumb: [m1dll nobreadcrumb="1"]
  12. displays content of wp-content/uploads/, with file and folder date and time (standard from WordPress) [m1dll ftime="1"]
  13. displays content of wp-content/uploads/, sorted by file type [m1dll sort-order="filetype"]
  14. displays content of wp-content/uploads/downloads/ as a sortable table [m1dll path="wp-content/uploads/downloads/" layout="table"]
  15. displays content of wp-content/uploads/downloads/ as cards [m1dll path="wp-content/uploads/downloads/" layout="grid"]

which folders can be listed?

  • Folders inside the uploads folder can be listed by every author.
  • Folders outside of the uploads folder are only listed if the author of the post or page may publish unfiltered HTML (administrators, editors). This protects the site against contributors listing private files.
  • Folders containing an index.php, index.html or index.htm are protected: they are not shown as subfolders and not opened by a link, and only administrators and editors can list them with path. Shop, form and backup plugins protect their folders in the uploads folder this way. Developers can change this with the filter m1dll_folder_protected (parameters: protected, folder).
  • The folders of WordPress itself are never listed: the WordPress root folder, wp-admin, wp-includes, wp-content, plugins, themes, languages and upgrade.
  • Files and folders whose name starts with a dot (.htaccess, .env) are never shown.
  • Folders hidden by hidedirs, hidefilename or hidefiletype="dir" can not be opened by a link either.
  • If a folder can not be listed, visitors see nothing and users who may edit the post see a short notice.
  • Developers can allow or deny a folder with the filter m1dll_path_allowed (parameters: allowed, real path, post).

The plugin only lists files, it does not protect them. Every file in a listed folder can be downloaded by everyone who knows its address. Do not put confidential files into a public folder.

Copyright

Tabler Icons, (c) Paweł Kuna, MIT license, https://tabler.io/icons
Bootstrap Icons, (c) The Bootstrap Authors, MIT license, https://icons.getbootstrap.com

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums