| 开发者 | kitgenix |
|---|---|
| 更新时间 | 2026年10月30日 18:46 |
| 捐献地址: | 去捐款 |
| PHP版本: | 8.2 及以上 |
| WordPress版本: | 7.4 |
| 版权: | GPLv3 or later |
| 版权网址: | 版权信息 |
/kitgenix-document-manager/{slug}/
Replace the current attachment later and the document route can remain the same, so old links in pages, emails, QR codes, bookmarks and external documentation do not need to be replaced.
Built by Kitgenix.
Document Management Features
.htaccess.[kitgenix_document_manager_link slug="my-document"]
A card can be rendered with:
[kitgenix_document_manager_document slug="my-document"]
The card shortcode can also display several comma-separated document slugs and supports presentation attributes for button labels/styles, image size, alignment, target behaviour and the visibility of file metadata/description.
A searchable, filterable document library can be rendered with:
[kitgenix_document_manager_library]
The library lists every live document the current visitor is allowed to access, with a search box (title and description), category and file-type filters, sorting and pagination. It can be limited to specific categories with category="slug-a,slug-b", and supports per_page, columns, orderby (title, newest, updated), show_search, show_category_filter, show_type_filter, show_sort, empty_message and the same presentation attributes as the card shortcode. Filtering works without JavaScript and updates in place when JavaScript is available.
Protected documents are not revealed by the shortcodes to visitors who fail the document's access rules. The library also hides categories and file types that only contain documents the visitor cannot access.
Local Document Analytics
The plugin records aggregate counts for views/downloads, signed-link usage and recent daily activity in WordPress metadata. It also retains the most recent access timestamp/type for administrative reporting.
The analytics implementation does not create visitor profiles and does not intentionally store visitor IP addresses, user agents, referrers or tracking cookies. Older daily buckets are pruned while cumulative totals remain available.
File Delivery, Range Requests and Caching
Managed files are served through WordPress after access checks. The endpoint supports single byte-range requests, which can help resumable downloads and seeking in compatible browser-displayed content.
Eligible public responses can use ETag and Last-Modified revalidation. Protected responses are handled with private/no-store style cache controls so a shared intermediary is not encouraged to cache restricted content.
REST and Site Health
A plugin REST route can return permitted document metadata by slug. Permission/access checks still apply; it is not intended as an anonymous route for enumerating protected documents.
The Site Health integration checks the dedicated Document Manager uploads directory and can flag directory/writability problems that would prevent file management from working correctly.
Settings Portability
Administrators can export/import plugin configuration and document-category structure as JSON. This portability workflow deliberately does not package the document files themselves, signed-link secrets or analytics history.
Typical Uses
/wp-content/plugins/.No. The stable document URL points to the document record rather than directly to a particular attachment. Replacing the current file keeps the same stable URL.
Yes. Set the document to a protected visibility mode. You can also narrow access using roles, a required capability, or specific user IDs.
Yes. Generate a signed share link with an expiry date. You can optionally set a maximum-use count, revoke the link, or regenerate the signing secret to invalidate previously issued links.
Yes. Each document can have an available-from time, archive time, and expiry time. Access checks enforce those lifecycle dates across the stable URL, shortcode output, and plugin REST endpoint.
Yes. Version history can retain old attachments. Saved versions can have optional labels/notes and can later be restored or deleted.
Yes. Use the slugs attribute on [kitgenix_document_manager_document] with a comma-separated list of document slugs.
Yes. PDF is allowed by default and can be served inline when the global serving mode is set to inline. Browser support determines whether a compatible file is displayed or downloaded.
No. The plugin works without WooCommerce. If WooCommerce is active, the Shop Manager role is granted the Document Manager capability on activation so store managers can be permitted to manage documents.
Not necessarily. Existing Media Library attachments remain in their original location. The plugin guards their WordPress REST-media exposure and attachment permalink when access is denied, but an already-known raw uploads URL may still be directly reachable depending on server configuration. See Security and File Protection above.
Plugin settings and document categories. Documents, uploaded files, analytics, and signed-link secrets are intentionally excluded.
Plugin settings/log data are removed during uninstall. Document posts and managed attachments are retained by default. If Delete data on uninstall is enabled before uninstalling, the plugin also deletes its document records and associated current/version attachments.
report-kdm-<random>.pdf). On servers that ignore the folder's .htaccess rules, such as nginx, a protected document could previously be downloaded directly by guessing its URL, bypassing visibility, role and share-link checks.[kitgenix_document_manager_library]. It lists every live document the current visitor is allowed to access, with search across titles and descriptions, category and file-type filters, sorting (title, newest, recently updated) and pagination. Restricted, private, scheduled, archived and expired documents are never listed, and categories or file types that only contain them are not offered as filters. A signed share link in the page URL never adds documents to the listing.category="...", and supports per_page, columns, orderby, filter visibility toggles, a custom empty message and all document card presentation attributes.edit_post/read_post/delete_post capabilities to the same flat management capability used everywhere else, which made WordPress treat every check of that capability as a delete_post check missing a post ID and log a "called incorrectly" notice on the Kitgenix admin menu and the plugin's own settings page. Those singular capabilities are no longer set explicitly, so WordPress derives them safely instead.Requires PHP: 8.2).rename() calls so they match the sniff's actual code; no behaviour change.kitgenix_document_manager_library_query_args and kitgenix_document_manager_library_query_limit filters.Shortcode::resolve_card_options() and Shortcode::render_card()..pot translation template for 2.2.0.CHANGELOG.md.CHANGELOG.md file.