內容簡介
WordPress 內建的檔案管理系統主要是用來處理「媒體」。但有時我們需要在 WordPress 內建立一個檔案集合,並不一定是要顯示媒體,只是用來儲存檔案。
這個外掛為 WordPress 新增了一個抽象概念,稱為「檔案群組」。每個檔案群組可以包含多個檔案,並以優雅的方式呈現給使用者。所有在檔案群組中的檔案也可以一次下載為 zip 壓縮檔。
此外,檔案群組還可以被標籤化,這些標籤可以用來將特定的檔案群組關聯到文章上。外掛提供了兩個小工具:「相關檔案群組」和「上傳相關檔案群組」,以便更輕鬆地將相關檔案群組與文章整合顯示。
目前此外掛使用 PHP ZipArchive 擴充元件來支援批次下載功能。
此外掛是 MIT 教育協作空間項目的一部分。
遷移
檔案群組具有一些工具,可讓您輕鬆地將未包含在檔案群組中的檔案(稱為「孤兒檔案」)遷移到檔案群組中。
首先,您需要(暫時)從管理員中取消隱藏原生的媒體庫,方法是在您的 wp-config.php 檔案中添加以下內容:
define( 'FILE_GROUPS_HIDE_NATIVE_MEDIA', false );
在媒體庫中,現在會看到一個下拉式選單,讓您可以「僅顯示孤兒檔案」。選擇您要遷移為檔案群組的任何檔案集合,然後從「批量操作」選單中選擇「建立新檔案群組」動作,並點擊「套用」。系統會為您選擇的檔案建立一個新的檔案群組。
或者,如果您在表格中將滑鼠指向孤兒檔案的行,您可以使用「建立獨立群組」這個操作。
外掛標籤
開發者團隊
原文外掛簡介
WordPress’s built-in file-management is built primarily for handling “media”. But sometimes there’s a need for curating collections of files within WordPress, not necessarily as media which will be displayed, but simply as files.
This plugin adds an abstraction called “file groups” to WordPress. Each file group can contain multiple files, which are presented elegantly to the user. All files in a file group can be downloaded together as a zip archive as well.
In addition, file groups can be tagged and these tags are used to associate particular file groups to your posts. Two widgets, “related file groups” and “upload related file group”, are supplied to make it easier to integrate the display of related file groups with your posts.
The plugin currently uses the PHP ZipArchive extension to support the batch download functionality.
This plugin is a component of the MIT Educational Collaboration Space project.
Migration
File Groups has some tools which make it easy for you to migrate files which are not in file groups (known as “orphans”) into file groups.
First things first, you will need to (temporarily) unhide the native Media Library from your admin by adding the following to your wp-config.php file:
define( 'FILE_GROUPS_HIDE_NATIVE_MEDIA', false );
In the Media Library, you will now see a drop down which will let you “show only orphans”. Select any collection of files there which you would like to migrate into a file group, and then select the “create new file group” action from the “Bulk actions” menu and click “apply”. A new file group will be created for the files you selected.
Alternatively, individual orphan files have an action called “create singleton group” available to them if you hover over its row in the table.
