get_the_modified_author

Retrieve the author who last edited the current post.

Description

(string|void) get_the_modified_author(); 

Returns (string|void)

The author's display name.


Usage

  1. if ( !function_exists( 'get_the_modified_author' ) ) { 
  2. require_once ABSPATH . WPINC . '/author-template.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = get_the_modified_author(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/author-template.php  
  1. function get_the_modified_author() { 
  2. if ( $last_id = get_post_meta( get_post()->ID, '_edit_last', true) ) { 
  3. $last_user = get_userdata($last_id); 
  4.  
  5. /** 
  6. * Filters the display name of the author who last edited the current post. 
  7. * @since 2.8.0 
  8. * @param string $last_user->display_name The author's display name. 
  9. */ 
  10. return apply_filters('the_modified_author', $last_user->display_name);