| 开发者 | trilobita |
|---|---|
| 更新时间 | 2026年5月20日 22:32 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
[trdv_list tag="slug"] or show a tag dropdown with show_tag_filter="true".[trdv_list orderby="menu_order"] to apply 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.[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.
Yes, you can restrict documents to logged-in users only via the Settings page.
Files are stored in /wp-content/uploads/trdv-documents/ organized by year and month folders.
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/.
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