钩子文档

the_modified_author

💡 云策文档标注

概述

the_modified_author 是一个 WordPress 过滤器钩子,用于修改当前文章最后编辑者的显示名称。它允许开发者自定义或过滤显示名称的输出。

关键要点

  • 过滤器钩子名称:the_modified_author
  • 参数:$display_name(字符串类型),表示作者的显示名称,如果用户不可用则为空字符串
  • 源代码:apply_filters('the_modified_author', $last_user ? $last_user->display_name : '')
  • 相关函数:get_the_modified_author() 用于检索最后编辑者的信息
  • 引入版本:WordPress 2.8.0

📄 原文内容

Filters the display name of the author who last edited the current post.

Parameters

$display_namestring
The author’s display name, empty string if user is unavailable.

Source

return apply_filters( 'the_modified_author', $last_user ? $last_user->display_name : '' );

Changelog

Version Description
2.8.0 Introduced.