WordPress at a glance

get_the_modified_author() WP 1.0

Retrieve the author who last edited the current post.

Is the basis for: the_modified_author()
Works based on: get_post_meta()
✈ 1 time = 0.000051s = very fast | 50000 times = 1.22s = fast PHP 7.0.8, WP 4.6
Hooks from function:
Return

String/null. The author's display name.

Usage

get_the_modified_author();

Code of get_the_modified_author: wp-includes/author-template.php VER 4.9.8

<?php
function get_the_modified_author() {
	if ( $last_id = get_post_meta( get_post()->ID, '_edit_last', true) ) {
		$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 $last_user->display_name The author's display name.
		 */
		return apply_filters('the_modified_author', $last_user->display_name);
	}
}

Related Functions

From category: Other

No comments
    Hello, !     Log In . Register