wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi
get_the_modified_author › WordPress Function
Da2.8.0
Deprecaton/a
› get_the_modified_author ( $post = null )
| Parametri: |
|
| Ritorna: |
|
| Definito a: |
|
| Codex: | |
| ChangeLog: |
|
Retrieves the author who last edited the current post.
Funzioni correlate: the_modified_author, get_the_modified_date, get_the_modified_time, get_the_author, the_modified_date
Sorgenti
function get_the_modified_author( $post = null ) {
$post = get_post( $post );
if ( ! $post ) {
return null;
}
$last_id = get_post_meta( $post->ID, '_edit_last', true );
if ( ! $last_id ) {
return null;
}
$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, empty string if user is unavailable.
*/
return apply_filters( 'the_modified_author', $last_user ? $last_user->display_name : '' );
}