get_the_modified_author()
Retrieve the author who last edited the current post.
Uses: get_post_meta()
Used By: the_modified_author()
1 time — 0.000051 sec (very fast) | 50000 times — 1.22 sec (fast) | PHP 7.0.8, WP 4.6
Hooks from the function
Return
String|null
. The author's display name.
Usage
get_the_modified_author();
Changelog
Since 2.8.0 | Introduced. |
Code of get_the_modified_author() get the modified author WP 5.9.3
function get_the_modified_author() { $last_id = get_post_meta( get_post()->ID, '_edit_last', true ); if ( $last_id ) { $last_user = get_userdata( $last_id ); /** * Filters the display name of the author who last edited the current post. * * @since 2.8.0 * * @param string $display_name The author's display name. */ return apply_filters( 'the_modified_author', $last_user->display_name ); } }