wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



get_the_modified_author › WordPress Function

Depuis2.8.0
Dépréciéen/a
get_the_modified_author ( Pas de paramètres )
Retourne:
  • (string|void) The author's display name, empty string if unknown.
Défini(e) dans:
Codex:

Retrieves the author who last edited the current post.



Source

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, empty string if unknown.
		 */
		return apply_filters( 'the_modified_author', $last_user ? $last_user->display_name : '' );
	}
}