如何让 WordPress 找到并显示用户正在使用的所有描述?通常,我们网站上的用户会有 2-3 种语言的描述。其他语言的附加描述字段由插件创建(并由我们的编辑手动填写)。目前,另一个插件使用此代码显示用户的主要描述:
$biography = get_the_author_meta( 'description', $user->user_id )
但是,我需要它来提取所有描述字段,例如:
$biography = get_the_author_meta( 'description', $user->user_id ) . $biography = get_the_author_meta( 'description_zh', $user->user_id )
但这很笨拙,而且我不会提前知道该站点将添加多少种语言。我想也许这样的事情可能会奏效,但没有运气:
$biography = get_the_author_meta( 'description.*', $user->user_id )
我是 PHP 新手,所以非常感谢任何帮助!
Helenr