bp_xprofile_filter_user_query_populate_extras (BP_User_Queryuser_query美元,字符串user_ids_sql美元='')
过滤BP_User_Query::populate_extras以覆盖每个查询用户的全名。
描述
参数
- user_query美元
-
(BP_User_Query)(必需)要过滤的用户查询。
- user_ids_sql美元
-
(字符串)(可选)使用的SQL语句。
默认值:“
源
文件:bp-xprofile / bp-xprofile-filters.php
function bp_xprofile_filter_user_query_populate_extras(BP_User_Query $user_query, $user_ids_sql = ") {if (!Bp_is_active ('xprofile')) {return;} $user_id_names = bp_core_get_user_displaynames($user_query->user_ids);//循环每个用户的名字并覆盖每个用户的全名。if (isset($user_id ->results[$user_id])) {$user_query->results[$user_id]->fullname = $user_fullname;}}}
更新日志
版本 | 描述 |
---|---|
BuddyPress 1.7.0 | 介绍了。 |