Skip to content

Commit

Permalink
Merge pull request #337 from wp-document-revisions/update-pull-reques…
Browse files Browse the repository at this point in the history
…t/readme

Update README
  • Loading branch information
benbalter committed Mar 12, 2024
2 parents e3c6e79 + edd6731 commit ffad4c1
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -606,10 +606,10 @@ The records held in the database will be:

1. Document Record

- post_content contains the id of the latest Document file attachment.
- post_content contains the id of the latest Document file attachment record.
- When a Document file is loaded on editing this Document record, the post_content will be modified to contain the ID of the Attachment record created.
- In plugin versions prior to 3.4, this would simply be the numeric ID.
- Subsequent versions hold this in the form of an HTML comment "<!-- WPDR nnn -->" where nnn is the ID of the attachment. It can also contain a text Document description.
- Subsequent versions hold this in the form of an HTML comment "&lt;!-- WPDR nnn --&gt;" where nnn is the ID of an attachment post. It can also contain a text Document description.
- When editing the post, this field is decomposed into its two parts of ID and description with program management of the former and user management of the latter, recombined automatically when changes are made.

- post_excerpt will contain any comment entered when the document record is updated.
Expand All @@ -628,19 +628,19 @@ There can be multiple Attachment records, one for each Document file loaded.

- When a PDF Document file is loaded, then standard WP processing will attempt to make a JPEG image of the first page as a thumbnail (using all sizes). These will be held in the same directory as the Document file.
- However if the file name is MD5Hash.pdf, then these images will be called MD5Hash-pdf.jpg.
- If used, this would expose the name of the file to the user.
- To avoid this, there is a process to transform this name to another (essentially random) MD5 and rename these files.
- Once done, a postmeta record is created with these new file names (and another postmeta record denoting this process has been done).
- If used on a page, this would expose the name of the file to the user.
- To avoid this, there is a process to transform this name to another (essentially random) MD5 and rename these image files.
- Once done, a postmeta record is created with these new file names (and a field denoting this process has been done).

- If a Featured Image is loaded whilst editing the Document record, this would also have the same post_parent set, so in this case, the post_parent is set to 0.
- If a Featured Image is loaded whilst editing the Document record, this would also have the same post_parent set, so in this case, the post_parent is set to 0 leaving the functional postmeta link to denote the presence of the featured image.

3. Revision Record(s)

When saving a Document Record, standard WP processing will be invoked to detect a change in title, content or excerpt fields. If one is found then a Revision record is created.

There can be multiple Revision records held, one for each saving event where a change in these fields are detected.

Because the content contains the Attachment ID, an upload of a new Document file will create a new Revision.
Because the document content contains the latest Attachment ID, an upload of a revised Document file will create a new document Revision record.


=== WP-Documents-Revisions Filters ===
Expand Down Expand Up @@ -1246,7 +1246,7 @@ Interested in translating WP Document Revisions? You can do so [via Crowdin](htt

= Permissions management =

* [Members Membership & User Role Editor Plugin](https://wordpress.org/plugins/members/)
* [Members Membership & User Role Editor Plugin](https://wordpress.org/plugins/members/)

(Previously called Members)

Expand All @@ -1265,4 +1265,3 @@ Interested in translating WP Document Revisions? You can do so [via Crowdin](htt

(Previously called PublishPress)
* [PublishPress Statuses](https://wordpress.org/plugins/publishpress-statuses/)

0 comments on commit ffad4c1

Please sign in to comment.