例如,如果要构造:
http://example.com/?ref=1,8,22
对于当前子站点的多个管理员,可以尝试以下操作(未测试):
$uids = get_users(
array(
\'blog_id\' => get_current_blog_id(),
\'role\' => \'administrator\',
\'fields\' => \'ID\',
\'order_by\' => \'ID\',
\'order\' => \'ASC\',
)
);
echo $url = add_query_arg(
array( \'ref\' => join( \',\', $uids ) ),
\'http://example.com\'
);