That’s really strange. get_the_modified_author()
gets the ID of the user that last edited the post or page.
It queries the table with the post metadata (normally wp_postmeta
if the $table_prefix variable in wp-config.php is wp_
) and looks for the meta_key “_edit_last
” where the meta_value is the user id of the user that made the edit.
If there is no _edit_last
meta_key associated to the post id, the user is UNKNOWN.
Could you please check if for the last post you edited there is an associated meta_key “_edit_last
“?
You could get the information with a database query similar to this one:
SELECT * FROM
wp_postmetaWHERE
post_id= 8313 AND
meta_keyLIKE '%_edit_last%'
changing the post_id to your post_id.
If this doesn’t return a result something weird is happening in the WordPress installation which we can’t solve. If this returns a result like this:
meta_id: 23921
post_id: 8313
meta_key: _edit_last
meta_value: 1
Next would be to look up if there is a user with ID = 1. With something like this:
SELECT * FROM
wp_usersWHERE
ID= 1
If this doesn’t return a result then the user doesn’t exist and our plugin will show it as UKNOWN. If this returns a result next would be to trace the get_the_modified_author()
function to see why it isn’t returning the correct info.
Could you please check this?
Best regards from Spain.`