Trashed By

Beschreibung

This plugin records which user actually trashed a post, which in a multi-author environment may not always be the original post author. This helps to maintain accountability for who was ultimately responsible for deleting a post. It also records when the post got trashed.

The admin listing of trashed posts is amended with new „Trashed By“ and „Trashed On“ columns that shows the name of the person who trashed the post or page and the date the post was trashed, respectively.

The plugin makes no assumption about who trashed a post, or when, for posts that were trashed prior to the use of this plugin (since the plugin could not have directly recorded information about the post’s trashing). The „Trashed By“ and „Trashed On“ values for those posts will remain empty. Put another way, only posts or pages trashed while this plugin is active will have the user who trashed the post/page and that date recorded.

Links: Plugin Homepage | Plugin Directory Page | GitHub | Author Homepage

Screenshots

  • A screenshot of the admin post trash listing showing the added "Trashed By" and "Trashed On" columns.

Installation

  1. Install via the built-in WordPress plugin installer. Or download and unzip trashed-by.zip inside the plugins directory for your site (typically wp-content/plugins/)
  2. Activate the plugin through the ‚Plugins‘ admin menu in WordPress

FAQ

What if I am only interested in seeing when a post was trashed but not who trashed it?

The visibility of the „Trashed By“ and „Trashed On“ columns can be controlled by the „Screen Options“ slide-down options panel available at the top right of the page when viewing the trash listing in the admin.

If a post is trashed, then restored, and then trashed a second time by a different person, who is noted as the trashing user?

The user most recently responsible for trashing a post will be recorded as the trashing user.

Why are the „Trashed By“ and „Trashed On“ columns blank for some posts in the trash?

This should only be the case for posts that were trashed prior to activating this plugin (or any time when the plugin wasn’t active).

Does the plugin retain any information about a previously trashed post once it has been restored?

No. Once a trashed post is restored and thus removed from the trash, the information about when and who trashed the post is deleted.

Does this plugin track who permanently deleted a posted?

Just so everyone is clear, „Trashed“ and „Permanently deleted“ are two differently things.

Trashed posts get assigned a post status of „trash“ and then only appear in the „Trash“ list of the page/post area of the admin. These posts still exist, they’re just hidden from public view. This operates like the trash feature in your operating system; you can still go into the trash to retrieve something before it is gone for good. As such, it is possible for the plugin to keep track of and report who trashed the post.

Permanently deleted posts (whether done so directly by a user or automatically by WordPress for posts that have been in the trash for a period of time) are completely deleted from the database. This plugin does not track who deleted those posts.

How do I see (or hide) the „Trash By“ and/or „Trashed On“ columns in an admin listing of posts?

In the upper-right of the page is a „Screen Options“ link that reveals a panel of options. In the „Columns“ section, check (to show) or uncheck (to hide) the „Trashed By“ and/or „Trashed On“ options.

Does this plugin include unit tests?

Yes.

Rezensionen

Für dieses Plugin gibt es keine Rezensionen.

Mitwirkende & Entwickler

„Trashed By“ ist Open-Source-Software. Folgende Menschen haben an diesem Plugin mitgewirkt:

Mitwirkende

Übersetze „Trashed By“ in deine Sprache.

Interessiert an der Entwicklung?

Durchstöbere den Code, sieh dir das SVN Repository an oder abonniere das Entwicklungsprotokoll per RSS.

Änderungsprotokoll

1.3 (2020-03-17)

  • New: Add CHANGELOG.md and move all but most recent changelog entries into it
  • New: Add TODO.md and move existing TODO list from top of main plugin file into it (and add more items to the list)
  • New: Add .gitignore file
  • New: Add link to plugin’s page in Plugin Directory to README.md
  • Improve meta key handling:
    • New: Add is_protected_meta() to protect the meta key from being exposed as a custom field
    • Change: Update register_meta() with a proper auth_callback
    • Change: Prefer registering meta via register_post_meta() when available
    • Change: Register meta on init action instead of plugins_loaded
  • Change: Record date post was trashed even if a current user can’t be determined
  • Change: Expose custom field via REST API
  • Change: Omit ‚type‘ attribute for ’style‘ tag
  • Change: Add get_trashed_by() as the renamed replacement for the now-deprecated get_trasher_id()
  • Change: Support a post object or null (for current post) being sent as the argument to get_trashed_by() and get_trashed_on()
  • Change: Prevent object instantiation of the class
  • Change: Remove duplicate hook registrations
  • Change: Allow string „you“ to be translated
  • Unit tests:
    • New: Add more unit tests
    • Change: Update unit test install script and bootstrap to use latest WP unit test repo
    • Change: Add test and data provider for default hooks that should get hooked
    • Change: Allow create_user() to accept an array argument of user attributes
    • Change: Use update_post_meta() within create_user() instead of add_post_meta()
  • Change: Note compatibility through WP 5.3+
  • Change: Drop compatibility with version of WP older than 4.9
  • Change: Tweak plugin description
  • Change: Amend inline docs for get_trashed_by() and get_trashed_on() to indicate that meta values won’t be returned, even if present, if post isn’t in the trash
  • Change: Add inline documentation reference for a filter that originates in WP
  • Change: Split paragraph in README.md’s „Support“ section into two
  • Change: Update copyright date (2020)

1.2 (2018-03-05)

  • Change: (Hardening) Escape attribute before being output within markup
  • Change: Initialize plugin on ‚plugins_loaded‘ action instead of on load
  • Change: Merge do_init() into init()
  • Change: Note compatibility through WP 5.1+
  • Change: Update copyright date (2019)
  • Change: Update License URI to be HTTPS

1.1.1 (2017-12-27)

  • New: Add README.md
  • Change: Add GitHub link to readme
  • Change: Note compatibility through WP 4.9+
  • Change: Update copyright date (2018)
  • Change: Minor code spacing in unit test bootstrap

Full changelog is available in CHANGELOG.md.