Sorry it has taken me so long to do this, but I finally dug up the login info and took a look. As best I can tell, this was done as a functions.php file in a child theme. The child theme has the necessary style.css with the header, but that’s the only other file. The functions.php in the child theme creates a ‘taglist’ shortcode, as follows:
<?php
//[filters]
function clean_taglist($field_value){
preg_match_all('/\[.*?\]/',$field_value, $matches);
$tags = '';
foreach($matches as $match_array) {
foreach($match_array as $match_item){
$tags = $tags . trim($match_item) . ',';
}
}
$tagarray = explode(',', $tags);
natcasesort($tagarray);
$tags = implode('; ', array_filter(array_iunique($tagarray)));
$tags = cpfb_add_brackets($tags);
$tags = cpfb_add_social_networking_links($tags);
$tags = cpfb_unlink_fields($tags);
return $tags;
}
//[Array Unique Case Insensitive]
function array_iunique($array) {
return array_intersect_key(
$array,
array_unique(array_map("StrToLower",$array))
);
}
//[taglist field="field-name"]
function taglist_func( $atts ){
$attributes = shortcode_atts( array(
'field' => null,
'brackets' => 'false'
), $atts );
// If no field defined, return error.
if($attributes['field'] == null){
return "Missing required attribute: 'field'.";
}
$allusers = get_users();
$taglist = '';
//For fields requiring brackets (In this install, only one field)
if($attributes['brackets'] == 'true'){
foreach ($allusers as $user) {
$args = array(
'field' => $attributes['field'],
'user_id' => $user->ID
);
$taglist = $taglist . bp_get_profile_field_data($args);
}
$taglist = clean_taglist($taglist);
}else{
//For fields without brackets (all other fields)
foreach ($allusers as $user) {
$args = array(
'field' => $attributes['field'],
'user_id' => $user->ID
);
$taglist = $taglist . bp_get_profile_field_data($args) . ';';
}
$tagarray = explode(';', $taglist);
$tagarray = array_filter(array_iunique($tagarray));
natcasesort($tagarray);
foreach($tagarray as $key => $org){
$tagarray[$key] = trim(xprofile_filter_link_profile_data($org));
}
$taglist = implode('; ', $tagarray);
}
return $taglist;
}
add_shortcode( 'taglist', 'taglist_func' );