Brought to you by: #ASMW Uber Tracker
';
if (preg_match($asmw_songid_pat, $text, $matches)) {
$text = preg_replace($asmw_songid_pat, $asmw_player, $text);
}
return $text;
}
/* Links */
function asmw_links($str)
{
// find the url
$matches = array();
preg_match('`"http://[-_a-z0-9.]*amiestreet.com[^"]*"`',$str,$matches);
// loop through the matches
if(count($matches) > 0) {
foreach($matches as $k=>$v)
{
$replace = '';
if(strpos($v,'?'))
{
$replace = substr($v,0,strlen($v)-1).'&pytr=asmw"';
}else{
$replace = substr($v,0,strlen($v)-1).'?pytr=asmw"';
}
if(!empty($replace))
{
$str = str_replace($v,$replace,$str);
}
}
}
// return the replaced string
return $str;
}
add_filter('content_save_pre', 'player');
?>