如何判断当前浏览页面为微信浏览器-WordPress主题

摘要:大挖最新在开发wordpress程序主题网站是遇到一个特殊的微信端功能处理,需要一段判断微信浏览器的代码,通过搜索后,总…

大挖最新在开发wordpress程序主题网站是遇到一个特殊的微信端功能处理,需要一段判断微信浏览器的代码,通过搜索后,总结得出下面的代码方法,现在分享给大家学习一下,可以用做微信浏览端的独立判断设置,比如二维码关注或是转发类的事件处理

在页面需要使用到的地方,直接用is_wx_browser();进行调用判断即可

来源:http://www.wazhuti.com/960.html

微信公众号
手机浏览(小程序)

Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(): Failed to enable crypto in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_13008.jpg): failed to open stream: operation failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57
0
分享到:
没有账号? 忘记密码?