📅  最后修改于: 2022-03-11 15:00:49.132000             🧑  作者: Mango
$barcelona_posts = get_posts('cat=59');
$barcelona_author_ids = array();
foreach ( $barcelona_posts as $k => $v ) {
if ( ! in_array( $v->post_author, $barcelona_author_ids ) ) {
$barcelona_author_ids[] = $v->post_author;
}
}
$barcelona_authors = get_users( array(
'fields' => 'ID',
'who' => 'authors',
'order' => 'DESC',
'orderby'=> 'post_count',
'include' => $barcelona_author_ids
) );