Making WordPress.org

Opened 10 months ago

Last modified 5 weeks ago

#7177 new enhancement

Allow Seemingly Anonymous forum post Edits

Reported by: ipstenu's profile Ipstenu Owned by:
Milestone: Priority: normal
Component: Support Forums Keywords: has-patch
Cc:

Description

Related to #6839, #5718, #5717

When a post is edited by anyone, it puts in their name and the time.

By default, if the action is done by a moderator and it's NOT their own post, this should show as 'WordPress Moderation Team' instead of the user name, but only to the logged in users.

All other mods and cape wearers should be able to see which Mod did what, for accountability.

Right now, we have a checkbox for 'don't log edit'

I recommend we remove that, and change it to an auto-checked "log edit as anon"

Attachments (2)

Screenshot 2023-08-07 at 4.54.47 pm.png (150.1 KB) - added by dd32 10 months ago.
Screenshot 2023-08-08 at 1.47.51 pm.png (108.8 KB) - added by dd32 10 months ago.

Download all attachments as: .zip

Change History (11)

#1 in reply to: ↑ description @Otto42
10 months ago

Replying to Ipstenu:

Right now, we have a checkbox for 'don't log edit'
I recommend we remove that, and change it to an auto-checked "log edit as anon"

-1. There's no need to log minor edits or adjustments to the topic metadata such as tags.

#2 @Clorith
10 months ago

I'd like to avoid adding another checkbox, there's enough of them as is :)

Perhaps we should instead think about filtering the author of the edits, setting it to the new "Support Moderator" user when viewed by someone without the appropriate capabilities. Doing so would cover existing content as well, which would be a huge bonus.

If tags are an issue, we can add tag-editing to the sidebar for those with the right access, but I think any edit to content, when originally created by another user, should be logged for accountability reasons.

#3 @dd32
10 months ago

-1. There's no need to log minor edits or adjustments

I agree.

Perhaps we should instead think about filtering the author of the edits, setting it to the new "Support Moderator" user when viewed by someone without the appropriate capabilities.

I think this is the better option. I don't think it needs filtering as such, but rather, we can just assume edits made by not-the-post-author are a moderator. Remove the existing log display for non-moderators, change the display to say "edit by post author, edit by moderator" for non-mods.

#4 @dd32
10 months ago

See also: #7178

#5 @dd32
10 months ago

How about something like this?

Leave the edit log as-is for moderator, but for non-mods, simply remove all authorship details for everyone.

Edited by the author is just 'Modified .. ago', edited by the mods are 'Modified ... ago by a moderator.' (I'm open to wording, "WordPress Moderation Team" seems a bit long to me? - Feel free to suggest it via the PR below)

I simplified the string to avoid needing to have topic/reply variants, Including 'by the author' or something seemed irrelevant to me..

https://meta.trac.wordpress.org/raw-attachment/ticket/7177/Screenshot%202023-08-07%20at%204.54.47%20pm.png

Last edited 10 months ago by dd32 (previous) (diff)

This ticket was mentioned in PR #171 on WordPress/wordpress.org by @dd32.


10 months ago
#6

  • Keywords has-patch added

#7 @Ipstenu
10 months ago

-1. There's no need to log minor edits or adjustments to the topic metadata such as tags.

The problem is that it can be abused. Not that I don't trust people to use their better judgement, but if we just log everything then we don't have to worry about some rogue human with a beef. All it takes is one forum mod having the worst day of their life to make a bad edit and try to hide it. We owe that kind of transparency to each other.

Alternatively, we could properly script that if it's ONLY a tag change, it says "XXX removed tags" Or for a title "XXX changed title to..." and now we know exactly what was done.

Leave the edit log as-is for moderator, but for non-mods, simply remove all authorship details for everyone.

That works for me.

Would this also mean though that authors wouldn't see their OWN edits?

Like I write a post and type in public but I forgot the L, so I edit and add it back.

Would I just see "Modified X time ago" and nothing else?

#8 @dd32
10 months ago

Would this also mean though that authors wouldn't see their OWN edits?
Would I just see "Modified X time ago" and nothing else?

With the above, yes. That's part of the simplification of the filtering.

I'm not sure that would be a problem though, but I understand why it might be ideal to specifically tell posters that an edit was them.

There was a "simpler" solution which was to just reassign the ownership of the revisions to the moderator, but that came with it's own problems like https://bbpress.trac.wordpress.org/ticket/3579

Going down that path, it's also possible to use a much lower-level filter, post_author hopefully temporarily until the above ticket is resolved, ie:
https://meta.trac.wordpress.org/raw-attachment/ticket/7177/Screenshot%202023-08-08%20at%201.47.51%20pm.png

I'm not super confident in that filter though, as I'd be concerned about side effects..

add_filter( 'post_author', function( $author, $post_id, $context ) {
	if ( 'display' != $context || is_admin() || current_user_can( 'moderate' ) ) {
		return $author;
	}

	$post = get_post( $post_id );
	if ( 'revision' != $post->post_type || ! $post->post_parent ) {
		return $author;
	}

	$parent = get_post( $post->post_parent );
	if ( ! $parent || ! in_array( $parent->post_type, [ 'reply', 'topic' ] ) ) {
		return $author;
	}

	if ( $author != $parent->post_author ) {
		$author = get_user_by( 'slug', 'moderator')->ID;
	}

	return $author;
}, 10, 3 );

#9 @Ipstenu
10 months ago

I'm not sure that would be a problem though, but I understand why it might be ideal to specifically tell posters that an edit was them.

Yeah my 'worry' has more to do with goldfish memory. I may not remember making an edit and (thus) blame you or a mod on removing something.

We can keep the idea on the back burner, just in case someone tries to use it as PROOF we're editing their posts against their wishes :rolling eyes emoji:

Note: See TracTickets for help on using tickets.