Eclipse Version: Luna Release (4.4.0)Wordpress Version: 3.9
Wordpress文件:wp-includes/function.php第2975 - 2976行
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"<?php if ( is_rtl() ) echo ' dir="rtl"'; ?>>
Eclipse验证器返回两个错误,这是两个重复的HTML标签,没有任何PHP代码或回显。
我应该忽略它还是注释其中一行?
这与这个(关闭为无效)错误有关
总而言之,他们说eclipse验证器不能很好地处理php中的html标签。
从这里你有两个选择。
-
更干净,不那么容易。创建一个PHP工作集来选择性地禁用验证:
参考eclipse文档。为您正在开发的插件/主题创建一个工作集,然后将问题视图中的内容过滤到该工作集。
-
更容易,不那么干净。通过类型:
禁用/软化验证Project -> Properties -> Validation -> HTML Syntax x Enable project specific settings Document Type -> Duplicate DOCTYPE declaration (Change to Warning or Ignore) Element -> Unclosed Start tag (Change to Warning or Ignore)
最后一个是针对wp-includes/media-template.php
中的两个验证错误。
还要记住,有一个wordpress特定的stackexchange web。我还是在这里回答了,因为它可能对eclipse中通用的html/php验证管理有用。