function wp_noexternallinks_parser()
{
$this->load_options();
$this->set_filters();
add_filter('template_redirect',array($this,'Redirect'),1);
if($this->options['debug'])
$this->debug_info("Options: \n".var_export($this->options, true));
}
function Redirect()
{
$goto='';
$p=strpos($_SERVER['REQUEST_URI'],''.$this->options['LINK_SEP'].'/');
if(@$_REQUEST[$this->options['LINK_SEP']])
$goto=$_REQUEST[$this->options['LINK_SEP']];
elseif($p!==FALSE)
$goto=substr($_SERVER['REQUEST_URI'],$p+strlen($this->options['LINK_SEP'])+2);
else
{
$url=$_SERVER['REQUEST_URI'];
$url=explode('/',$url);
if($url[sizeof($url)-2]==$this->options['LINK_SEP'])
$goto=$url[sizeof($url)-1];
}
if(!strpos($goto,'://'))
$goto=str_replace(':/','://',$goto);
if($goto)
$this->redirect2($goto);
}
นี่คือฟังชั่นของ WP No External Links ที่ใช้ goto
เช่น www.เว็บหลัก.com/goto/www.เว็บออก.com
สิ่งที่ต้องการคือ
เอา www.เว็บหลัก.com ออกไป
ให้เหลืองแต่ goto/www.เว็บออก.com
ใครพอแก้ได้บ้างครับ จ้างก็ได้ครับ PM มาหน่อย