{"id":19882,"date":"2012-09-11T19:48:39","date_gmt":"2012-09-11T19:48:39","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/documents-shortcode\/"},"modified":"2015-08-26T18:41:38","modified_gmt":"2015-08-26T18:41:38","slug":"documents-shortcode","status":"publish","type":"plugin","link":"https:\/\/jv.wordpress.org\/plugins\/documents-shortcode\/","author":5,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.0.1","stable_tag":"1.0.1","tested":"4.3.34","requires":"2.5","requires_php":"","requires_plugins":"","header_name":"Document Shortcode","header_author":"Dougal Campbell","header_description":"","assets_banners_color":"","last_updated":"2015-08-26 18:41:38","external_support_url":"","external_repository_url":"","donate_link":"http:\/\/dougal.gunters.org\/donate","header_plugin_uri":"http:\/\/dougal.gunters.org\/","header_author_uri":"http:\/\/dougal.gunters.org\/","rating":5,"author_block_rating":0,"active_installs":80,"downloads":6451,"num_ratings":1,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":"1"},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0","1.0.1"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[9054,24414,88,80,24415],"plugin_category":[43,50],"plugin_contributors":[77598],"plugin_business_model":[],"class_list":["post-19882","plugin","type-plugin","status-publish","hentry","plugin_tags-documents","plugin_tags-documents-shortcode","plugin_tags-files","plugin_tags-shortcode","plugin_tags-shortcode-only","plugin_category-customization","plugin_category-media","plugin_contributors-dougal","plugin_committers-dougal"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/documents-shortcode.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>By adding a simple <code>[documents]<\/code> shortcode in your post or page, you get a\nlist of all documents (non-image\/audio\/video) attached. Each item in the\ndocument list can be styled with CSS to indicate different document types\nbased on file extension (e.g., .doc, .pdf, etc).<\/p>\n\n<!--section=installation-->\n<p>Copy the documents-shortcode folder and its contents to your wp-content\/plugins\ndirectory, then activate the plugin. Or better yet, use the built-in <code>Add New<\/code>\nfeature under your Dashboard's <code>Plugins<\/code> menu.<\/p>\n\n<p>There is no configuration. Just type the <code>[documents]<\/code> shortcode into your \nposts or pages to generate a list of attached files.<\/p>\n\n<!--section=faq-->\n<dl>\n<dt>Where is the settings page?<\/dt>\n<dd><p>There is no settings page. Just upload attachments to a post or page, and put \nthe <code>[documents]<\/code> shortcode where you wish the list of attachments to appear.<\/p><\/dd>\n<dt>How can I limit which attachments are listed?<\/dt>\n<dd><p>There are two attributes you can use with the shortcode to control which\nattached documents are listed: <code>mimetype<\/code> and <code>ext<\/code>.<\/p>\n\n<p>The default match is for mimetype <code>application\/*<\/code>. For other types, you will \nneed to specifically override that attribute.<\/p>\n\n<p>Examples:<\/p>\n\n<pre><code>Just .XLS files:\n      [documents ext=\"xls\"]\n\nAll .DOC, .DOCX, or .PDF files:\n      [documents ext=\"doc,docx,pdf\"]\n\nOnly 'video' types with a .MOV extension:\n      [documents mimetype=\"video\" ext=\"mov\"]\n\nJust application\/pdf mimetypes:\n      [documents mimetype=\"application\/pdf\"]\n\nAll attached documents, regardless of type:\n      [documents mimetype=\"*\"]\n<\/code><\/pre><\/dd>\n<dt>I got an error trying to upload a file!<\/dt>\n<dd><p>If WordPress tells you that a file failed to upload due to an error (\"Sorry, \nthis file type is not permitted for security reasons.\"), you may need to \nadjust the list of allowed file extensions. For more information on how to do \nthis, see:<\/p>\n\n<pre><code>http:\/\/wordpress.org\/extend\/plugins\/ap-extended-mime-types\/\nhttp:\/\/wordpress.org\/extend\/plugins\/manage-upload-types\/\nhttp:\/\/www.wprecipes.com\/wordpress-tip-allow-upload-of-more-file-types\n<\/code><\/pre><\/dd>\n<dt>How do I change the styling?<\/dt>\n<dd><p>See the <code>dc_documents.css<\/code> file for the default styles. Document icons are in \nthe <code>images<\/code> sub-folder of the plugin.<\/p>\n\n<p>You can override these styles in your theme's CSS by adding more specific \nselectors. For example, you could change the font used for the file titles in \nposts with a rule similar to this:<\/p>\n\n<pre><code>    .post ul.dc_documents li a { font-family: Courier,monospace; }\n<\/code><\/pre><\/dd>\n<dt>Why don't my attached images appear in the documents list?<\/dt>\n<dd><p>By default, images are filtered out of the list (because, that's what \ngalleries are for, right?). If you want to list <em>all<\/em> attached documents, \nwith no filtering, just say so:<\/p>\n\n<pre><code>    [documents mimetype=\"*\"]\n<\/code><\/pre><\/dd>\n<dt>What file types are supported?<\/dt>\n<dd><p><em>Technically<\/em>, any file type that WordPress will allow you to upload as an \nattachment (see above). More specifically, there are icons included for the \nfollowing types of files:<\/p>\n\n<pre><code>PDF: `.pdf`\nMS Word: `.doc`, `.docx`\nMS Excel: `.xls`, `.xlsx`\nMS PowerPoint: `.ppt`, `.pptx`\nMS Visio Diagrams: `.vsd`, `.vsdx`\nMS Access Database: `.mdb`, `.mdbx`\nZIP: `.zip`\n<\/code><\/pre>\n\n<p>Any other extension will display a generic text document icon. I realize this \nlist is slanted towards Microsoft applications, but that's just due to the \noriginal plugin usage. Other extension =&gt; icon mappings will be added in the \nfuture, and I am open to suggestions.<\/p><\/dd>\n<dt>Can you make the icon bigger\/smaller?<\/dt>\n<dd><p>At this time, the only supported icon size is 32 x 32 pixels.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<p>= 1.0.1=\n* Allow CSS URL to be filtered.<\/p>\n\n<h4>1.0<\/h4>\n\n<ul>\n<li>Initial release. 2012-09-10<\/li>\n<\/ul>","raw_excerpt":"A [documents] shortcode which will display a list of attached files, with file type icons, and linked to the files for easy downloading.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/jv.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/19882","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jv.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/jv.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/jv.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=19882"}],"author":[{"embeddable":true,"href":"https:\/\/jv.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/dougal"}],"wp:attachment":[{"href":"https:\/\/jv.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=19882"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/jv.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=19882"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/jv.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=19882"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/jv.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=19882"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/jv.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=19882"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/jv.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=19882"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}