| 开发者 | karelialabs |
|---|---|
| 更新时间 | 2026年11月16日 04:12 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
media_category taxonomy, so every category shows up as a folder, with its subcategories and files. Nothing is copied or converted.[gallery media_category="flowers,mosses"], [gallery media_category="california+flowers"], type, limit, orderby and [playlist] work the same way.SHELFWRIGHT_IMPORT_ROOTS constant in wp-config.php (or added with the shelfwright_import_roots filter). You choose a folder inside those. Paths are checked, symbolic links are never followed, and only administrators can use it.[gallery folder="logos"].No. Folders are virtual: a file's address never changes, so nothing on your site breaks. Moving a file between folders is instant.
Yes. Drag with Ctrl or Alt held down to copy it into another folder, or tick several folders in the attachment details.
The folder is removed; its files stay in the Media Library, and its subfolders move up one level.
No. Shelfwright uses the same categories, so they are already there. Deactivate Enhanced Media Library once Shelfwright is active, so the two do not both change the Media Library.
They stay, so you can reinstall or switch back to Enhanced Media Library. If you want them removed too, tick "Also delete all folders when Shelfwright is deleted" under Settings → Media first. Your files are never deleted.
Anyone who can upload files can create, rename and fill folders. Deleting folders needs an Editor or Administrator.
Open Media → Import from server, choose the folder, check the count and click Import. The files are registered where they are, and the sub-folders become folders in the tree. Folders you want to import from outside the uploads folder have to be allowed by the site owner first (see the next question).
The uploads folder, and folders the site owner lists in wp-config.php: define( 'SHELFWRIGHT_IMPORT_ROOTS', array( '/home/example/ftp-incoming' ) ); (absolute paths; use 'Label' => '/path' to give a folder a name), or with the shelfwright_import_roots filter. Nothing else can be read, however the address is written, and symbolic links are never followed.
Files inside the uploads folder are registered where they are: no copy, no move, no rename. WordPress makes thumbnails next to them, as for any upload; originals of large pictures are not scaled or rotated. Files in a folder outside uploads are copied into uploads/server-import only if you tick the box that asks for it; the originals stay.
Types WordPress does not allow (PHP, scripts, SVG unless your site allows it) and files whose content does not match their name, empty files, hidden files (names starting with a dot), symbolic links, resized copies WordPress made of another file, files that are already in the Media Library, and names with #, ? or % or invalid text (they would break the file's web address). The count before the import lists each group.
Yes. Files that are already in the Media Library are skipped, so only new files are added, into the folders that match. Tick "Also put the files that are already in the Media Library into these folders" to give older files their folders.
Yes. Folders use WordPress' own taxonomy tables and indexes, and imports run in batches.
SHELFWRIGHT_IMPORT_ROOTS constant, or added with the shelfwright_import_roots filter. Paths are checked one segment at a time and resolved, must stay inside the allowed folder, and symbolic links are never followed. Every route needs the Administrator capability and the REST nonce.