function jhc_seo_title($title,$keys,$id=0){
if(!$keys)return $title;
$kuohao=array('(¨k)','『k』','[¨k]','≤k≥','(¨k)','<¨k>', '《¨k》','<k>','≈k≈',);
$k1=$kuohao[$id % 9];
$k2=$kuohao[($id+1) % 9];
$keyr=explode(',',$keys);
$k1=str_replace('k',$keyr[0],$k1);
$num=count($keyr)-1;
if($num>0){
$k2=str_replace('k',$keyr[1],$k2);
}else{
$k2='';
}
$GLOBALS['jhcnum']=0;
$GLOBALS['jhck1']=$k1;
$GLOBALS['jhck2']=$k2;
$title= preg_replace_callback('#([ !!,,?\?])#ui',
function ($ms){
$GLOBALS['jhcnum']=$GLOBALS['jhcnum']+1;
if($GLOBALS['jhcnum']==1)return $GLOBALS['jhck1'].$ms[0];
if($GLOBALS['jhcnum']==2)return $GLOBALS['jhck2'].$ms[0];
return $ms[0];
},
$title);
if( $GLOBALS['jhcnum']>1)return $title;
if( $GLOBALS['jhcnum']==1)return $title.$k2;
return $k1.$title.$k2;
}
最后更新时间: