get_tag_permastruct();
$ss=$wp_rewrite->get_tag_permastruct();
$structure="";
if($ss==false) {
$structure=get_option('siteurl').'/?tag=%tag%';
}else $structure=get_option('siteurl').$ss;
/*
Get post tags
*/
$tags=wp_get_post_tags($id);
$p=$s;
if($tags==null) return $p;
/*
Start replace
*/
$temp=$structure;
foreach($tags as $value){
if($useTe){
$pattern='/(?name.'(?!<\/a>)/';
$replace=''.$value->name.'';
$p=preg_replace($pattern,$replace,$p,$replace_times);
}
else{
$structure=str_replace('%tag%',$value->name,$temp);
if($ss==false){
$pattern='/(?name.'(?!\s*\w*<\/a>)/';
}else{
$pattern='/(?name.'(?!\s*\w*<\/a>)/';
}
$replace=''.$value->name.'';
$p=preg_replace($pattern,$replace,$p,$replace_times);
}
}
return $p;
}
function tag2link_setting_options(){
add_options_page('Tag to Links', 'Tag to Links', 5, 'automatic-tag-link/options.php');
}
?>