get_the_author_{$field}
云策文档标注
概述
这是一个动态过滤器,用于过滤用户元数据的值,其名称基于 get_the_author_meta() 函数中的 $field 参数动态生成。
关键要点
- 过滤器名称是动态的,格式为 get_the_author_{$field},其中 $field 是用户元数据字段名。
- 参数包括 $value(元数据值)、$user_id(用户ID)和 $original_user_id(原始用户ID)。
- 此过滤器与 get_the_author_meta() 函数关联,用于在获取作者元数据时进行自定义处理。
注意事项
- 从 WordPress 4.3.0 版本开始,添加了 $original_user_id 参数。
- 此过滤器自 WordPress 2.8.0 版本引入。
原文内容
Filters the value of the requested user metadata.
Description
The filter name is dynamic and depends on the $field parameter of the function.
Parameters
$valuestring-
The value of the metadata.
$user_idint-
The user ID for the value.
$original_user_idint|false-
The original user ID, as passed to the function.
Source
return apply_filters( "get_the_author_{$field}", $value, $user_id, $original_user_id );