Wordpress duplicate HTML tag and Eclipse for php

Eclipse Version: Luna Release (4.4.0) Wordpress Version: 4.7

Wordpress file: wp-includes/function.php Line 2975 - 2976

<!DOCTYPE html> 
<html xmlns="http://www.w3.org/1999/xhtml"<?php if ( is_rtl() ) echo ' dir="rtl"'; ?>>

Eclipse validator returned two errorse those are two duplicate HTML tags opened without any PHP code or echo.

Should I ignore it or comment one line of these?

 

 Answer

up vote 4 down vote accepted

This is related to this (closed as invalid) bug

To sum up, they say eclipse validator doesn't handle well html tags within php.

From here you have two options.

  1. Cleaner, not so easy. Create a PHP working set to selectively disable validation:

    Refer to eclipse docs. Create a working set for the plugin/theme you are developing and then filter the contents in the problems view to that working set.

    It may also help you to focus on the source you are working on.

  2. Easier, not so clean. Disable/soften validation by type:

    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)

    The last one is for two validation errors in wp-includes/media-template.php

Also remember that there is a wordpress specific stackexchange web. I've answered here anyway because it may be useful for general html/php validation management in eclipse.

share improve this answer
 
 
Thanks I understood, so there is no error related to my website, it's a eclipse's validating problem. I think I can just ignore it as doesn't affect anything.  –  D.Shinekhuu   Jul 30 '14 at 13:44  
 
Thanks, I understood  –  Shinkov   Jul 30 '14 at 14:47
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值