Server:Server Status

Making the Sociable Plugin W3C Compliant

I noticed my website was not W3C compliant, and in fact it had something like 200 errors. All of them were due to the Sociable plugin declaring each of the links as an "id." An "id" can only be declared once in a document, whereas a "class" can have multiple instances on the page. To fix this, open the file /wp-content/plugins/sociable/sociable.php and change line 839 from this:

//$link .= ' id="'.esc_attr(strtolower(str_replace(" ", "", $sitename))).'" ';

to this:

//$link .= ' class="'.esc_attr(strtolower(str_replace(" ", "", $sitename))).'" ';

Should fix you right up.

Leave a Reply