The editing user is determined by wp_check_post_lock()
, which in turn checks the _edit_lock
postmeta field:
function wp_check_post_lock( $post_id ) { if ( ! $post = get_post( $post_id ) ) { return false; } if ( ! $lock = get_post_meta( $post->ID, '_edit_lock', true ) ) { return false; } $lock = explode( ':', $lock ); $time = $lock[0]; $user = isset( $lock[1] ) ? $lock[1] : get_post_meta( $post->ID, '_edit_last', true ); if ( ! get_userdata( $user ) ) { return false; } /** This filter is documented in wp-admin/includes/ajax-actions.php */ $time_window = apply_filters( 'wp_check_post_lock_window', 150 ); if ( $time && $time > time() - $time_window && $user != get_current_user_id() ) { return $user; } return false;}
You could carefully setup a filter on get_post_metadata
and return another user id (the field contains a string made up of a timestamp and the user id separated by a colon, e.g. 123456789:1
), for example the user id of a custom user with the username "Anonymous".
You might have to put some measures in place to only overwrite it on the overview, so your users don't get surprised by "somebody else is editing this post" alerts when they are entering edit mode (I'm not sure it would happen, but it might), but other than that, I don't think there should be any nasty side effects. Be sure to test it thoroughly before deploying it.