我的WPTouch Worpress插件有这个代码。我尝试添加一些东西,然后删除我添加的东西,现在我收到一个错误。有什么问题?
错误:
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /home/kyfbnews/public_html/wp-content/plugins/wptouch/core/mobile-user-agents.php on line 18
代码:
<?php
/* Smartphones */
global $wptouch_smartphone_list;
$wptouch_smartphone_list = array(
array( 'iPhone' ), // iPhone
array( 'iPod', 'Mobile' ), // iPod touch
array( 'Android', 'Mobile' ), // Android devices
array( 'Opera', 'Mini/7' ), // Opera Mini 7
array( 'BB', 'Mobile Safari' ), // BB10 devices
array( 'BlackBerry', 'Mobile Safari' ), // BB 6, 7 devices
array( 'IEMobile/10', 'Touch' ), // Windows IE 10 touch devices
array( 'IEMobile/11', 'Touch' ), // Windows IE 11 touch devices
array( 'Firefox', 'Mobile' ), // Firefox OS devices
'IEMobile/7.0', // Windows Phone OS 7
'IEMobile/9.0', // Windows Phone OS 9
'webOS' // Palm Pre/Pixi
);
/* Tablets */
global $wptouch_tablet_list;
$wptouch_tablet_list = array(
// Nothing excluded yet
);
/* Matching any of these user-agents will cause WPtouch Pro to be shown for the 'default' theme */
global $wptouch_device_classes;
$wptouch_device_classes[ 'default' ] = $wptouch_smartphone_list;
global $wptouch_exclusion_list;
$wptouch_exclusion_list = $wptouch_tablet_list;
答案 0 :(得分:0)
我没有立即看到问题,所以请尝试返回默认设置,即:
global $wptouch_smartphone_list;
$wptouch_smartphone_list = array(
array( 'iPhone', 'Mobile' ), // iPhone
array( 'iPod', 'Mobile' ), // iPod touch
array( 'Android', 'Mobile' ), // Android devices
array( 'BB', 'Mobile Safari' ), // BB10 devices
array( 'BlackBerry', 'Mobile Safari' ), // BB 6, 7 devices
array( 'IEMobile/10.0', 'Touch' ), // Windows IE 10 touch devices
array( 'Firefox', 'Mobile' ), // Firefox OS devices
'IEMobile/7.0', // Windows Phone OS 7
'IEMobile/9.0', // Windows Phone OS 9
'webOS' // Palm Pre/Pixi
);
如果失败了,那么你还有其他事情要发生。如果成功,请逐个添加新添加的内容,并查看哪一个导致问题。