WP Document Revisions (wp-document-revisions) free WordPress plugin

Free Plugin337 websites
WP Document Revisions (wp-document-revisions) free WordPress plugin by Ben Balter

WP Document Revisions is a document management and version control plugin. Built for time-sensitive and mission-critical projects, teams can collaboratively edit files of any format — text documents, spreadsheets, images, sheet music… anything — all the while, seamlessly tracking the document’s progress as it moves through your organization’s existing workflow.

WP Document Revisions is three things

  1. A document management system (DMS), to track, store, and organize files of any format
  2. A collaboration tool to empower teams to collaboratively draft, edit, and refine documents
  3. A file hosting solution to publish and securely deliver files to a team, to clients, or to the public

See the full list of features for more information.

Documentation

See the full documentation

Learn

  • Features and Overview
  • Screenshots
  • Installation
  • Frequently Asked Questions
  • Links
  • Where to get Support or Report an Issue
  • Translations
  • Plugin Actions
  • Plugin Filters
  • Plugin Shortcodes and Widget
  • Useful Plugins and Tools

Get Involved

  • How to Contribute
  • Join the List Serve

Features

Overview

Powerful Collaboration Tools – With great power does not have to come great complexity. Based on a simple philosophy of putting powerful but intuitive tools in the hands of managers and content creators, WP Document Revisions leverages many of the essential WordPress features that, for more than eight years, have been tested and proven across countless industries — posts, attachments, revisions, taxonomies, authentication, and permalinks — to make collaborating on the creation and publication of documents a natural endeavor. Think of it as an open-source and more intuitive version of the popular Microsoft collaboration suite, Sharepoint.

Document History – At each step of the authoring process, WP Document Revisions gives you an instant snapshot of your team’s progress and the document’s history. It even gives you the option to revert back to a previous revision — so don’t fret if you make a mistake — or receive updates on changes to the document right in your favorite feed reader.

Access Control – Each document is given a persistent URL (e.g., yourcompany.com/documents/2011/08/TPS-Report.doc) which can be private (securely delivered only to members of your organization), password protected (available only to those you select such as clients or contractors), or public (published and hosted for the world to see). If you catch a typo and upload a new version, that URL will continue to point to the latest version, regardless of how many changes you make.

Enterprise Security – Worried about storing propriety or sensitive information? WP Document Revisions was built from the first line of code with government- and enterprise-grade security in mind. Each file is masked behind an anonymous 128-bit MD5 hash as soon as it touches the server, and requests for files are transparently routed through WordPress’s time-tested URL rewriting, authentication, and permission systems (which can even integrate with existing enterprise active directory or LDAP servers). Need more security? WP Document Revisions allows you to store documents in a folder above the htdocs or public_html web root, further ensuring that only those you authorize have access to your work.

Customization – WP Document Revisions recognizes that no two teams are identical, and as a result, molds to your firm’s needs, not the other way around. Need to track additional information associated with a document? Departments, editors, issues, sections, even arbitrary key-value pairs — whatever you can throw at it, it can handle. Development and customization costs are further minimized by its extensive plugin API, and the WordPress Custom Taxonomy Generator makes it easy for even the uninitiated to add custom taxonomies to documents. Need an audit trail to track check-ins and check-outs? User-level permissions based on the document’s state or another custom taxonomy? Support for third-party encryption? Check out the WP Document Revisions Code Cookbook for sample code. Looking for even more advanced control of your workflow? WP Document Revisions will detect the popular workflow plugin Edit Flow, if installed, and will automatically pull Edit Flow’s advanced workflow management tools into WP Document Revisions. Simply put, virtually every aspect of the plugin’s functionality from workflow states to user-level permissions can be fully customized to your team’s unique needs.

Future Proof – Switching costs a concern? WP Document Revisions is built with tomorrow’s uncertainty in mind. Equally at home in an in-house server room as it is in the cloud, moving individual files or entire document repositories in and out of WP Document Revisions is a breeze (history and all). And since the software is open-source, you can easily add tools to automate the process of moving to or integrating with future third-party systems.

Features

  • Support for any file type (docs, spreadsheets, images, PDFs — anything!)
  • Securely stores unlimited revisions of your business’s essential files
  • Provides a full file history in the form of a revision log, accessible via RSS
  • Helps you track and organize documents as they move through your organization’s existing workflow
  • Each file gets a permanent, authenticated URL that always points to the latest version
  • Each revision gets its own unique url (e.g.,TPS-Report-revision-3.doc) accessible only to those you deem
  • Files are intuitively checked out and locked to prevent revisions from colliding
  • Toggle documents between public, private, and password protected with a single mouse click
  • Runs in-house or in the cloud
  • Secure: filenames are hashed on upload and files are only accessible through WordPress’s proven authentication system
  • Can move document upload folder to location outside of web root to further ensure government- and enterprise-grade security
  • Documents and Revisions shortcodes, Recently Revised Documents widget
  • Multisite and Windows (XAMPP) support
  • French and Spanish language support (easily translated to your language)
  • Integration with Edit Flow
  • Recently Revised Documents Widget, shortcodes, and templating functions for front-end integration

Features Available via the [Code Cookbook](https://github.com/wp-document-revisions/wp-document-revisions-Code-Cookbook)

  • Audit Trail – creates check in / check out audit trail for all documents
  • Taxonomy-based Permissions – allows setting user-level permissions based on a custom taxonomy such as department
  • Third Party Encryption – example of how to integrate at rest encryption using third-party tools
  • Rename Documents – changes all references to “Documents” in the interface to any label of your choosing
  • State Change Notification – how to use document api to allow users to receive notification whenever documents change workflow state
  • Bulk Import – how to batch import a directory (or other list) of files as documents
  • Filetype Taxonomy – Adds support to filter by filetype
  • Track Changes – Auto-generates and appends revision summaries for changes to taxonomies, title, and visibility
  • Remove Workflow States – Completely removes Workflow state taxonomy backend and UI
  • Change Tracker – Auto-generates and appends revision summaries for changes to taxonomies, title, and visibility

Security Policy

To report a security vulnerability, please email [email protected].

Where to get help or report an issue

  • For getting started and general documentation, please browse, and feel free to contribute to the project documentation.
  • For support questions (“How do I”, “I can’t seem to”, etc.) please search and if not already answered, open a thread in the Support Forums.
  • For technical issues (e.g., to submit a bug or feature request) please search and if not already filed, open an issue on GitHub.
  • For implementation, and all general questions (“Is it possible to..”, “Has anyone…”), please search, and if not already answered, post a topic to the general discussion list serve

Things to check before reporting an issue

  • Are you using the latest version of WordPress?
  • Are you using the latest version of the plugin?
  • Does the problem occur even when you deactivate all plugins and use the default theme?
  • Have you tried deactivating and reactivating the plugin?
  • Has your issue already been reported?

What to include in an issue

  • What steps can another user take to recreate the issue?
  • What is the expected outcome of that action?
  • What is the actual outcome of that action?
  • Are there any screenshots or screencasts that may be helpful to include?
  • Only include one bug per issue. If you have discovered two bugs, please file two issues.

WP-Documents-Revisions Action Hooks

This plugin makes use of many action hooks to tailor the delivered processing according to a site’s needs.

Most of them are named with a leading ‘document-‘ but there are a few additional non-standard ones.

Action change_document_workflow_state

Called when the post is saved and Workflow_State taxonomy value is changed. (Only post_ID and new value are available)

In: class-wp-document-revisions-admin.php

Action document_change_workflow_state

Called when the post is saved and Workflow_State taxonomy value is changed. (post_ID, new and old value are available)

In: class-wp-document-revisions-admin.php

Action document_edit

Called as part of the Workflow_State taxonomy when putting the metabox on the admin page

In: class-wp-document-revisions-admin.php

Action document_lock_notice

Called when putting the lock notice on the admin edit screen.

In: class-wp-document-revisions-admin.php

Action document_lock_override

Called after trying to over-ride the lock and possibly a notice has been sent.

In: class-wp-document-revisions.php

Action document_saved

Called when a document has been saved and all plugin processing done.

In: class-wp-document-revisions-admin.php

Action document_serve_done

Called just after serving the file to the user.

In: class-wp-document-revisions.php

Action serve_document

Called just before serving the file to the user.

In: class-wp-document-revisions.php

WP-Documents-Revisions Filters

This plugin makes use of many filters to tailor the delivered processing according to a site’s needs.

Most of them are named with a leading ‘document-‘ but there are a few additional non-standard ones shown at the bottom.

Filter document_block_taxonomies

In: class-wp-document-revisions-front-end.php

Filters the Document taxonomies (allowing users to select the first three for the block widget.

Filter document_buffer_size

In: class-wp-document-revisions.php

Filter to define file writing buffer size (Default 0 = No buffering).

Filter document_caps

In: class-wp-document-revisions.php

Filters the default capabilities provided by the plugin.
Note that by default all custom roles will have the default Subscriber access.

Filter document_content_disposition_inline

In: class-wp-document-revisions.php

Sets the content disposition header to open the document (inline) or to save it (attachment).
Ordinarily set as inline but can be changed.

Filter document_custom_feed

In: class-wp-document-revisions.php

Sets to false to use the standard RSS feed.

Filter document_extension

In: class-wp-document-revisions.php

Allows the document file extension to be manipulated.

Filter document_help_array

In: class-wp-document-revisions-admin.php

Filters the default help text for current screen.

Filter document_internal_filename

In: class-wp-document-revisions.php

Filters the encoded file name for the attached document (on save).

Filter document_lock_check

In: class-wp-document-revisions.php

Filters the user locking the document file.

Filter document_lock_override_email

In: class-wp-document-revisions.php

Filters the lost lock document email text.

Filter document_output_sent_is_ok

In: class-wp-document-revisions.php

Filter to serve file even if output already written.

Filter document_path

In: class-wp-document-revisions.php

Filters the file name for WAMP settings (filter routine provided by plugin).

Filter document_permalink

In: class-wp-document-revisions.php

Filters the Document permalink.

Filter document_read_uses_read

In: class-wp-document-revisions.php

Filters the users capacities to require read (or read_document) capability.

Filter document_revision_query

In: class-wp-document-revisions.php

Filters the plugin query to fetch all the attachments of a parent post.

Filter document_revisions_cpt

In: class-wp-document-revisions.php

Filters the delivered document type definition prior to registering it.

Filter document_revisions_ct

In: class-wp-document-revisions.php

Filters the default structure and label values of the workflow_state taxonomy on declaration.

Filter document_revisions_limit

In: class-wp-document-revisions-admin.php

Filters the number of revisions to keep for documents.

Filter document_revisions_merge_revisions

In: class-wp-document-revisions-admin.php

Filters whether to merge two revisions for a change in excerpt (generally where taxonomy change made late).

Filter document_revisions_mimetype

In: class-wp-document-revisions.php

Filters the MIME type for a file before it is processed by WP Document Revisions.

Filter document_revisions_owners

In: class-wp-document-revisions-admin.php

Filters the author metabox query for document owners.

Filter document_revisions_serve_file_headers

In: class-wp-document-revisions.php

Filters the HTTP headers sent when a file is served through WP Document Revisions.

Filter document_revisions_use_edit_flow

In: class-wp-document-revisions.php

Filter to switch off integration with Edit_Flow/PublishPress statuses.

Filter document_rewrite_rules

In: class-wp-document-revisions.php

Filters the Document rewrite rules.

Filter document_serve

In: class-wp-document-revisions.php

Filters file name of document served. (Useful if file is encrypted at rest).

Filter document_serve_attachment

In: class-wp-document-revisions.php

Filter the attachment post to serve (Return false to stop display).

Filter document_serve_use_gzip

In: class-wp-document-revisions.php

Filter to determine if gzip should be used to serve file (subject to browser negotiation).

Filter document_shortcode_atts

In: class-wp-document-revisions-front-end.php

Filters the Document shortcode attributes.

Filter document_shortcode_show_edit

In: class-wp-document-revisions-front-end.php

Filters the controlling option to display an edit option against each document.

Filter document_show_in_rest

In: class-wp-document-revisions.php

Filters the show_in_rest parameter from its default value of fa1se.

Filter document_slug

In: class-wp-document-revisions.php

Filters the document slug.

Filter document_taxonomy_term_count

In: class-wp-document-revisions.php

Filter to select which taxonomies with default term count to be modified to count all non-trashed posts.

Filter document_title

In: class-wp-document-revisions.php

Filter the document title from the post.

Filter document_to_private

In: class-wp-document-revisions-admin.php

Filters setting the new document status to private.

Filter document_use_workflow_states

In: class-wp-document-revisions.php

Filter to switch off use of standard Workflow States taxonomy. For internal use.

Filter document_verify_feed_key

In: class-wp-document-revisions.php

Allows the RSS feed to be switched off.

Filter default_workflow_states

In: class-wp-document-revisions.php

Filters the default workflow state values.

Filter lock_override_notice_subject

In: class-wp-document-revisions.php

Filters the locked document email subject text.

Filter lock_override_notice_message

In: class-wp-document-revisions.php

Filters the locked document email message text.

Filter send_document_override_notice

In: class-wp-document-revisions.php

Filters the option to send a locked document override email

Filter serve_document_auth

In: class-wp-document-revisions.php

Filters the decision to serve the document through WP Document Revisions.

Links

  • Source Code (GitHub)
  • Development version (Build Status)
  • Code Cookbook
  • Translations (GlotPres)
  • Project Wiki
  • Where to get Support or Report an Issue
  • How to Contribute

WP-Documents-Revisions Shortcodes and Widget

These shortcodes and widget are available both in their historic form and as blocks.

Existing shortcodes can be converted to and from their block forms.

They are held in a grouping called WP Document Revisions.

Since the blocks make use of dynamically-generated content, the same code is used to create this for a shortcode/widget.

Documents Shortcode

In a post or page, simply type [documents] to display a list of documents.

WP_Query parameters

The shortcode accepts most Standard WP_Query parameters which should allow you to fine tune the output. Parameters are passed in the form of, for example, [documents numberposts="5"].

Specifically, the shortcode accepts: author__in, author__not_in, author_name, author, cat, category__and, category__in, category__not_in, category_name, date_query, day, has_password, hour, m, meta_compare, meta_key, meta_query, meta_value_num, meta_value, minute, monthnum, name, numberposts, order, orderby, p, page_id, pagename, post__in, post__not_in, post_name__in, post_parent__in, post_parent__not_in, post_parent, post_password, post_status, s, second, tag__and, tag__in, tag__not_in, tag_id, tag_slug__and, tag_slug__in, tag, tax_query, title, w and year.

If you’re using a custom taxonomy, you can add the taxonomy name as a parameter in your shortcode. For example, if your custom taxonomy is called “document_categories”, you can write insert a shortcode like this:

[documents document_categories="category-name" numberposts="6"]

(Where “category-name” is the taxonomy term’s slug)

It accepts the “query_var” parameter of the taxonomies used for documents. That is, if you have defined a taxonomy for your documents with slug “document_categories”. If you have not defined the query_var parameter then you use the slug. However if you have set query_var to “doc_cat”, say, then you can insert a shortcode as

[documents doc_cat="category-name" numberposts="5"]

Important parameters WP_Query will be the ordering and number of posts to display.

numberposts (with a number parameter) will give the maximum number of posts to display.

order (with value 'ASC' or 'DESC') gives the ordering,

orderby (with a string value) gives the field to order the documents. Common values are "title", "date", "name", "modified" and "ID".

Display parameters

It is also possible to add formatting parameters:

show_edit (with a true/false parameter) that can add a link next to each document shown in the list that the user is able to edit by them. This permits the user to edit the document directly from the list. A value set here will override the default behaviour.

As delivered, administrators will have the show_edit implicitly active. A filter document_shortcode_show_edit can be used to set this for additional user roles.

new_tab (with a true/false parameter) that will open the document in a new browser tab rather than in the current one.

show_thumb (with a true/false parameter) that will display a featured image (or generated one from the first page of PDF documents) if provided.

show_descr (with a true/false parameter) that will output the entered description if provided.

All these boolean variables can be entered without a value (with default value true except for show_thumb whose default value is false).

Block Usage

When using the block version of the shortcode called Document List, some compromises have been necessary.

Since queries are often selecting a single taxonomy value, the block provides the possibility to select single values from up to three taxonomies. Since there can be more than three taxomomies attached to documents, a filter document_block_taxonomies allows the list of taxonomies to be edited to select the taxonomies to be displayed.

The parameters numberposts, order, orderby, show_edit,new_tab, show_thumb and show_descr are directly supported. However, since there are many other parameters are possible, as well as differet structures, additional parameters may be entered as a text field as held in the shortcode.

Document Taxonomy Changes

Note that this section does not refer to the terms used within a taxonomy are changed but to changes made when taxonomies are registereed with documents.

It is possible that the taxonomies associated with documents are changed. Since the three taxonomies are chosen when the block is created, then if the taxonomies linked are subsequently changed, then a warning/error message “Taxonomy details in this block have changed.” may be seen when the block is output.

The resolution to this issue is to transform the block to a shortcode and then back to a block again. A side effect will be to lose any “supports” properties (see below) that have been used.

Document Revisions Shortcode

In a post or page, simply type [document_revisions id="100"] where ID is the ID of the document for which you would like to list revisions.

You can find the ID in the URL of the edit document page.

To limit the number of revisions displayed, passed the “number” argument, e.g., to display the 5 most recent revisions [document_revisions id="100" number="5"].

Display parameters

It is also possible to add formatting parameters:

numberposts (with a number parameter) will give the maximum number of revisions to display.

summary (with a true/false parameter) that will add the excerpt for the revision to the output.

new_tab (with a true/false parameter) that will open the revision in a new browser tab rather than in the current one.

Both of these boolean variables can be entered without a value (with default value true ).

Block Usage

When using the block version of the shortcode called Document Revisions, a change have been necessary.

number is a reserved word within javascript so `numberposts` is also supported even for the shortcode format. `numberposts` is used by the block.

Since the block is dynamically displayed as parameters are entered, if the post number entered is not a document, then an appropriate message will be entered.

Latest Documents Widget

Go to your theme’s widgets page (if your theme supports widgets), and drag the widget to a sidebar of you choice. Once in a sidebar, you will be presented with options to customize the widget’s functionality.

Display parameters

It is also possible to add formatting parameters:

numberposts (with a number parameter) will give the maximum number of revisions to display.

Post Status allowing the selection "publish", "private" or "draft", or combination of them.

show_thumb (with a true/false parameter) that will display a featured image (or generated one from the first page of PDF documents) if provided.

show_descr (with a true/false parameter) that will output the entered description if provided.

show_author(with a true/false parameter) that will identify the document author.

new_tab (with a true/false parameter) that will open the revision in a new browser tab rather than in the current one.

Block Usage

The block version of the widget called Latest Documentscan be used on pages or posts. It cannot be converted to or from a shortcode block.

Block supports properties

Additionally, later versions of WordPress provide for blocks to support additional display attributes that will be applied to the block on rendering if the theme allows it.

These attributes are align, color, spacing and typography and these attributes have been added to all blocks.

Translations

Interested in translating WP Document Revisions? You can do so via Crowdin, or by submitting a pull request.

  • French – Hubert CAMPAN
  • Spanish – IBIDEM GROUP, TradiArt, and elarequi
  • Norwegian – Daniel Haugen
  • German –Konstantin Obenland
  • Chinese – Tim Ren
  • Swedish – Daniel Kroon, Examinare AB, Sweden.
  • Czech – Hynek Šťavík
  • Italian – @guterboit
  • Russian – Evgeny Vlasov
  • Dutch – @tijscruysen

Useful plugins and tools

Permissions management

  • Members � Membership & User Role Editor Plugin

    (Previously called Members)

Taxonomy management

  • Simple Taxonomy Refreshed

Document workflow management

  • Edit Flow
  • PublishPress

Author: Ben Balter

Plugin folder: wp-document-revisions

Tags: attachments, document management, documents, enterprise, uploads

image.pngimage.pngimage.png