WordPress.org

Ready to get started?Download WordPress

Forums

template_rdf not working in 2.2 (4 posts)

  1. rlrr
    Member
    Posted 7 years ago #

    template_rdf() isn't working correctly. Line 242 in comment-template.php:

    if (strpos($_SERVER['HTTP_USER_AGENT'], 'W3C_Validator') !== false) {

    Replacing it with:

    if (!stristr($_SERVER['HTTP_USER_AGENT'], 'W3C_Validator')) {

    fixes the problem.

    Basically it was working the the opposite of what was expected. The trackback code was appearing when trying to validating the page and wasn;t appearing otherwise.

  2. MichaelH
    Member
    Posted 7 years ago #

    Just for clarification, did you have the template tag, trackback_rdf, wrapped in an HTML comment as recommended ?

  3. rlrr
    Member
    Posted 7 years ago #

    Now that you mention it, no (but I will do so, thanks). That would make no difference in what I saw, though.

  4. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    Changing it to:

    if (strpos($_SERVER['HTTP_USER_AGENT'], 'W3C_Validator') == false) {

    Would be slightly faster, in theory.

    Anyway, I put this bug into trac:
    http://trac.wordpress.org/ticket/4390

Topic Closed

This topic has been closed to new replies.

About this Topic