get_the_modified_author()
get_the_modified_author() 检索上次编辑当前文章的作者。Retrieve the au…
get_the_modified_author()
检索上次编辑当前文章的作者。
Retrieve the author who last edited the current post.
目录锚点:#返回#源码
返回(Return)
(string|void)作者的显示名称。
源码(Source)
/**
* Retrieve the author who last edited the current post.
*
* @since 2.8.0
*
* @return string|void The author's display name.
*/
function get_the_modified_author() {
if ( $last_id = get_post_meta( get_post()->ID, '_edit_last', true) ) {
$last_user = get_userdata($last_id);
/**
* Filter 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);
}
}| 更新版本 | 源码位置 | 使用 | 被使用 |
|---|---|---|---|
| 2.8.0 | wp-includes/author-template.php:90 | 1 function | 5 |
类别:WordPress 函数手册、
本文收集自互联网,转载请注明来源。
如有侵权,请联系 wper_net@163.com 删除。
还没有任何评论,赶紧来占个楼吧!