| 开发者 | trilobita |
|---|---|
| 更新时间 | 2026年10月8日 18:03 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
[trdv_list] shortcode shows a responsive table with live search, sortable columns and pagination, plus optional category, tag and file type filters.[trdv_link] shortcode.[trdv_list orderby="menu_order"] to show that order on the frontend.trilobita-docvault folder to /wp-content/plugins/.Trilobita DocVault supports PDF, DOC, DOCX, XLS, XLSX, PPT, PPTX, ODT, ODS, ODP, RTF, CSV, and TXT files.
From the Edit Document screen, you can upload new versions of a file. The plugin keeps a full version history with the ability to download, restore, or delete any previous version. By default, up to 5 versions per document are kept.
There are three ways:
[trdv_list] shortcode — displays a searchable, sortable table of documents on any page or post. On a new site, the getting-started guide's Create a documents page button sets up a draft page with this table for you.[trdv_link] shortcode — inserts an inline download link within any text. You can also use the Trilobita DocVault Link toolbar button in the block editor to link selected text to a document without using a shortcode.Yes. Download links use the format /trdv/download/{id}/ rather than a direct path to the file. Every download request is handled by WordPress, which checks access permissions before serving the file. The actual file location on the server is never exposed. Restricted documents cannot be accessed by guessing a URL, and files are always forced to download rather than opened inline in the browser (except PDFs and images opened with the View button).
On Apache, DocVault blocks direct web access to its upload folder with an .htaccess file, so stored files can only be reached through these download links. Nginx and some other servers ignore .htaccess files, so on those servers you should add an equivalent rule to your server configuration. DocVault checks this for you: go to Tools > Site Health, and if stored files can be downloaded directly you will see a warning with the exact rule for your site. For Nginx:
location ^~ /wp-content/uploads/trdv-documents/ { deny all; }
If your site has a legacy sdm-documents folder from an early version of the plugin, add the same rule for that folder too.
Yes. In Documents > Settings, set the default access to Public or Logged-in users only. Each document can override the default in its Access Control box. Restricting documents to specific user roles is available in DocVault Pro.
Files are stored in /wp-content/uploads/trdv-documents/. By default all files are kept in one folder; in Documents > Settings you can choose folders by document ID or by year and month instead.
Yes. Open the document, drop the new file into Upload New Version and click Update. Download links point to the document, not the file, so every existing link now serves the new version. The previous file stays in the version history.
Yes. Every download through a DocVault link is counted. Counts appear in the admin document list and on each document's edit screen, and you can show them on the frontend with [trdv_list show_count="true"] or the Document block's Show download count option.
By default, up to 5 versions per document are kept. Older versions are automatically removed when the limit is reached.
Yes. Each document has an optional expiry date field in the admin. Once the date passes, the document is automatically hidden from all frontend listings — the [trdv_list] shortcode, AJAX search, Query Loop block, and REST API. Direct download and view URLs are also blocked for non-admin, non-author users. To include expired documents in a specific [trdv_list] listing, use [trdv_list show_expired="true"]. Admins and the document's author can still download expired documents directly; they remain visible and manageable in the admin.
Yes, Trilobita DocVault is fully translatable. A .pot template file is included in the plugin's languages/ folder to help you get started. Translation files should be named trilobita-docvault-{locale}.mo (e.g. trilobita-docvault-fr_FR.mo) and can be placed either in the plugin's own languages/ folder or in /wp-content/languages/plugins/.
trdv.document.layoutOptions and trdv.document.layoutControls JavaScript filters. DocVault Pro 1.5.4 uses these to add its Card and Button layouts to the same Layout control, fixing a duplicate Layout control and missing toggles in the block sidebar when Pro is active. No change for sites without Pro.[trdv_list] table now show your site's time zone instead of UTC.style_handles so they load correctly inside the always-iframed post editor introduced in WordPress 7.1, instead of relying on a WordPress core compatibility fallback.var(--wp-admin-theme-color) so buttons, borders, and links match whichever admin colour scheme is active (Fresh, Modern, Ocean, etc.).style_handles in block registration, ensuring styles load correctly inside the iframed editor.$placeholders in sort-order query suppressed with targeted phpcs:disable/enable — the variable contains only %d tokens and is not user-controlled.meta_query in pre_get_posts access-control filter suppressed — no alternative API covers this use case.[trdv_list]).can_view_document(). Previously expiry only filtered documents from [trdv_list] output; direct download/view URLs and REST requests could still reach expired documents.[trdv_list orderby="menu_order"] to display documents on the frontend in their manually-defined order.[trdv_list tag="slug"] to pre-filter by tag and [trdv_list show_tag_filter="true"] for a tag dropdown filter.[trdv_list] shortcode (show_view="false" to hide) and the DocVault Document block.[trdv_list] with a toggle button, and directly in the DocVault Document block (full layout).[trdv_list show_category_filter="true"] adds a category dropdown alongside the search box.[trdv_list show_type_filter="true"] adds a file type dropdown; only types present in the library are listed.[trdv_list show_count="true"] adds a Downloads column showing total download count per document. Also available as a toggle in the DocVault Document block (full layout).trdv_allowed_file_types filter to the upload validation, wp_handle_upload() mimes, download tracker MIME check, and upload UI — allows Pro to extend the accepted file type list without patching free plugin code.sdm-documents/ directory are now correctly hidden from the media library.sdm-documents/ files, not just the current trdv-documents/ directory.current_time('timestamp', true) calls with time() to eliminate notices on sites with WP_DEBUG enabled.[trdv_list show_expired="true"] to include them.[trdv_documents] to [trdv_list] — update any pages using the old shortcode[docvault_link] to [trdv_link] — update any content using the old shortcode