get_the_modified_author() - WordPress 函数参考中文文档

返回介绍

get_the_modified_author()

发布于 2017-09-11 字数1529 浏览 887 评论 0

get_the_modified_author()

Retrieve the author who last edited the current post.


描述


返回值

(string|void) The author’s display name.


源代码

File: wp-includes/author-template.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);
	}
}

更新日志

Version 描述
2.8.0 Introduced.

相关函数

Uses

  • wp-includes/pluggable.php:
    get_userdata()
  • wp-includes/plugin.php:
    apply_filters()
  • wp-includes/post.php:
    get_post_meta()
  • wp-includes/post.php:
    get_post()
  • wp-includes/author-template.php:
    the_modified_author

Used By

  • wp-includes/author-template.php:
    the_modified_author()

User Contributed Notes

上一篇:get_the_ID()

下一篇:get_the_modified_date()

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

目前还没有任何评论,快来抢沙发吧!