{"id":11141,"date":"2026-05-27T02:30:08","date_gmt":"2026-05-26T18:30:08","guid":{"rendered":"https:\/\/aeosub.com\/tooldocs\/"},"modified":"2026-05-27T02:30:08","modified_gmt":"2026-05-26T18:30:08","slug":"tooldocs","status":"publish","type":"post","link":"https:\/\/aeosub.com\/zh\/tooldocs\/","title":{"rendered":"ToolDocs"},"content":{"rendered":"<div class=\"post-img\" style=\"margin-bottom: 25px\"><img decoding=\"async\" src=\"https:\/\/ps.w.org\/tooldocs\/assets\/banner-772x250.png?rev=3549574\" alt=\"ToolDocs\" style=\"width: 100%;height: auto;border-radius: 12px\"><\/div>\n<div class=\"plugin-info-card\" style=\"border: 1px solid #e2e8f0;border-radius: 10px;overflow: hidden;margin-bottom: 30px;font-family: -apple-system, system-ui, sans-serif;background: #fff\">\n<table style=\"width: 100%;border-collapse: collapse;font-size: 14px\">\n<tr style=\"border-bottom: 1px solid #edf2f7\">\n<th style=\"padding: 15px 20px;text-align: left;width: 35%;color: #4a5568;background: #fcfcfc\"><img decoding=\"async\" src=\"https:\/\/ps.w.org\/tooldocs\/assets\/icon-256x256.png?rev=3549574\" style=\"width: 40px;height: 40px;border-radius: 6px;margin-right: 12px;vertical-align: middle\"> Developer<\/th>\n<td style=\"padding: 15px 20px;font-weight: 500\"><a href=\"https:\/\/profiles.wordpress.org\/fmgconsultants\/\" target=\"_blank\" rel=\"noopener\">fmgconsultants<\/a><\/td>\n<\/tr>\n<tr style=\"border-bottom: 1px solid #edf2f7\">\n<th style=\"padding: 12px 20px;text-align: left;color: #4a5568;background: #fcfcfc\">Version<\/th>\n<td style=\"padding: 12px 20px\">v0.9.9<\/td>\n<\/tr>\n<tr style=\"border-bottom: 1px solid #edf2f7\">\n<th style=\"padding: 12px 20px;text-align: left;color: #4a5568;background: #fcfcfc\">Active Installs<\/th>\n<td style=\"padding: 12px 20px\">0 +<\/td>\n<\/tr>\n<tr style=\"border-bottom: 1px solid #edf2f7\">\n<th style=\"padding: 12px 20px;text-align: left;color: #4a5568;background: #fcfcfc\">Requires \/ Tested<\/th>\n<td style=\"padding: 12px 20px\">5.8 \/ 6.9.4<\/td>\n<\/tr>\n<tr style=\"border-bottom: 1px solid #edf2f7\">\n<th style=\"padding: 12px 20px;text-align: left;color: #4a5568;background: #fcfcfc\">Last Updated<\/th>\n<td style=\"padding: 12px 20px\">2026-05-26 6:14pm GMT<\/td>\n<\/tr>\n<tr>\n<th style=\"padding: 12px 20px;text-align: left;color: #4a5568;background: #fcfcfc\">Official Link<\/th>\n<td style=\"padding: 12px 20px\"><a href=\"https:\/\/wordpress.org\/plugins\/tooldocs\/\" target=\"_blank\" style=\"text-decoration: none;color: #4a3bca;font-weight: bold\" rel=\"noopener\">View Details \u2192<\/a><\/td>\n<\/tr>\n<\/table><\/div>\n<div class=\"plugin-short-desc\" style=\"margin: 20px 0;padding: 12px 15px;background: #f9fafb;border-left: 4px solid #4a3bca;border-radius: 6px;font-style: italic;color: #4a5568\">A document management plugin that provides ungated, persistent permalinks for your uploaded documents.<\/div>\n<p>ToolDocs is a document management plugin for WordPress that lets you upload, organize, and share documents with your visitors through direct permalinks.<\/p>\n<p><strong>Key Features:<\/strong><\/p>\n<ul>\n<li>Upload and manage PDF, Word, Excel, ZIP, and other file types<\/li>\n<li>Add external URLs as managed documents<\/li>\n<li>Organize documents into categories<\/li>\n<li>Generate direct permalink URLs for each document<\/li>\n<li>Embed document download links using shortcodes<\/li>\n<li>Track download counts and view per-document download history<\/li>\n<li>Export download statistics to CSV (summary, by day, by week, by month)<\/li>\n<li>File version history with configurable retention (0-4 versions)<\/li>\n<li>File usage detection across your site<\/li>\n<li>Customize shortcode icon color<\/li>\n<li>Font Awesome icon support with customizable file type icons<\/li>\n<li>Modern Vue.js admin dashboard<\/li>\n<li>REST API for programmatic access<\/li>\n<li>Developer-friendly with filters for customization<\/li>\n<\/ul>\n<p><strong>Shortcodes:<\/strong><\/p>\n<ul>\n<li><code>[tooldocs_file id=\"X\"]<\/code> &#8211; Display a single document download link with file type icon<\/li>\n<li><code>[tooldocs_category_files category_id=\"Y\"]<\/code> &#8211; Display all documents in a category, with optional modal popup<\/li>\n<\/ul>\n<p><strong>How It Works:<\/strong><\/p>\n<ol>\n<li>Upload documents through the ToolDocs admin panel or add external URLs<\/li>\n<li>Organize them into categories<\/li>\n<li>Use shortcodes or direct URLs to share documents on your site<\/li>\n<li>Track downloads and export reports<\/li>\n<\/ol>\n<h3>Development<\/h3>\n<p>The admin interface is built with Vue.js. Source code is included in the <code>admin\/src\/<\/code> directory.<br \/>\nFrontend JavaScript source is in <code>front\/<\/code>.<\/p>\n<p>To build the admin interface:<br \/>\n1. Navigate to the <code>admin\/<\/code> directory<br \/>\n2. Run <code>npm install<\/code><br \/>\n3. Run <code>npm run build<\/code><\/p>\n<p>To build the frontend JavaScript:<br \/>\n1. Navigate to the <code>front\/<\/code> directory<br \/>\n2. Run <code>npm install<\/code><br \/>\n3. Run <code>npm run build<\/code><\/p>\n<h3>Review Responses<\/h3>\n<h4>Nonces and User Permissions (document-download.php)<\/h4>\n<p>The document download template is a public-facing page with no authentication or access restrictions &#8211; all documents are freely downloadable. The <code>h<\/code> parameter is simply a unique file identifier (like a post slug), and <code>src<\/code> is a tracking parameter similar to UTM parameters. These URLs are distributed in emails, press releases, and external sites, so they cannot be bound to a WordPress nonce (which would expire and require an active session to generate). Both <code>$_GET<\/code> parameters are sanitized with <code>sanitize_text_field(wp_unslash())<\/code> and the hash is validated against the database before any file operation.<\/p>\n<h4>Variables and options must be escaped when echo&#8217;d (fread)<\/h4>\n<p>The <code>echo fread()<\/code> on this line streams raw binary file data (PDFs, ZIPs, documents, etc.) to the browser. Escaping binary data would corrupt the file. The Content-Type header is set from the WordPress media library MIME type, and the file path is resolved from a validated database record. This is the standard pattern for file streaming in PHP and cannot be escaped.<\/p>\n<h4>Changing global behaviour (DONOTCACHEPAGE)<\/h4>\n<p>The <code>DONOTCACHEPAGE<\/code> constant is only defined on the specific ToolDocs download page, not globally. It is set inside a conditional that checks <code>get_queried_object_id()<\/code> against the stored download page ID. This is a standard WordPress cache-busting constant recognised by all major caching plugins, and it is necessary to ensure download tracking fires on every visit to the download page.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A document management plugin that provides ungated, persistent permalinks for your uploaded documents.<\/p>","protected":false},"author":1,"featured_media":9317,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[252],"tags":[2185,2186,747,1945,1983,555],"class_list":["post-11141","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-trends","tag-document-management","tag-documents","tag-downloads","tag-file-manager","tag-shortcodes","tag-wordpress-plugin"],"_links":{"self":[{"href":"https:\/\/aeosub.com\/zh\/wp-json\/wp\/v2\/posts\/11141","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/aeosub.com\/zh\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/aeosub.com\/zh\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/aeosub.com\/zh\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/aeosub.com\/zh\/wp-json\/wp\/v2\/comments?post=11141"}],"version-history":[{"count":0,"href":"https:\/\/aeosub.com\/zh\/wp-json\/wp\/v2\/posts\/11141\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/aeosub.com\/zh\/wp-json\/wp\/v2\/media\/9317"}],"wp:attachment":[{"href":"https:\/\/aeosub.com\/zh\/wp-json\/wp\/v2\/media?parent=11141"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/aeosub.com\/zh\/wp-json\/wp\/v2\/categories?post=11141"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/aeosub.com\/zh\/wp-json\/wp\/v2\/tags?post=11141"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}