WordPress.org

Ready to get started?Download WordPress

Forums

Digg Digg
Fix to HTML5 validator warning concerning CSS link (1 post)

  1. Dartanjan
    Member
    Posted 1 year ago #

    This isn't something critical, but I noticed there is a Warning on HTML5 validator when DD plugin is used. The warning is:

    Bad value ***plugins/digg-digg/include/../css/diggdigg-style.css?ver=5.2.9 for attribute href on element link: Path component contains a segment /../ not at the beginning of a relative reference, or it contains a /./. These should be removed.

    Function dd_output_css_to_html() (Line 102 of dd-helper.php) writes the CSS link, like so:

    echo '<link rel="stylesheet" href="' . DD_PLUGIN_URL . '../css/diggdigg-style.css?ver=' . DD_VERSION . '" type="text/css" media="screen" />';

    To fix the warning, dirname the DD_PLUGIN_URL constant and remove the '..' like this:

    echo '<link rel="stylesheet" href="' . dirname(DD_PLUGIN_URL) . '/css/diggdigg-style.css?ver=' . DD_VERSION . '" type="text/css" media="screen" />';

    Nothing much, but just in case you want to get rid of that warning :)

    http://wordpress.org/extend/plugins/digg-digg/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic