Dynamic text with shortcode

<?php

//Text Shortcode
/** Print Text **/
function wco_print_text($shortcode = false,$term = '',$poss = false){
if($shortcode) ob_start();
if($poss) $extra_text = '&#8217;s'; //Possessive ('s)
$option = get_blog_option(1,'wco_text_' . $term); //Use get_option() for non-multisite
if($option) echo $option . $extra_text;
else echo '**' . strtoupper($term) . $extra_text;
if($shortcode){
$output = ob_get_contents();
ob_end_clean();
return $output;
}
}
/** Shortcode Print Text [wco_text term="location" poss="1"] **/
function wco_shortcode_print_text($atts){
extract(shortcode_atts(array('term' => '','poss' => false),$atts));
return wco_print_text(true,$term,$poss);
}
add_shortcode('wco_text','wco_shortcode_print_text');

?>

User blogs

//Call the function from the members-loop.php file within the members loop
<?php lmc_get_user_blogs(bp_get_member_user_id());?>

//Add to your functions.php file
function lmc_get_user_blogs($user_id){
global $wpdb;

$blog_query = $wpdb->get_results("SELECT blog_id FROM wp_bp_user_blogs
WHERE user_id = $user_id");
if(!$blog_query) return;
else echo bp_member_name() . ''s Blogs:</span>';
foreach($blog_query as $blog){
if($blog->blog_id == 1) continue;
$domain_query = $wpdb->get_results("SELECT domain FROM wp_blogs
WHERE blog_id = $blog->blog_id");
$complete_url = $domain_query[0]->domain;
$pos = strpos($complete_url,'.');
$subdomain = substr_replace($complete_url,"",$pos);
?>
<a class="lmc-blog-link" href="<?php echo 'http://' . $complete_url ?>" title="Visit Blog"><?php echo $subdomain ?></a>
<?php
}
}

WPMU get blog id

function lmc_get_band_description($subdomain){
global $wpdb;
$path = $subdomain . str_replace('http://','.', get_blog_option(1,'siteurl'));
$lmcb_band_id = $wpdb->get_results("SELECT * FROM wp_blogs WHERE domain = '$path'");
echo $lmcb_band_id[0]->blog_id;
}