| 开发者 | kitgenix |
|---|---|
| 更新时间 | 2026年9月1日 03:30 |
| 捐献地址: | 去捐款 |
| PHP版本: | 8.1 及以上 |
| WordPress版本: | 7.1 |
| 版权: | 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
[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.
Protected documents are not revealed by the shortcode to visitors who fail the document's access rules.
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.
kitgenix_document_manager_lifecycle_status_changed hook and a Log tab entry.kitgenix_document_manager_share_link_url developer hook for filtering generated signed-share URLs.kitgenix_document_manager_document_served developer hook for responding when a document is successfully delivered.kitgenix_document_manager_rest_document_response developer hook for customising REST metadata responses.kitgenix_document_manager_lifecycle_status_changed developer hook for responding to document lifecycle transitions.Content-Range header./wp/v2/media/{id} and attachment permalinks, preventing these routes from bypassing the plugin's Private, Restricted, signed-link, and scheduling access controls..htaccess, web.config, and an empty index.php file to the plugin's dedicated uploads directory to prevent direct web access and directory listing on Apache, IIS, and compatible web servers.location rule because WordPress plugins cannot modify Nginx server configuration directly.Content-Disposition headers against quote, carriage-return, and line-feed characters.Accept-Ranges and X-Content-Type-Options headers to document responses.Cache-Control: private, no-store, preventing intermediary caches and CDNs from retaining sensitive document metadata.kgx-dm-* to kitgenix-document-manager-* for consistency with other Kitgenix plugins. Sites with custom CSS targeting the previous class names will need to update their selectors.