WordPress插件 代码高亮插件Pure-Highlightjs(Mac风格)


%title插图%num

%title插图%num

插件使用:wp后台上传安装->启用->设置->Pure highlightjs  选择样式‘Mosheng’然后点击启用即可

演示:(识别电脑或手机访问,跳转指定页面)

<?php

if (isset ($_SERVER['HTTP_USER_AGENT'])) {
  $clientkeywords = array ('nokia',  'sony','ericsson','mot','samsung','htc','sgh','lg','sharp','oppo','sie-','philips','panasonic','alcatel','lenovo','iphone','ipod','blackberry','meizu','android','netfront','symbian','ucweb','windowsce','palm','operamini','operamobi','openwave','nexusone','cldc','midp','wap','mobile'); 

 // 从HTTP_USER_AGENT中查找手机浏览器的关键字
 if (preg_match("/(" . implode('|', $clientkeywords) . ")/i", strtolower($_SERVER['HTTP_USER_AGENT']))){
require_once 'm.php';
}else{
require_once 'pc.php';
}
}else{
echo "未知";
}

 

版权均归原作者所有,请勿使用于商业用途,若侵犯到您的版权,请联系客服删除处理
纸团打包站 » WordPress插件 代码高亮插件Pure-Highlightjs(Mac风格)