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.
In: class-wp-document-revisions.php
Filters the default workflow state values.
In: trait-wp-document-revisions-revisions.php
Filter to allow revision deletion. Set to true to bypass these tests and allow delete. Note that this should be used when deleting revisions by trusted plugins e.g. PublishPress Revisions.
In: class-wp-document-revisions-front-end.php
Filters the Document taxonomies (allowing users to select the first three for the block widget.
In: trait-wp-document-revisions-file-handler.php
Filter to define file writing buffer size (Default 0 = No buffering).
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.
In: trait-wp-document-revisions-file-handler.php
Sets the content disposition header to open the document (inline) or to save it (attachment). Ordinarily set as inline but can be changed.
In: trait-wp-document-revisions-file-handler.php
Sets to false to use the standard RSS feed.
In: trait-wp-document-revisions-file-handler.php
Allows the document file extension to be manipulated.
In: trait-wp-document-revisions-admin-editor.php
Filters the default help text for current screen.
In: trait-wp-document-revisions-rewrites.php
Filters the home_url() for WPML and translated documents.
In: trait-wp-document-revisions-file-handler.php
Filters the encoded file name for the attached document (on save).
In: trait-wp-document-revisions-revisions.php
Filters the user locking the document file.
In: trait-wp-document-revisions-revisions.php
Filters the lost lock document email text.
In: trait-wp-document-revisions-file-handler.php
Filter to serve file even if output already written.
In: trait-wp-document-revisions-file-handler.php, class-wp-document-revisions-validate-structure.php
Filters the file name for WAMP settings (filter routine provided by plugin).
In: trait-wp-document-revisions-rewrites.php
Filters the Document permalink.
In: trait-wp-document-revisions-query.php
Filters the post-thumbnail size parameters (used only if this image size has not been set).
In: class-wp-document-revisions.php, class-wp-document-revisions-front-end.php, class-wp-document-revisions-manage-rest.php, trait-wp-document-revisions-file-handler.php
Filters the users capacities to require read (or read_document) capability.
In: trait-wp-document-revisions-revisions.php
Filters the plugin query to fetch all the attachments of a parent post.
In: class-wp-document-revisions.php
Filters the delivered document type definition prior to registering it.
In: class-wp-document-revisions.php
Filters the default structure and label values of the workflow_state taxonomy on declaration.
In: trait-wp-document-revisions-query.php
Filters the number of revisions to keep for documents.
In: trait-wp-document-revisions-admin-editor.php
Filters whether to merge two revisions for a change in excerpt (generally where taxonomy change made late).
In: trait-wp-document-revisions-file-handler.php
Filters the MIME type for a file before it is processed by WP Document Revisions.
In: trait-wp-document-revisions-file-handler.php
Filters the HTTP headers sent when a file is served through WP Document Revisions.
In: class-wp-document-revisions.php
Filter to switch off integration with Edit_Flow/PublishPress statuses.
In: trait-wp-document-revisions-rewrites.php
Filters the Document rewrite rules.
In: trait-wp-document-revisions-file-handler.php
Filters file name of document served. (Useful if file is encrypted at rest).
In: trait-wp-document-revisions-file-handler.php
Filter the attachment post to serve (Return false to stop display).
In: trait-wp-document-revisions-file-handler.php
Filter to determine if gzip should be used to serve file (subject to browser negotiation).
In: class-wp-document-revisions-front-end.php
Filters the Document shortcode attributes.
In: class-wp-document-revisions-front-end.php
Filters the controlling option to display an edit option against each document.
⚠️ Experimental — This feature is under active development and may change in future releases.
In: class-wp-document-revisions.php
Filters the show_in_rest parameter from its default value of false. Must be set to true to enable the block editor or REST API access for documents. Enabling this exposes document data via the WordPress REST API using document permissions. See Block Editor Support.
In: trait-wp-document-revisions-file-handler.php
Filters the document slug.
In: class-wp-document-revisions.php, trait-wp-document-revisions-rewrites.php
Filter to stop direct file access to documents (specify the URL element (or trailing part) to traverse to the document directory.
In: trait-wp-document-revisions-query.php
Filter to select which taxonomies with default term count to be modified to count all non-trashed posts.
In: class-wp-document-revisions-front-end.php, class-wp-document-revisions-recently-revised-widget.php
Filters the post thumbnail size on blocks/shortcodes - default thumbnail.
In: trait-wp-document-revisions-query.php
Filter the document title from the post.
In: trait-wp-document-revisions-admin-editor.php
Filters setting the new document status to private.
In: class-wp-document-revisions.php, class-wp-document-revisions-manage-rest.php, trait-wp-document-revisions-admin-editor.php
Filters whether to enable experimental block editor (Gutenberg) support for documents. Default is false. When set to true, enables REST API write methods, registers post meta for REST, adds excerpt support to the document post type, and hides the main editor canvas. Must be used together with document_show_in_rest filter. See Block Editor Support.
In: class-wp-document-revisions.php
Filter to switch off use of standard Workflow States taxonomy. For internal use.
In: trait-wp-document-revisions-file-handler.php
Filter whether WP_FileSystem used to serve document (or PHP readfile). Irrelevant if file compressed on output.
In: class-wp-document-revisions-validate-structure.php
Filter whether to validate the document structure for a documrnt.
In: class-wp-document-revisions-validate-structure.php
Filter to switch off md5 format attachment validation.
In: trait-wp-document-revisions-file-handler.php
Allows the RSS feed to be switched off.
In: trait-wp-document-revisions-revisions.php
Filters the locked document email subject text.
In: trait-wp-document-revisions-revisions.php
Filters the locked document email message text.
In: trait-wp-document-revisions-revisions.php
Filters the option to send a locked document override email
In: trait-wp-document-revisions-file-handler.php
Filters the decision to serve the document through WP Document Revisions.